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 ENABLE_JAVAC_SERVER
 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 LIBZIP_CAN_USE_MMAP
 650 LIBDL
 651 LIBM
 652 USE_EXTERNAL_LCMS
 653 LCMS_LIBS
 654 LCMS_CFLAGS
 655 USE_EXTERNAL_LIBZ
 656 USE_EXTERNAL_LIBPNG
 657 PNG_LIBS
 658 PNG_CFLAGS
 659 USE_EXTERNAL_LIBGIF
 660 USE_EXTERNAL_LIBJPEG
 661 LLVM_LIBS
 662 LLVM_LDFLAGS
 663 LLVM_CFLAGS
 664 LLVM_CONFIG
 665 LIBFFI_LIBS
 666 LIBFFI_CFLAGS
 667 ALSA_LIBS
 668 ALSA_CFLAGS
 669 FREETYPE_BUNDLE_LIB_PATH
 670 FREETYPE_LIBS
 671 FREETYPE_CFLAGS
 672 CUPS_CFLAGS
 673 X_EXTRA_LIBS
 674 X_LIBS
 675 X_PRE_LIBS
 676 X_CFLAGS
 677 XMKMF
 678 MSVCP_DLL
 679 MSVCR_DLL
 680 LIBCXX
 681 STATIC_CXX_SETTING
 682 FIXPATH
 683 GCOV_ENABLED
 684 DEBUG_SYMBOL
 685 ZIP_DEBUGINFO_FILES
 686 ENABLE_DEBUG_SYMBOLS
 687 CFLAGS_WARNINGS_ARE_ERRORS
 688 DISABLE_WARNING_PREFIX
 689 HOTSPOT_SET_WARNINGS_AS_ERRORS
 690 WARNINGS_AS_ERRORS
 691 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 692 ZERO_ARCHFLAG
 693 LDFLAGS_TESTEXE
 694 LDFLAGS_TESTLIB
 695 LDFLAGS_CXX_JDK
 696 JDKEXE_LIBS
 697 JDKLIB_LIBS
 698 LDFLAGS_JDKEXE
 699 LDFLAGS_JDKLIB
 700 CXXFLAGS_TESTEXE
 701 CXXFLAGS_TESTLIB
 702 CFLAGS_TESTEXE
 703 CFLAGS_TESTLIB
 704 CXXFLAGS_JDKEXE
 705 CXXFLAGS_JDKLIB
 706 CFLAGS_JDKEXE
 707 CFLAGS_JDKLIB
 708 MACOSX_VERSION_MIN
 709 CXX_O_FLAG_NONE
 710 CXX_O_FLAG_DEBUG
 711 CXX_O_FLAG_NORM
 712 CXX_O_FLAG_HI
 713 CXX_O_FLAG_HIGHEST
 714 C_O_FLAG_NONE
 715 C_O_FLAG_DEBUG
 716 C_O_FLAG_NORM
 717 C_O_FLAG_HI
 718 C_O_FLAG_HIGHEST
 719 CXXFLAGS_DEBUG_SYMBOLS
 720 CFLAGS_DEBUG_SYMBOLS
 721 CXX_FLAG_DEPS
 722 C_FLAG_DEPS
 723 SET_SHARED_LIBRARY_MAPFILE
 724 SET_SHARED_LIBRARY_NAME
 725 SET_SHARED_LIBRARY_ORIGIN
 726 SET_EXECUTABLE_ORIGIN
 727 CXX_FLAG_REORDER
 728 C_FLAG_REORDER
 729 RC_FLAGS
 730 AR_OUT_OPTION
 731 LD_OUT_OPTION
 732 EXE_OUT_OPTION
 733 CC_OUT_OPTION
 734 STRIPFLAGS
 735 ARFLAGS
 736 COMPILER_TARGET_BITS_FLAG
 737 JT_HOME
 738 JTREGEXE
 739 USING_BROKEN_SUSE_LD
 740 PACKAGE_PATH
 741 USE_CLANG
 742 HOTSPOT_LD
 743 HOTSPOT_CXX
 744 HOTSPOT_RC
 745 HOTSPOT_MT
 746 BUILD_LD
 747 BUILD_CXX
 748 BUILD_CC
 749 BUILD_SYSROOT_LDFLAGS
 750 BUILD_SYSROOT_CFLAGS
 751 ac_ct_OBJDUMP
 752 OBJDUMP
 753 ac_ct_OBJCOPY
 754 OBJCOPY
 755 ac_ct_NM
 756 ac_ct_STRIP
 757 GNM
 758 NM
 759 STRIP
 760 MSBUILD
 761 DUMPBIN
 762 RC
 763 MT
 764 LIPO
 765 ac_ct_AR
 766 AR
 767 AS
 768 LDCXX
 769 LD
 770 CXXCPP
 771 CPP
 772 ac_ct_CXX
 773 CXXFLAGS
 774 CXX
 775 ac_ct_PROPER_COMPILER_CXX
 776 PROPER_COMPILER_CXX
 777 TOOLCHAIN_PATH_CXX
 778 POTENTIAL_CXX
 779 OBJEXT
 780 EXEEXT
 781 ac_ct_CC
 782 CPPFLAGS
 783 LDFLAGS
 784 CFLAGS
 785 CC
 786 ac_ct_PROPER_COMPILER_CC
 787 PROPER_COMPILER_CC
 788 TOOLCHAIN_PATH_CC
 789 POTENTIAL_CC
 790 VS_LIB
 791 VS_INCLUDE
 792 VS_PATH
 793 CYGWIN_LINK
 794 SYSROOT_LDFLAGS
 795 SYSROOT_CFLAGS
 796 LEGACY_EXTRA_LDFLAGS
 797 LEGACY_EXTRA_CXXFLAGS
 798 LEGACY_EXTRA_CFLAGS
 799 EXE_SUFFIX
 800 OBJ_SUFFIX
 801 STATIC_LIBRARY
 802 SHARED_LIBRARY
 803 STATIC_LIBRARY_SUFFIX
 804 SHARED_LIBRARY_SUFFIX
 805 LIBRARY_PREFIX
 806 TOOLCHAIN_TYPE
 807 STATIC_BUILD
 808 BUILD_HOTSPOT
 809 HOTSPOT_DIST
 810 BUILD_OUTPUT
 811 JDK_TOPDIR
 812 NASHORN_TOPDIR
 813 HOTSPOT_TOPDIR
 814 JAXWS_TOPDIR
 815 JAXP_TOPDIR
 816 CORBA_TOPDIR
 817 LANGTOOLS_TOPDIR
 818 BOOT_JDK_BITS
 819 JAVAC_FLAGS
 820 BOOT_JDK_SOURCETARGET
 821 JARSIGNER
 822 JAR
 823 JAVAH
 824 JAVAC
 825 JAVA
 826 BOOT_JDK
 827 JAVA_CHECK
 828 JAVAC_CHECK
 829 COOKED_BUILD_NUMBER
 830 JDK_VERSION
 831 COPYRIGHT_YEAR
 832 MACOSX_BUNDLE_ID_BASE
 833 MACOSX_BUNDLE_NAME_BASE
 834 COMPANY_NAME
 835 JDK_RC_PLATFORM_NAME
 836 PRODUCT_SUFFIX
 837 PRODUCT_NAME
 838 LAUNCHER_NAME
 839 MILESTONE
 840 JDK_BUILD_NUMBER
 841 JDK_UPDATE_VERSION
 842 JDK_MICRO_VERSION
 843 JDK_MINOR_VERSION
 844 JDK_MAJOR_VERSION
 845 USER_RELEASE_SUFFIX
 846 COMPRESS_JARS
 847 UNLIMITED_CRYPTO
 848 CACERTS_FILE
 849 TEST_IN_BUILD
 850 BUILD_HEADLESS
 851 SUPPORT_HEADFUL
 852 SUPPORT_HEADLESS
 853 OS_VERSION_MICRO
 854 OS_VERSION_MINOR
 855 OS_VERSION_MAJOR
 856 PKG_CONFIG
 857 BASH_ARGS
 858 SETFILE
 859 CODESIGN
 860 XATTR
 861 DSYMUTIL
 862 IS_GNU_TIME
 863 PATCH
 864 TIME
 865 STAT
 866 HG
 867 READELF
 868 OTOOL
 869 LDD
 870 ZIP
 871 UNZIP
 872 FIND_DELETE
 873 OUTPUT_SYNC
 874 OUTPUT_SYNC_SUPPORTED
 875 CHECK_TOOLSDIR_MAKE
 876 CHECK_TOOLSDIR_GMAKE
 877 CHECK_MAKE
 878 CHECK_GMAKE
 879 MAKE
 880 PKGHANDLER
 881 CONFIGURESUPPORT_OUTPUTDIR
 882 OUTPUT_ROOT
 883 CONF_NAME
 884 SPEC
 885 SDKROOT
 886 XCODEBUILD
 887 BUILD_VARIANT_RELEASE
 888 DEBUG_CLASSFILES
 889 FASTDEBUG
 890 VARIANT
 891 DEBUG_LEVEL
 892 MACOSX_UNIVERSAL
 893 INCLUDE_SA
 894 JVM_VARIANT_CORE
 895 JVM_VARIANT_ZEROSHARK
 896 JVM_VARIANT_ZERO
 897 JVM_VARIANT_KERNEL
 898 JVM_VARIANT_MINIMAL1
 899 JVM_VARIANT_CLIENT
 900 JVM_VARIANT_SERVER
 901 JVM_VARIANTS
 902 JVM_INTERPRETER
 903 JDK_VARIANT
 904 SET_OPENJDK
 905 CANONICAL_TOPDIR
 906 ORIGINAL_TOPDIR
 907 TOPDIR
 908 PATH_SEP
 909 ZERO_ARCHDEF
 910 DEFINE_CROSS_COMPILE_ARCH
 911 LP64
 912 OPENJDK_TARGET_OS_EXPORT_DIR
 913 OPENJDK_TARGET_CPU_JLI_CFLAGS
 914 OPENJDK_TARGET_CPU_OSARCH
 915 OPENJDK_TARGET_CPU_ISADIR
 916 OPENJDK_TARGET_CPU_LIBDIR
 917 OPENJDK_TARGET_CPU_LEGACY_LIB
 918 OPENJDK_TARGET_CPU_LEGACY
 919 REQUIRED_OS_VERSION
 920 REQUIRED_OS_NAME
 921 COMPILE_TYPE
 922 OPENJDK_TARGET_CPU_ENDIAN
 923 OPENJDK_TARGET_CPU_BITS
 924 OPENJDK_TARGET_CPU_ARCH
 925 OPENJDK_TARGET_CPU
 926 OPENJDK_TARGET_OS_ENV
 927 OPENJDK_TARGET_OS_TYPE
 928 OPENJDK_TARGET_OS
 929 OPENJDK_BUILD_CPU_ENDIAN
 930 OPENJDK_BUILD_CPU_BITS
 931 OPENJDK_BUILD_CPU_ARCH
 932 OPENJDK_BUILD_CPU
 933 OPENJDK_BUILD_OS_ENV
 934 OPENJDK_BUILD_OS_TYPE
 935 OPENJDK_BUILD_OS
 936 OPENJDK_BUILD_AUTOCONF_NAME
 937 OPENJDK_TARGET_AUTOCONF_NAME
 938 target_os
 939 target_vendor
 940 target_cpu
 941 target
 942 host_os
 943 host_vendor
 944 host_cpu
 945 host
 946 build_os
 947 build_vendor
 948 build_cpu
 949 build
 950 NICE
 951 CPIO
 952 DF
 953 READLINK
 954 CYGPATH
 955 SED
 956 FGREP
 957 EGREP
 958 GREP
 959 AWK
 960 XARGS
 961 WHICH
 962 WC
 963 UNIQ
 964 UNAME
 965 TR
 966 TOUCH
 967 TEE
 968 TAR
 969 TAIL
 970 SORT
 971 SH
 972 RMDIR
 973 RM
 974 PRINTF
 975 NAWK
 976 MV
 977 MKTEMP
 978 MKDIR
 979 LS
 980 LN
 981 HEAD
 982 FIND
 983 FILE
 984 EXPR
 985 ECHO
 986 DIRNAME
 987 DIFF
 988 DATE
 989 CUT
 990 CP
 991 COMM
 992 CMP
 993 CHMOD
 994 CAT
 995 BASH
 996 BASENAME
 997 DATE_WHEN_CONFIGURED
 998 ORIGINAL_PATH
 999 CONFIGURE_COMMAND_LINE
1000 target_alias
1001 host_alias
1002 build_alias
1003 LIBS
1004 ECHO_T
1005 ECHO_N
1006 ECHO_C
1007 DEFS
1008 mandir
1009 localedir
1010 libdir
1011 psdir
1012 pdfdir
1013 dvidir
1014 htmldir
1015 infodir
1016 docdir
1017 oldincludedir
1018 includedir
1019 localstatedir
1020 sharedstatedir
1021 sysconfdir
1022 datadir
1023 datarootdir
1024 libexecdir
1025 sbindir
1026 bindir
1027 program_transform_name
1028 prefix
1029 exec_prefix
1030 PACKAGE_URL
1031 PACKAGE_BUGREPORT
1032 PACKAGE_STRING
1033 PACKAGE_VERSION
1034 PACKAGE_TARNAME
1035 PACKAGE_NAME
1036 PATH_SEPARATOR
1037 SHELL'
1038 ac_subst_files=''
1039 ac_user_opts='
1040 enable_option_checking
1041 with_target_bits
1042 enable_openjdk_only
1043 with_custom_make_dir
1044 with_jdk_variant
1045 with_jvm_interpreter
1046 with_jvm_variants
1047 enable_debug
1048 with_debug_level
1049 with_devkit
1050 with_sys_root
1051 with_sysroot
1052 with_tools_dir
1053 with_toolchain_path
1054 with_extra_path
1055 with_sdk_name
1056 with_conf_name
1057 with_output_sync
1058 enable_headful
1059 enable_hotspot_test_in_build
1060 with_cacerts_file
1061 enable_unlimited_crypto
1062 with_milestone
1063 with_update_version
1064 with_user_release_suffix
1065 with_build_number
1066 with_copyright_year
1067 with_boot_jdk
1068 with_add_source_root
1069 with_override_source_root
1070 with_adds_and_overrides
1071 with_override_langtools
1072 with_override_corba
1073 with_override_jaxp
1074 with_override_jaxws
1075 with_override_hotspot
1076 with_override_nashorn
1077 with_override_jdk
1078 with_import_hotspot
1079 enable_static_build
1080 with_toolchain_type
1081 with_extra_cflags
1082 with_extra_cxxflags
1083 with_extra_ldflags
1084 with_toolchain_version
1085 with_build_devkit
1086 with_jtreg
1087 enable_warnings_as_errors
1088 enable_debug_symbols
1089 enable_zip_debug_info
1090 with_debug_symbols
1091 enable_native_coverage
1092 with_stdc__lib
1093 with_msvcr_dll
1094 with_msvcp_dll
1095 with_x
1096 with_cups
1097 with_cups_include
1098 with_freetype
1099 with_freetype_include
1100 with_freetype_lib
1101 with_freetype_src
1102 enable_freetype_bundling
1103 with_alsa
1104 with_alsa_include
1105 with_alsa_lib
1106 with_libffi
1107 with_libffi_include
1108 with_libffi_lib
1109 with_libjpeg
1110 with_giflib
1111 with_libpng
1112 with_zlib
1113 with_lcms
1114 with_dxsdk
1115 with_dxsdk_lib
1116 with_dxsdk_include
1117 with_num_cores
1118 with_memory_size
1119 with_jobs
1120 with_boot_jdk_jvmargs
1121 with_sjavac_server_java
1122 enable_sjavac
1123 enable_javac_server
1124 enable_precompiled_headers
1125 enable_ccache
1126 with_ccache_dir
1127 '
1128       ac_precious_vars='build_alias
1129 host_alias
1130 target_alias
1131 BASENAME
1132 BASH
1133 CAT
1134 CHMOD
1135 CMP
1136 COMM
1137 CP
1138 CUT
1139 DATE
1140 DIFF
1141 DIRNAME
1142 ECHO
1143 EXPR
1144 FILE
1145 FIND
1146 HEAD
1147 LN
1148 LS
1149 MKDIR
1150 MKTEMP
1151 MV
1152 NAWK
1153 PRINTF
1154 RM
1155 RMDIR
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 CPIO
1177 NICE
1178 MAKE
1179 UNZIP
1180 ZIP
1181 LDD
1182 OTOOL
1183 READELF
1184 HG
1185 STAT
1186 TIME
1187 PATCH
1188 DSYMUTIL
1189 XATTR
1190 CODESIGN
1191 SETFILE
1192 PKG_CONFIG
1193 JAVA
1194 JAVAC
1195 JAVAH
1196 JAR
1197 JARSIGNER
1198 CC
1199 CFLAGS
1200 LDFLAGS
1201 LIBS
1202 CPPFLAGS
1203 CXX
1204 CXXFLAGS
1205 CCC
1206 CPP
1207 CXXCPP
1208 AS
1209 AR
1210 LIPO
1211 STRIP
1212 NM
1213 GNM
1214 OBJCOPY
1215 OBJDUMP
1216 BUILD_CC
1217 BUILD_CXX
1218 JTREGEXE
1219 XMKMF
1220 FREETYPE_CFLAGS
1221 FREETYPE_LIBS
1222 ALSA_CFLAGS
1223 ALSA_LIBS
1224 LIBFFI_CFLAGS
1225 LIBFFI_LIBS
1226 PNG_CFLAGS
1227 PNG_LIBS
1228 LCMS_CFLAGS
1229 LCMS_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-static-build   enable static library build [disabled]
1860   --disable-warnings-as-errors
1861                           do not consider native warnings to be an error
1862                           [enabled]
1863   --disable-debug-symbols disable generation of debug symbols [enabled]
1864   --disable-zip-debug-info
1865                           disable zipping of debug-info files [enabled]
1866   --enable-native-coverage
1867                           enable native compilation with code coverage
1868                           data[disabled]
1869   --disable-freetype-bundling
1870                           disable bundling of the freetype library with the
1871                           build result [enabled on Windows or when using
1872                           --with-freetype, disabled otherwise]
1873   --enable-sjavac         use sjavac to do fast incremental compiles
1874                           [disabled]
1875   --enable-javac-server   use only the server part of sjavac for faster javac
1876                           compiles [disabled]
1877   --disable-precompiled-headers
1878                           disable using precompiled headers when compiling C++
1879                           [enabled]
1880   --enable-ccache         enable using ccache to speed up recompilations
1881                           [disabled]
1882 
1883 Optional Packages:
1884   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1885   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1886   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1887                           support it), e.g. --with-target-bits=32 [guessed]
1888   --with-custom-make-dir  Deprecated. Option is kept for backwards
1889                           compatibility and is ignored
1890   --with-jdk-variant      JDK variant to build (normal) [normal]
1891   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1892   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1893                           client, minimal1, kernel, zero, zeroshark, core)
1894                           [server]
1895   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1896                           optimized (HotSpot build only)) [release]
1897   --with-devkit           use this devkit for compilers, tools and resources
1898   --with-sys-root         alias for --with-sysroot for backwards compatability
1899   --with-sysroot          use this directory as sysroot
1900   --with-tools-dir        alias for --with-toolchain-path for backwards
1901                           compatibility
1902   --with-toolchain-path   prepend these directories when searching for
1903                           toolchain binaries (compilers etc)
1904   --with-extra-path       prepend these directories to the default path
1905   --with-sdk-name         use the platform SDK of the given name. [macosx]
1906   --with-conf-name        use this as the name of the configuration [generated
1907                           from important configuration options]
1908   --with-output-sync      set make output sync type if supported by make.
1909                           [recurse]
1910   --with-cacerts-file     specify alternative cacerts file
1911   --with-milestone        Set milestone value for build [internal]
1912   --with-update-version   Set update version value for build [b00]
1913   --with-user-release-suffix
1914                           Add a custom string to the version string if build
1915                           number is not set.[username_builddateb00]
1916   --with-build-number     Set build number value for build [b00]
1917   --with-copyright-year   Set copyright year value for build [current year]
1918   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1919   --with-add-source-root  Deprecated. Option is kept for backwards
1920                           compatibility and is ignored
1921   --with-override-source-root
1922                           Deprecated. Option is kept for backwards
1923                           compatibility and is ignored
1924   --with-adds-and-overrides
1925                           Deprecated. Option is kept for backwards
1926                           compatibility and is ignored
1927   --with-override-langtools
1928                           Deprecated. Option is kept for backwards
1929                           compatibility and is ignored
1930   --with-override-corba   Deprecated. Option is kept for backwards
1931                           compatibility and is ignored
1932   --with-override-jaxp    Deprecated. Option is kept for backwards
1933                           compatibility and is ignored
1934   --with-override-jaxws   Deprecated. Option is kept for backwards
1935                           compatibility and is ignored
1936   --with-override-hotspot Deprecated. Option is kept for backwards
1937                           compatibility and is ignored
1938   --with-override-nashorn Deprecated. Option is kept for backwards
1939                           compatibility and is ignored
1940   --with-override-jdk     Deprecated. Option is kept for backwards
1941                           compatibility and is ignored
1942   --with-import-hotspot   import hotspot binaries from this jdk image or
1943                           hotspot build dist dir instead of building from
1944                           source
1945   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1946                           to show possible values [platform dependent]
1947   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1948   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1949   --with-extra-ldflags    extra flags to be used when linking jdk
1950   --with-toolchain-version
1951                           the version of the toolchain to look for, use
1952                           '--help' to show possible values [platform
1953                           dependent]
1954   --with-build-devkit     Devkit to use for the build platform toolchain
1955   --with-jtreg            Regression Test Harness [probed]
1956   --with-debug-symbols    set the debug symbol configuration (none, internal,
1957                           external, zipped) [zipped]
1958   --with-stdc++lib=<static>,<dynamic>,<default>
1959                           force linking of the C++ runtime on Linux to either
1960                           static or dynamic, default is static with dynamic as
1961                           fallback
1962   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1963                           (Windows only) [probed]
1964   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1965                           (Windows only) [probed]
1966   --with-x                use the X Window System
1967   --with-cups             specify prefix directory for the cups package
1968                           (expecting the headers under PATH/include)
1969   --with-cups-include     specify directory for the cups include files
1970   --with-freetype         specify prefix directory for the freetype package
1971                           (expecting the libraries under PATH/lib and the
1972                           headers under PATH/include)
1973   --with-freetype-include specify directory for the freetype include files
1974   --with-freetype-lib     specify directory for the freetype library
1975   --with-freetype-src     specify directory with freetype sources to
1976                           automatically build the library (experimental,
1977                           Windows-only)
1978   --with-alsa             specify prefix directory for the alsa package
1979                           (expecting the libraries under PATH/lib and the
1980                           headers under PATH/include)
1981   --with-alsa-include     specify directory for the alsa include files
1982   --with-alsa-lib         specify directory for the alsa library
1983   --with-libffi           specify prefix directory for the libffi package
1984                           (expecting the libraries under PATH/lib and the
1985                           headers under PATH/include)
1986   --with-libffi-include   specify directory for the libffi include files
1987   --with-libffi-lib       specify directory for the libffi library
1988   --with-libjpeg          use libjpeg from build system or OpenJDK source
1989                           (system, bundled) [bundled]
1990   --with-giflib           use giflib from build system or OpenJDK source
1991                           (system, bundled) [bundled]
1992   --with-libpng           use libpng from build system or OpenJDK source
1993                           (system, bundled) [bundled]
1994   --with-zlib             use zlib from build system or OpenJDK source
1995                           (system, bundled) [bundled]
1996   --with-lcms             use lcms2 from build system or OpenJDK source
1997                           (system, bundled) [bundled]
1998   --with-dxsdk            Deprecated. Option is kept for backwards
1999                           compatibility and is ignored
2000   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2001                           compatibility and is ignored
2002   --with-dxsdk-include    Deprecated. Option is kept for backwards
2003                           compatibility and is ignored
2004   --with-num-cores        number of cores in the build system, e.g.
2005                           --with-num-cores=8 [probed]
2006   --with-memory-size      memory (in MB) available in the build system, e.g.
2007                           --with-memory-size=1024 [probed]
2008   --with-jobs             number of parallel jobs to let make run [calculated
2009                           based on cores and memory]
2010   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2011                           invocations of boot JDK, overriding the default
2012                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2013                           -enableassertions"
2014   --with-sjavac-server-java
2015                           use this java binary for running the sjavac
2016                           background server [Boot JDK java]
2017   --with-ccache-dir       where to store ccache files [~/.ccache]
2018 
2019 Some influential environment variables:
2020   BASENAME    Override default value for BASENAME
2021   BASH        Override default value for BASH
2022   CAT         Override default value for CAT
2023   CHMOD       Override default value for CHMOD
2024   CMP         Override default value for CMP
2025   COMM        Override default value for COMM
2026   CP          Override default value for CP
2027   CUT         Override default value for CUT
2028   DATE        Override default value for DATE
2029   DIFF        Override default value for DIFF
2030   DIRNAME     Override default value for DIRNAME
2031   ECHO        Override default value for ECHO
2032   EXPR        Override default value for EXPR
2033   FILE        Override default value for FILE
2034   FIND        Override default value for FIND
2035   HEAD        Override default value for HEAD
2036   LN          Override default value for LN
2037   LS          Override default value for LS
2038   MKDIR       Override default value for MKDIR
2039   MKTEMP      Override default value for MKTEMP
2040   MV          Override default value for MV
2041   NAWK        Override default value for NAWK
2042   PRINTF      Override default value for PRINTF
2043   RM          Override default value for RM
2044   RMDIR       Override default value for RMDIR
2045   SH          Override default value for SH
2046   SORT        Override default value for SORT
2047   TAIL        Override default value for TAIL
2048   TAR         Override default value for TAR
2049   TEE         Override default value for TEE
2050   TOUCH       Override default value for TOUCH
2051   TR          Override default value for TR
2052   UNAME       Override default value for UNAME
2053   UNIQ        Override default value for UNIQ
2054   WC          Override default value for WC
2055   WHICH       Override default value for WHICH
2056   XARGS       Override default value for XARGS
2057   AWK         Override default value for AWK
2058   GREP        Override default value for GREP
2059   EGREP       Override default value for EGREP
2060   FGREP       Override default value for FGREP
2061   SED         Override default value for SED
2062   CYGPATH     Override default value for CYGPATH
2063   READLINK    Override default value for READLINK
2064   DF          Override default value for DF
2065   CPIO        Override default value for CPIO
2066   NICE        Override default value for NICE
2067   MAKE        Override default value for MAKE
2068   UNZIP       Override default value for UNZIP
2069   ZIP         Override default value for ZIP
2070   LDD         Override default value for LDD
2071   OTOOL       Override default value for OTOOL
2072   READELF     Override default value for READELF
2073   HG          Override default value for HG
2074   STAT        Override default value for STAT
2075   TIME        Override default value for TIME
2076   PATCH       Override default value for PATCH
2077   DSYMUTIL    Override default value for DSYMUTIL
2078   XATTR       Override default value for XATTR
2079   CODESIGN    Override default value for CODESIGN
2080   SETFILE     Override default value for SETFILE
2081   PKG_CONFIG  path to pkg-config utility
2082   JAVA        Override default value for JAVA
2083   JAVAC       Override default value for JAVAC
2084   JAVAH       Override default value for JAVAH
2085   JAR         Override default value for JAR
2086   JARSIGNER   Override default value for JARSIGNER
2087   CC          C compiler command
2088   CFLAGS      C compiler flags
2089   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2090               nonstandard directory <lib dir>
2091   LIBS        libraries to pass to the linker, e.g. -l<library>
2092   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2093               you have headers in a nonstandard directory <include dir>
2094   CXX         C++ compiler command
2095   CXXFLAGS    C++ compiler flags
2096   CPP         C preprocessor
2097   CXXCPP      C++ preprocessor
2098   AS          Override default value for AS
2099   AR          Override default value for AR
2100   LIPO        Override default value for LIPO
2101   STRIP       Override default value for STRIP
2102   NM          Override default value for NM
2103   GNM         Override default value for GNM
2104   OBJCOPY     Override default value for OBJCOPY
2105   OBJDUMP     Override default value for OBJDUMP
2106   BUILD_CC    Override default value for BUILD_CC
2107   BUILD_CXX   Override default value for BUILD_CXX
2108   JTREGEXE    Override default value for JTREGEXE
2109   XMKMF       Path to xmkmf, Makefile generator for X Window System
2110   FREETYPE_CFLAGS
2111               C compiler flags for FREETYPE, overriding pkg-config
2112   FREETYPE_LIBS
2113               linker flags for FREETYPE, overriding pkg-config
2114   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2115   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2116   LIBFFI_CFLAGS
2117               C compiler flags for LIBFFI, overriding pkg-config
2118   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2119   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2120   PNG_LIBS    linker flags for PNG, overriding pkg-config
2121   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2122   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2123   CCACHE      Override default value for CCACHE
2124 
2125 Use these variables to override the choices made by `configure' or to help
2126 it to find libraries and programs with nonstandard names/locations.
2127 
2128 Report bugs to <build-dev@openjdk.java.net>.
2129 OpenJDK home page: <http://openjdk.java.net>.
2130 _ACEOF
2131 ac_status=$?
2132 fi
2133 
2134 if test "$ac_init_help" = "recursive"; then
2135   # If there are subdirs, report their specific --help.
2136   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2137     test -d "$ac_dir" ||
2138       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2139       continue
2140     ac_builddir=.
2141 
2142 case "$ac_dir" in
2143 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2144 *)
2145   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2146   # A ".." for each directory in $ac_dir_suffix.
2147   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2148   case $ac_top_builddir_sub in
2149   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2150   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2151   esac ;;
2152 esac
2153 ac_abs_top_builddir=$ac_pwd
2154 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2155 # for backward compatibility:
2156 ac_top_builddir=$ac_top_build_prefix
2157 
2158 case $srcdir in
2159   .)  # We are building in place.
2160     ac_srcdir=.
2161     ac_top_srcdir=$ac_top_builddir_sub
2162     ac_abs_top_srcdir=$ac_pwd ;;
2163   [\\/]* | ?:[\\/]* )  # Absolute name.
2164     ac_srcdir=$srcdir$ac_dir_suffix;
2165     ac_top_srcdir=$srcdir
2166     ac_abs_top_srcdir=$srcdir ;;
2167   *) # Relative name.
2168     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2169     ac_top_srcdir=$ac_top_build_prefix$srcdir
2170     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2171 esac
2172 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2173 
2174     cd "$ac_dir" || { ac_status=$?; continue; }
2175     # Check for guested configure.
2176     if test -f "$ac_srcdir/configure.gnu"; then
2177       echo &&
2178       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2179     elif test -f "$ac_srcdir/configure"; then
2180       echo &&
2181       $SHELL "$ac_srcdir/configure" --help=recursive
2182     else
2183       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2184     fi || ac_status=$?
2185     cd "$ac_pwd" || { ac_status=$?; break; }
2186   done
2187 fi
2188 
2189 test -n "$ac_init_help" && exit $ac_status
2190 if $ac_init_version; then
2191   cat <<\_ACEOF
2192 OpenJDK configure jdk9
2193 generated by GNU Autoconf 2.69
2194 
2195 Copyright (C) 2012 Free Software Foundation, Inc.
2196 This configure script is free software; the Free Software Foundation
2197 gives unlimited permission to copy, distribute and modify it.
2198 _ACEOF
2199   exit
2200 fi
2201 
2202 ## ------------------------ ##
2203 ## Autoconf initialization. ##
2204 ## ------------------------ ##
2205 
2206 # ac_fn_c_try_compile LINENO
2207 # --------------------------
2208 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2209 ac_fn_c_try_compile ()
2210 {
2211   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2212   rm -f conftest.$ac_objext
2213   if { { ac_try="$ac_compile"
2214 case "(($ac_try" in
2215   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2216   *) ac_try_echo=$ac_try;;
2217 esac
2218 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2219 $as_echo "$ac_try_echo"; } >&5
2220   (eval "$ac_compile") 2>conftest.err
2221   ac_status=$?
2222   if test -s conftest.err; then
2223     grep -v '^ *+' conftest.err >conftest.er1
2224     cat conftest.er1 >&5
2225     mv -f conftest.er1 conftest.err
2226   fi
2227   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2228   test $ac_status = 0; } && {
2229          test -z "$ac_c_werror_flag" ||
2230          test ! -s conftest.err
2231        } && test -s conftest.$ac_objext; then :
2232   ac_retval=0
2233 else
2234   $as_echo "$as_me: failed program was:" >&5
2235 sed 's/^/| /' conftest.$ac_ext >&5
2236 
2237         ac_retval=1
2238 fi
2239   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2240   as_fn_set_status $ac_retval
2241 
2242 } # ac_fn_c_try_compile
2243 
2244 # ac_fn_cxx_try_compile LINENO
2245 # ----------------------------
2246 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2247 ac_fn_cxx_try_compile ()
2248 {
2249   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2250   rm -f conftest.$ac_objext
2251   if { { ac_try="$ac_compile"
2252 case "(($ac_try" in
2253   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2254   *) ac_try_echo=$ac_try;;
2255 esac
2256 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2257 $as_echo "$ac_try_echo"; } >&5
2258   (eval "$ac_compile") 2>conftest.err
2259   ac_status=$?
2260   if test -s conftest.err; then
2261     grep -v '^ *+' conftest.err >conftest.er1
2262     cat conftest.er1 >&5
2263     mv -f conftest.er1 conftest.err
2264   fi
2265   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2266   test $ac_status = 0; } && {
2267          test -z "$ac_cxx_werror_flag" ||
2268          test ! -s conftest.err
2269        } && test -s conftest.$ac_objext; then :
2270   ac_retval=0
2271 else
2272   $as_echo "$as_me: failed program was:" >&5
2273 sed 's/^/| /' conftest.$ac_ext >&5
2274 
2275         ac_retval=1
2276 fi
2277   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2278   as_fn_set_status $ac_retval
2279 
2280 } # ac_fn_cxx_try_compile
2281 
2282 # ac_fn_c_try_cpp LINENO
2283 # ----------------------
2284 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2285 ac_fn_c_try_cpp ()
2286 {
2287   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2288   if { { ac_try="$ac_cpp conftest.$ac_ext"
2289 case "(($ac_try" in
2290   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2291   *) ac_try_echo=$ac_try;;
2292 esac
2293 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2294 $as_echo "$ac_try_echo"; } >&5
2295   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2296   ac_status=$?
2297   if test -s conftest.err; then
2298     grep -v '^ *+' conftest.err >conftest.er1
2299     cat conftest.er1 >&5
2300     mv -f conftest.er1 conftest.err
2301   fi
2302   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2303   test $ac_status = 0; } > conftest.i && {
2304          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2305          test ! -s conftest.err
2306        }; then :
2307   ac_retval=0
2308 else
2309   $as_echo "$as_me: failed program was:" >&5
2310 sed 's/^/| /' conftest.$ac_ext >&5
2311 
2312     ac_retval=1
2313 fi
2314   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2315   as_fn_set_status $ac_retval
2316 
2317 } # ac_fn_c_try_cpp
2318 
2319 # ac_fn_cxx_try_cpp LINENO
2320 # ------------------------
2321 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2322 ac_fn_cxx_try_cpp ()
2323 {
2324   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2325   if { { ac_try="$ac_cpp conftest.$ac_ext"
2326 case "(($ac_try" in
2327   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2328   *) ac_try_echo=$ac_try;;
2329 esac
2330 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2331 $as_echo "$ac_try_echo"; } >&5
2332   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2333   ac_status=$?
2334   if test -s conftest.err; then
2335     grep -v '^ *+' conftest.err >conftest.er1
2336     cat conftest.er1 >&5
2337     mv -f conftest.er1 conftest.err
2338   fi
2339   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2340   test $ac_status = 0; } > conftest.i && {
2341          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2342          test ! -s conftest.err
2343        }; then :
2344   ac_retval=0
2345 else
2346   $as_echo "$as_me: failed program was:" >&5
2347 sed 's/^/| /' conftest.$ac_ext >&5
2348 
2349     ac_retval=1
2350 fi
2351   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2352   as_fn_set_status $ac_retval
2353 
2354 } # ac_fn_cxx_try_cpp
2355 
2356 # ac_fn_c_try_link LINENO
2357 # -----------------------
2358 # Try to link conftest.$ac_ext, and return whether this succeeded.
2359 ac_fn_c_try_link ()
2360 {
2361   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2362   rm -f conftest.$ac_objext conftest$ac_exeext
2363   if { { ac_try="$ac_link"
2364 case "(($ac_try" in
2365   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2366   *) ac_try_echo=$ac_try;;
2367 esac
2368 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2369 $as_echo "$ac_try_echo"; } >&5
2370   (eval "$ac_link") 2>conftest.err
2371   ac_status=$?
2372   if test -s conftest.err; then
2373     grep -v '^ *+' conftest.err >conftest.er1
2374     cat conftest.er1 >&5
2375     mv -f conftest.er1 conftest.err
2376   fi
2377   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2378   test $ac_status = 0; } && {
2379          test -z "$ac_c_werror_flag" ||
2380          test ! -s conftest.err
2381        } && test -s conftest$ac_exeext && {
2382          test "$cross_compiling" = yes ||
2383          test -x conftest$ac_exeext
2384        }; then :
2385   ac_retval=0
2386 else
2387   $as_echo "$as_me: failed program was:" >&5
2388 sed 's/^/| /' conftest.$ac_ext >&5
2389 
2390         ac_retval=1
2391 fi
2392   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2393   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2394   # interfere with the next link command; also delete a directory that is
2395   # left behind by Apple's compiler.  We do this before executing the actions.
2396   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2397   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2398   as_fn_set_status $ac_retval
2399 
2400 } # ac_fn_c_try_link
2401 
2402 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2403 # ---------------------------------------------------------
2404 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2405 # the include files in INCLUDES and setting the cache variable VAR
2406 # accordingly.
2407 ac_fn_cxx_check_header_mongrel ()
2408 {
2409   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2410   if eval \${$3+:} false; then :
2411   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2412 $as_echo_n "checking for $2... " >&6; }
2413 if eval \${$3+:} false; then :
2414   $as_echo_n "(cached) " >&6
2415 fi
2416 eval ac_res=\$$3
2417                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2418 $as_echo "$ac_res" >&6; }
2419 else
2420   # Is the header compilable?
2421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2422 $as_echo_n "checking $2 usability... " >&6; }
2423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2424 /* end confdefs.h.  */
2425 $4
2426 #include <$2>
2427 _ACEOF
2428 if ac_fn_cxx_try_compile "$LINENO"; then :
2429   ac_header_compiler=yes
2430 else
2431   ac_header_compiler=no
2432 fi
2433 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2435 $as_echo "$ac_header_compiler" >&6; }
2436 
2437 # Is the header present?
2438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2439 $as_echo_n "checking $2 presence... " >&6; }
2440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2441 /* end confdefs.h.  */
2442 #include <$2>
2443 _ACEOF
2444 if ac_fn_cxx_try_cpp "$LINENO"; then :
2445   ac_header_preproc=yes
2446 else
2447   ac_header_preproc=no
2448 fi
2449 rm -f conftest.err conftest.i conftest.$ac_ext
2450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2451 $as_echo "$ac_header_preproc" >&6; }
2452 
2453 # So?  What about this header?
2454 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2455   yes:no: )
2456     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2457 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2458     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2459 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2460     ;;
2461   no:yes:* )
2462     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2463 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2464     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2465 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2466     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2467 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2468     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2469 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2470     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2471 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2472 ( $as_echo "## ----------------------------------------- ##
2473 ## Report this to build-dev@openjdk.java.net ##
2474 ## ----------------------------------------- ##"
2475      ) | sed "s/^/$as_me: WARNING:     /" >&2
2476     ;;
2477 esac
2478   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2479 $as_echo_n "checking for $2... " >&6; }
2480 if eval \${$3+:} false; then :
2481   $as_echo_n "(cached) " >&6
2482 else
2483   eval "$3=\$ac_header_compiler"
2484 fi
2485 eval ac_res=\$$3
2486                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2487 $as_echo "$ac_res" >&6; }
2488 fi
2489   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2490 
2491 } # ac_fn_cxx_check_header_mongrel
2492 
2493 # ac_fn_cxx_try_run LINENO
2494 # ------------------------
2495 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2496 # that executables *can* be run.
2497 ac_fn_cxx_try_run ()
2498 {
2499   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2500   if { { ac_try="$ac_link"
2501 case "(($ac_try" in
2502   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2503   *) ac_try_echo=$ac_try;;
2504 esac
2505 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2506 $as_echo "$ac_try_echo"; } >&5
2507   (eval "$ac_link") 2>&5
2508   ac_status=$?
2509   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2510   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2511   { { case "(($ac_try" in
2512   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2513   *) ac_try_echo=$ac_try;;
2514 esac
2515 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2516 $as_echo "$ac_try_echo"; } >&5
2517   (eval "$ac_try") 2>&5
2518   ac_status=$?
2519   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2520   test $ac_status = 0; }; }; then :
2521   ac_retval=0
2522 else
2523   $as_echo "$as_me: program exited with status $ac_status" >&5
2524        $as_echo "$as_me: failed program was:" >&5
2525 sed 's/^/| /' conftest.$ac_ext >&5
2526 
2527        ac_retval=$ac_status
2528 fi
2529   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2530   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2531   as_fn_set_status $ac_retval
2532 
2533 } # ac_fn_cxx_try_run
2534 
2535 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2536 # ---------------------------------------------------------
2537 # Tests whether HEADER exists and can be compiled using the include files in
2538 # INCLUDES, setting the cache variable VAR accordingly.
2539 ac_fn_cxx_check_header_compile ()
2540 {
2541   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2542   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2543 $as_echo_n "checking for $2... " >&6; }
2544 if eval \${$3+:} false; then :
2545   $as_echo_n "(cached) " >&6
2546 else
2547   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2548 /* end confdefs.h.  */
2549 $4
2550 #include <$2>
2551 _ACEOF
2552 if ac_fn_cxx_try_compile "$LINENO"; then :
2553   eval "$3=yes"
2554 else
2555   eval "$3=no"
2556 fi
2557 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2558 fi
2559 eval ac_res=\$$3
2560                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2561 $as_echo "$ac_res" >&6; }
2562   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2563 
2564 } # ac_fn_cxx_check_header_compile
2565 
2566 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2567 # ----------------------------------------------
2568 # Tries to find the compile-time value of EXPR in a program that includes
2569 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2570 # computed
2571 ac_fn_cxx_compute_int ()
2572 {
2573   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2574   if test "$cross_compiling" = yes; then
2575     # Depending upon the size, compute the lo and hi bounds.
2576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2577 /* end confdefs.h.  */
2578 $4
2579 int
2580 main ()
2581 {
2582 static int test_array [1 - 2 * !(($2) >= 0)];
2583 test_array [0] = 0;
2584 return test_array [0];
2585 
2586   ;
2587   return 0;
2588 }
2589 _ACEOF
2590 if ac_fn_cxx_try_compile "$LINENO"; then :
2591   ac_lo=0 ac_mid=0
2592   while :; do
2593     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2594 /* end confdefs.h.  */
2595 $4
2596 int
2597 main ()
2598 {
2599 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2600 test_array [0] = 0;
2601 return test_array [0];
2602 
2603   ;
2604   return 0;
2605 }
2606 _ACEOF
2607 if ac_fn_cxx_try_compile "$LINENO"; then :
2608   ac_hi=$ac_mid; break
2609 else
2610   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2611                         if test $ac_lo -le $ac_mid; then
2612                           ac_lo= ac_hi=
2613                           break
2614                         fi
2615                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2616 fi
2617 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2618   done
2619 else
2620   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2621 /* end confdefs.h.  */
2622 $4
2623 int
2624 main ()
2625 {
2626 static int test_array [1 - 2 * !(($2) < 0)];
2627 test_array [0] = 0;
2628 return test_array [0];
2629 
2630   ;
2631   return 0;
2632 }
2633 _ACEOF
2634 if ac_fn_cxx_try_compile "$LINENO"; then :
2635   ac_hi=-1 ac_mid=-1
2636   while :; do
2637     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2638 /* end confdefs.h.  */
2639 $4
2640 int
2641 main ()
2642 {
2643 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2644 test_array [0] = 0;
2645 return test_array [0];
2646 
2647   ;
2648   return 0;
2649 }
2650 _ACEOF
2651 if ac_fn_cxx_try_compile "$LINENO"; then :
2652   ac_lo=$ac_mid; break
2653 else
2654   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2655                         if test $ac_mid -le $ac_hi; then
2656                           ac_lo= ac_hi=
2657                           break
2658                         fi
2659                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2660 fi
2661 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2662   done
2663 else
2664   ac_lo= ac_hi=
2665 fi
2666 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2667 fi
2668 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2669 # Binary search between lo and hi bounds.
2670 while test "x$ac_lo" != "x$ac_hi"; do
2671   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2672   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2673 /* end confdefs.h.  */
2674 $4
2675 int
2676 main ()
2677 {
2678 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2679 test_array [0] = 0;
2680 return test_array [0];
2681 
2682   ;
2683   return 0;
2684 }
2685 _ACEOF
2686 if ac_fn_cxx_try_compile "$LINENO"; then :
2687   ac_hi=$ac_mid
2688 else
2689   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2690 fi
2691 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2692 done
2693 case $ac_lo in #((
2694 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2695 '') ac_retval=1 ;;
2696 esac
2697   else
2698     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2699 /* end confdefs.h.  */
2700 $4
2701 static long int longval () { return $2; }
2702 static unsigned long int ulongval () { return $2; }
2703 #include <stdio.h>
2704 #include <stdlib.h>
2705 int
2706 main ()
2707 {
2708 
2709   FILE *f = fopen ("conftest.val", "w");
2710   if (! f)
2711     return 1;
2712   if (($2) < 0)
2713     {
2714       long int i = longval ();
2715       if (i != ($2))
2716         return 1;
2717       fprintf (f, "%ld", i);
2718     }
2719   else
2720     {
2721       unsigned long int i = ulongval ();
2722       if (i != ($2))
2723         return 1;
2724       fprintf (f, "%lu", i);
2725     }
2726   /* Do not output a trailing newline, as this causes \r\n confusion
2727      on some platforms.  */
2728   return ferror (f) || fclose (f) != 0;
2729 
2730   ;
2731   return 0;
2732 }
2733 _ACEOF
2734 if ac_fn_cxx_try_run "$LINENO"; then :
2735   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2736 else
2737   ac_retval=1
2738 fi
2739 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2740   conftest.$ac_objext conftest.beam conftest.$ac_ext
2741 rm -f conftest.val
2742 
2743   fi
2744   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2745   as_fn_set_status $ac_retval
2746 
2747 } # ac_fn_cxx_compute_int
2748 
2749 # ac_fn_cxx_try_link LINENO
2750 # -------------------------
2751 # Try to link conftest.$ac_ext, and return whether this succeeded.
2752 ac_fn_cxx_try_link ()
2753 {
2754   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2755   rm -f conftest.$ac_objext conftest$ac_exeext
2756   if { { ac_try="$ac_link"
2757 case "(($ac_try" in
2758   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2759   *) ac_try_echo=$ac_try;;
2760 esac
2761 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2762 $as_echo "$ac_try_echo"; } >&5
2763   (eval "$ac_link") 2>conftest.err
2764   ac_status=$?
2765   if test -s conftest.err; then
2766     grep -v '^ *+' conftest.err >conftest.er1
2767     cat conftest.er1 >&5
2768     mv -f conftest.er1 conftest.err
2769   fi
2770   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2771   test $ac_status = 0; } && {
2772          test -z "$ac_cxx_werror_flag" ||
2773          test ! -s conftest.err
2774        } && test -s conftest$ac_exeext && {
2775          test "$cross_compiling" = yes ||
2776          test -x conftest$ac_exeext
2777        }; then :
2778   ac_retval=0
2779 else
2780   $as_echo "$as_me: failed program was:" >&5
2781 sed 's/^/| /' conftest.$ac_ext >&5
2782 
2783         ac_retval=1
2784 fi
2785   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2786   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2787   # interfere with the next link command; also delete a directory that is
2788   # left behind by Apple's compiler.  We do this before executing the actions.
2789   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2790   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2791   as_fn_set_status $ac_retval
2792 
2793 } # ac_fn_cxx_try_link
2794 
2795 # ac_fn_cxx_check_func LINENO FUNC VAR
2796 # ------------------------------------
2797 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2798 ac_fn_cxx_check_func ()
2799 {
2800   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2801   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2802 $as_echo_n "checking for $2... " >&6; }
2803 if eval \${$3+:} false; then :
2804   $as_echo_n "(cached) " >&6
2805 else
2806   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2807 /* end confdefs.h.  */
2808 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2809    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2810 #define $2 innocuous_$2
2811 
2812 /* System header to define __stub macros and hopefully few prototypes,
2813     which can conflict with char $2 (); below.
2814     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2815     <limits.h> exists even on freestanding compilers.  */
2816 
2817 #ifdef __STDC__
2818 # include <limits.h>
2819 #else
2820 # include <assert.h>
2821 #endif
2822 
2823 #undef $2
2824 
2825 /* Override any GCC internal prototype to avoid an error.
2826    Use char because int might match the return type of a GCC
2827    builtin and then its argument prototype would still apply.  */
2828 #ifdef __cplusplus
2829 extern "C"
2830 #endif
2831 char $2 ();
2832 /* The GNU C library defines this for functions which it implements
2833     to always fail with ENOSYS.  Some functions are actually named
2834     something starting with __ and the normal name is an alias.  */
2835 #if defined __stub_$2 || defined __stub___$2
2836 choke me
2837 #endif
2838 
2839 int
2840 main ()
2841 {
2842 return $2 ();
2843   ;
2844   return 0;
2845 }
2846 _ACEOF
2847 if ac_fn_cxx_try_link "$LINENO"; then :
2848   eval "$3=yes"
2849 else
2850   eval "$3=no"
2851 fi
2852 rm -f core conftest.err conftest.$ac_objext \
2853     conftest$ac_exeext conftest.$ac_ext
2854 fi
2855 eval ac_res=\$$3
2856                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2857 $as_echo "$ac_res" >&6; }
2858   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2859 
2860 } # ac_fn_cxx_check_func
2861 
2862 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2863 # -------------------------------------------------------
2864 # Tests whether HEADER exists and can be compiled using the include files in
2865 # INCLUDES, setting the cache variable VAR accordingly.
2866 ac_fn_c_check_header_compile ()
2867 {
2868   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2869   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2870 $as_echo_n "checking for $2... " >&6; }
2871 if eval \${$3+:} false; then :
2872   $as_echo_n "(cached) " >&6
2873 else
2874   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2875 /* end confdefs.h.  */
2876 $4
2877 #include <$2>
2878 _ACEOF
2879 if ac_fn_c_try_compile "$LINENO"; then :
2880   eval "$3=yes"
2881 else
2882   eval "$3=no"
2883 fi
2884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2885 fi
2886 eval ac_res=\$$3
2887                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2888 $as_echo "$ac_res" >&6; }
2889   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2890 
2891 } # ac_fn_c_check_header_compile
2892 cat >config.log <<_ACEOF
2893 This file contains any messages produced by compilers while
2894 running configure, to aid debugging if configure makes a mistake.
2895 
2896 It was created by OpenJDK $as_me jdk9, which was
2897 generated by GNU Autoconf 2.69.  Invocation command line was
2898 
2899   $ $0 $@
2900 
2901 _ACEOF
2902 exec 5>>config.log
2903 {
2904 cat <<_ASUNAME
2905 ## --------- ##
2906 ## Platform. ##
2907 ## --------- ##
2908 
2909 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2910 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2911 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2912 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2913 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2914 
2915 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2916 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2917 
2918 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2919 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2920 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2921 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2922 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2923 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2924 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2925 
2926 _ASUNAME
2927 
2928 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2929 for as_dir in $PATH
2930 do
2931   IFS=$as_save_IFS
2932   test -z "$as_dir" && as_dir=.
2933     $as_echo "PATH: $as_dir"
2934   done
2935 IFS=$as_save_IFS
2936 
2937 } >&5
2938 
2939 cat >&5 <<_ACEOF
2940 
2941 
2942 ## ----------- ##
2943 ## Core tests. ##
2944 ## ----------- ##
2945 
2946 _ACEOF
2947 
2948 
2949 # Keep a trace of the command line.
2950 # Strip out --no-create and --no-recursion so they do not pile up.
2951 # Strip out --silent because we don't want to record it for future runs.
2952 # Also quote any args containing shell meta-characters.
2953 # Make two passes to allow for proper duplicate-argument suppression.
2954 ac_configure_args=
2955 ac_configure_args0=
2956 ac_configure_args1=
2957 ac_must_keep_next=false
2958 for ac_pass in 1 2
2959 do
2960   for ac_arg
2961   do
2962     case $ac_arg in
2963     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2964     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2965     | -silent | --silent | --silen | --sile | --sil)
2966       continue ;;
2967     *\'*)
2968       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2969     esac
2970     case $ac_pass in
2971     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2972     2)
2973       as_fn_append ac_configure_args1 " '$ac_arg'"
2974       if test $ac_must_keep_next = true; then
2975         ac_must_keep_next=false # Got value, back to normal.
2976       else
2977         case $ac_arg in
2978           *=* | --config-cache | -C | -disable-* | --disable-* \
2979           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2980           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2981           | -with-* | --with-* | -without-* | --without-* | --x)
2982             case "$ac_configure_args0 " in
2983               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2984             esac
2985             ;;
2986           -* ) ac_must_keep_next=true ;;
2987         esac
2988       fi
2989       as_fn_append ac_configure_args " '$ac_arg'"
2990       ;;
2991     esac
2992   done
2993 done
2994 { ac_configure_args0=; unset ac_configure_args0;}
2995 { ac_configure_args1=; unset ac_configure_args1;}
2996 
2997 # When interrupted or exit'd, cleanup temporary files, and complete
2998 # config.log.  We remove comments because anyway the quotes in there
2999 # would cause problems or look ugly.
3000 # WARNING: Use '\'' to represent an apostrophe within the trap.
3001 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3002 trap 'exit_status=$?
3003   # Save into config.log some information that might help in debugging.
3004   {
3005     echo
3006 
3007     $as_echo "## ---------------- ##
3008 ## Cache variables. ##
3009 ## ---------------- ##"
3010     echo
3011     # The following way of writing the cache mishandles newlines in values,
3012 (
3013   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3014     eval ac_val=\$$ac_var
3015     case $ac_val in #(
3016     *${as_nl}*)
3017       case $ac_var in #(
3018       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3019 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3020       esac
3021       case $ac_var in #(
3022       _ | IFS | as_nl) ;; #(
3023       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3024       *) { eval $ac_var=; unset $ac_var;} ;;
3025       esac ;;
3026     esac
3027   done
3028   (set) 2>&1 |
3029     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3030     *${as_nl}ac_space=\ *)
3031       sed -n \
3032         "s/'\''/'\''\\\\'\'''\''/g;
3033           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3034       ;; #(
3035     *)
3036       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3037       ;;
3038     esac |
3039     sort
3040 )
3041     echo
3042 
3043     $as_echo "## ----------------- ##
3044 ## Output variables. ##
3045 ## ----------------- ##"
3046     echo
3047     for ac_var in $ac_subst_vars
3048     do
3049       eval ac_val=\$$ac_var
3050       case $ac_val in
3051       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3052       esac
3053       $as_echo "$ac_var='\''$ac_val'\''"
3054     done | sort
3055     echo
3056 
3057     if test -n "$ac_subst_files"; then
3058       $as_echo "## ------------------- ##
3059 ## File substitutions. ##
3060 ## ------------------- ##"
3061       echo
3062       for ac_var in $ac_subst_files
3063       do
3064         eval ac_val=\$$ac_var
3065         case $ac_val in
3066         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3067         esac
3068         $as_echo "$ac_var='\''$ac_val'\''"
3069       done | sort
3070       echo
3071     fi
3072 
3073     if test -s confdefs.h; then
3074       $as_echo "## ----------- ##
3075 ## confdefs.h. ##
3076 ## ----------- ##"
3077       echo
3078       cat confdefs.h
3079       echo
3080     fi
3081     test "$ac_signal" != 0 &&
3082       $as_echo "$as_me: caught signal $ac_signal"
3083     $as_echo "$as_me: exit $exit_status"
3084   } >&5
3085   rm -f core *.core core.conftest.* &&
3086     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3087     exit $exit_status
3088 ' 0
3089 for ac_signal in 1 2 13 15; do
3090   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3091 done
3092 ac_signal=0
3093 
3094 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3095 rm -f -r conftest* confdefs.h
3096 
3097 $as_echo "/* confdefs.h */" > confdefs.h
3098 
3099 # Predefined preprocessor variables.
3100 
3101 cat >>confdefs.h <<_ACEOF
3102 #define PACKAGE_NAME "$PACKAGE_NAME"
3103 _ACEOF
3104 
3105 cat >>confdefs.h <<_ACEOF
3106 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3107 _ACEOF
3108 
3109 cat >>confdefs.h <<_ACEOF
3110 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3111 _ACEOF
3112 
3113 cat >>confdefs.h <<_ACEOF
3114 #define PACKAGE_STRING "$PACKAGE_STRING"
3115 _ACEOF
3116 
3117 cat >>confdefs.h <<_ACEOF
3118 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3119 _ACEOF
3120 
3121 cat >>confdefs.h <<_ACEOF
3122 #define PACKAGE_URL "$PACKAGE_URL"
3123 _ACEOF
3124 
3125 
3126 # Let the site file select an alternate cache file if it wants to.
3127 # Prefer an explicitly selected file to automatically selected ones.
3128 ac_site_file1=NONE
3129 ac_site_file2=NONE
3130 if test -n "$CONFIG_SITE"; then
3131   # We do not want a PATH search for config.site.
3132   case $CONFIG_SITE in #((
3133     -*)  ac_site_file1=./$CONFIG_SITE;;
3134     */*) ac_site_file1=$CONFIG_SITE;;
3135     *)   ac_site_file1=./$CONFIG_SITE;;
3136   esac
3137 elif test "x$prefix" != xNONE; then
3138   ac_site_file1=$prefix/share/config.site
3139   ac_site_file2=$prefix/etc/config.site
3140 else
3141   ac_site_file1=$ac_default_prefix/share/config.site
3142   ac_site_file2=$ac_default_prefix/etc/config.site
3143 fi
3144 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3145 do
3146   test "x$ac_site_file" = xNONE && continue
3147   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3148     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3149 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3150     sed 's/^/| /' "$ac_site_file" >&5
3151     . "$ac_site_file" \
3152       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3153 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3154 as_fn_error $? "failed to load site script $ac_site_file
3155 See \`config.log' for more details" "$LINENO" 5; }
3156   fi
3157 done
3158 
3159 if test -r "$cache_file"; then
3160   # Some versions of bash will fail to source /dev/null (special files
3161   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3162   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3163     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3164 $as_echo "$as_me: loading cache $cache_file" >&6;}
3165     case $cache_file in
3166       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3167       *)                      . "./$cache_file";;
3168     esac
3169   fi
3170 else
3171   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3172 $as_echo "$as_me: creating cache $cache_file" >&6;}
3173   >$cache_file
3174 fi
3175 
3176 # Check that the precious variables saved in the cache have kept the same
3177 # value.
3178 ac_cache_corrupted=false
3179 for ac_var in $ac_precious_vars; do
3180   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3181   eval ac_new_set=\$ac_env_${ac_var}_set
3182   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3183   eval ac_new_val=\$ac_env_${ac_var}_value
3184   case $ac_old_set,$ac_new_set in
3185     set,)
3186       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3187 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3188       ac_cache_corrupted=: ;;
3189     ,set)
3190       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3191 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3192       ac_cache_corrupted=: ;;
3193     ,);;
3194     *)
3195       if test "x$ac_old_val" != "x$ac_new_val"; then
3196         # differences in whitespace do not lead to failure.
3197         ac_old_val_w=`echo x $ac_old_val`
3198         ac_new_val_w=`echo x $ac_new_val`
3199         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3200           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3201 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3202           ac_cache_corrupted=:
3203         else
3204           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3205 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3206           eval $ac_var=\$ac_old_val
3207         fi
3208         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3209 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3210         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3211 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3212       fi;;
3213   esac
3214   # Pass precious variables to config.status.
3215   if test "$ac_new_set" = set; then
3216     case $ac_new_val in
3217     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3218     *) ac_arg=$ac_var=$ac_new_val ;;
3219     esac
3220     case " $ac_configure_args " in
3221       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3222       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3223     esac
3224   fi
3225 done
3226 if $ac_cache_corrupted; then
3227   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3228 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3229   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3230 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3231   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3232 fi
3233 ## -------------------- ##
3234 ## Main body of script. ##
3235 ## -------------------- ##
3236 
3237 ac_ext=c
3238 ac_cpp='$CPP $CPPFLAGS'
3239 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3240 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3241 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3242 
3243 
3244 
3245 ac_aux_dir=
3246 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3247   if test -f "$ac_dir/install-sh"; then
3248     ac_aux_dir=$ac_dir
3249     ac_install_sh="$ac_aux_dir/install-sh -c"
3250     break
3251   elif test -f "$ac_dir/install.sh"; then
3252     ac_aux_dir=$ac_dir
3253     ac_install_sh="$ac_aux_dir/install.sh -c"
3254     break
3255   elif test -f "$ac_dir/shtool"; then
3256     ac_aux_dir=$ac_dir
3257     ac_install_sh="$ac_aux_dir/shtool install -c"
3258     break
3259   fi
3260 done
3261 if test -z "$ac_aux_dir"; then
3262   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
3263 fi
3264 
3265 # These three variables are undocumented and unsupported,
3266 # and are intended to be withdrawn in a future Autoconf release.
3267 # They can cause serious problems if a builder's source tree is in a directory
3268 # whose full name contains unusual characters.
3269 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3270 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3271 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3272 
3273 
3274 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3275 
3276 #
3277 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3278 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3279 #
3280 # This code is free software; you can redistribute it and/or modify it
3281 # under the terms of the GNU General Public License version 2 only, as
3282 # published by the Free Software Foundation.  Oracle designates this
3283 # particular file as subject to the "Classpath" exception as provided
3284 # by Oracle in the LICENSE file that accompanied this code.
3285 #
3286 # This code is distributed in the hope that it will be useful, but WITHOUT
3287 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3288 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3289 # version 2 for more details (a copy is included in the LICENSE file that
3290 # accompanied this code).
3291 #
3292 # You should have received a copy of the GNU General Public License version
3293 # 2 along with this work; if not, write to the Free Software Foundation,
3294 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3295 #
3296 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3297 # or visit www.oracle.com if you need additional information or have any
3298 # questions.
3299 #
3300 
3301 #
3302 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3303 #
3304 # This program is free software; you can redistribute it and/or modify
3305 # it under the terms of the GNU General Public License as published by
3306 # the Free Software Foundation; either version 2 of the License, or
3307 # (at your option) any later version.
3308 #
3309 # This program is distributed in the hope that it will be useful, but
3310 # WITHOUT ANY WARRANTY; without even the implied warranty of
3311 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3312 # General Public License for more details.
3313 #
3314 # You should have received a copy of the GNU General Public License
3315 # along with this program; if not, write to the Free Software
3316 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3317 #
3318 # As a special exception to the GNU General Public License, if you
3319 # distribute this file as part of a program that contains a
3320 # configuration script generated by Autoconf, you may include it under
3321 # the same distribution terms that you use for the rest of that program.
3322 
3323 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3324 # ----------------------------------
3325 # PKG_PROG_PKG_CONFIG
3326 
3327 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3328 #
3329 # Check to see whether a particular set of modules exists.  Similar
3330 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3331 #
3332 #
3333 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3334 # this or PKG_CHECK_MODULES is called, or make sure to call
3335 # PKG_CHECK_EXISTS manually
3336 # --------------------------------------------------------------
3337 
3338 
3339 
3340 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3341 # ---------------------------------------------
3342 # _PKG_CONFIG
3343 
3344 # _PKG_SHORT_ERRORS_SUPPORTED
3345 # -----------------------------
3346 # _PKG_SHORT_ERRORS_SUPPORTED
3347 
3348 
3349 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3350 # [ACTION-IF-NOT-FOUND])
3351 #
3352 #
3353 # Note that if there is a possibility the first call to
3354 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3355 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3356 #
3357 #
3358 # --------------------------------------------------------------
3359 # PKG_CHECK_MODULES
3360 
3361 
3362 # Include these first...
3363 #
3364 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3365 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3366 #
3367 # This code is free software; you can redistribute it and/or modify it
3368 # under the terms of the GNU General Public License version 2 only, as
3369 # published by the Free Software Foundation.  Oracle designates this
3370 # particular file as subject to the "Classpath" exception as provided
3371 # by Oracle in the LICENSE file that accompanied this code.
3372 #
3373 # This code is distributed in the hope that it will be useful, but WITHOUT
3374 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3375 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3376 # version 2 for more details (a copy is included in the LICENSE file that
3377 # accompanied this code).
3378 #
3379 # You should have received a copy of the GNU General Public License version
3380 # 2 along with this work; if not, write to the Free Software Foundation,
3381 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3382 #
3383 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3384 # or visit www.oracle.com if you need additional information or have any
3385 # questions.
3386 #
3387 
3388 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3389 # If so, then append $1 to $2 \
3390 # Also set JVM_ARG_OK to true/false depending on outcome.
3391 
3392 
3393 # Appends a string to a path variable, only adding the : when needed.
3394 
3395 
3396 # Prepends a string to a path variable, only adding the : when needed.
3397 
3398 
3399 # This will make sure the given variable points to a full and proper
3400 # path. This means:
3401 # 1) There will be no spaces in the path. On unix platforms,
3402 #    spaces in the path will result in an error. On Windows,
3403 #    the path will be rewritten using short-style to be space-free.
3404 # 2) The path will be absolute, and it will be in unix-style (on
3405 #     cygwin).
3406 # $1: The name of the variable to fix
3407 
3408 
3409 # This will make sure the given variable points to a executable
3410 # with a full and proper path. This means:
3411 # 1) There will be no spaces in the path. On unix platforms,
3412 #    spaces in the path will result in an error. On Windows,
3413 #    the path will be rewritten using short-style to be space-free.
3414 # 2) The path will be absolute, and it will be in unix-style (on
3415 #     cygwin).
3416 # Any arguments given to the executable is preserved.
3417 # If the input variable does not have a directory specification, then
3418 # it need to be in the PATH.
3419 # $1: The name of the variable to fix
3420 
3421 
3422 
3423 
3424 # Register a --with argument but mark it as deprecated
3425 # $1: The name of the with argument to deprecate, not including --with-
3426 
3427 
3428 # Register a --enable argument but mark it as deprecated
3429 # $1: The name of the with argument to deprecate, not including --enable-
3430 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3431 
3432 
3433 
3434 
3435 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3436 # $1: variable to check
3437 
3438 
3439 # Check that there are no unprocessed overridden variables left.
3440 # If so, they are an incorrect argument and we will exit with an error.
3441 
3442 
3443 # Setup a tool for the given variable. If correctly specified by the user,
3444 # use that value, otherwise search for the tool using the supplied code snippet.
3445 # $1: variable to set
3446 # $2: code snippet to call to look for the tool
3447 # $3: code snippet to call if variable was used to find tool
3448 
3449 
3450 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3451 # $1: variable to set
3452 # $2: executable name (or list of names) to look for
3453 
3454 
3455 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3456 # $1: variable to set
3457 # $2: executable name (or list of names) to look for
3458 
3459 
3460 # Like BASIC_PATH_PROGS but fails if no tool was found.
3461 # $1: variable to set
3462 # $2: executable name (or list of names) to look for
3463 
3464 
3465 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3466 # $1: variable to set
3467 # $2: autoconf macro to call to look for the special tool
3468 
3469 
3470 # Setup the most fundamental tools that relies on not much else to set up,
3471 # but is used by much of the early bootstrap code.
3472 
3473 
3474 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3475 
3476 
3477 # Evaluates platform specific overrides for devkit variables.
3478 # $1: Name of variable
3479 
3480 
3481 
3482 
3483 
3484 
3485 #%%% Simple tools %%%
3486 
3487 # Check if we have found a usable version of make
3488 # $1: the path to a potential make binary (or empty)
3489 # $2: the description on how we found this
3490 
3491 
3492 
3493 
3494 # Goes looking for a usable version of GNU make.
3495 
3496 
3497 
3498 
3499 
3500 
3501 # Check if build directory is on local disk. If not possible to determine,
3502 # we prefer to claim it's local.
3503 # Argument 1: directory to test
3504 # Argument 2: what to do if it is on local disk
3505 # Argument 3: what to do otherwise (remote disk or failure)
3506 
3507 
3508 # Check that source files have basic read permissions set. This might
3509 # not be the case in cygwin in certain conditions.
3510 
3511 
3512 
3513 
3514 # Check for support for specific options in bash
3515 
3516 
3517 # Code to run after AC_OUTPUT
3518 
3519 
3520 #
3521 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3522 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3523 #
3524 # This code is free software; you can redistribute it and/or modify it
3525 # under the terms of the GNU General Public License version 2 only, as
3526 # published by the Free Software Foundation.  Oracle designates this
3527 # particular file as subject to the "Classpath" exception as provided
3528 # by Oracle in the LICENSE file that accompanied this code.
3529 #
3530 # This code is distributed in the hope that it will be useful, but WITHOUT
3531 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3532 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3533 # version 2 for more details (a copy is included in the LICENSE file that
3534 # accompanied this code).
3535 #
3536 # You should have received a copy of the GNU General Public License version
3537 # 2 along with this work; if not, write to the Free Software Foundation,
3538 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3539 #
3540 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3541 # or visit www.oracle.com if you need additional information or have any
3542 # questions.
3543 #
3544 
3545 
3546 
3547 
3548 
3549 # Helper function which possibly converts a path using DOS-style short mode.
3550 # If so, the updated path is stored in $new_path.
3551 # $1: The path to check
3552 
3553 
3554 # Helper function which possibly converts a path using DOS-style short mode.
3555 # If so, the updated path is stored in $new_path.
3556 # $1: The path to check
3557 
3558 
3559 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3560 # and could probably be heavily simplified. However, all changes in this
3561 # area tend to need lot of testing in different scenarios, and in lack of
3562 # proper unit testing, cleaning this up has not been deemed worth the effort
3563 # at the moment.
3564 
3565 
3566 
3567 
3568 
3569 
3570 
3571 
3572 
3573 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3574 
3575 
3576 
3577 
3578 # ... then the rest
3579 #
3580 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3581 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3582 #
3583 # This code is free software; you can redistribute it and/or modify it
3584 # under the terms of the GNU General Public License version 2 only, as
3585 # published by the Free Software Foundation.  Oracle designates this
3586 # particular file as subject to the "Classpath" exception as provided
3587 # by Oracle in the LICENSE file that accompanied this code.
3588 #
3589 # This code is distributed in the hope that it will be useful, but WITHOUT
3590 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3591 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3592 # version 2 for more details (a copy is included in the LICENSE file that
3593 # accompanied this code).
3594 #
3595 # You should have received a copy of the GNU General Public License version
3596 # 2 along with this work; if not, write to the Free Software Foundation,
3597 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3598 #
3599 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3600 # or visit www.oracle.com if you need additional information or have any
3601 # questions.
3602 #
3603 
3604 ########################################################################
3605 # This file handles detection of the Boot JDK. The Boot JDK detection
3606 # process has been developed as a response to solve a complex real-world
3607 # problem. Initially, it was simple, but it has grown as platform after
3608 # platform, idiosyncracy after idiosyncracy has been supported.
3609 #
3610 # The basic idea is this:
3611 # 1) You need an acceptable *) JDK to use as a Boot JDK
3612 # 2) There are several ways to locate a JDK, that are mostly platform
3613 #    dependent **)
3614 # 3) You can have multiple JDKs installed
3615 # 4) If possible, configure should try to dig out an acceptable JDK
3616 #    automatically, without having to resort to command-line options
3617 #
3618 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3619 #     javac) and not a JRE, etc.
3620 #
3621 # **) On Windows we typically use a well-known path.
3622 #     On MacOSX we typically use the tool java_home.
3623 #     On Linux we typically find javac in the $PATH, and then follow a
3624 #     chain of symlinks that often ends up in a real JDK.
3625 #
3626 # This leads to the code where we check in different ways to locate a
3627 # JDK, and if one is found, check if it is acceptable. If not, we print
3628 # our reasons for rejecting it (useful when debugging non-working
3629 # configure situations) and continue checking the next one.
3630 ########################################################################
3631 
3632 # Execute the check given as argument, and verify the result
3633 # If the Boot JDK was previously found, do nothing
3634 # $1 A command line (typically autoconf macro) to execute
3635 
3636 
3637 # Test: Is bootjdk explicitely set by command line arguments?
3638 
3639 
3640 # Test: Is $JAVA_HOME set?
3641 
3642 
3643 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3644 
3645 
3646 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3647 # $1: Argument to the java_home binary (optional)
3648 
3649 
3650 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3651 
3652 
3653 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3654 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3655 # $1 = Path to directory containing jdk installations.
3656 # $2 = String to append to the found JDK directory to get the proper JDK home
3657 
3658 
3659 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3660 # environmental variable as base for where to look.
3661 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3662 
3663 
3664 # Test: Is there a JDK installed in default, well-known locations?
3665 
3666 
3667 # Check that a command-line tool in the Boot JDK is correct
3668 # $1 = name of variable to assign
3669 # $2 = name of binary
3670 
3671 
3672 ###############################################################################
3673 #
3674 # We need a Boot JDK to bootstrap the build.
3675 #
3676 
3677 
3678 
3679 
3680 
3681 #
3682 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3683 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3684 #
3685 # This code is free software; you can redistribute it and/or modify it
3686 # under the terms of the GNU General Public License version 2 only, as
3687 # published by the Free Software Foundation.  Oracle designates this
3688 # particular file as subject to the "Classpath" exception as provided
3689 # by Oracle in the LICENSE file that accompanied this code.
3690 #
3691 # This code is distributed in the hope that it will be useful, but WITHOUT
3692 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3693 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3694 # version 2 for more details (a copy is included in the LICENSE file that
3695 # accompanied this code).
3696 #
3697 # You should have received a copy of the GNU General Public License version
3698 # 2 along with this work; if not, write to the Free Software Foundation,
3699 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3700 #
3701 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3702 # or visit www.oracle.com if you need additional information or have any
3703 # questions.
3704 #
3705 
3706 
3707 
3708 
3709 
3710 
3711 
3712 
3713 
3714 
3715 
3716 
3717 
3718 
3719 
3720 
3721 
3722 
3723 
3724 
3725 #
3726 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3727 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3728 #
3729 # This code is free software; you can redistribute it and/or modify it
3730 # under the terms of the GNU General Public License version 2 only, as
3731 # published by the Free Software Foundation.  Oracle designates this
3732 # particular file as subject to the "Classpath" exception as provided
3733 # by Oracle in the LICENSE file that accompanied this code.
3734 #
3735 # This code is distributed in the hope that it will be useful, but WITHOUT
3736 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3737 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3738 # version 2 for more details (a copy is included in the LICENSE file that
3739 # accompanied this code).
3740 #
3741 # You should have received a copy of the GNU General Public License version
3742 # 2 along with this work; if not, write to the Free Software Foundation,
3743 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3744 #
3745 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3746 # or visit www.oracle.com if you need additional information or have any
3747 # questions.
3748 #
3749 
3750 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3751 # corresponding configure arguments instead
3752 
3753 
3754 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3755 # that configure can use them while detecting compilers.
3756 # TOOLCHAIN_TYPE is available here.
3757 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
3758 
3759 
3760 
3761 
3762 
3763 
3764 # Documentation on common flags used for solstudio in HIGHEST.
3765 #
3766 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3767 #          done with care, there are some assumptions below that need to
3768 #          be understood about the use of pointers, and IEEE behavior.
3769 #
3770 # -fns: Use non-standard floating point mode (not IEEE 754)
3771 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3772 # -fsingle: Use single precision floating point with 'float'
3773 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
3774 #   (Source with excessing pointer casting and data access with mixed
3775 #    pointer types are not recommended)
3776 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3777 #   (If you expect perfect errno behavior, do not use this)
3778 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3779 # -xrestrict: Pointer parameters to functions do not overlap
3780 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3781 #    If you pass in multiple pointers to the same data, do not use this)
3782 # -xlibmil: Inline some library routines
3783 #   (If you expect perfect errno behavior, do not use this)
3784 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3785 #   (If you expect perfect errno behavior, do not use this)
3786 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3787 
3788     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3789     # Bug?
3790     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3791     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3792     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3793     #fi
3794 
3795 
3796 
3797 
3798 
3799 # FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3800 #                                   [RUN-IF-FALSE])
3801 # ------------------------------------------------------------
3802 # Check that the c and c++ compilers support an argument
3803 
3804 
3805 # FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3806 #                                    [RUN-IF-FALSE])
3807 # ------------------------------------------------------------
3808 # Check that the linker support an argument
3809 
3810 
3811 
3812 
3813 #
3814 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3815 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3816 #
3817 # This code is free software; you can redistribute it and/or modify it
3818 # under the terms of the GNU General Public License version 2 only, as
3819 # published by the Free Software Foundation.  Oracle designates this
3820 # particular file as subject to the "Classpath" exception as provided
3821 # by Oracle in the LICENSE file that accompanied this code.
3822 #
3823 # This code is distributed in the hope that it will be useful, but WITHOUT
3824 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3825 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3826 # version 2 for more details (a copy is included in the LICENSE file that
3827 # accompanied this code).
3828 #
3829 # You should have received a copy of the GNU General Public License version
3830 # 2 along with this work; if not, write to the Free Software Foundation,
3831 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3832 #
3833 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3834 # or visit www.oracle.com if you need additional information or have any
3835 # questions.
3836 #
3837 
3838 
3839 
3840 
3841 
3842 cygwin_help() {
3843   case $1 in
3844     unzip)
3845       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3846       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3847       ;;
3848     zip)
3849       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3850       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3851       ;;
3852     make)
3853       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3854       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3855       ;;
3856     freetype)
3857       HELP_MSG="
3858 The freetype library can now be build during the configure process.
3859 Download the freetype sources and unpack them into an arbitrary directory:
3860 
3861 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3862 tar -xzf freetype-2.5.3.tar.gz
3863 
3864 Then run configure with '--with-freetype-src=<freetype_src>'. This will
3865 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3866 builds or into '<freetype_src>/lib32' for 32-bit builds.
3867 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3868 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3869       ;;
3870   esac
3871 }
3872 
3873 msys_help() {
3874   PKGHANDLER_COMMAND=""
3875 }
3876 
3877 apt_help() {
3878   case $1 in
3879     reduced)
3880       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3881     devkit)
3882       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3883     openjdk)
3884       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3885     alsa)
3886       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3887     cups)
3888       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3889     freetype)
3890       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3891     ffi)
3892       PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3893     x11)
3894       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3895     ccache)
3896       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3897   esac
3898 }
3899 
3900 yum_help() {
3901   case $1 in
3902     devkit)
3903       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3904     openjdk)
3905       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3906     alsa)
3907       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3908     cups)
3909       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3910     freetype)
3911       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3912     x11)
3913       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3914     ccache)
3915       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3916   esac
3917 }
3918 
3919 port_help() {
3920   PKGHANDLER_COMMAND=""
3921 }
3922 
3923 pkgutil_help() {
3924   PKGHANDLER_COMMAND=""
3925 }
3926 
3927 pkgadd_help() {
3928   PKGHANDLER_COMMAND=""
3929 }
3930 
3931 # This function will check if we're called from the "configure" wrapper while
3932 # printing --help. If so, we will print out additional information that can
3933 # only be extracted within the autoconf script, and then exit. This must be
3934 # called at the very beginning in configure.ac.
3935 
3936 
3937 
3938 
3939 
3940 
3941 #
3942 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3943 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3944 #
3945 # This code is free software; you can redistribute it and/or modify it
3946 # under the terms of the GNU General Public License version 2 only, as
3947 # published by the Free Software Foundation.  Oracle designates this
3948 # particular file as subject to the "Classpath" exception as provided
3949 # by Oracle in the LICENSE file that accompanied this code.
3950 #
3951 # This code is distributed in the hope that it will be useful, but WITHOUT
3952 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3953 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3954 # version 2 for more details (a copy is included in the LICENSE file that
3955 # accompanied this code).
3956 #
3957 # You should have received a copy of the GNU General Public License version
3958 # 2 along with this work; if not, write to the Free Software Foundation,
3959 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3960 #
3961 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3962 # or visit www.oracle.com if you need additional information or have any
3963 # questions.
3964 #
3965 
3966 
3967 
3968 
3969 
3970 
3971 
3972 
3973 
3974 
3975 ###############################################################################
3976 #
3977 # Should we build only OpenJDK even if closed sources are present?
3978 #
3979 
3980 
3981 
3982 
3983 ###############################################################################
3984 #
3985 # Setup version numbers
3986 #
3987 
3988 
3989 
3990 
3991 
3992 
3993 ################################################################################
3994 #
3995 # Gcov coverage data for hotspot
3996 #
3997 
3998 
3999 ################################################################################
4000 #
4001 # Static build support.  When enabled will generate static
4002 # libraries instead of shared libraries for all JDK libs.
4003 #
4004 
4005 
4006 
4007 
4008 #
4009 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4010 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4011 #
4012 # This code is free software; you can redistribute it and/or modify it
4013 # under the terms of the GNU General Public License version 2 only, as
4014 # published by the Free Software Foundation.  Oracle designates this
4015 # particular file as subject to the "Classpath" exception as provided
4016 # by Oracle in the LICENSE file that accompanied this code.
4017 #
4018 # This code is distributed in the hope that it will be useful, but WITHOUT
4019 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4020 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4021 # version 2 for more details (a copy is included in the LICENSE file that
4022 # accompanied this code).
4023 #
4024 # You should have received a copy of the GNU General Public License version
4025 # 2 along with this work; if not, write to the Free Software Foundation,
4026 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4027 #
4028 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4029 # or visit www.oracle.com if you need additional information or have any
4030 # questions.
4031 #
4032 
4033 # Major library component reside in separate files.
4034 #
4035 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4036 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4037 #
4038 # This code is free software; you can redistribute it and/or modify it
4039 # under the terms of the GNU General Public License version 2 only, as
4040 # published by the Free Software Foundation.  Oracle designates this
4041 # particular file as subject to the "Classpath" exception as provided
4042 # by Oracle in the LICENSE file that accompanied this code.
4043 #
4044 # This code is distributed in the hope that it will be useful, but WITHOUT
4045 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4046 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4047 # version 2 for more details (a copy is included in the LICENSE file that
4048 # accompanied this code).
4049 #
4050 # You should have received a copy of the GNU General Public License version
4051 # 2 along with this work; if not, write to the Free Software Foundation,
4052 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4053 #
4054 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4055 # or visit www.oracle.com if you need additional information or have any
4056 # questions.
4057 #
4058 
4059 ################################################################################
4060 # Setup alsa (Advanced Linux Sound Architecture)
4061 ################################################################################
4062 
4063 
4064 #
4065 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4066 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4067 #
4068 # This code is free software; you can redistribute it and/or modify it
4069 # under the terms of the GNU General Public License version 2 only, as
4070 # published by the Free Software Foundation.  Oracle designates this
4071 # particular file as subject to the "Classpath" exception as provided
4072 # by Oracle in the LICENSE file that accompanied this code.
4073 #
4074 # This code is distributed in the hope that it will be useful, but WITHOUT
4075 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4076 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4077 # version 2 for more details (a copy is included in the LICENSE file that
4078 # accompanied this code).
4079 #
4080 # You should have received a copy of the GNU General Public License version
4081 # 2 along with this work; if not, write to the Free Software Foundation,
4082 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4083 #
4084 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4085 # or visit www.oracle.com if you need additional information or have any
4086 # questions.
4087 #
4088 
4089 ################################################################################
4090 # Setup bundled libraries.
4091 #
4092 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4093 # OpenJDK repository. Default is to use these libraries as bundled, but they
4094 # might be replaced by en external version by the user.
4095 ################################################################################
4096 
4097 
4098 ################################################################################
4099 # Setup libjpeg
4100 ################################################################################
4101 
4102 
4103 ################################################################################
4104 # Setup giflib
4105 ################################################################################
4106 
4107 
4108 ################################################################################
4109 # Setup libpng
4110 ################################################################################
4111 
4112 
4113 ################################################################################
4114 # Setup zlib
4115 ################################################################################
4116 
4117 
4118 ################################################################################
4119 # Setup lcms (Little CMS)
4120 ################################################################################
4121 
4122 
4123 #
4124 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4125 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4126 #
4127 # This code is free software; you can redistribute it and/or modify it
4128 # under the terms of the GNU General Public License version 2 only, as
4129 # published by the Free Software Foundation.  Oracle designates this
4130 # particular file as subject to the "Classpath" exception as provided
4131 # by Oracle in the LICENSE file that accompanied this code.
4132 #
4133 # This code is distributed in the hope that it will be useful, but WITHOUT
4134 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4135 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4136 # version 2 for more details (a copy is included in the LICENSE file that
4137 # accompanied this code).
4138 #
4139 # You should have received a copy of the GNU General Public License version
4140 # 2 along with this work; if not, write to the Free Software Foundation,
4141 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4142 #
4143 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4144 # or visit www.oracle.com if you need additional information or have any
4145 # questions.
4146 #
4147 
4148 ################################################################################
4149 # Setup cups (Common Unix Printing System)
4150 ################################################################################
4151 
4152 
4153 #
4154 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4155 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4156 #
4157 # This code is free software; you can redistribute it and/or modify it
4158 # under the terms of the GNU General Public License version 2 only, as
4159 # published by the Free Software Foundation.  Oracle designates this
4160 # particular file as subject to the "Classpath" exception as provided
4161 # by Oracle in the LICENSE file that accompanied this code.
4162 #
4163 # This code is distributed in the hope that it will be useful, but WITHOUT
4164 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4165 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4166 # version 2 for more details (a copy is included in the LICENSE file that
4167 # accompanied this code).
4168 #
4169 # You should have received a copy of the GNU General Public License version
4170 # 2 along with this work; if not, write to the Free Software Foundation,
4171 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4172 #
4173 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4174 # or visit www.oracle.com if you need additional information or have any
4175 # questions.
4176 #
4177 
4178 ################################################################################
4179 # Setup libffi (Foreign Function Interface)
4180 ################################################################################
4181 
4182 
4183 #
4184 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4185 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4186 #
4187 # This code is free software; you can redistribute it and/or modify it
4188 # under the terms of the GNU General Public License version 2 only, as
4189 # published by the Free Software Foundation.  Oracle designates this
4190 # particular file as subject to the "Classpath" exception as provided
4191 # by Oracle in the LICENSE file that accompanied this code.
4192 #
4193 # This code is distributed in the hope that it will be useful, but WITHOUT
4194 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4195 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4196 # version 2 for more details (a copy is included in the LICENSE file that
4197 # accompanied this code).
4198 #
4199 # You should have received a copy of the GNU General Public License version
4200 # 2 along with this work; if not, write to the Free Software Foundation,
4201 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4202 #
4203 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4204 # or visit www.oracle.com if you need additional information or have any
4205 # questions.
4206 #
4207 
4208 ################################################################################
4209 # Build the freetype lib from source
4210 ################################################################################
4211 
4212 
4213 ################################################################################
4214 # Check if a potential freeype library match is correct and usable
4215 ################################################################################
4216 
4217 
4218 ################################################################################
4219 # Setup freetype (The FreeType2 font rendering library)
4220 ################################################################################
4221 
4222 
4223 #
4224 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4225 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4226 #
4227 # This code is free software; you can redistribute it and/or modify it
4228 # under the terms of the GNU General Public License version 2 only, as
4229 # published by the Free Software Foundation.  Oracle designates this
4230 # particular file as subject to the "Classpath" exception as provided
4231 # by Oracle in the LICENSE file that accompanied this code.
4232 #
4233 # This code is distributed in the hope that it will be useful, but WITHOUT
4234 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4235 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4236 # version 2 for more details (a copy is included in the LICENSE file that
4237 # accompanied this code).
4238 #
4239 # You should have received a copy of the GNU General Public License version
4240 # 2 along with this work; if not, write to the Free Software Foundation,
4241 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4242 #
4243 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4244 # or visit www.oracle.com if you need additional information or have any
4245 # questions.
4246 #
4247 
4248 ################################################################################
4249 # Setup the standard C/C++ runtime libraries.
4250 #
4251 # Most importantly, determine if stdc++ should be linked statically or
4252 # dynamically.
4253 ################################################################################
4254 
4255 
4256 #
4257 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4258 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4259 #
4260 # This code is free software; you can redistribute it and/or modify it
4261 # under the terms of the GNU General Public License version 2 only, as
4262 # published by the Free Software Foundation.  Oracle designates this
4263 # particular file as subject to the "Classpath" exception as provided
4264 # by Oracle in the LICENSE file that accompanied this code.
4265 #
4266 # This code is distributed in the hope that it will be useful, but WITHOUT
4267 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4268 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4269 # version 2 for more details (a copy is included in the LICENSE file that
4270 # accompanied this code).
4271 #
4272 # You should have received a copy of the GNU General Public License version
4273 # 2 along with this work; if not, write to the Free Software Foundation,
4274 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4275 #
4276 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4277 # or visit www.oracle.com if you need additional information or have any
4278 # questions.
4279 #
4280 
4281 ################################################################################
4282 # Setup X11 Windows system
4283 ################################################################################
4284 
4285 
4286 
4287 ################################################################################
4288 # Determine which libraries are needed for this configuration
4289 ################################################################################
4290 
4291 
4292 ################################################################################
4293 # Parse library options, and setup needed libraries
4294 ################################################################################
4295 
4296 
4297 ################################################################################
4298 # Setup llvm (Low-Level VM)
4299 ################################################################################
4300 
4301 
4302 ################################################################################
4303 # Setup various libraries, typically small system libraries
4304 ################################################################################
4305 
4306 
4307 #
4308 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4309 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4310 #
4311 # This code is free software; you can redistribute it and/or modify it
4312 # under the terms of the GNU General Public License version 2 only, as
4313 # published by the Free Software Foundation.  Oracle designates this
4314 # particular file as subject to the "Classpath" exception as provided
4315 # by Oracle in the LICENSE file that accompanied this code.
4316 #
4317 # This code is distributed in the hope that it will be useful, but WITHOUT
4318 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4319 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4320 # version 2 for more details (a copy is included in the LICENSE file that
4321 # accompanied this code).
4322 #
4323 # You should have received a copy of the GNU General Public License version
4324 # 2 along with this work; if not, write to the Free Software Foundation,
4325 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4326 #
4327 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4328 # or visit www.oracle.com if you need additional information or have any
4329 # questions.
4330 #
4331 
4332 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4333 # Converts autoconf style CPU name to OpenJDK style, into
4334 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4335 
4336 
4337 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4338 # Converts autoconf style OS name to OpenJDK style, into
4339 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4340 
4341 
4342 # Expects $host_os $host_cpu $build_os and $build_cpu
4343 # and $with_target_bits to have been setup!
4344 #
4345 # Translate the standard triplet(quadruplet) definition
4346 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4347 # OPENJDK_BUILD_OS, etc.
4348 
4349 
4350 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4351 # accordingly. Must be done after setting up build and target system, but before
4352 # doing anything else with these values.
4353 
4354 
4355 # Setup the legacy variables, for controlling the old makefiles.
4356 #
4357 
4358 
4359 
4360 
4361 #%%% Build and target systems %%%
4362 
4363 
4364 
4365 
4366 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4367 # Add -mX to various FLAGS variables.
4368 
4369 
4370 
4371 
4372 
4373 
4374 #
4375 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4376 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4377 #
4378 # This code is free software; you can redistribute it and/or modify it
4379 # under the terms of the GNU General Public License version 2 only, as
4380 # published by the Free Software Foundation.  Oracle designates this
4381 # particular file as subject to the "Classpath" exception as provided
4382 # by Oracle in the LICENSE file that accompanied this code.
4383 #
4384 # This code is distributed in the hope that it will be useful, but WITHOUT
4385 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4386 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4387 # version 2 for more details (a copy is included in the LICENSE file that
4388 # accompanied this code).
4389 #
4390 # You should have received a copy of the GNU General Public License version
4391 # 2 along with this work; if not, write to the Free Software Foundation,
4392 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4393 #
4394 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4395 # or visit www.oracle.com if you need additional information or have any
4396 # questions.
4397 #
4398 
4399 
4400 
4401 
4402 
4403 
4404 
4405 #
4406 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4407 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4408 #
4409 # This code is free software; you can redistribute it and/or modify it
4410 # under the terms of the GNU General Public License version 2 only, as
4411 # published by the Free Software Foundation.  Oracle designates this
4412 # particular file as subject to the "Classpath" exception as provided
4413 # by Oracle in the LICENSE file that accompanied this code.
4414 #
4415 # This code is distributed in the hope that it will be useful, but WITHOUT
4416 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4417 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4418 # version 2 for more details (a copy is included in the LICENSE file that
4419 # accompanied this code).
4420 #
4421 # You should have received a copy of the GNU General Public License version
4422 # 2 along with this work; if not, write to the Free Software Foundation,
4423 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4424 #
4425 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4426 # or visit www.oracle.com if you need additional information or have any
4427 # questions.
4428 #
4429 
4430 ########################################################################
4431 # This file is responsible for detecting, verifying and setting up the
4432 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4433 # proper paths to the binaries, but it will not setup any flags.
4434 #
4435 # The binaries used is determined by the toolchain type, which is the family of
4436 # compilers and related tools that are used.
4437 ########################################################################
4438 
4439 
4440 # All valid toolchains, regardless of platform (used by help.m4)
4441 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4442 
4443 # These toolchains are valid on different platforms
4444 VALID_TOOLCHAINS_linux="gcc clang"
4445 VALID_TOOLCHAINS_solaris="solstudio"
4446 VALID_TOOLCHAINS_macosx="gcc clang"
4447 VALID_TOOLCHAINS_aix="xlc"
4448 VALID_TOOLCHAINS_windows="microsoft"
4449 
4450 # Toolchain descriptions
4451 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4452 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4453 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4454 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4455 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4456 
4457 # Setup a number of variables describing how native output files are
4458 # named on this platform/toolchain.
4459 
4460 
4461 # Determine which toolchain type to use, and make sure it is valid for this
4462 # platform. Setup various information about the selected toolchain.
4463 
4464 
4465 # Before we start detecting the toolchain executables, we might need some
4466 # special setup, e.g. additional paths etc.
4467 
4468 
4469 # Restore path, etc
4470 
4471 
4472 # Check if a compiler is of the toolchain type we expect, and save the version
4473 # information from it. If the compiler does not match the expected type,
4474 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4475 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4476 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4477 #
4478 # $1 = compiler to test (CC or CXX)
4479 # $2 = human readable name of compiler (C or C++)
4480 
4481 
4482 # Try to locate the given C or C++ compiler in the path, or otherwise.
4483 #
4484 # $1 = compiler to test (CC or CXX)
4485 # $2 = human readable name of compiler (C or C++)
4486 # $3 = list of compiler names to search for
4487 
4488 
4489 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4490 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4491 # archiver (AR). Verify that the compilers are correct according to the
4492 # toolchain type.
4493 
4494 
4495 # Setup additional tools that is considered a part of the toolchain, but not the
4496 # core part. Many of these are highly platform-specific and do not exist,
4497 # and/or are not needed on all platforms.
4498 
4499 
4500 # Setup the build tools (i.e, the compiler and linker used to build programs
4501 # that should be run on the build platform, not the target platform, as a build
4502 # helper). Since the non-cross-compile case uses the normal, target compilers
4503 # for this, we can only do this after these have been setup.
4504 
4505 
4506 # Setup legacy variables that are still needed as alternative ways to refer to
4507 # parts of the toolchain.
4508 
4509 
4510 # Do some additional checks on the detected tools.
4511 
4512 
4513 # Setup the JTReg Regression Test Harness.
4514 
4515 
4516 #
4517 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4518 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4519 #
4520 # This code is free software; you can redistribute it and/or modify it
4521 # under the terms of the GNU General Public License version 2 only, as
4522 # published by the Free Software Foundation.  Oracle designates this
4523 # particular file as subject to the "Classpath" exception as provided
4524 # by Oracle in the LICENSE file that accompanied this code.
4525 #
4526 # This code is distributed in the hope that it will be useful, but WITHOUT
4527 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4528 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4529 # version 2 for more details (a copy is included in the LICENSE file that
4530 # accompanied this code).
4531 #
4532 # You should have received a copy of the GNU General Public License version
4533 # 2 along with this work; if not, write to the Free Software Foundation,
4534 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4535 #
4536 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4537 # or visit www.oracle.com if you need additional information or have any
4538 # questions.
4539 #
4540 
4541 ################################################################################
4542 # The order of these defines the priority by which we try to find them.
4543 VALID_VS_VERSIONS="2013 2012 2010"
4544 
4545 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4546 VS_VERSION_INTERNAL_2010=100
4547 VS_MSVCR_2010=msvcr100.dll
4548 # We don't use msvcp on Visual Studio 2010
4549 #VS_MSVCP_2010=msvcp100.dll
4550 VS_ENVVAR_2010="VS100COMNTOOLS"
4551 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4552 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4553 VS_VS_PLATFORM_NAME_2010="v100"
4554 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4555 
4556 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4557 VS_VERSION_INTERNAL_2012=110
4558 VS_MSVCR_2012=msvcr110.dll
4559 VS_MSVCP_2012=msvcp110.dll
4560 VS_ENVVAR_2012="VS110COMNTOOLS"
4561 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4562 VS_SDK_INSTALLDIR_2012=
4563 VS_VS_PLATFORM_NAME_2012="v110"
4564 VS_SDK_PLATFORM_NAME_2012=
4565 
4566 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4567 VS_VERSION_INTERNAL_2013=120
4568 VS_MSVCR_2013=msvcr120.dll
4569 VS_MSVCP_2013=msvcp120.dll
4570 VS_ENVVAR_2013="VS120COMNTOOLS"
4571 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4572 VS_SDK_INSTALLDIR_2013=
4573 VS_VS_PLATFORM_NAME_2013="v120"
4574 VS_SDK_PLATFORM_NAME_2013=
4575 
4576 ################################################################################
4577 
4578 
4579 
4580 ################################################################################
4581 
4582 
4583 
4584 ################################################################################
4585 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4586 # build environment and assigns it to VS_ENV_CMD
4587 
4588 
4589 ################################################################################
4590 
4591 
4592 
4593 ################################################################################
4594 # Check if the VS env variables were setup prior to running configure.
4595 # If not, then find vcvarsall.bat and run it automatically, and integrate
4596 # the set env variables into the spec file.
4597 
4598 
4599 
4600 
4601 
4602 
4603 
4604 
4605 
4606 
4607 
4608 
4609 
4610 
4611 # This line needs to be here, verbatim, after all includes and the dummy hook
4612 # definitions. It is replaced with custom functionality when building
4613 # custom sources.
4614 #CUSTOM_AUTOCONF_INCLUDE
4615 
4616 # Do not change or remove the following line, it is needed for consistency checks:
4617 DATE_WHEN_GENERATED=1447665780
4618 
4619 ###############################################################################
4620 #
4621 # Initialization / Boot-strapping
4622 #
4623 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4624 # thus it jumps back and forth, each time gaining something needed later on.
4625 #
4626 ###############################################################################
4627 
4628 # If we are requested to print additional help, do that and then exit.
4629 # This must be the very first call.
4630 
4631   if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4632     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4633     $PRINTF "Which are valid to use depends on the build platform.\n"
4634     for toolchain in $VALID_TOOLCHAINS_all; do
4635       # Use indirect variable referencing
4636       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4637       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4638       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4639     done
4640 
4641     # And now exit directly
4642     exit 0
4643   fi
4644 
4645 
4646 # Basic initialization that must happen first of all in the normal process.
4647 
4648   # Save the original command line. This is passed to us by the wrapper configure script.
4649 
4650   # Save the path variable before it gets changed
4651   ORIGINAL_PATH="$PATH"
4652 
4653   DATE_WHEN_CONFIGURED=`LANG=C date`
4654 
4655   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4656 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4657   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4658 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4659 
4660 
4661   # Start with tools that do not need have cross compilation support
4662   # and can be expected to be found in the default PATH. These tools are
4663   # used by configure.
4664 
4665   # First are all the simple required tools.
4666 
4667 
4668 
4669   # Publish this variable in the help.
4670 
4671 
4672   if [ -z "${BASENAME+x}" ]; then
4673     # The variable is not set by user, try to locate tool using the code snippet
4674     for ac_prog in basename
4675 do
4676   # Extract the first word of "$ac_prog", so it can be a program name with args.
4677 set dummy $ac_prog; ac_word=$2
4678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4679 $as_echo_n "checking for $ac_word... " >&6; }
4680 if ${ac_cv_path_BASENAME+:} false; then :
4681   $as_echo_n "(cached) " >&6
4682 else
4683   case $BASENAME in
4684   [\\/]* | ?:[\\/]*)
4685   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4686   ;;
4687   *)
4688   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4689 for as_dir in $PATH
4690 do
4691   IFS=$as_save_IFS
4692   test -z "$as_dir" && as_dir=.
4693     for ac_exec_ext in '' $ac_executable_extensions; do
4694   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4695     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4696     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4697     break 2
4698   fi
4699 done
4700   done
4701 IFS=$as_save_IFS
4702 
4703   ;;
4704 esac
4705 fi
4706 BASENAME=$ac_cv_path_BASENAME
4707 if test -n "$BASENAME"; then
4708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4709 $as_echo "$BASENAME" >&6; }
4710 else
4711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4712 $as_echo "no" >&6; }
4713 fi
4714 
4715 
4716   test -n "$BASENAME" && break
4717 done
4718 
4719   else
4720     # The variable is set, but is it from the command line or the environment?
4721 
4722     # Try to remove the string !BASENAME! from our list.
4723     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4724     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4725       # If it failed, the variable was not from the command line. Ignore it,
4726       # but warn the user (except for BASH, which is always set by the calling BASH).
4727       if test "xBASENAME" != xBASH; then
4728         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4729 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4730       fi
4731       # Try to locate tool using the code snippet
4732       for ac_prog in basename
4733 do
4734   # Extract the first word of "$ac_prog", so it can be a program name with args.
4735 set dummy $ac_prog; ac_word=$2
4736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4737 $as_echo_n "checking for $ac_word... " >&6; }
4738 if ${ac_cv_path_BASENAME+:} false; then :
4739   $as_echo_n "(cached) " >&6
4740 else
4741   case $BASENAME in
4742   [\\/]* | ?:[\\/]*)
4743   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4744   ;;
4745   *)
4746   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4747 for as_dir in $PATH
4748 do
4749   IFS=$as_save_IFS
4750   test -z "$as_dir" && as_dir=.
4751     for ac_exec_ext in '' $ac_executable_extensions; do
4752   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4753     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4754     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4755     break 2
4756   fi
4757 done
4758   done
4759 IFS=$as_save_IFS
4760 
4761   ;;
4762 esac
4763 fi
4764 BASENAME=$ac_cv_path_BASENAME
4765 if test -n "$BASENAME"; then
4766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4767 $as_echo "$BASENAME" >&6; }
4768 else
4769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4770 $as_echo "no" >&6; }
4771 fi
4772 
4773 
4774   test -n "$BASENAME" && break
4775 done
4776 
4777     else
4778       # If it succeeded, then it was overridden by the user. We will use it
4779       # for the tool.
4780 
4781       # First remove it from the list of overridden variables, so we can test
4782       # for unknown variables in the end.
4783       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4784 
4785       # Check if we try to supply an empty value
4786       if test "x$BASENAME" = x; then
4787         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4788 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4789         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4790 $as_echo_n "checking for BASENAME... " >&6; }
4791         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4792 $as_echo "disabled" >&6; }
4793       else
4794         # Check if the provided tool contains a complete path.
4795         tool_specified="$BASENAME"
4796         tool_basename="${tool_specified##*/}"
4797         if test "x$tool_basename" = "x$tool_specified"; then
4798           # A command without a complete path is provided, search $PATH.
4799           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4800 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4801           # Extract the first word of "$tool_basename", so it can be a program name with args.
4802 set dummy $tool_basename; ac_word=$2
4803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4804 $as_echo_n "checking for $ac_word... " >&6; }
4805 if ${ac_cv_path_BASENAME+:} false; then :
4806   $as_echo_n "(cached) " >&6
4807 else
4808   case $BASENAME in
4809   [\\/]* | ?:[\\/]*)
4810   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4811   ;;
4812   *)
4813   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4814 for as_dir in $PATH
4815 do
4816   IFS=$as_save_IFS
4817   test -z "$as_dir" && as_dir=.
4818     for ac_exec_ext in '' $ac_executable_extensions; do
4819   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4820     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4821     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4822     break 2
4823   fi
4824 done
4825   done
4826 IFS=$as_save_IFS
4827 
4828   ;;
4829 esac
4830 fi
4831 BASENAME=$ac_cv_path_BASENAME
4832 if test -n "$BASENAME"; then
4833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4834 $as_echo "$BASENAME" >&6; }
4835 else
4836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4837 $as_echo "no" >&6; }
4838 fi
4839 
4840 
4841           if test "x$BASENAME" = x; then
4842             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4843           fi
4844         else
4845           # Otherwise we believe it is a complete path. Use it as it is.
4846           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4847 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4848           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4849 $as_echo_n "checking for BASENAME... " >&6; }
4850           if test ! -x "$tool_specified"; then
4851             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4852 $as_echo "not found" >&6; }
4853             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4854           fi
4855           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4856 $as_echo "$tool_specified" >&6; }
4857         fi
4858       fi
4859     fi
4860 
4861   fi
4862 
4863 
4864 
4865   if test "x$BASENAME" = x; then
4866     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4867   fi
4868 
4869 
4870 
4871 
4872 
4873   # Publish this variable in the help.
4874 
4875 
4876   if [ -z "${BASH+x}" ]; then
4877     # The variable is not set by user, try to locate tool using the code snippet
4878     for ac_prog in bash
4879 do
4880   # Extract the first word of "$ac_prog", so it can be a program name with args.
4881 set dummy $ac_prog; ac_word=$2
4882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4883 $as_echo_n "checking for $ac_word... " >&6; }
4884 if ${ac_cv_path_BASH+:} false; then :
4885   $as_echo_n "(cached) " >&6
4886 else
4887   case $BASH in
4888   [\\/]* | ?:[\\/]*)
4889   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4890   ;;
4891   *)
4892   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4893 for as_dir in $PATH
4894 do
4895   IFS=$as_save_IFS
4896   test -z "$as_dir" && as_dir=.
4897     for ac_exec_ext in '' $ac_executable_extensions; do
4898   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4899     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4900     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4901     break 2
4902   fi
4903 done
4904   done
4905 IFS=$as_save_IFS
4906 
4907   ;;
4908 esac
4909 fi
4910 BASH=$ac_cv_path_BASH
4911 if test -n "$BASH"; then
4912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4913 $as_echo "$BASH" >&6; }
4914 else
4915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4916 $as_echo "no" >&6; }
4917 fi
4918 
4919 
4920   test -n "$BASH" && break
4921 done
4922 
4923   else
4924     # The variable is set, but is it from the command line or the environment?
4925 
4926     # Try to remove the string !BASH! from our list.
4927     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4928     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4929       # If it failed, the variable was not from the command line. Ignore it,
4930       # but warn the user (except for BASH, which is always set by the calling BASH).
4931       if test "xBASH" != xBASH; then
4932         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4933 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4934       fi
4935       # Try to locate tool using the code snippet
4936       for ac_prog in bash
4937 do
4938   # Extract the first word of "$ac_prog", so it can be a program name with args.
4939 set dummy $ac_prog; ac_word=$2
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4941 $as_echo_n "checking for $ac_word... " >&6; }
4942 if ${ac_cv_path_BASH+:} false; then :
4943   $as_echo_n "(cached) " >&6
4944 else
4945   case $BASH in
4946   [\\/]* | ?:[\\/]*)
4947   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4948   ;;
4949   *)
4950   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4951 for as_dir in $PATH
4952 do
4953   IFS=$as_save_IFS
4954   test -z "$as_dir" && as_dir=.
4955     for ac_exec_ext in '' $ac_executable_extensions; do
4956   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4957     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4958     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4959     break 2
4960   fi
4961 done
4962   done
4963 IFS=$as_save_IFS
4964 
4965   ;;
4966 esac
4967 fi
4968 BASH=$ac_cv_path_BASH
4969 if test -n "$BASH"; then
4970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4971 $as_echo "$BASH" >&6; }
4972 else
4973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4974 $as_echo "no" >&6; }
4975 fi
4976 
4977 
4978   test -n "$BASH" && break
4979 done
4980 
4981     else
4982       # If it succeeded, then it was overridden by the user. We will use it
4983       # for the tool.
4984 
4985       # First remove it from the list of overridden variables, so we can test
4986       # for unknown variables in the end.
4987       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4988 
4989       # Check if we try to supply an empty value
4990       if test "x$BASH" = x; then
4991         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
4992 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
4993         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4994 $as_echo_n "checking for BASH... " >&6; }
4995         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4996 $as_echo "disabled" >&6; }
4997       else
4998         # Check if the provided tool contains a complete path.
4999         tool_specified="$BASH"
5000         tool_basename="${tool_specified##*/}"
5001         if test "x$tool_basename" = "x$tool_specified"; then
5002           # A command without a complete path is provided, search $PATH.
5003           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5004 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5005           # Extract the first word of "$tool_basename", so it can be a program name with args.
5006 set dummy $tool_basename; ac_word=$2
5007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5008 $as_echo_n "checking for $ac_word... " >&6; }
5009 if ${ac_cv_path_BASH+:} false; then :
5010   $as_echo_n "(cached) " >&6
5011 else
5012   case $BASH in
5013   [\\/]* | ?:[\\/]*)
5014   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5015   ;;
5016   *)
5017   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5018 for as_dir in $PATH
5019 do
5020   IFS=$as_save_IFS
5021   test -z "$as_dir" && as_dir=.
5022     for ac_exec_ext in '' $ac_executable_extensions; do
5023   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5024     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5025     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5026     break 2
5027   fi
5028 done
5029   done
5030 IFS=$as_save_IFS
5031 
5032   ;;
5033 esac
5034 fi
5035 BASH=$ac_cv_path_BASH
5036 if test -n "$BASH"; then
5037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5038 $as_echo "$BASH" >&6; }
5039 else
5040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5041 $as_echo "no" >&6; }
5042 fi
5043 
5044 
5045           if test "x$BASH" = x; then
5046             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5047           fi
5048         else
5049           # Otherwise we believe it is a complete path. Use it as it is.
5050           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5051 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5052           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5053 $as_echo_n "checking for BASH... " >&6; }
5054           if test ! -x "$tool_specified"; then
5055             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5056 $as_echo "not found" >&6; }
5057             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5058           fi
5059           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5060 $as_echo "$tool_specified" >&6; }
5061         fi
5062       fi
5063     fi
5064 
5065   fi
5066 
5067 
5068 
5069   if test "x$BASH" = x; then
5070     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5071   fi
5072 
5073 
5074 
5075 
5076 
5077   # Publish this variable in the help.
5078 
5079 
5080   if [ -z "${CAT+x}" ]; then
5081     # The variable is not set by user, try to locate tool using the code snippet
5082     for ac_prog in cat
5083 do
5084   # Extract the first word of "$ac_prog", so it can be a program name with args.
5085 set dummy $ac_prog; ac_word=$2
5086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5087 $as_echo_n "checking for $ac_word... " >&6; }
5088 if ${ac_cv_path_CAT+:} false; then :
5089   $as_echo_n "(cached) " >&6
5090 else
5091   case $CAT in
5092   [\\/]* | ?:[\\/]*)
5093   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5094   ;;
5095   *)
5096   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5097 for as_dir in $PATH
5098 do
5099   IFS=$as_save_IFS
5100   test -z "$as_dir" && as_dir=.
5101     for ac_exec_ext in '' $ac_executable_extensions; do
5102   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5103     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5104     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5105     break 2
5106   fi
5107 done
5108   done
5109 IFS=$as_save_IFS
5110 
5111   ;;
5112 esac
5113 fi
5114 CAT=$ac_cv_path_CAT
5115 if test -n "$CAT"; then
5116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5117 $as_echo "$CAT" >&6; }
5118 else
5119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5120 $as_echo "no" >&6; }
5121 fi
5122 
5123 
5124   test -n "$CAT" && break
5125 done
5126 
5127   else
5128     # The variable is set, but is it from the command line or the environment?
5129 
5130     # Try to remove the string !CAT! from our list.
5131     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5132     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5133       # If it failed, the variable was not from the command line. Ignore it,
5134       # but warn the user (except for BASH, which is always set by the calling BASH).
5135       if test "xCAT" != xBASH; then
5136         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5137 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5138       fi
5139       # Try to locate tool using the code snippet
5140       for ac_prog in cat
5141 do
5142   # Extract the first word of "$ac_prog", so it can be a program name with args.
5143 set dummy $ac_prog; ac_word=$2
5144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5145 $as_echo_n "checking for $ac_word... " >&6; }
5146 if ${ac_cv_path_CAT+:} false; then :
5147   $as_echo_n "(cached) " >&6
5148 else
5149   case $CAT in
5150   [\\/]* | ?:[\\/]*)
5151   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5152   ;;
5153   *)
5154   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5155 for as_dir in $PATH
5156 do
5157   IFS=$as_save_IFS
5158   test -z "$as_dir" && as_dir=.
5159     for ac_exec_ext in '' $ac_executable_extensions; do
5160   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5161     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5162     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5163     break 2
5164   fi
5165 done
5166   done
5167 IFS=$as_save_IFS
5168 
5169   ;;
5170 esac
5171 fi
5172 CAT=$ac_cv_path_CAT
5173 if test -n "$CAT"; then
5174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5175 $as_echo "$CAT" >&6; }
5176 else
5177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5178 $as_echo "no" >&6; }
5179 fi
5180 
5181 
5182   test -n "$CAT" && break
5183 done
5184 
5185     else
5186       # If it succeeded, then it was overridden by the user. We will use it
5187       # for the tool.
5188 
5189       # First remove it from the list of overridden variables, so we can test
5190       # for unknown variables in the end.
5191       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5192 
5193       # Check if we try to supply an empty value
5194       if test "x$CAT" = x; then
5195         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5196 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5197         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5198 $as_echo_n "checking for CAT... " >&6; }
5199         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5200 $as_echo "disabled" >&6; }
5201       else
5202         # Check if the provided tool contains a complete path.
5203         tool_specified="$CAT"
5204         tool_basename="${tool_specified##*/}"
5205         if test "x$tool_basename" = "x$tool_specified"; then
5206           # A command without a complete path is provided, search $PATH.
5207           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5208 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5209           # Extract the first word of "$tool_basename", so it can be a program name with args.
5210 set dummy $tool_basename; ac_word=$2
5211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5212 $as_echo_n "checking for $ac_word... " >&6; }
5213 if ${ac_cv_path_CAT+:} false; then :
5214   $as_echo_n "(cached) " >&6
5215 else
5216   case $CAT in
5217   [\\/]* | ?:[\\/]*)
5218   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5219   ;;
5220   *)
5221   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5222 for as_dir in $PATH
5223 do
5224   IFS=$as_save_IFS
5225   test -z "$as_dir" && as_dir=.
5226     for ac_exec_ext in '' $ac_executable_extensions; do
5227   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5228     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5229     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5230     break 2
5231   fi
5232 done
5233   done
5234 IFS=$as_save_IFS
5235 
5236   ;;
5237 esac
5238 fi
5239 CAT=$ac_cv_path_CAT
5240 if test -n "$CAT"; then
5241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5242 $as_echo "$CAT" >&6; }
5243 else
5244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5245 $as_echo "no" >&6; }
5246 fi
5247 
5248 
5249           if test "x$CAT" = x; then
5250             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5251           fi
5252         else
5253           # Otherwise we believe it is a complete path. Use it as it is.
5254           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5255 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5256           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5257 $as_echo_n "checking for CAT... " >&6; }
5258           if test ! -x "$tool_specified"; then
5259             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5260 $as_echo "not found" >&6; }
5261             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5262           fi
5263           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5264 $as_echo "$tool_specified" >&6; }
5265         fi
5266       fi
5267     fi
5268 
5269   fi
5270 
5271 
5272 
5273   if test "x$CAT" = x; then
5274     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5275   fi
5276 
5277 
5278 
5279 
5280 
5281   # Publish this variable in the help.
5282 
5283 
5284   if [ -z "${CHMOD+x}" ]; then
5285     # The variable is not set by user, try to locate tool using the code snippet
5286     for ac_prog in chmod
5287 do
5288   # Extract the first word of "$ac_prog", so it can be a program name with args.
5289 set dummy $ac_prog; ac_word=$2
5290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5291 $as_echo_n "checking for $ac_word... " >&6; }
5292 if ${ac_cv_path_CHMOD+:} false; then :
5293   $as_echo_n "(cached) " >&6
5294 else
5295   case $CHMOD in
5296   [\\/]* | ?:[\\/]*)
5297   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5298   ;;
5299   *)
5300   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5301 for as_dir in $PATH
5302 do
5303   IFS=$as_save_IFS
5304   test -z "$as_dir" && as_dir=.
5305     for ac_exec_ext in '' $ac_executable_extensions; do
5306   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5307     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5309     break 2
5310   fi
5311 done
5312   done
5313 IFS=$as_save_IFS
5314 
5315   ;;
5316 esac
5317 fi
5318 CHMOD=$ac_cv_path_CHMOD
5319 if test -n "$CHMOD"; then
5320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5321 $as_echo "$CHMOD" >&6; }
5322 else
5323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5324 $as_echo "no" >&6; }
5325 fi
5326 
5327 
5328   test -n "$CHMOD" && break
5329 done
5330 
5331   else
5332     # The variable is set, but is it from the command line or the environment?
5333 
5334     # Try to remove the string !CHMOD! from our list.
5335     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5336     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5337       # If it failed, the variable was not from the command line. Ignore it,
5338       # but warn the user (except for BASH, which is always set by the calling BASH).
5339       if test "xCHMOD" != xBASH; then
5340         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5341 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5342       fi
5343       # Try to locate tool using the code snippet
5344       for ac_prog in chmod
5345 do
5346   # Extract the first word of "$ac_prog", so it can be a program name with args.
5347 set dummy $ac_prog; ac_word=$2
5348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5349 $as_echo_n "checking for $ac_word... " >&6; }
5350 if ${ac_cv_path_CHMOD+:} false; then :
5351   $as_echo_n "(cached) " >&6
5352 else
5353   case $CHMOD in
5354   [\\/]* | ?:[\\/]*)
5355   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5356   ;;
5357   *)
5358   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5359 for as_dir in $PATH
5360 do
5361   IFS=$as_save_IFS
5362   test -z "$as_dir" && as_dir=.
5363     for ac_exec_ext in '' $ac_executable_extensions; do
5364   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5365     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5366     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5367     break 2
5368   fi
5369 done
5370   done
5371 IFS=$as_save_IFS
5372 
5373   ;;
5374 esac
5375 fi
5376 CHMOD=$ac_cv_path_CHMOD
5377 if test -n "$CHMOD"; then
5378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5379 $as_echo "$CHMOD" >&6; }
5380 else
5381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5382 $as_echo "no" >&6; }
5383 fi
5384 
5385 
5386   test -n "$CHMOD" && break
5387 done
5388 
5389     else
5390       # If it succeeded, then it was overridden by the user. We will use it
5391       # for the tool.
5392 
5393       # First remove it from the list of overridden variables, so we can test
5394       # for unknown variables in the end.
5395       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5396 
5397       # Check if we try to supply an empty value
5398       if test "x$CHMOD" = x; then
5399         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5400 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5401         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5402 $as_echo_n "checking for CHMOD... " >&6; }
5403         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5404 $as_echo "disabled" >&6; }
5405       else
5406         # Check if the provided tool contains a complete path.
5407         tool_specified="$CHMOD"
5408         tool_basename="${tool_specified##*/}"
5409         if test "x$tool_basename" = "x$tool_specified"; then
5410           # A command without a complete path is provided, search $PATH.
5411           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5412 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5413           # Extract the first word of "$tool_basename", so it can be a program name with args.
5414 set dummy $tool_basename; ac_word=$2
5415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5416 $as_echo_n "checking for $ac_word... " >&6; }
5417 if ${ac_cv_path_CHMOD+:} false; then :
5418   $as_echo_n "(cached) " >&6
5419 else
5420   case $CHMOD in
5421   [\\/]* | ?:[\\/]*)
5422   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5423   ;;
5424   *)
5425   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5426 for as_dir in $PATH
5427 do
5428   IFS=$as_save_IFS
5429   test -z "$as_dir" && as_dir=.
5430     for ac_exec_ext in '' $ac_executable_extensions; do
5431   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5432     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5433     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5434     break 2
5435   fi
5436 done
5437   done
5438 IFS=$as_save_IFS
5439 
5440   ;;
5441 esac
5442 fi
5443 CHMOD=$ac_cv_path_CHMOD
5444 if test -n "$CHMOD"; then
5445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5446 $as_echo "$CHMOD" >&6; }
5447 else
5448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5449 $as_echo "no" >&6; }
5450 fi
5451 
5452 
5453           if test "x$CHMOD" = x; then
5454             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5455           fi
5456         else
5457           # Otherwise we believe it is a complete path. Use it as it is.
5458           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5459 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5460           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5461 $as_echo_n "checking for CHMOD... " >&6; }
5462           if test ! -x "$tool_specified"; then
5463             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5464 $as_echo "not found" >&6; }
5465             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5466           fi
5467           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5468 $as_echo "$tool_specified" >&6; }
5469         fi
5470       fi
5471     fi
5472 
5473   fi
5474 
5475 
5476 
5477   if test "x$CHMOD" = x; then
5478     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5479   fi
5480 
5481 
5482 
5483 
5484 
5485   # Publish this variable in the help.
5486 
5487 
5488   if [ -z "${CMP+x}" ]; then
5489     # The variable is not set by user, try to locate tool using the code snippet
5490     for ac_prog in cmp
5491 do
5492   # Extract the first word of "$ac_prog", so it can be a program name with args.
5493 set dummy $ac_prog; ac_word=$2
5494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5495 $as_echo_n "checking for $ac_word... " >&6; }
5496 if ${ac_cv_path_CMP+:} false; then :
5497   $as_echo_n "(cached) " >&6
5498 else
5499   case $CMP in
5500   [\\/]* | ?:[\\/]*)
5501   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5502   ;;
5503   *)
5504   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5505 for as_dir in $PATH
5506 do
5507   IFS=$as_save_IFS
5508   test -z "$as_dir" && as_dir=.
5509     for ac_exec_ext in '' $ac_executable_extensions; do
5510   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5511     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5513     break 2
5514   fi
5515 done
5516   done
5517 IFS=$as_save_IFS
5518 
5519   ;;
5520 esac
5521 fi
5522 CMP=$ac_cv_path_CMP
5523 if test -n "$CMP"; then
5524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5525 $as_echo "$CMP" >&6; }
5526 else
5527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5528 $as_echo "no" >&6; }
5529 fi
5530 
5531 
5532   test -n "$CMP" && break
5533 done
5534 
5535   else
5536     # The variable is set, but is it from the command line or the environment?
5537 
5538     # Try to remove the string !CMP! from our list.
5539     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5540     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5541       # If it failed, the variable was not from the command line. Ignore it,
5542       # but warn the user (except for BASH, which is always set by the calling BASH).
5543       if test "xCMP" != xBASH; then
5544         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5545 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5546       fi
5547       # Try to locate tool using the code snippet
5548       for ac_prog in cmp
5549 do
5550   # Extract the first word of "$ac_prog", so it can be a program name with args.
5551 set dummy $ac_prog; ac_word=$2
5552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5553 $as_echo_n "checking for $ac_word... " >&6; }
5554 if ${ac_cv_path_CMP+:} false; then :
5555   $as_echo_n "(cached) " >&6
5556 else
5557   case $CMP in
5558   [\\/]* | ?:[\\/]*)
5559   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5560   ;;
5561   *)
5562   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5563 for as_dir in $PATH
5564 do
5565   IFS=$as_save_IFS
5566   test -z "$as_dir" && as_dir=.
5567     for ac_exec_ext in '' $ac_executable_extensions; do
5568   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5569     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5570     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5571     break 2
5572   fi
5573 done
5574   done
5575 IFS=$as_save_IFS
5576 
5577   ;;
5578 esac
5579 fi
5580 CMP=$ac_cv_path_CMP
5581 if test -n "$CMP"; then
5582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5583 $as_echo "$CMP" >&6; }
5584 else
5585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5586 $as_echo "no" >&6; }
5587 fi
5588 
5589 
5590   test -n "$CMP" && break
5591 done
5592 
5593     else
5594       # If it succeeded, then it was overridden by the user. We will use it
5595       # for the tool.
5596 
5597       # First remove it from the list of overridden variables, so we can test
5598       # for unknown variables in the end.
5599       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5600 
5601       # Check if we try to supply an empty value
5602       if test "x$CMP" = x; then
5603         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5604 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5605         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5606 $as_echo_n "checking for CMP... " >&6; }
5607         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5608 $as_echo "disabled" >&6; }
5609       else
5610         # Check if the provided tool contains a complete path.
5611         tool_specified="$CMP"
5612         tool_basename="${tool_specified##*/}"
5613         if test "x$tool_basename" = "x$tool_specified"; then
5614           # A command without a complete path is provided, search $PATH.
5615           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5616 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5617           # Extract the first word of "$tool_basename", so it can be a program name with args.
5618 set dummy $tool_basename; ac_word=$2
5619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5620 $as_echo_n "checking for $ac_word... " >&6; }
5621 if ${ac_cv_path_CMP+:} false; then :
5622   $as_echo_n "(cached) " >&6
5623 else
5624   case $CMP in
5625   [\\/]* | ?:[\\/]*)
5626   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5627   ;;
5628   *)
5629   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5630 for as_dir in $PATH
5631 do
5632   IFS=$as_save_IFS
5633   test -z "$as_dir" && as_dir=.
5634     for ac_exec_ext in '' $ac_executable_extensions; do
5635   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5636     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5637     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5638     break 2
5639   fi
5640 done
5641   done
5642 IFS=$as_save_IFS
5643 
5644   ;;
5645 esac
5646 fi
5647 CMP=$ac_cv_path_CMP
5648 if test -n "$CMP"; then
5649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5650 $as_echo "$CMP" >&6; }
5651 else
5652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5653 $as_echo "no" >&6; }
5654 fi
5655 
5656 
5657           if test "x$CMP" = x; then
5658             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5659           fi
5660         else
5661           # Otherwise we believe it is a complete path. Use it as it is.
5662           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5663 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5664           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5665 $as_echo_n "checking for CMP... " >&6; }
5666           if test ! -x "$tool_specified"; then
5667             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5668 $as_echo "not found" >&6; }
5669             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5670           fi
5671           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5672 $as_echo "$tool_specified" >&6; }
5673         fi
5674       fi
5675     fi
5676 
5677   fi
5678 
5679 
5680 
5681   if test "x$CMP" = x; then
5682     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5683   fi
5684 
5685 
5686 
5687 
5688 
5689   # Publish this variable in the help.
5690 
5691 
5692   if [ -z "${COMM+x}" ]; then
5693     # The variable is not set by user, try to locate tool using the code snippet
5694     for ac_prog in comm
5695 do
5696   # Extract the first word of "$ac_prog", so it can be a program name with args.
5697 set dummy $ac_prog; ac_word=$2
5698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5699 $as_echo_n "checking for $ac_word... " >&6; }
5700 if ${ac_cv_path_COMM+:} false; then :
5701   $as_echo_n "(cached) " >&6
5702 else
5703   case $COMM in
5704   [\\/]* | ?:[\\/]*)
5705   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5706   ;;
5707   *)
5708   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5709 for as_dir in $PATH
5710 do
5711   IFS=$as_save_IFS
5712   test -z "$as_dir" && as_dir=.
5713     for ac_exec_ext in '' $ac_executable_extensions; do
5714   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5715     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5716     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5717     break 2
5718   fi
5719 done
5720   done
5721 IFS=$as_save_IFS
5722 
5723   ;;
5724 esac
5725 fi
5726 COMM=$ac_cv_path_COMM
5727 if test -n "$COMM"; then
5728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5729 $as_echo "$COMM" >&6; }
5730 else
5731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5732 $as_echo "no" >&6; }
5733 fi
5734 
5735 
5736   test -n "$COMM" && break
5737 done
5738 
5739   else
5740     # The variable is set, but is it from the command line or the environment?
5741 
5742     # Try to remove the string !COMM! from our list.
5743     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5744     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5745       # If it failed, the variable was not from the command line. Ignore it,
5746       # but warn the user (except for BASH, which is always set by the calling BASH).
5747       if test "xCOMM" != xBASH; then
5748         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5749 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5750       fi
5751       # Try to locate tool using the code snippet
5752       for ac_prog in comm
5753 do
5754   # Extract the first word of "$ac_prog", so it can be a program name with args.
5755 set dummy $ac_prog; ac_word=$2
5756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5757 $as_echo_n "checking for $ac_word... " >&6; }
5758 if ${ac_cv_path_COMM+:} false; then :
5759   $as_echo_n "(cached) " >&6
5760 else
5761   case $COMM in
5762   [\\/]* | ?:[\\/]*)
5763   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5764   ;;
5765   *)
5766   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5767 for as_dir in $PATH
5768 do
5769   IFS=$as_save_IFS
5770   test -z "$as_dir" && as_dir=.
5771     for ac_exec_ext in '' $ac_executable_extensions; do
5772   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5773     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5774     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5775     break 2
5776   fi
5777 done
5778   done
5779 IFS=$as_save_IFS
5780 
5781   ;;
5782 esac
5783 fi
5784 COMM=$ac_cv_path_COMM
5785 if test -n "$COMM"; then
5786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5787 $as_echo "$COMM" >&6; }
5788 else
5789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5790 $as_echo "no" >&6; }
5791 fi
5792 
5793 
5794   test -n "$COMM" && break
5795 done
5796 
5797     else
5798       # If it succeeded, then it was overridden by the user. We will use it
5799       # for the tool.
5800 
5801       # First remove it from the list of overridden variables, so we can test
5802       # for unknown variables in the end.
5803       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5804 
5805       # Check if we try to supply an empty value
5806       if test "x$COMM" = x; then
5807         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5808 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5809         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5810 $as_echo_n "checking for COMM... " >&6; }
5811         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5812 $as_echo "disabled" >&6; }
5813       else
5814         # Check if the provided tool contains a complete path.
5815         tool_specified="$COMM"
5816         tool_basename="${tool_specified##*/}"
5817         if test "x$tool_basename" = "x$tool_specified"; then
5818           # A command without a complete path is provided, search $PATH.
5819           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5820 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5821           # Extract the first word of "$tool_basename", so it can be a program name with args.
5822 set dummy $tool_basename; ac_word=$2
5823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5824 $as_echo_n "checking for $ac_word... " >&6; }
5825 if ${ac_cv_path_COMM+:} false; then :
5826   $as_echo_n "(cached) " >&6
5827 else
5828   case $COMM in
5829   [\\/]* | ?:[\\/]*)
5830   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5831   ;;
5832   *)
5833   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5834 for as_dir in $PATH
5835 do
5836   IFS=$as_save_IFS
5837   test -z "$as_dir" && as_dir=.
5838     for ac_exec_ext in '' $ac_executable_extensions; do
5839   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5840     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5841     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5842     break 2
5843   fi
5844 done
5845   done
5846 IFS=$as_save_IFS
5847 
5848   ;;
5849 esac
5850 fi
5851 COMM=$ac_cv_path_COMM
5852 if test -n "$COMM"; then
5853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5854 $as_echo "$COMM" >&6; }
5855 else
5856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5857 $as_echo "no" >&6; }
5858 fi
5859 
5860 
5861           if test "x$COMM" = x; then
5862             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5863           fi
5864         else
5865           # Otherwise we believe it is a complete path. Use it as it is.
5866           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5867 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5868           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5869 $as_echo_n "checking for COMM... " >&6; }
5870           if test ! -x "$tool_specified"; then
5871             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5872 $as_echo "not found" >&6; }
5873             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5874           fi
5875           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5876 $as_echo "$tool_specified" >&6; }
5877         fi
5878       fi
5879     fi
5880 
5881   fi
5882 
5883 
5884 
5885   if test "x$COMM" = x; then
5886     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5887   fi
5888 
5889 
5890 
5891 
5892 
5893   # Publish this variable in the help.
5894 
5895 
5896   if [ -z "${CP+x}" ]; then
5897     # The variable is not set by user, try to locate tool using the code snippet
5898     for ac_prog in cp
5899 do
5900   # Extract the first word of "$ac_prog", so it can be a program name with args.
5901 set dummy $ac_prog; ac_word=$2
5902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5903 $as_echo_n "checking for $ac_word... " >&6; }
5904 if ${ac_cv_path_CP+:} false; then :
5905   $as_echo_n "(cached) " >&6
5906 else
5907   case $CP in
5908   [\\/]* | ?:[\\/]*)
5909   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5910   ;;
5911   *)
5912   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5913 for as_dir in $PATH
5914 do
5915   IFS=$as_save_IFS
5916   test -z "$as_dir" && as_dir=.
5917     for ac_exec_ext in '' $ac_executable_extensions; do
5918   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5919     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5920     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5921     break 2
5922   fi
5923 done
5924   done
5925 IFS=$as_save_IFS
5926 
5927   ;;
5928 esac
5929 fi
5930 CP=$ac_cv_path_CP
5931 if test -n "$CP"; then
5932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5933 $as_echo "$CP" >&6; }
5934 else
5935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5936 $as_echo "no" >&6; }
5937 fi
5938 
5939 
5940   test -n "$CP" && break
5941 done
5942 
5943   else
5944     # The variable is set, but is it from the command line or the environment?
5945 
5946     # Try to remove the string !CP! from our list.
5947     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5948     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5949       # If it failed, the variable was not from the command line. Ignore it,
5950       # but warn the user (except for BASH, which is always set by the calling BASH).
5951       if test "xCP" != xBASH; then
5952         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5953 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5954       fi
5955       # Try to locate tool using the code snippet
5956       for ac_prog in cp
5957 do
5958   # Extract the first word of "$ac_prog", so it can be a program name with args.
5959 set dummy $ac_prog; ac_word=$2
5960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5961 $as_echo_n "checking for $ac_word... " >&6; }
5962 if ${ac_cv_path_CP+:} false; then :
5963   $as_echo_n "(cached) " >&6
5964 else
5965   case $CP in
5966   [\\/]* | ?:[\\/]*)
5967   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5968   ;;
5969   *)
5970   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5971 for as_dir in $PATH
5972 do
5973   IFS=$as_save_IFS
5974   test -z "$as_dir" && as_dir=.
5975     for ac_exec_ext in '' $ac_executable_extensions; do
5976   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5977     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5978     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5979     break 2
5980   fi
5981 done
5982   done
5983 IFS=$as_save_IFS
5984 
5985   ;;
5986 esac
5987 fi
5988 CP=$ac_cv_path_CP
5989 if test -n "$CP"; then
5990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5991 $as_echo "$CP" >&6; }
5992 else
5993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5994 $as_echo "no" >&6; }
5995 fi
5996 
5997 
5998   test -n "$CP" && break
5999 done
6000 
6001     else
6002       # If it succeeded, then it was overridden by the user. We will use it
6003       # for the tool.
6004 
6005       # First remove it from the list of overridden variables, so we can test
6006       # for unknown variables in the end.
6007       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6008 
6009       # Check if we try to supply an empty value
6010       if test "x$CP" = x; then
6011         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6012 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6013         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6014 $as_echo_n "checking for CP... " >&6; }
6015         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6016 $as_echo "disabled" >&6; }
6017       else
6018         # Check if the provided tool contains a complete path.
6019         tool_specified="$CP"
6020         tool_basename="${tool_specified##*/}"
6021         if test "x$tool_basename" = "x$tool_specified"; then
6022           # A command without a complete path is provided, search $PATH.
6023           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6024 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6025           # Extract the first word of "$tool_basename", so it can be a program name with args.
6026 set dummy $tool_basename; ac_word=$2
6027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6028 $as_echo_n "checking for $ac_word... " >&6; }
6029 if ${ac_cv_path_CP+:} false; then :
6030   $as_echo_n "(cached) " >&6
6031 else
6032   case $CP in
6033   [\\/]* | ?:[\\/]*)
6034   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6035   ;;
6036   *)
6037   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6038 for as_dir in $PATH
6039 do
6040   IFS=$as_save_IFS
6041   test -z "$as_dir" && as_dir=.
6042     for ac_exec_ext in '' $ac_executable_extensions; do
6043   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6044     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6045     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6046     break 2
6047   fi
6048 done
6049   done
6050 IFS=$as_save_IFS
6051 
6052   ;;
6053 esac
6054 fi
6055 CP=$ac_cv_path_CP
6056 if test -n "$CP"; then
6057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6058 $as_echo "$CP" >&6; }
6059 else
6060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6061 $as_echo "no" >&6; }
6062 fi
6063 
6064 
6065           if test "x$CP" = x; then
6066             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6067           fi
6068         else
6069           # Otherwise we believe it is a complete path. Use it as it is.
6070           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6071 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6072           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6073 $as_echo_n "checking for CP... " >&6; }
6074           if test ! -x "$tool_specified"; then
6075             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6076 $as_echo "not found" >&6; }
6077             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6078           fi
6079           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6080 $as_echo "$tool_specified" >&6; }
6081         fi
6082       fi
6083     fi
6084 
6085   fi
6086 
6087 
6088 
6089   if test "x$CP" = x; then
6090     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6091   fi
6092 
6093 
6094 
6095 
6096 
6097   # Publish this variable in the help.
6098 
6099 
6100   if [ -z "${CUT+x}" ]; then
6101     # The variable is not set by user, try to locate tool using the code snippet
6102     for ac_prog in cut
6103 do
6104   # Extract the first word of "$ac_prog", so it can be a program name with args.
6105 set dummy $ac_prog; ac_word=$2
6106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6107 $as_echo_n "checking for $ac_word... " >&6; }
6108 if ${ac_cv_path_CUT+:} false; then :
6109   $as_echo_n "(cached) " >&6
6110 else
6111   case $CUT in
6112   [\\/]* | ?:[\\/]*)
6113   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6114   ;;
6115   *)
6116   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6117 for as_dir in $PATH
6118 do
6119   IFS=$as_save_IFS
6120   test -z "$as_dir" && as_dir=.
6121     for ac_exec_ext in '' $ac_executable_extensions; do
6122   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6123     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6124     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6125     break 2
6126   fi
6127 done
6128   done
6129 IFS=$as_save_IFS
6130 
6131   ;;
6132 esac
6133 fi
6134 CUT=$ac_cv_path_CUT
6135 if test -n "$CUT"; then
6136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6137 $as_echo "$CUT" >&6; }
6138 else
6139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6140 $as_echo "no" >&6; }
6141 fi
6142 
6143 
6144   test -n "$CUT" && break
6145 done
6146 
6147   else
6148     # The variable is set, but is it from the command line or the environment?
6149 
6150     # Try to remove the string !CUT! from our list.
6151     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6152     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6153       # If it failed, the variable was not from the command line. Ignore it,
6154       # but warn the user (except for BASH, which is always set by the calling BASH).
6155       if test "xCUT" != xBASH; then
6156         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6157 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6158       fi
6159       # Try to locate tool using the code snippet
6160       for ac_prog in cut
6161 do
6162   # Extract the first word of "$ac_prog", so it can be a program name with args.
6163 set dummy $ac_prog; ac_word=$2
6164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6165 $as_echo_n "checking for $ac_word... " >&6; }
6166 if ${ac_cv_path_CUT+:} false; then :
6167   $as_echo_n "(cached) " >&6
6168 else
6169   case $CUT in
6170   [\\/]* | ?:[\\/]*)
6171   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6172   ;;
6173   *)
6174   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6175 for as_dir in $PATH
6176 do
6177   IFS=$as_save_IFS
6178   test -z "$as_dir" && as_dir=.
6179     for ac_exec_ext in '' $ac_executable_extensions; do
6180   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6181     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6182     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6183     break 2
6184   fi
6185 done
6186   done
6187 IFS=$as_save_IFS
6188 
6189   ;;
6190 esac
6191 fi
6192 CUT=$ac_cv_path_CUT
6193 if test -n "$CUT"; then
6194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6195 $as_echo "$CUT" >&6; }
6196 else
6197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6198 $as_echo "no" >&6; }
6199 fi
6200 
6201 
6202   test -n "$CUT" && break
6203 done
6204 
6205     else
6206       # If it succeeded, then it was overridden by the user. We will use it
6207       # for the tool.
6208 
6209       # First remove it from the list of overridden variables, so we can test
6210       # for unknown variables in the end.
6211       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6212 
6213       # Check if we try to supply an empty value
6214       if test "x$CUT" = x; then
6215         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6216 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6217         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6218 $as_echo_n "checking for CUT... " >&6; }
6219         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6220 $as_echo "disabled" >&6; }
6221       else
6222         # Check if the provided tool contains a complete path.
6223         tool_specified="$CUT"
6224         tool_basename="${tool_specified##*/}"
6225         if test "x$tool_basename" = "x$tool_specified"; then
6226           # A command without a complete path is provided, search $PATH.
6227           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6228 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6229           # Extract the first word of "$tool_basename", so it can be a program name with args.
6230 set dummy $tool_basename; ac_word=$2
6231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6232 $as_echo_n "checking for $ac_word... " >&6; }
6233 if ${ac_cv_path_CUT+:} false; then :
6234   $as_echo_n "(cached) " >&6
6235 else
6236   case $CUT in
6237   [\\/]* | ?:[\\/]*)
6238   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6239   ;;
6240   *)
6241   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6242 for as_dir in $PATH
6243 do
6244   IFS=$as_save_IFS
6245   test -z "$as_dir" && as_dir=.
6246     for ac_exec_ext in '' $ac_executable_extensions; do
6247   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6248     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6249     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6250     break 2
6251   fi
6252 done
6253   done
6254 IFS=$as_save_IFS
6255 
6256   ;;
6257 esac
6258 fi
6259 CUT=$ac_cv_path_CUT
6260 if test -n "$CUT"; then
6261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6262 $as_echo "$CUT" >&6; }
6263 else
6264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6265 $as_echo "no" >&6; }
6266 fi
6267 
6268 
6269           if test "x$CUT" = x; then
6270             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6271           fi
6272         else
6273           # Otherwise we believe it is a complete path. Use it as it is.
6274           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6275 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6276           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6277 $as_echo_n "checking for CUT... " >&6; }
6278           if test ! -x "$tool_specified"; then
6279             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6280 $as_echo "not found" >&6; }
6281             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6282           fi
6283           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6284 $as_echo "$tool_specified" >&6; }
6285         fi
6286       fi
6287     fi
6288 
6289   fi
6290 
6291 
6292 
6293   if test "x$CUT" = x; then
6294     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6295   fi
6296 
6297 
6298 
6299 
6300 
6301   # Publish this variable in the help.
6302 
6303 
6304   if [ -z "${DATE+x}" ]; then
6305     # The variable is not set by user, try to locate tool using the code snippet
6306     for ac_prog in date
6307 do
6308   # Extract the first word of "$ac_prog", so it can be a program name with args.
6309 set dummy $ac_prog; ac_word=$2
6310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6311 $as_echo_n "checking for $ac_word... " >&6; }
6312 if ${ac_cv_path_DATE+:} false; then :
6313   $as_echo_n "(cached) " >&6
6314 else
6315   case $DATE in
6316   [\\/]* | ?:[\\/]*)
6317   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6318   ;;
6319   *)
6320   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6321 for as_dir in $PATH
6322 do
6323   IFS=$as_save_IFS
6324   test -z "$as_dir" && as_dir=.
6325     for ac_exec_ext in '' $ac_executable_extensions; do
6326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6327     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6329     break 2
6330   fi
6331 done
6332   done
6333 IFS=$as_save_IFS
6334 
6335   ;;
6336 esac
6337 fi
6338 DATE=$ac_cv_path_DATE
6339 if test -n "$DATE"; then
6340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6341 $as_echo "$DATE" >&6; }
6342 else
6343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6344 $as_echo "no" >&6; }
6345 fi
6346 
6347 
6348   test -n "$DATE" && break
6349 done
6350 
6351   else
6352     # The variable is set, but is it from the command line or the environment?
6353 
6354     # Try to remove the string !DATE! from our list.
6355     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6356     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6357       # If it failed, the variable was not from the command line. Ignore it,
6358       # but warn the user (except for BASH, which is always set by the calling BASH).
6359       if test "xDATE" != xBASH; then
6360         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6361 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6362       fi
6363       # Try to locate tool using the code snippet
6364       for ac_prog in date
6365 do
6366   # Extract the first word of "$ac_prog", so it can be a program name with args.
6367 set dummy $ac_prog; ac_word=$2
6368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6369 $as_echo_n "checking for $ac_word... " >&6; }
6370 if ${ac_cv_path_DATE+:} false; then :
6371   $as_echo_n "(cached) " >&6
6372 else
6373   case $DATE in
6374   [\\/]* | ?:[\\/]*)
6375   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6376   ;;
6377   *)
6378   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6379 for as_dir in $PATH
6380 do
6381   IFS=$as_save_IFS
6382   test -z "$as_dir" && as_dir=.
6383     for ac_exec_ext in '' $ac_executable_extensions; do
6384   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6385     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6386     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6387     break 2
6388   fi
6389 done
6390   done
6391 IFS=$as_save_IFS
6392 
6393   ;;
6394 esac
6395 fi
6396 DATE=$ac_cv_path_DATE
6397 if test -n "$DATE"; then
6398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6399 $as_echo "$DATE" >&6; }
6400 else
6401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6402 $as_echo "no" >&6; }
6403 fi
6404 
6405 
6406   test -n "$DATE" && break
6407 done
6408 
6409     else
6410       # If it succeeded, then it was overridden by the user. We will use it
6411       # for the tool.
6412 
6413       # First remove it from the list of overridden variables, so we can test
6414       # for unknown variables in the end.
6415       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6416 
6417       # Check if we try to supply an empty value
6418       if test "x$DATE" = x; then
6419         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6420 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6421         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6422 $as_echo_n "checking for DATE... " >&6; }
6423         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6424 $as_echo "disabled" >&6; }
6425       else
6426         # Check if the provided tool contains a complete path.
6427         tool_specified="$DATE"
6428         tool_basename="${tool_specified##*/}"
6429         if test "x$tool_basename" = "x$tool_specified"; then
6430           # A command without a complete path is provided, search $PATH.
6431           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6432 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6433           # Extract the first word of "$tool_basename", so it can be a program name with args.
6434 set dummy $tool_basename; ac_word=$2
6435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6436 $as_echo_n "checking for $ac_word... " >&6; }
6437 if ${ac_cv_path_DATE+:} false; then :
6438   $as_echo_n "(cached) " >&6
6439 else
6440   case $DATE in
6441   [\\/]* | ?:[\\/]*)
6442   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6443   ;;
6444   *)
6445   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6446 for as_dir in $PATH
6447 do
6448   IFS=$as_save_IFS
6449   test -z "$as_dir" && as_dir=.
6450     for ac_exec_ext in '' $ac_executable_extensions; do
6451   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6452     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6454     break 2
6455   fi
6456 done
6457   done
6458 IFS=$as_save_IFS
6459 
6460   ;;
6461 esac
6462 fi
6463 DATE=$ac_cv_path_DATE
6464 if test -n "$DATE"; then
6465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6466 $as_echo "$DATE" >&6; }
6467 else
6468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6469 $as_echo "no" >&6; }
6470 fi
6471 
6472 
6473           if test "x$DATE" = x; then
6474             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6475           fi
6476         else
6477           # Otherwise we believe it is a complete path. Use it as it is.
6478           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6479 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6480           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6481 $as_echo_n "checking for DATE... " >&6; }
6482           if test ! -x "$tool_specified"; then
6483             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6484 $as_echo "not found" >&6; }
6485             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6486           fi
6487           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6488 $as_echo "$tool_specified" >&6; }
6489         fi
6490       fi
6491     fi
6492 
6493   fi
6494 
6495 
6496 
6497   if test "x$DATE" = x; then
6498     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6499   fi
6500 
6501 
6502 
6503 
6504 
6505   # Publish this variable in the help.
6506 
6507 
6508   if [ -z "${DIFF+x}" ]; then
6509     # The variable is not set by user, try to locate tool using the code snippet
6510     for ac_prog in gdiff diff
6511 do
6512   # Extract the first word of "$ac_prog", so it can be a program name with args.
6513 set dummy $ac_prog; ac_word=$2
6514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6515 $as_echo_n "checking for $ac_word... " >&6; }
6516 if ${ac_cv_path_DIFF+:} false; then :
6517   $as_echo_n "(cached) " >&6
6518 else
6519   case $DIFF in
6520   [\\/]* | ?:[\\/]*)
6521   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6522   ;;
6523   *)
6524   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6525 for as_dir in $PATH
6526 do
6527   IFS=$as_save_IFS
6528   test -z "$as_dir" && as_dir=.
6529     for ac_exec_ext in '' $ac_executable_extensions; do
6530   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6531     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6533     break 2
6534   fi
6535 done
6536   done
6537 IFS=$as_save_IFS
6538 
6539   ;;
6540 esac
6541 fi
6542 DIFF=$ac_cv_path_DIFF
6543 if test -n "$DIFF"; then
6544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6545 $as_echo "$DIFF" >&6; }
6546 else
6547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6548 $as_echo "no" >&6; }
6549 fi
6550 
6551 
6552   test -n "$DIFF" && break
6553 done
6554 
6555   else
6556     # The variable is set, but is it from the command line or the environment?
6557 
6558     # Try to remove the string !DIFF! from our list.
6559     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6560     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6561       # If it failed, the variable was not from the command line. Ignore it,
6562       # but warn the user (except for BASH, which is always set by the calling BASH).
6563       if test "xDIFF" != xBASH; then
6564         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6565 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6566       fi
6567       # Try to locate tool using the code snippet
6568       for ac_prog in gdiff diff
6569 do
6570   # Extract the first word of "$ac_prog", so it can be a program name with args.
6571 set dummy $ac_prog; ac_word=$2
6572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6573 $as_echo_n "checking for $ac_word... " >&6; }
6574 if ${ac_cv_path_DIFF+:} false; then :
6575   $as_echo_n "(cached) " >&6
6576 else
6577   case $DIFF in
6578   [\\/]* | ?:[\\/]*)
6579   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6580   ;;
6581   *)
6582   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6583 for as_dir in $PATH
6584 do
6585   IFS=$as_save_IFS
6586   test -z "$as_dir" && as_dir=.
6587     for ac_exec_ext in '' $ac_executable_extensions; do
6588   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6589     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6590     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6591     break 2
6592   fi
6593 done
6594   done
6595 IFS=$as_save_IFS
6596 
6597   ;;
6598 esac
6599 fi
6600 DIFF=$ac_cv_path_DIFF
6601 if test -n "$DIFF"; then
6602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6603 $as_echo "$DIFF" >&6; }
6604 else
6605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6606 $as_echo "no" >&6; }
6607 fi
6608 
6609 
6610   test -n "$DIFF" && break
6611 done
6612 
6613     else
6614       # If it succeeded, then it was overridden by the user. We will use it
6615       # for the tool.
6616 
6617       # First remove it from the list of overridden variables, so we can test
6618       # for unknown variables in the end.
6619       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6620 
6621       # Check if we try to supply an empty value
6622       if test "x$DIFF" = x; then
6623         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6624 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6625         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6626 $as_echo_n "checking for DIFF... " >&6; }
6627         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6628 $as_echo "disabled" >&6; }
6629       else
6630         # Check if the provided tool contains a complete path.
6631         tool_specified="$DIFF"
6632         tool_basename="${tool_specified##*/}"
6633         if test "x$tool_basename" = "x$tool_specified"; then
6634           # A command without a complete path is provided, search $PATH.
6635           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6636 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6637           # Extract the first word of "$tool_basename", so it can be a program name with args.
6638 set dummy $tool_basename; ac_word=$2
6639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6640 $as_echo_n "checking for $ac_word... " >&6; }
6641 if ${ac_cv_path_DIFF+:} false; then :
6642   $as_echo_n "(cached) " >&6
6643 else
6644   case $DIFF in
6645   [\\/]* | ?:[\\/]*)
6646   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6647   ;;
6648   *)
6649   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6650 for as_dir in $PATH
6651 do
6652   IFS=$as_save_IFS
6653   test -z "$as_dir" && as_dir=.
6654     for ac_exec_ext in '' $ac_executable_extensions; do
6655   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6656     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6657     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6658     break 2
6659   fi
6660 done
6661   done
6662 IFS=$as_save_IFS
6663 
6664   ;;
6665 esac
6666 fi
6667 DIFF=$ac_cv_path_DIFF
6668 if test -n "$DIFF"; then
6669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6670 $as_echo "$DIFF" >&6; }
6671 else
6672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6673 $as_echo "no" >&6; }
6674 fi
6675 
6676 
6677           if test "x$DIFF" = x; then
6678             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6679           fi
6680         else
6681           # Otherwise we believe it is a complete path. Use it as it is.
6682           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6683 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6684           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6685 $as_echo_n "checking for DIFF... " >&6; }
6686           if test ! -x "$tool_specified"; then
6687             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6688 $as_echo "not found" >&6; }
6689             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6690           fi
6691           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6692 $as_echo "$tool_specified" >&6; }
6693         fi
6694       fi
6695     fi
6696 
6697   fi
6698 
6699 
6700 
6701   if test "x$DIFF" = x; then
6702     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6703   fi
6704 
6705 
6706 
6707 
6708 
6709   # Publish this variable in the help.
6710 
6711 
6712   if [ -z "${DIRNAME+x}" ]; then
6713     # The variable is not set by user, try to locate tool using the code snippet
6714     for ac_prog in dirname
6715 do
6716   # Extract the first word of "$ac_prog", so it can be a program name with args.
6717 set dummy $ac_prog; ac_word=$2
6718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6719 $as_echo_n "checking for $ac_word... " >&6; }
6720 if ${ac_cv_path_DIRNAME+:} false; then :
6721   $as_echo_n "(cached) " >&6
6722 else
6723   case $DIRNAME in
6724   [\\/]* | ?:[\\/]*)
6725   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6726   ;;
6727   *)
6728   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6729 for as_dir in $PATH
6730 do
6731   IFS=$as_save_IFS
6732   test -z "$as_dir" && as_dir=.
6733     for ac_exec_ext in '' $ac_executable_extensions; do
6734   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6735     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6736     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6737     break 2
6738   fi
6739 done
6740   done
6741 IFS=$as_save_IFS
6742 
6743   ;;
6744 esac
6745 fi
6746 DIRNAME=$ac_cv_path_DIRNAME
6747 if test -n "$DIRNAME"; then
6748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6749 $as_echo "$DIRNAME" >&6; }
6750 else
6751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6752 $as_echo "no" >&6; }
6753 fi
6754 
6755 
6756   test -n "$DIRNAME" && break
6757 done
6758 
6759   else
6760     # The variable is set, but is it from the command line or the environment?
6761 
6762     # Try to remove the string !DIRNAME! from our list.
6763     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6764     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6765       # If it failed, the variable was not from the command line. Ignore it,
6766       # but warn the user (except for BASH, which is always set by the calling BASH).
6767       if test "xDIRNAME" != xBASH; then
6768         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6769 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6770       fi
6771       # Try to locate tool using the code snippet
6772       for ac_prog in dirname
6773 do
6774   # Extract the first word of "$ac_prog", so it can be a program name with args.
6775 set dummy $ac_prog; ac_word=$2
6776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6777 $as_echo_n "checking for $ac_word... " >&6; }
6778 if ${ac_cv_path_DIRNAME+:} false; then :
6779   $as_echo_n "(cached) " >&6
6780 else
6781   case $DIRNAME in
6782   [\\/]* | ?:[\\/]*)
6783   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6784   ;;
6785   *)
6786   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6787 for as_dir in $PATH
6788 do
6789   IFS=$as_save_IFS
6790   test -z "$as_dir" && as_dir=.
6791     for ac_exec_ext in '' $ac_executable_extensions; do
6792   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6793     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6794     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6795     break 2
6796   fi
6797 done
6798   done
6799 IFS=$as_save_IFS
6800 
6801   ;;
6802 esac
6803 fi
6804 DIRNAME=$ac_cv_path_DIRNAME
6805 if test -n "$DIRNAME"; then
6806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6807 $as_echo "$DIRNAME" >&6; }
6808 else
6809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6810 $as_echo "no" >&6; }
6811 fi
6812 
6813 
6814   test -n "$DIRNAME" && break
6815 done
6816 
6817     else
6818       # If it succeeded, then it was overridden by the user. We will use it
6819       # for the tool.
6820 
6821       # First remove it from the list of overridden variables, so we can test
6822       # for unknown variables in the end.
6823       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6824 
6825       # Check if we try to supply an empty value
6826       if test "x$DIRNAME" = x; then
6827         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
6828 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
6829         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6830 $as_echo_n "checking for DIRNAME... " >&6; }
6831         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6832 $as_echo "disabled" >&6; }
6833       else
6834         # Check if the provided tool contains a complete path.
6835         tool_specified="$DIRNAME"
6836         tool_basename="${tool_specified##*/}"
6837         if test "x$tool_basename" = "x$tool_specified"; then
6838           # A command without a complete path is provided, search $PATH.
6839           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6840 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6841           # Extract the first word of "$tool_basename", so it can be a program name with args.
6842 set dummy $tool_basename; ac_word=$2
6843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6844 $as_echo_n "checking for $ac_word... " >&6; }
6845 if ${ac_cv_path_DIRNAME+:} false; then :
6846   $as_echo_n "(cached) " >&6
6847 else
6848   case $DIRNAME in
6849   [\\/]* | ?:[\\/]*)
6850   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6851   ;;
6852   *)
6853   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6854 for as_dir in $PATH
6855 do
6856   IFS=$as_save_IFS
6857   test -z "$as_dir" && as_dir=.
6858     for ac_exec_ext in '' $ac_executable_extensions; do
6859   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6860     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6861     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6862     break 2
6863   fi
6864 done
6865   done
6866 IFS=$as_save_IFS
6867 
6868   ;;
6869 esac
6870 fi
6871 DIRNAME=$ac_cv_path_DIRNAME
6872 if test -n "$DIRNAME"; then
6873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6874 $as_echo "$DIRNAME" >&6; }
6875 else
6876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6877 $as_echo "no" >&6; }
6878 fi
6879 
6880 
6881           if test "x$DIRNAME" = x; then
6882             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6883           fi
6884         else
6885           # Otherwise we believe it is a complete path. Use it as it is.
6886           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6887 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6888           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6889 $as_echo_n "checking for DIRNAME... " >&6; }
6890           if test ! -x "$tool_specified"; then
6891             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6892 $as_echo "not found" >&6; }
6893             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6894           fi
6895           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6896 $as_echo "$tool_specified" >&6; }
6897         fi
6898       fi
6899     fi
6900 
6901   fi
6902 
6903 
6904 
6905   if test "x$DIRNAME" = x; then
6906     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6907   fi
6908 
6909 
6910 
6911 
6912 
6913   # Publish this variable in the help.
6914 
6915 
6916   if [ -z "${ECHO+x}" ]; then
6917     # The variable is not set by user, try to locate tool using the code snippet
6918     for ac_prog in echo
6919 do
6920   # Extract the first word of "$ac_prog", so it can be a program name with args.
6921 set dummy $ac_prog; ac_word=$2
6922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6923 $as_echo_n "checking for $ac_word... " >&6; }
6924 if ${ac_cv_path_ECHO+:} false; then :
6925   $as_echo_n "(cached) " >&6
6926 else
6927   case $ECHO in
6928   [\\/]* | ?:[\\/]*)
6929   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6930   ;;
6931   *)
6932   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6933 for as_dir in $PATH
6934 do
6935   IFS=$as_save_IFS
6936   test -z "$as_dir" && as_dir=.
6937     for ac_exec_ext in '' $ac_executable_extensions; do
6938   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6939     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6940     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6941     break 2
6942   fi
6943 done
6944   done
6945 IFS=$as_save_IFS
6946 
6947   ;;
6948 esac
6949 fi
6950 ECHO=$ac_cv_path_ECHO
6951 if test -n "$ECHO"; then
6952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6953 $as_echo "$ECHO" >&6; }
6954 else
6955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6956 $as_echo "no" >&6; }
6957 fi
6958 
6959 
6960   test -n "$ECHO" && break
6961 done
6962 
6963   else
6964     # The variable is set, but is it from the command line or the environment?
6965 
6966     # Try to remove the string !ECHO! from our list.
6967     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6968     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6969       # If it failed, the variable was not from the command line. Ignore it,
6970       # but warn the user (except for BASH, which is always set by the calling BASH).
6971       if test "xECHO" != xBASH; then
6972         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6973 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6974       fi
6975       # Try to locate tool using the code snippet
6976       for ac_prog in echo
6977 do
6978   # Extract the first word of "$ac_prog", so it can be a program name with args.
6979 set dummy $ac_prog; ac_word=$2
6980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6981 $as_echo_n "checking for $ac_word... " >&6; }
6982 if ${ac_cv_path_ECHO+:} false; then :
6983   $as_echo_n "(cached) " >&6
6984 else
6985   case $ECHO in
6986   [\\/]* | ?:[\\/]*)
6987   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6988   ;;
6989   *)
6990   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6991 for as_dir in $PATH
6992 do
6993   IFS=$as_save_IFS
6994   test -z "$as_dir" && as_dir=.
6995     for ac_exec_ext in '' $ac_executable_extensions; do
6996   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6997     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6998     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6999     break 2
7000   fi
7001 done
7002   done
7003 IFS=$as_save_IFS
7004 
7005   ;;
7006 esac
7007 fi
7008 ECHO=$ac_cv_path_ECHO
7009 if test -n "$ECHO"; then
7010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7011 $as_echo "$ECHO" >&6; }
7012 else
7013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7014 $as_echo "no" >&6; }
7015 fi
7016 
7017 
7018   test -n "$ECHO" && break
7019 done
7020 
7021     else
7022       # If it succeeded, then it was overridden by the user. We will use it
7023       # for the tool.
7024 
7025       # First remove it from the list of overridden variables, so we can test
7026       # for unknown variables in the end.
7027       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7028 
7029       # Check if we try to supply an empty value
7030       if test "x$ECHO" = x; then
7031         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7032 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7033         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7034 $as_echo_n "checking for ECHO... " >&6; }
7035         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7036 $as_echo "disabled" >&6; }
7037       else
7038         # Check if the provided tool contains a complete path.
7039         tool_specified="$ECHO"
7040         tool_basename="${tool_specified##*/}"
7041         if test "x$tool_basename" = "x$tool_specified"; then
7042           # A command without a complete path is provided, search $PATH.
7043           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7044 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7045           # Extract the first word of "$tool_basename", so it can be a program name with args.
7046 set dummy $tool_basename; ac_word=$2
7047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7048 $as_echo_n "checking for $ac_word... " >&6; }
7049 if ${ac_cv_path_ECHO+:} false; then :
7050   $as_echo_n "(cached) " >&6
7051 else
7052   case $ECHO in
7053   [\\/]* | ?:[\\/]*)
7054   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7055   ;;
7056   *)
7057   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7058 for as_dir in $PATH
7059 do
7060   IFS=$as_save_IFS
7061   test -z "$as_dir" && as_dir=.
7062     for ac_exec_ext in '' $ac_executable_extensions; do
7063   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7064     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7065     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7066     break 2
7067   fi
7068 done
7069   done
7070 IFS=$as_save_IFS
7071 
7072   ;;
7073 esac
7074 fi
7075 ECHO=$ac_cv_path_ECHO
7076 if test -n "$ECHO"; then
7077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7078 $as_echo "$ECHO" >&6; }
7079 else
7080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7081 $as_echo "no" >&6; }
7082 fi
7083 
7084 
7085           if test "x$ECHO" = x; then
7086             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7087           fi
7088         else
7089           # Otherwise we believe it is a complete path. Use it as it is.
7090           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7091 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7092           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7093 $as_echo_n "checking for ECHO... " >&6; }
7094           if test ! -x "$tool_specified"; then
7095             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7096 $as_echo "not found" >&6; }
7097             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7098           fi
7099           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7100 $as_echo "$tool_specified" >&6; }
7101         fi
7102       fi
7103     fi
7104 
7105   fi
7106 
7107 
7108 
7109   if test "x$ECHO" = x; then
7110     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7111   fi
7112 
7113 
7114 
7115 
7116 
7117   # Publish this variable in the help.
7118 
7119 
7120   if [ -z "${EXPR+x}" ]; then
7121     # The variable is not set by user, try to locate tool using the code snippet
7122     for ac_prog in expr
7123 do
7124   # Extract the first word of "$ac_prog", so it can be a program name with args.
7125 set dummy $ac_prog; ac_word=$2
7126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7127 $as_echo_n "checking for $ac_word... " >&6; }
7128 if ${ac_cv_path_EXPR+:} false; then :
7129   $as_echo_n "(cached) " >&6
7130 else
7131   case $EXPR in
7132   [\\/]* | ?:[\\/]*)
7133   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7134   ;;
7135   *)
7136   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7137 for as_dir in $PATH
7138 do
7139   IFS=$as_save_IFS
7140   test -z "$as_dir" && as_dir=.
7141     for ac_exec_ext in '' $ac_executable_extensions; do
7142   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7143     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7144     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7145     break 2
7146   fi
7147 done
7148   done
7149 IFS=$as_save_IFS
7150 
7151   ;;
7152 esac
7153 fi
7154 EXPR=$ac_cv_path_EXPR
7155 if test -n "$EXPR"; then
7156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7157 $as_echo "$EXPR" >&6; }
7158 else
7159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7160 $as_echo "no" >&6; }
7161 fi
7162 
7163 
7164   test -n "$EXPR" && break
7165 done
7166 
7167   else
7168     # The variable is set, but is it from the command line or the environment?
7169 
7170     # Try to remove the string !EXPR! from our list.
7171     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7172     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7173       # If it failed, the variable was not from the command line. Ignore it,
7174       # but warn the user (except for BASH, which is always set by the calling BASH).
7175       if test "xEXPR" != xBASH; then
7176         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7177 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7178       fi
7179       # Try to locate tool using the code snippet
7180       for ac_prog in expr
7181 do
7182   # Extract the first word of "$ac_prog", so it can be a program name with args.
7183 set dummy $ac_prog; ac_word=$2
7184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7185 $as_echo_n "checking for $ac_word... " >&6; }
7186 if ${ac_cv_path_EXPR+:} false; then :
7187   $as_echo_n "(cached) " >&6
7188 else
7189   case $EXPR in
7190   [\\/]* | ?:[\\/]*)
7191   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7192   ;;
7193   *)
7194   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7195 for as_dir in $PATH
7196 do
7197   IFS=$as_save_IFS
7198   test -z "$as_dir" && as_dir=.
7199     for ac_exec_ext in '' $ac_executable_extensions; do
7200   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7201     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7202     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7203     break 2
7204   fi
7205 done
7206   done
7207 IFS=$as_save_IFS
7208 
7209   ;;
7210 esac
7211 fi
7212 EXPR=$ac_cv_path_EXPR
7213 if test -n "$EXPR"; then
7214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7215 $as_echo "$EXPR" >&6; }
7216 else
7217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7218 $as_echo "no" >&6; }
7219 fi
7220 
7221 
7222   test -n "$EXPR" && break
7223 done
7224 
7225     else
7226       # If it succeeded, then it was overridden by the user. We will use it
7227       # for the tool.
7228 
7229       # First remove it from the list of overridden variables, so we can test
7230       # for unknown variables in the end.
7231       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7232 
7233       # Check if we try to supply an empty value
7234       if test "x$EXPR" = x; then
7235         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7236 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7237         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7238 $as_echo_n "checking for EXPR... " >&6; }
7239         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7240 $as_echo "disabled" >&6; }
7241       else
7242         # Check if the provided tool contains a complete path.
7243         tool_specified="$EXPR"
7244         tool_basename="${tool_specified##*/}"
7245         if test "x$tool_basename" = "x$tool_specified"; then
7246           # A command without a complete path is provided, search $PATH.
7247           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7248 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7249           # Extract the first word of "$tool_basename", so it can be a program name with args.
7250 set dummy $tool_basename; ac_word=$2
7251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7252 $as_echo_n "checking for $ac_word... " >&6; }
7253 if ${ac_cv_path_EXPR+:} false; then :
7254   $as_echo_n "(cached) " >&6
7255 else
7256   case $EXPR in
7257   [\\/]* | ?:[\\/]*)
7258   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7259   ;;
7260   *)
7261   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7262 for as_dir in $PATH
7263 do
7264   IFS=$as_save_IFS
7265   test -z "$as_dir" && as_dir=.
7266     for ac_exec_ext in '' $ac_executable_extensions; do
7267   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7268     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7269     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7270     break 2
7271   fi
7272 done
7273   done
7274 IFS=$as_save_IFS
7275 
7276   ;;
7277 esac
7278 fi
7279 EXPR=$ac_cv_path_EXPR
7280 if test -n "$EXPR"; then
7281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7282 $as_echo "$EXPR" >&6; }
7283 else
7284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7285 $as_echo "no" >&6; }
7286 fi
7287 
7288 
7289           if test "x$EXPR" = x; then
7290             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7291           fi
7292         else
7293           # Otherwise we believe it is a complete path. Use it as it is.
7294           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7295 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7296           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7297 $as_echo_n "checking for EXPR... " >&6; }
7298           if test ! -x "$tool_specified"; then
7299             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7300 $as_echo "not found" >&6; }
7301             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7302           fi
7303           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7304 $as_echo "$tool_specified" >&6; }
7305         fi
7306       fi
7307     fi
7308 
7309   fi
7310 
7311 
7312 
7313   if test "x$EXPR" = x; then
7314     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7315   fi
7316 
7317 
7318 
7319 
7320 
7321   # Publish this variable in the help.
7322 
7323 
7324   if [ -z "${FILE+x}" ]; then
7325     # The variable is not set by user, try to locate tool using the code snippet
7326     for ac_prog in file
7327 do
7328   # Extract the first word of "$ac_prog", so it can be a program name with args.
7329 set dummy $ac_prog; ac_word=$2
7330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7331 $as_echo_n "checking for $ac_word... " >&6; }
7332 if ${ac_cv_path_FILE+:} false; then :
7333   $as_echo_n "(cached) " >&6
7334 else
7335   case $FILE in
7336   [\\/]* | ?:[\\/]*)
7337   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7338   ;;
7339   *)
7340   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7341 for as_dir in $PATH
7342 do
7343   IFS=$as_save_IFS
7344   test -z "$as_dir" && as_dir=.
7345     for ac_exec_ext in '' $ac_executable_extensions; do
7346   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7347     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7348     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7349     break 2
7350   fi
7351 done
7352   done
7353 IFS=$as_save_IFS
7354 
7355   ;;
7356 esac
7357 fi
7358 FILE=$ac_cv_path_FILE
7359 if test -n "$FILE"; then
7360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7361 $as_echo "$FILE" >&6; }
7362 else
7363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7364 $as_echo "no" >&6; }
7365 fi
7366 
7367 
7368   test -n "$FILE" && break
7369 done
7370 
7371   else
7372     # The variable is set, but is it from the command line or the environment?
7373 
7374     # Try to remove the string !FILE! from our list.
7375     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7376     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7377       # If it failed, the variable was not from the command line. Ignore it,
7378       # but warn the user (except for BASH, which is always set by the calling BASH).
7379       if test "xFILE" != xBASH; then
7380         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7381 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7382       fi
7383       # Try to locate tool using the code snippet
7384       for ac_prog in file
7385 do
7386   # Extract the first word of "$ac_prog", so it can be a program name with args.
7387 set dummy $ac_prog; ac_word=$2
7388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7389 $as_echo_n "checking for $ac_word... " >&6; }
7390 if ${ac_cv_path_FILE+:} false; then :
7391   $as_echo_n "(cached) " >&6
7392 else
7393   case $FILE in
7394   [\\/]* | ?:[\\/]*)
7395   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7396   ;;
7397   *)
7398   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7399 for as_dir in $PATH
7400 do
7401   IFS=$as_save_IFS
7402   test -z "$as_dir" && as_dir=.
7403     for ac_exec_ext in '' $ac_executable_extensions; do
7404   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7405     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7406     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7407     break 2
7408   fi
7409 done
7410   done
7411 IFS=$as_save_IFS
7412 
7413   ;;
7414 esac
7415 fi
7416 FILE=$ac_cv_path_FILE
7417 if test -n "$FILE"; then
7418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7419 $as_echo "$FILE" >&6; }
7420 else
7421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7422 $as_echo "no" >&6; }
7423 fi
7424 
7425 
7426   test -n "$FILE" && break
7427 done
7428 
7429     else
7430       # If it succeeded, then it was overridden by the user. We will use it
7431       # for the tool.
7432 
7433       # First remove it from the list of overridden variables, so we can test
7434       # for unknown variables in the end.
7435       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7436 
7437       # Check if we try to supply an empty value
7438       if test "x$FILE" = x; then
7439         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7440 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7441         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7442 $as_echo_n "checking for FILE... " >&6; }
7443         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7444 $as_echo "disabled" >&6; }
7445       else
7446         # Check if the provided tool contains a complete path.
7447         tool_specified="$FILE"
7448         tool_basename="${tool_specified##*/}"
7449         if test "x$tool_basename" = "x$tool_specified"; then
7450           # A command without a complete path is provided, search $PATH.
7451           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7452 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7453           # Extract the first word of "$tool_basename", so it can be a program name with args.
7454 set dummy $tool_basename; ac_word=$2
7455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7456 $as_echo_n "checking for $ac_word... " >&6; }
7457 if ${ac_cv_path_FILE+:} false; then :
7458   $as_echo_n "(cached) " >&6
7459 else
7460   case $FILE in
7461   [\\/]* | ?:[\\/]*)
7462   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7463   ;;
7464   *)
7465   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7466 for as_dir in $PATH
7467 do
7468   IFS=$as_save_IFS
7469   test -z "$as_dir" && as_dir=.
7470     for ac_exec_ext in '' $ac_executable_extensions; do
7471   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7472     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7473     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7474     break 2
7475   fi
7476 done
7477   done
7478 IFS=$as_save_IFS
7479 
7480   ;;
7481 esac
7482 fi
7483 FILE=$ac_cv_path_FILE
7484 if test -n "$FILE"; then
7485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7486 $as_echo "$FILE" >&6; }
7487 else
7488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7489 $as_echo "no" >&6; }
7490 fi
7491 
7492 
7493           if test "x$FILE" = x; then
7494             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7495           fi
7496         else
7497           # Otherwise we believe it is a complete path. Use it as it is.
7498           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7499 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7500           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7501 $as_echo_n "checking for FILE... " >&6; }
7502           if test ! -x "$tool_specified"; then
7503             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7504 $as_echo "not found" >&6; }
7505             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7506           fi
7507           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7508 $as_echo "$tool_specified" >&6; }
7509         fi
7510       fi
7511     fi
7512 
7513   fi
7514 
7515 
7516 
7517   if test "x$FILE" = x; then
7518     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7519   fi
7520 
7521 
7522 
7523 
7524 
7525   # Publish this variable in the help.
7526 
7527 
7528   if [ -z "${FIND+x}" ]; then
7529     # The variable is not set by user, try to locate tool using the code snippet
7530     for ac_prog in find
7531 do
7532   # Extract the first word of "$ac_prog", so it can be a program name with args.
7533 set dummy $ac_prog; ac_word=$2
7534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7535 $as_echo_n "checking for $ac_word... " >&6; }
7536 if ${ac_cv_path_FIND+:} false; then :
7537   $as_echo_n "(cached) " >&6
7538 else
7539   case $FIND in
7540   [\\/]* | ?:[\\/]*)
7541   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7542   ;;
7543   *)
7544   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7545 for as_dir in $PATH
7546 do
7547   IFS=$as_save_IFS
7548   test -z "$as_dir" && as_dir=.
7549     for ac_exec_ext in '' $ac_executable_extensions; do
7550   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7551     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7552     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7553     break 2
7554   fi
7555 done
7556   done
7557 IFS=$as_save_IFS
7558 
7559   ;;
7560 esac
7561 fi
7562 FIND=$ac_cv_path_FIND
7563 if test -n "$FIND"; then
7564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7565 $as_echo "$FIND" >&6; }
7566 else
7567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7568 $as_echo "no" >&6; }
7569 fi
7570 
7571 
7572   test -n "$FIND" && break
7573 done
7574 
7575   else
7576     # The variable is set, but is it from the command line or the environment?
7577 
7578     # Try to remove the string !FIND! from our list.
7579     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7580     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7581       # If it failed, the variable was not from the command line. Ignore it,
7582       # but warn the user (except for BASH, which is always set by the calling BASH).
7583       if test "xFIND" != xBASH; then
7584         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7585 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7586       fi
7587       # Try to locate tool using the code snippet
7588       for ac_prog in find
7589 do
7590   # Extract the first word of "$ac_prog", so it can be a program name with args.
7591 set dummy $ac_prog; ac_word=$2
7592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7593 $as_echo_n "checking for $ac_word... " >&6; }
7594 if ${ac_cv_path_FIND+:} false; then :
7595   $as_echo_n "(cached) " >&6
7596 else
7597   case $FIND in
7598   [\\/]* | ?:[\\/]*)
7599   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7600   ;;
7601   *)
7602   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7603 for as_dir in $PATH
7604 do
7605   IFS=$as_save_IFS
7606   test -z "$as_dir" && as_dir=.
7607     for ac_exec_ext in '' $ac_executable_extensions; do
7608   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7609     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7611     break 2
7612   fi
7613 done
7614   done
7615 IFS=$as_save_IFS
7616 
7617   ;;
7618 esac
7619 fi
7620 FIND=$ac_cv_path_FIND
7621 if test -n "$FIND"; then
7622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7623 $as_echo "$FIND" >&6; }
7624 else
7625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7626 $as_echo "no" >&6; }
7627 fi
7628 
7629 
7630   test -n "$FIND" && break
7631 done
7632 
7633     else
7634       # If it succeeded, then it was overridden by the user. We will use it
7635       # for the tool.
7636 
7637       # First remove it from the list of overridden variables, so we can test
7638       # for unknown variables in the end.
7639       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7640 
7641       # Check if we try to supply an empty value
7642       if test "x$FIND" = x; then
7643         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7644 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7645         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7646 $as_echo_n "checking for FIND... " >&6; }
7647         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7648 $as_echo "disabled" >&6; }
7649       else
7650         # Check if the provided tool contains a complete path.
7651         tool_specified="$FIND"
7652         tool_basename="${tool_specified##*/}"
7653         if test "x$tool_basename" = "x$tool_specified"; then
7654           # A command without a complete path is provided, search $PATH.
7655           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7656 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7657           # Extract the first word of "$tool_basename", so it can be a program name with args.
7658 set dummy $tool_basename; ac_word=$2
7659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7660 $as_echo_n "checking for $ac_word... " >&6; }
7661 if ${ac_cv_path_FIND+:} false; then :
7662   $as_echo_n "(cached) " >&6
7663 else
7664   case $FIND in
7665   [\\/]* | ?:[\\/]*)
7666   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7667   ;;
7668   *)
7669   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7670 for as_dir in $PATH
7671 do
7672   IFS=$as_save_IFS
7673   test -z "$as_dir" && as_dir=.
7674     for ac_exec_ext in '' $ac_executable_extensions; do
7675   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7676     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7677     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7678     break 2
7679   fi
7680 done
7681   done
7682 IFS=$as_save_IFS
7683 
7684   ;;
7685 esac
7686 fi
7687 FIND=$ac_cv_path_FIND
7688 if test -n "$FIND"; then
7689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7690 $as_echo "$FIND" >&6; }
7691 else
7692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7693 $as_echo "no" >&6; }
7694 fi
7695 
7696 
7697           if test "x$FIND" = x; then
7698             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7699           fi
7700         else
7701           # Otherwise we believe it is a complete path. Use it as it is.
7702           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7703 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7704           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7705 $as_echo_n "checking for FIND... " >&6; }
7706           if test ! -x "$tool_specified"; then
7707             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7708 $as_echo "not found" >&6; }
7709             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7710           fi
7711           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7712 $as_echo "$tool_specified" >&6; }
7713         fi
7714       fi
7715     fi
7716 
7717   fi
7718 
7719 
7720 
7721   if test "x$FIND" = x; then
7722     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7723   fi
7724 
7725 
7726 
7727 
7728 
7729   # Publish this variable in the help.
7730 
7731 
7732   if [ -z "${HEAD+x}" ]; then
7733     # The variable is not set by user, try to locate tool using the code snippet
7734     for ac_prog in head
7735 do
7736   # Extract the first word of "$ac_prog", so it can be a program name with args.
7737 set dummy $ac_prog; ac_word=$2
7738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7739 $as_echo_n "checking for $ac_word... " >&6; }
7740 if ${ac_cv_path_HEAD+:} false; then :
7741   $as_echo_n "(cached) " >&6
7742 else
7743   case $HEAD in
7744   [\\/]* | ?:[\\/]*)
7745   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7746   ;;
7747   *)
7748   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7749 for as_dir in $PATH
7750 do
7751   IFS=$as_save_IFS
7752   test -z "$as_dir" && as_dir=.
7753     for ac_exec_ext in '' $ac_executable_extensions; do
7754   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7755     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7756     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7757     break 2
7758   fi
7759 done
7760   done
7761 IFS=$as_save_IFS
7762 
7763   ;;
7764 esac
7765 fi
7766 HEAD=$ac_cv_path_HEAD
7767 if test -n "$HEAD"; then
7768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7769 $as_echo "$HEAD" >&6; }
7770 else
7771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7772 $as_echo "no" >&6; }
7773 fi
7774 
7775 
7776   test -n "$HEAD" && break
7777 done
7778 
7779   else
7780     # The variable is set, but is it from the command line or the environment?
7781 
7782     # Try to remove the string !HEAD! from our list.
7783     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7784     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7785       # If it failed, the variable was not from the command line. Ignore it,
7786       # but warn the user (except for BASH, which is always set by the calling BASH).
7787       if test "xHEAD" != xBASH; then
7788         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7789 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7790       fi
7791       # Try to locate tool using the code snippet
7792       for ac_prog in head
7793 do
7794   # Extract the first word of "$ac_prog", so it can be a program name with args.
7795 set dummy $ac_prog; ac_word=$2
7796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7797 $as_echo_n "checking for $ac_word... " >&6; }
7798 if ${ac_cv_path_HEAD+:} false; then :
7799   $as_echo_n "(cached) " >&6
7800 else
7801   case $HEAD in
7802   [\\/]* | ?:[\\/]*)
7803   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7804   ;;
7805   *)
7806   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7807 for as_dir in $PATH
7808 do
7809   IFS=$as_save_IFS
7810   test -z "$as_dir" && as_dir=.
7811     for ac_exec_ext in '' $ac_executable_extensions; do
7812   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7813     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7814     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7815     break 2
7816   fi
7817 done
7818   done
7819 IFS=$as_save_IFS
7820 
7821   ;;
7822 esac
7823 fi
7824 HEAD=$ac_cv_path_HEAD
7825 if test -n "$HEAD"; then
7826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7827 $as_echo "$HEAD" >&6; }
7828 else
7829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7830 $as_echo "no" >&6; }
7831 fi
7832 
7833 
7834   test -n "$HEAD" && break
7835 done
7836 
7837     else
7838       # If it succeeded, then it was overridden by the user. We will use it
7839       # for the tool.
7840 
7841       # First remove it from the list of overridden variables, so we can test
7842       # for unknown variables in the end.
7843       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7844 
7845       # Check if we try to supply an empty value
7846       if test "x$HEAD" = x; then
7847         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
7848 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
7849         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7850 $as_echo_n "checking for HEAD... " >&6; }
7851         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7852 $as_echo "disabled" >&6; }
7853       else
7854         # Check if the provided tool contains a complete path.
7855         tool_specified="$HEAD"
7856         tool_basename="${tool_specified##*/}"
7857         if test "x$tool_basename" = "x$tool_specified"; then
7858           # A command without a complete path is provided, search $PATH.
7859           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7860 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7861           # Extract the first word of "$tool_basename", so it can be a program name with args.
7862 set dummy $tool_basename; ac_word=$2
7863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7864 $as_echo_n "checking for $ac_word... " >&6; }
7865 if ${ac_cv_path_HEAD+:} false; then :
7866   $as_echo_n "(cached) " >&6
7867 else
7868   case $HEAD in
7869   [\\/]* | ?:[\\/]*)
7870   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7871   ;;
7872   *)
7873   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7874 for as_dir in $PATH
7875 do
7876   IFS=$as_save_IFS
7877   test -z "$as_dir" && as_dir=.
7878     for ac_exec_ext in '' $ac_executable_extensions; do
7879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7880     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7882     break 2
7883   fi
7884 done
7885   done
7886 IFS=$as_save_IFS
7887 
7888   ;;
7889 esac
7890 fi
7891 HEAD=$ac_cv_path_HEAD
7892 if test -n "$HEAD"; then
7893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7894 $as_echo "$HEAD" >&6; }
7895 else
7896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7897 $as_echo "no" >&6; }
7898 fi
7899 
7900 
7901           if test "x$HEAD" = x; then
7902             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7903           fi
7904         else
7905           # Otherwise we believe it is a complete path. Use it as it is.
7906           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7907 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7908           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7909 $as_echo_n "checking for HEAD... " >&6; }
7910           if test ! -x "$tool_specified"; then
7911             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7912 $as_echo "not found" >&6; }
7913             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7914           fi
7915           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7916 $as_echo "$tool_specified" >&6; }
7917         fi
7918       fi
7919     fi
7920 
7921   fi
7922 
7923 
7924 
7925   if test "x$HEAD" = x; then
7926     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7927   fi
7928 
7929 
7930 
7931 
7932 
7933   # Publish this variable in the help.
7934 
7935 
7936   if [ -z "${LN+x}" ]; then
7937     # The variable is not set by user, try to locate tool using the code snippet
7938     for ac_prog in ln
7939 do
7940   # Extract the first word of "$ac_prog", so it can be a program name with args.
7941 set dummy $ac_prog; ac_word=$2
7942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7943 $as_echo_n "checking for $ac_word... " >&6; }
7944 if ${ac_cv_path_LN+:} false; then :
7945   $as_echo_n "(cached) " >&6
7946 else
7947   case $LN in
7948   [\\/]* | ?:[\\/]*)
7949   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7950   ;;
7951   *)
7952   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7953 for as_dir in $PATH
7954 do
7955   IFS=$as_save_IFS
7956   test -z "$as_dir" && as_dir=.
7957     for ac_exec_ext in '' $ac_executable_extensions; do
7958   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7959     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7960     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7961     break 2
7962   fi
7963 done
7964   done
7965 IFS=$as_save_IFS
7966 
7967   ;;
7968 esac
7969 fi
7970 LN=$ac_cv_path_LN
7971 if test -n "$LN"; then
7972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7973 $as_echo "$LN" >&6; }
7974 else
7975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7976 $as_echo "no" >&6; }
7977 fi
7978 
7979 
7980   test -n "$LN" && break
7981 done
7982 
7983   else
7984     # The variable is set, but is it from the command line or the environment?
7985 
7986     # Try to remove the string !LN! from our list.
7987     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7988     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7989       # If it failed, the variable was not from the command line. Ignore it,
7990       # but warn the user (except for BASH, which is always set by the calling BASH).
7991       if test "xLN" != xBASH; then
7992         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7993 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7994       fi
7995       # Try to locate tool using the code snippet
7996       for ac_prog in ln
7997 do
7998   # Extract the first word of "$ac_prog", so it can be a program name with args.
7999 set dummy $ac_prog; ac_word=$2
8000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8001 $as_echo_n "checking for $ac_word... " >&6; }
8002 if ${ac_cv_path_LN+:} false; then :
8003   $as_echo_n "(cached) " >&6
8004 else
8005   case $LN in
8006   [\\/]* | ?:[\\/]*)
8007   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8008   ;;
8009   *)
8010   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8011 for as_dir in $PATH
8012 do
8013   IFS=$as_save_IFS
8014   test -z "$as_dir" && as_dir=.
8015     for ac_exec_ext in '' $ac_executable_extensions; do
8016   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8017     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8018     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8019     break 2
8020   fi
8021 done
8022   done
8023 IFS=$as_save_IFS
8024 
8025   ;;
8026 esac
8027 fi
8028 LN=$ac_cv_path_LN
8029 if test -n "$LN"; then
8030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8031 $as_echo "$LN" >&6; }
8032 else
8033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8034 $as_echo "no" >&6; }
8035 fi
8036 
8037 
8038   test -n "$LN" && break
8039 done
8040 
8041     else
8042       # If it succeeded, then it was overridden by the user. We will use it
8043       # for the tool.
8044 
8045       # First remove it from the list of overridden variables, so we can test
8046       # for unknown variables in the end.
8047       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8048 
8049       # Check if we try to supply an empty value
8050       if test "x$LN" = x; then
8051         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8052 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8053         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8054 $as_echo_n "checking for LN... " >&6; }
8055         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8056 $as_echo "disabled" >&6; }
8057       else
8058         # Check if the provided tool contains a complete path.
8059         tool_specified="$LN"
8060         tool_basename="${tool_specified##*/}"
8061         if test "x$tool_basename" = "x$tool_specified"; then
8062           # A command without a complete path is provided, search $PATH.
8063           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8064 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8065           # Extract the first word of "$tool_basename", so it can be a program name with args.
8066 set dummy $tool_basename; ac_word=$2
8067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8068 $as_echo_n "checking for $ac_word... " >&6; }
8069 if ${ac_cv_path_LN+:} false; then :
8070   $as_echo_n "(cached) " >&6
8071 else
8072   case $LN in
8073   [\\/]* | ?:[\\/]*)
8074   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8075   ;;
8076   *)
8077   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8078 for as_dir in $PATH
8079 do
8080   IFS=$as_save_IFS
8081   test -z "$as_dir" && as_dir=.
8082     for ac_exec_ext in '' $ac_executable_extensions; do
8083   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8084     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8085     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8086     break 2
8087   fi
8088 done
8089   done
8090 IFS=$as_save_IFS
8091 
8092   ;;
8093 esac
8094 fi
8095 LN=$ac_cv_path_LN
8096 if test -n "$LN"; then
8097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8098 $as_echo "$LN" >&6; }
8099 else
8100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8101 $as_echo "no" >&6; }
8102 fi
8103 
8104 
8105           if test "x$LN" = x; then
8106             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8107           fi
8108         else
8109           # Otherwise we believe it is a complete path. Use it as it is.
8110           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8111 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8112           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8113 $as_echo_n "checking for LN... " >&6; }
8114           if test ! -x "$tool_specified"; then
8115             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8116 $as_echo "not found" >&6; }
8117             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8118           fi
8119           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8120 $as_echo "$tool_specified" >&6; }
8121         fi
8122       fi
8123     fi
8124 
8125   fi
8126 
8127 
8128 
8129   if test "x$LN" = x; then
8130     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8131   fi
8132 
8133 
8134 
8135 
8136 
8137   # Publish this variable in the help.
8138 
8139 
8140   if [ -z "${LS+x}" ]; then
8141     # The variable is not set by user, try to locate tool using the code snippet
8142     for ac_prog in ls
8143 do
8144   # Extract the first word of "$ac_prog", so it can be a program name with args.
8145 set dummy $ac_prog; ac_word=$2
8146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8147 $as_echo_n "checking for $ac_word... " >&6; }
8148 if ${ac_cv_path_LS+:} false; then :
8149   $as_echo_n "(cached) " >&6
8150 else
8151   case $LS in
8152   [\\/]* | ?:[\\/]*)
8153   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8154   ;;
8155   *)
8156   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8157 for as_dir in $PATH
8158 do
8159   IFS=$as_save_IFS
8160   test -z "$as_dir" && as_dir=.
8161     for ac_exec_ext in '' $ac_executable_extensions; do
8162   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8163     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8164     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8165     break 2
8166   fi
8167 done
8168   done
8169 IFS=$as_save_IFS
8170 
8171   ;;
8172 esac
8173 fi
8174 LS=$ac_cv_path_LS
8175 if test -n "$LS"; then
8176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8177 $as_echo "$LS" >&6; }
8178 else
8179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8180 $as_echo "no" >&6; }
8181 fi
8182 
8183 
8184   test -n "$LS" && break
8185 done
8186 
8187   else
8188     # The variable is set, but is it from the command line or the environment?
8189 
8190     # Try to remove the string !LS! from our list.
8191     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8192     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8193       # If it failed, the variable was not from the command line. Ignore it,
8194       # but warn the user (except for BASH, which is always set by the calling BASH).
8195       if test "xLS" != xBASH; then
8196         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8197 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8198       fi
8199       # Try to locate tool using the code snippet
8200       for ac_prog in ls
8201 do
8202   # Extract the first word of "$ac_prog", so it can be a program name with args.
8203 set dummy $ac_prog; ac_word=$2
8204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8205 $as_echo_n "checking for $ac_word... " >&6; }
8206 if ${ac_cv_path_LS+:} false; then :
8207   $as_echo_n "(cached) " >&6
8208 else
8209   case $LS in
8210   [\\/]* | ?:[\\/]*)
8211   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8212   ;;
8213   *)
8214   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8215 for as_dir in $PATH
8216 do
8217   IFS=$as_save_IFS
8218   test -z "$as_dir" && as_dir=.
8219     for ac_exec_ext in '' $ac_executable_extensions; do
8220   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8221     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8222     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8223     break 2
8224   fi
8225 done
8226   done
8227 IFS=$as_save_IFS
8228 
8229   ;;
8230 esac
8231 fi
8232 LS=$ac_cv_path_LS
8233 if test -n "$LS"; then
8234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8235 $as_echo "$LS" >&6; }
8236 else
8237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8238 $as_echo "no" >&6; }
8239 fi
8240 
8241 
8242   test -n "$LS" && break
8243 done
8244 
8245     else
8246       # If it succeeded, then it was overridden by the user. We will use it
8247       # for the tool.
8248 
8249       # First remove it from the list of overridden variables, so we can test
8250       # for unknown variables in the end.
8251       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8252 
8253       # Check if we try to supply an empty value
8254       if test "x$LS" = x; then
8255         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8256 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8257         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8258 $as_echo_n "checking for LS... " >&6; }
8259         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8260 $as_echo "disabled" >&6; }
8261       else
8262         # Check if the provided tool contains a complete path.
8263         tool_specified="$LS"
8264         tool_basename="${tool_specified##*/}"
8265         if test "x$tool_basename" = "x$tool_specified"; then
8266           # A command without a complete path is provided, search $PATH.
8267           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8268 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8269           # Extract the first word of "$tool_basename", so it can be a program name with args.
8270 set dummy $tool_basename; ac_word=$2
8271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8272 $as_echo_n "checking for $ac_word... " >&6; }
8273 if ${ac_cv_path_LS+:} false; then :
8274   $as_echo_n "(cached) " >&6
8275 else
8276   case $LS in
8277   [\\/]* | ?:[\\/]*)
8278   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8279   ;;
8280   *)
8281   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8282 for as_dir in $PATH
8283 do
8284   IFS=$as_save_IFS
8285   test -z "$as_dir" && as_dir=.
8286     for ac_exec_ext in '' $ac_executable_extensions; do
8287   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8288     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8289     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8290     break 2
8291   fi
8292 done
8293   done
8294 IFS=$as_save_IFS
8295 
8296   ;;
8297 esac
8298 fi
8299 LS=$ac_cv_path_LS
8300 if test -n "$LS"; then
8301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8302 $as_echo "$LS" >&6; }
8303 else
8304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8305 $as_echo "no" >&6; }
8306 fi
8307 
8308 
8309           if test "x$LS" = x; then
8310             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8311           fi
8312         else
8313           # Otherwise we believe it is a complete path. Use it as it is.
8314           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8315 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8316           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8317 $as_echo_n "checking for LS... " >&6; }
8318           if test ! -x "$tool_specified"; then
8319             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8320 $as_echo "not found" >&6; }
8321             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8322           fi
8323           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8324 $as_echo "$tool_specified" >&6; }
8325         fi
8326       fi
8327     fi
8328 
8329   fi
8330 
8331 
8332 
8333   if test "x$LS" = x; then
8334     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8335   fi
8336 
8337 
8338 
8339 
8340 
8341   # Publish this variable in the help.
8342 
8343 
8344   if [ -z "${MKDIR+x}" ]; then
8345     # The variable is not set by user, try to locate tool using the code snippet
8346     for ac_prog in mkdir
8347 do
8348   # Extract the first word of "$ac_prog", so it can be a program name with args.
8349 set dummy $ac_prog; ac_word=$2
8350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8351 $as_echo_n "checking for $ac_word... " >&6; }
8352 if ${ac_cv_path_MKDIR+:} false; then :
8353   $as_echo_n "(cached) " >&6
8354 else
8355   case $MKDIR in
8356   [\\/]* | ?:[\\/]*)
8357   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8358   ;;
8359   *)
8360   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8361 for as_dir in $PATH
8362 do
8363   IFS=$as_save_IFS
8364   test -z "$as_dir" && as_dir=.
8365     for ac_exec_ext in '' $ac_executable_extensions; do
8366   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8367     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8368     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8369     break 2
8370   fi
8371 done
8372   done
8373 IFS=$as_save_IFS
8374 
8375   ;;
8376 esac
8377 fi
8378 MKDIR=$ac_cv_path_MKDIR
8379 if test -n "$MKDIR"; then
8380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8381 $as_echo "$MKDIR" >&6; }
8382 else
8383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8384 $as_echo "no" >&6; }
8385 fi
8386 
8387 
8388   test -n "$MKDIR" && break
8389 done
8390 
8391   else
8392     # The variable is set, but is it from the command line or the environment?
8393 
8394     # Try to remove the string !MKDIR! from our list.
8395     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8396     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8397       # If it failed, the variable was not from the command line. Ignore it,
8398       # but warn the user (except for BASH, which is always set by the calling BASH).
8399       if test "xMKDIR" != xBASH; then
8400         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8401 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8402       fi
8403       # Try to locate tool using the code snippet
8404       for ac_prog in mkdir
8405 do
8406   # Extract the first word of "$ac_prog", so it can be a program name with args.
8407 set dummy $ac_prog; ac_word=$2
8408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8409 $as_echo_n "checking for $ac_word... " >&6; }
8410 if ${ac_cv_path_MKDIR+:} false; then :
8411   $as_echo_n "(cached) " >&6
8412 else
8413   case $MKDIR in
8414   [\\/]* | ?:[\\/]*)
8415   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8416   ;;
8417   *)
8418   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8419 for as_dir in $PATH
8420 do
8421   IFS=$as_save_IFS
8422   test -z "$as_dir" && as_dir=.
8423     for ac_exec_ext in '' $ac_executable_extensions; do
8424   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8425     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8426     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8427     break 2
8428   fi
8429 done
8430   done
8431 IFS=$as_save_IFS
8432 
8433   ;;
8434 esac
8435 fi
8436 MKDIR=$ac_cv_path_MKDIR
8437 if test -n "$MKDIR"; then
8438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8439 $as_echo "$MKDIR" >&6; }
8440 else
8441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8442 $as_echo "no" >&6; }
8443 fi
8444 
8445 
8446   test -n "$MKDIR" && break
8447 done
8448 
8449     else
8450       # If it succeeded, then it was overridden by the user. We will use it
8451       # for the tool.
8452 
8453       # First remove it from the list of overridden variables, so we can test
8454       # for unknown variables in the end.
8455       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8456 
8457       # Check if we try to supply an empty value
8458       if test "x$MKDIR" = x; then
8459         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8460 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8461         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8462 $as_echo_n "checking for MKDIR... " >&6; }
8463         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8464 $as_echo "disabled" >&6; }
8465       else
8466         # Check if the provided tool contains a complete path.
8467         tool_specified="$MKDIR"
8468         tool_basename="${tool_specified##*/}"
8469         if test "x$tool_basename" = "x$tool_specified"; then
8470           # A command without a complete path is provided, search $PATH.
8471           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8472 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8473           # Extract the first word of "$tool_basename", so it can be a program name with args.
8474 set dummy $tool_basename; ac_word=$2
8475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8476 $as_echo_n "checking for $ac_word... " >&6; }
8477 if ${ac_cv_path_MKDIR+:} false; then :
8478   $as_echo_n "(cached) " >&6
8479 else
8480   case $MKDIR in
8481   [\\/]* | ?:[\\/]*)
8482   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8483   ;;
8484   *)
8485   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8486 for as_dir in $PATH
8487 do
8488   IFS=$as_save_IFS
8489   test -z "$as_dir" && as_dir=.
8490     for ac_exec_ext in '' $ac_executable_extensions; do
8491   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8492     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8493     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8494     break 2
8495   fi
8496 done
8497   done
8498 IFS=$as_save_IFS
8499 
8500   ;;
8501 esac
8502 fi
8503 MKDIR=$ac_cv_path_MKDIR
8504 if test -n "$MKDIR"; then
8505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8506 $as_echo "$MKDIR" >&6; }
8507 else
8508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8509 $as_echo "no" >&6; }
8510 fi
8511 
8512 
8513           if test "x$MKDIR" = x; then
8514             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8515           fi
8516         else
8517           # Otherwise we believe it is a complete path. Use it as it is.
8518           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8519 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8520           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8521 $as_echo_n "checking for MKDIR... " >&6; }
8522           if test ! -x "$tool_specified"; then
8523             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8524 $as_echo "not found" >&6; }
8525             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8526           fi
8527           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8528 $as_echo "$tool_specified" >&6; }
8529         fi
8530       fi
8531     fi
8532 
8533   fi
8534 
8535 
8536 
8537   if test "x$MKDIR" = x; then
8538     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8539   fi
8540 
8541 
8542 
8543 
8544 
8545   # Publish this variable in the help.
8546 
8547 
8548   if [ -z "${MKTEMP+x}" ]; then
8549     # The variable is not set by user, try to locate tool using the code snippet
8550     for ac_prog in mktemp
8551 do
8552   # Extract the first word of "$ac_prog", so it can be a program name with args.
8553 set dummy $ac_prog; ac_word=$2
8554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8555 $as_echo_n "checking for $ac_word... " >&6; }
8556 if ${ac_cv_path_MKTEMP+:} false; then :
8557   $as_echo_n "(cached) " >&6
8558 else
8559   case $MKTEMP in
8560   [\\/]* | ?:[\\/]*)
8561   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8562   ;;
8563   *)
8564   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8565 for as_dir in $PATH
8566 do
8567   IFS=$as_save_IFS
8568   test -z "$as_dir" && as_dir=.
8569     for ac_exec_ext in '' $ac_executable_extensions; do
8570   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8571     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8572     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8573     break 2
8574   fi
8575 done
8576   done
8577 IFS=$as_save_IFS
8578 
8579   ;;
8580 esac
8581 fi
8582 MKTEMP=$ac_cv_path_MKTEMP
8583 if test -n "$MKTEMP"; then
8584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8585 $as_echo "$MKTEMP" >&6; }
8586 else
8587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8588 $as_echo "no" >&6; }
8589 fi
8590 
8591 
8592   test -n "$MKTEMP" && break
8593 done
8594 
8595   else
8596     # The variable is set, but is it from the command line or the environment?
8597 
8598     # Try to remove the string !MKTEMP! from our list.
8599     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8600     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8601       # If it failed, the variable was not from the command line. Ignore it,
8602       # but warn the user (except for BASH, which is always set by the calling BASH).
8603       if test "xMKTEMP" != xBASH; then
8604         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8605 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8606       fi
8607       # Try to locate tool using the code snippet
8608       for ac_prog in mktemp
8609 do
8610   # Extract the first word of "$ac_prog", so it can be a program name with args.
8611 set dummy $ac_prog; ac_word=$2
8612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8613 $as_echo_n "checking for $ac_word... " >&6; }
8614 if ${ac_cv_path_MKTEMP+:} false; then :
8615   $as_echo_n "(cached) " >&6
8616 else
8617   case $MKTEMP in
8618   [\\/]* | ?:[\\/]*)
8619   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8620   ;;
8621   *)
8622   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8623 for as_dir in $PATH
8624 do
8625   IFS=$as_save_IFS
8626   test -z "$as_dir" && as_dir=.
8627     for ac_exec_ext in '' $ac_executable_extensions; do
8628   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8629     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8630     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8631     break 2
8632   fi
8633 done
8634   done
8635 IFS=$as_save_IFS
8636 
8637   ;;
8638 esac
8639 fi
8640 MKTEMP=$ac_cv_path_MKTEMP
8641 if test -n "$MKTEMP"; then
8642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8643 $as_echo "$MKTEMP" >&6; }
8644 else
8645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8646 $as_echo "no" >&6; }
8647 fi
8648 
8649 
8650   test -n "$MKTEMP" && break
8651 done
8652 
8653     else
8654       # If it succeeded, then it was overridden by the user. We will use it
8655       # for the tool.
8656 
8657       # First remove it from the list of overridden variables, so we can test
8658       # for unknown variables in the end.
8659       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8660 
8661       # Check if we try to supply an empty value
8662       if test "x$MKTEMP" = x; then
8663         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8664 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8665         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8666 $as_echo_n "checking for MKTEMP... " >&6; }
8667         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8668 $as_echo "disabled" >&6; }
8669       else
8670         # Check if the provided tool contains a complete path.
8671         tool_specified="$MKTEMP"
8672         tool_basename="${tool_specified##*/}"
8673         if test "x$tool_basename" = "x$tool_specified"; then
8674           # A command without a complete path is provided, search $PATH.
8675           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8676 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8677           # Extract the first word of "$tool_basename", so it can be a program name with args.
8678 set dummy $tool_basename; ac_word=$2
8679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8680 $as_echo_n "checking for $ac_word... " >&6; }
8681 if ${ac_cv_path_MKTEMP+:} false; then :
8682   $as_echo_n "(cached) " >&6
8683 else
8684   case $MKTEMP in
8685   [\\/]* | ?:[\\/]*)
8686   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8687   ;;
8688   *)
8689   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8690 for as_dir in $PATH
8691 do
8692   IFS=$as_save_IFS
8693   test -z "$as_dir" && as_dir=.
8694     for ac_exec_ext in '' $ac_executable_extensions; do
8695   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8696     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8698     break 2
8699   fi
8700 done
8701   done
8702 IFS=$as_save_IFS
8703 
8704   ;;
8705 esac
8706 fi
8707 MKTEMP=$ac_cv_path_MKTEMP
8708 if test -n "$MKTEMP"; then
8709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8710 $as_echo "$MKTEMP" >&6; }
8711 else
8712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8713 $as_echo "no" >&6; }
8714 fi
8715 
8716 
8717           if test "x$MKTEMP" = x; then
8718             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8719           fi
8720         else
8721           # Otherwise we believe it is a complete path. Use it as it is.
8722           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8723 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8724           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8725 $as_echo_n "checking for MKTEMP... " >&6; }
8726           if test ! -x "$tool_specified"; then
8727             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8728 $as_echo "not found" >&6; }
8729             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8730           fi
8731           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8732 $as_echo "$tool_specified" >&6; }
8733         fi
8734       fi
8735     fi
8736 
8737   fi
8738 
8739 
8740 
8741   if test "x$MKTEMP" = x; then
8742     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8743   fi
8744 
8745 
8746 
8747 
8748 
8749   # Publish this variable in the help.
8750 
8751 
8752   if [ -z "${MV+x}" ]; then
8753     # The variable is not set by user, try to locate tool using the code snippet
8754     for ac_prog in mv
8755 do
8756   # Extract the first word of "$ac_prog", so it can be a program name with args.
8757 set dummy $ac_prog; ac_word=$2
8758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8759 $as_echo_n "checking for $ac_word... " >&6; }
8760 if ${ac_cv_path_MV+:} false; then :
8761   $as_echo_n "(cached) " >&6
8762 else
8763   case $MV in
8764   [\\/]* | ?:[\\/]*)
8765   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8766   ;;
8767   *)
8768   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8769 for as_dir in $PATH
8770 do
8771   IFS=$as_save_IFS
8772   test -z "$as_dir" && as_dir=.
8773     for ac_exec_ext in '' $ac_executable_extensions; do
8774   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8775     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8776     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8777     break 2
8778   fi
8779 done
8780   done
8781 IFS=$as_save_IFS
8782 
8783   ;;
8784 esac
8785 fi
8786 MV=$ac_cv_path_MV
8787 if test -n "$MV"; then
8788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8789 $as_echo "$MV" >&6; }
8790 else
8791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8792 $as_echo "no" >&6; }
8793 fi
8794 
8795 
8796   test -n "$MV" && break
8797 done
8798 
8799   else
8800     # The variable is set, but is it from the command line or the environment?
8801 
8802     # Try to remove the string !MV! from our list.
8803     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8804     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8805       # If it failed, the variable was not from the command line. Ignore it,
8806       # but warn the user (except for BASH, which is always set by the calling BASH).
8807       if test "xMV" != xBASH; then
8808         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8809 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8810       fi
8811       # Try to locate tool using the code snippet
8812       for ac_prog in mv
8813 do
8814   # Extract the first word of "$ac_prog", so it can be a program name with args.
8815 set dummy $ac_prog; ac_word=$2
8816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8817 $as_echo_n "checking for $ac_word... " >&6; }
8818 if ${ac_cv_path_MV+:} false; then :
8819   $as_echo_n "(cached) " >&6
8820 else
8821   case $MV in
8822   [\\/]* | ?:[\\/]*)
8823   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8824   ;;
8825   *)
8826   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8827 for as_dir in $PATH
8828 do
8829   IFS=$as_save_IFS
8830   test -z "$as_dir" && as_dir=.
8831     for ac_exec_ext in '' $ac_executable_extensions; do
8832   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8833     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8834     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8835     break 2
8836   fi
8837 done
8838   done
8839 IFS=$as_save_IFS
8840 
8841   ;;
8842 esac
8843 fi
8844 MV=$ac_cv_path_MV
8845 if test -n "$MV"; then
8846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8847 $as_echo "$MV" >&6; }
8848 else
8849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8850 $as_echo "no" >&6; }
8851 fi
8852 
8853 
8854   test -n "$MV" && break
8855 done
8856 
8857     else
8858       # If it succeeded, then it was overridden by the user. We will use it
8859       # for the tool.
8860 
8861       # First remove it from the list of overridden variables, so we can test
8862       # for unknown variables in the end.
8863       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8864 
8865       # Check if we try to supply an empty value
8866       if test "x$MV" = x; then
8867         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
8868 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
8869         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8870 $as_echo_n "checking for MV... " >&6; }
8871         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8872 $as_echo "disabled" >&6; }
8873       else
8874         # Check if the provided tool contains a complete path.
8875         tool_specified="$MV"
8876         tool_basename="${tool_specified##*/}"
8877         if test "x$tool_basename" = "x$tool_specified"; then
8878           # A command without a complete path is provided, search $PATH.
8879           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8880 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8881           # Extract the first word of "$tool_basename", so it can be a program name with args.
8882 set dummy $tool_basename; ac_word=$2
8883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8884 $as_echo_n "checking for $ac_word... " >&6; }
8885 if ${ac_cv_path_MV+:} false; then :
8886   $as_echo_n "(cached) " >&6
8887 else
8888   case $MV in
8889   [\\/]* | ?:[\\/]*)
8890   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8891   ;;
8892   *)
8893   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8894 for as_dir in $PATH
8895 do
8896   IFS=$as_save_IFS
8897   test -z "$as_dir" && as_dir=.
8898     for ac_exec_ext in '' $ac_executable_extensions; do
8899   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8900     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8901     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8902     break 2
8903   fi
8904 done
8905   done
8906 IFS=$as_save_IFS
8907 
8908   ;;
8909 esac
8910 fi
8911 MV=$ac_cv_path_MV
8912 if test -n "$MV"; then
8913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8914 $as_echo "$MV" >&6; }
8915 else
8916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8917 $as_echo "no" >&6; }
8918 fi
8919 
8920 
8921           if test "x$MV" = x; then
8922             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8923           fi
8924         else
8925           # Otherwise we believe it is a complete path. Use it as it is.
8926           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8927 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8928           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8929 $as_echo_n "checking for MV... " >&6; }
8930           if test ! -x "$tool_specified"; then
8931             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8932 $as_echo "not found" >&6; }
8933             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8934           fi
8935           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8936 $as_echo "$tool_specified" >&6; }
8937         fi
8938       fi
8939     fi
8940 
8941   fi
8942 
8943 
8944 
8945   if test "x$MV" = x; then
8946     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8947   fi
8948 
8949 
8950 
8951 
8952 
8953   # Publish this variable in the help.
8954 
8955 
8956   if [ -z "${NAWK+x}" ]; then
8957     # The variable is not set by user, try to locate tool using the code snippet
8958     for ac_prog in nawk gawk awk
8959 do
8960   # Extract the first word of "$ac_prog", so it can be a program name with args.
8961 set dummy $ac_prog; ac_word=$2
8962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8963 $as_echo_n "checking for $ac_word... " >&6; }
8964 if ${ac_cv_path_NAWK+:} false; then :
8965   $as_echo_n "(cached) " >&6
8966 else
8967   case $NAWK in
8968   [\\/]* | ?:[\\/]*)
8969   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8970   ;;
8971   *)
8972   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8973 for as_dir in $PATH
8974 do
8975   IFS=$as_save_IFS
8976   test -z "$as_dir" && as_dir=.
8977     for ac_exec_ext in '' $ac_executable_extensions; do
8978   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8979     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8980     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8981     break 2
8982   fi
8983 done
8984   done
8985 IFS=$as_save_IFS
8986 
8987   ;;
8988 esac
8989 fi
8990 NAWK=$ac_cv_path_NAWK
8991 if test -n "$NAWK"; then
8992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8993 $as_echo "$NAWK" >&6; }
8994 else
8995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8996 $as_echo "no" >&6; }
8997 fi
8998 
8999 
9000   test -n "$NAWK" && break
9001 done
9002 
9003   else
9004     # The variable is set, but is it from the command line or the environment?
9005 
9006     # Try to remove the string !NAWK! from our list.
9007     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9008     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9009       # If it failed, the variable was not from the command line. Ignore it,
9010       # but warn the user (except for BASH, which is always set by the calling BASH).
9011       if test "xNAWK" != xBASH; then
9012         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9013 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9014       fi
9015       # Try to locate tool using the code snippet
9016       for ac_prog in nawk gawk awk
9017 do
9018   # Extract the first word of "$ac_prog", so it can be a program name with args.
9019 set dummy $ac_prog; ac_word=$2
9020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9021 $as_echo_n "checking for $ac_word... " >&6; }
9022 if ${ac_cv_path_NAWK+:} false; then :
9023   $as_echo_n "(cached) " >&6
9024 else
9025   case $NAWK in
9026   [\\/]* | ?:[\\/]*)
9027   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9028   ;;
9029   *)
9030   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9031 for as_dir in $PATH
9032 do
9033   IFS=$as_save_IFS
9034   test -z "$as_dir" && as_dir=.
9035     for ac_exec_ext in '' $ac_executable_extensions; do
9036   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9037     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9038     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9039     break 2
9040   fi
9041 done
9042   done
9043 IFS=$as_save_IFS
9044 
9045   ;;
9046 esac
9047 fi
9048 NAWK=$ac_cv_path_NAWK
9049 if test -n "$NAWK"; then
9050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9051 $as_echo "$NAWK" >&6; }
9052 else
9053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9054 $as_echo "no" >&6; }
9055 fi
9056 
9057 
9058   test -n "$NAWK" && break
9059 done
9060 
9061     else
9062       # If it succeeded, then it was overridden by the user. We will use it
9063       # for the tool.
9064 
9065       # First remove it from the list of overridden variables, so we can test
9066       # for unknown variables in the end.
9067       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9068 
9069       # Check if we try to supply an empty value
9070       if test "x$NAWK" = x; then
9071         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9072 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9073         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9074 $as_echo_n "checking for NAWK... " >&6; }
9075         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9076 $as_echo "disabled" >&6; }
9077       else
9078         # Check if the provided tool contains a complete path.
9079         tool_specified="$NAWK"
9080         tool_basename="${tool_specified##*/}"
9081         if test "x$tool_basename" = "x$tool_specified"; then
9082           # A command without a complete path is provided, search $PATH.
9083           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9084 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9085           # Extract the first word of "$tool_basename", so it can be a program name with args.
9086 set dummy $tool_basename; ac_word=$2
9087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9088 $as_echo_n "checking for $ac_word... " >&6; }
9089 if ${ac_cv_path_NAWK+:} false; then :
9090   $as_echo_n "(cached) " >&6
9091 else
9092   case $NAWK in
9093   [\\/]* | ?:[\\/]*)
9094   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9095   ;;
9096   *)
9097   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9098 for as_dir in $PATH
9099 do
9100   IFS=$as_save_IFS
9101   test -z "$as_dir" && as_dir=.
9102     for ac_exec_ext in '' $ac_executable_extensions; do
9103   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9104     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9106     break 2
9107   fi
9108 done
9109   done
9110 IFS=$as_save_IFS
9111 
9112   ;;
9113 esac
9114 fi
9115 NAWK=$ac_cv_path_NAWK
9116 if test -n "$NAWK"; then
9117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9118 $as_echo "$NAWK" >&6; }
9119 else
9120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9121 $as_echo "no" >&6; }
9122 fi
9123 
9124 
9125           if test "x$NAWK" = x; then
9126             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9127           fi
9128         else
9129           # Otherwise we believe it is a complete path. Use it as it is.
9130           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9131 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9132           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9133 $as_echo_n "checking for NAWK... " >&6; }
9134           if test ! -x "$tool_specified"; then
9135             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9136 $as_echo "not found" >&6; }
9137             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9138           fi
9139           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9140 $as_echo "$tool_specified" >&6; }
9141         fi
9142       fi
9143     fi
9144 
9145   fi
9146 
9147 
9148 
9149   if test "x$NAWK" = x; then
9150     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9151   fi
9152 
9153 
9154 
9155 
9156 
9157   # Publish this variable in the help.
9158 
9159 
9160   if [ -z "${PRINTF+x}" ]; then
9161     # The variable is not set by user, try to locate tool using the code snippet
9162     for ac_prog in printf
9163 do
9164   # Extract the first word of "$ac_prog", so it can be a program name with args.
9165 set dummy $ac_prog; ac_word=$2
9166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9167 $as_echo_n "checking for $ac_word... " >&6; }
9168 if ${ac_cv_path_PRINTF+:} false; then :
9169   $as_echo_n "(cached) " >&6
9170 else
9171   case $PRINTF in
9172   [\\/]* | ?:[\\/]*)
9173   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9174   ;;
9175   *)
9176   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9177 for as_dir in $PATH
9178 do
9179   IFS=$as_save_IFS
9180   test -z "$as_dir" && as_dir=.
9181     for ac_exec_ext in '' $ac_executable_extensions; do
9182   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9183     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9184     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9185     break 2
9186   fi
9187 done
9188   done
9189 IFS=$as_save_IFS
9190 
9191   ;;
9192 esac
9193 fi
9194 PRINTF=$ac_cv_path_PRINTF
9195 if test -n "$PRINTF"; then
9196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9197 $as_echo "$PRINTF" >&6; }
9198 else
9199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9200 $as_echo "no" >&6; }
9201 fi
9202 
9203 
9204   test -n "$PRINTF" && break
9205 done
9206 
9207   else
9208     # The variable is set, but is it from the command line or the environment?
9209 
9210     # Try to remove the string !PRINTF! from our list.
9211     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9212     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9213       # If it failed, the variable was not from the command line. Ignore it,
9214       # but warn the user (except for BASH, which is always set by the calling BASH).
9215       if test "xPRINTF" != xBASH; then
9216         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9217 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9218       fi
9219       # Try to locate tool using the code snippet
9220       for ac_prog in printf
9221 do
9222   # Extract the first word of "$ac_prog", so it can be a program name with args.
9223 set dummy $ac_prog; ac_word=$2
9224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9225 $as_echo_n "checking for $ac_word... " >&6; }
9226 if ${ac_cv_path_PRINTF+:} false; then :
9227   $as_echo_n "(cached) " >&6
9228 else
9229   case $PRINTF in
9230   [\\/]* | ?:[\\/]*)
9231   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9232   ;;
9233   *)
9234   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9235 for as_dir in $PATH
9236 do
9237   IFS=$as_save_IFS
9238   test -z "$as_dir" && as_dir=.
9239     for ac_exec_ext in '' $ac_executable_extensions; do
9240   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9241     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9242     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9243     break 2
9244   fi
9245 done
9246   done
9247 IFS=$as_save_IFS
9248 
9249   ;;
9250 esac
9251 fi
9252 PRINTF=$ac_cv_path_PRINTF
9253 if test -n "$PRINTF"; then
9254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9255 $as_echo "$PRINTF" >&6; }
9256 else
9257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9258 $as_echo "no" >&6; }
9259 fi
9260 
9261 
9262   test -n "$PRINTF" && break
9263 done
9264 
9265     else
9266       # If it succeeded, then it was overridden by the user. We will use it
9267       # for the tool.
9268 
9269       # First remove it from the list of overridden variables, so we can test
9270       # for unknown variables in the end.
9271       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9272 
9273       # Check if we try to supply an empty value
9274       if test "x$PRINTF" = x; then
9275         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9276 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9277         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9278 $as_echo_n "checking for PRINTF... " >&6; }
9279         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9280 $as_echo "disabled" >&6; }
9281       else
9282         # Check if the provided tool contains a complete path.
9283         tool_specified="$PRINTF"
9284         tool_basename="${tool_specified##*/}"
9285         if test "x$tool_basename" = "x$tool_specified"; then
9286           # A command without a complete path is provided, search $PATH.
9287           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9288 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9289           # Extract the first word of "$tool_basename", so it can be a program name with args.
9290 set dummy $tool_basename; ac_word=$2
9291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9292 $as_echo_n "checking for $ac_word... " >&6; }
9293 if ${ac_cv_path_PRINTF+:} false; then :
9294   $as_echo_n "(cached) " >&6
9295 else
9296   case $PRINTF in
9297   [\\/]* | ?:[\\/]*)
9298   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9299   ;;
9300   *)
9301   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9302 for as_dir in $PATH
9303 do
9304   IFS=$as_save_IFS
9305   test -z "$as_dir" && as_dir=.
9306     for ac_exec_ext in '' $ac_executable_extensions; do
9307   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9308     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9309     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9310     break 2
9311   fi
9312 done
9313   done
9314 IFS=$as_save_IFS
9315 
9316   ;;
9317 esac
9318 fi
9319 PRINTF=$ac_cv_path_PRINTF
9320 if test -n "$PRINTF"; then
9321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9322 $as_echo "$PRINTF" >&6; }
9323 else
9324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9325 $as_echo "no" >&6; }
9326 fi
9327 
9328 
9329           if test "x$PRINTF" = x; then
9330             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9331           fi
9332         else
9333           # Otherwise we believe it is a complete path. Use it as it is.
9334           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9335 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9336           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9337 $as_echo_n "checking for PRINTF... " >&6; }
9338           if test ! -x "$tool_specified"; then
9339             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9340 $as_echo "not found" >&6; }
9341             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9342           fi
9343           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9344 $as_echo "$tool_specified" >&6; }
9345         fi
9346       fi
9347     fi
9348 
9349   fi
9350 
9351 
9352 
9353   if test "x$PRINTF" = x; then
9354     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9355   fi
9356 
9357 
9358 
9359 
9360 
9361   # Publish this variable in the help.
9362 
9363 
9364   if [ -z "${RM+x}" ]; then
9365     # The variable is not set by user, try to locate tool using the code snippet
9366     for ac_prog in rm
9367 do
9368   # Extract the first word of "$ac_prog", so it can be a program name with args.
9369 set dummy $ac_prog; ac_word=$2
9370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9371 $as_echo_n "checking for $ac_word... " >&6; }
9372 if ${ac_cv_path_RM+:} false; then :
9373   $as_echo_n "(cached) " >&6
9374 else
9375   case $RM in
9376   [\\/]* | ?:[\\/]*)
9377   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9378   ;;
9379   *)
9380   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9381 for as_dir in $PATH
9382 do
9383   IFS=$as_save_IFS
9384   test -z "$as_dir" && as_dir=.
9385     for ac_exec_ext in '' $ac_executable_extensions; do
9386   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9387     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9388     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9389     break 2
9390   fi
9391 done
9392   done
9393 IFS=$as_save_IFS
9394 
9395   ;;
9396 esac
9397 fi
9398 RM=$ac_cv_path_RM
9399 if test -n "$RM"; then
9400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9401 $as_echo "$RM" >&6; }
9402 else
9403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9404 $as_echo "no" >&6; }
9405 fi
9406 
9407 
9408   test -n "$RM" && break
9409 done
9410 
9411   else
9412     # The variable is set, but is it from the command line or the environment?
9413 
9414     # Try to remove the string !RM! from our list.
9415     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9416     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9417       # If it failed, the variable was not from the command line. Ignore it,
9418       # but warn the user (except for BASH, which is always set by the calling BASH).
9419       if test "xRM" != xBASH; then
9420         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9421 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9422       fi
9423       # Try to locate tool using the code snippet
9424       for ac_prog in rm
9425 do
9426   # Extract the first word of "$ac_prog", so it can be a program name with args.
9427 set dummy $ac_prog; ac_word=$2
9428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9429 $as_echo_n "checking for $ac_word... " >&6; }
9430 if ${ac_cv_path_RM+:} false; then :
9431   $as_echo_n "(cached) " >&6
9432 else
9433   case $RM in
9434   [\\/]* | ?:[\\/]*)
9435   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9436   ;;
9437   *)
9438   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9439 for as_dir in $PATH
9440 do
9441   IFS=$as_save_IFS
9442   test -z "$as_dir" && as_dir=.
9443     for ac_exec_ext in '' $ac_executable_extensions; do
9444   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9445     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9446     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9447     break 2
9448   fi
9449 done
9450   done
9451 IFS=$as_save_IFS
9452 
9453   ;;
9454 esac
9455 fi
9456 RM=$ac_cv_path_RM
9457 if test -n "$RM"; then
9458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9459 $as_echo "$RM" >&6; }
9460 else
9461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9462 $as_echo "no" >&6; }
9463 fi
9464 
9465 
9466   test -n "$RM" && break
9467 done
9468 
9469     else
9470       # If it succeeded, then it was overridden by the user. We will use it
9471       # for the tool.
9472 
9473       # First remove it from the list of overridden variables, so we can test
9474       # for unknown variables in the end.
9475       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9476 
9477       # Check if we try to supply an empty value
9478       if test "x$RM" = x; then
9479         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9480 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9481         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9482 $as_echo_n "checking for RM... " >&6; }
9483         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9484 $as_echo "disabled" >&6; }
9485       else
9486         # Check if the provided tool contains a complete path.
9487         tool_specified="$RM"
9488         tool_basename="${tool_specified##*/}"
9489         if test "x$tool_basename" = "x$tool_specified"; then
9490           # A command without a complete path is provided, search $PATH.
9491           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9492 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9493           # Extract the first word of "$tool_basename", so it can be a program name with args.
9494 set dummy $tool_basename; ac_word=$2
9495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9496 $as_echo_n "checking for $ac_word... " >&6; }
9497 if ${ac_cv_path_RM+:} false; then :
9498   $as_echo_n "(cached) " >&6
9499 else
9500   case $RM in
9501   [\\/]* | ?:[\\/]*)
9502   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9503   ;;
9504   *)
9505   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9506 for as_dir in $PATH
9507 do
9508   IFS=$as_save_IFS
9509   test -z "$as_dir" && as_dir=.
9510     for ac_exec_ext in '' $ac_executable_extensions; do
9511   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9512     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9513     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9514     break 2
9515   fi
9516 done
9517   done
9518 IFS=$as_save_IFS
9519 
9520   ;;
9521 esac
9522 fi
9523 RM=$ac_cv_path_RM
9524 if test -n "$RM"; then
9525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9526 $as_echo "$RM" >&6; }
9527 else
9528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9529 $as_echo "no" >&6; }
9530 fi
9531 
9532 
9533           if test "x$RM" = x; then
9534             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9535           fi
9536         else
9537           # Otherwise we believe it is a complete path. Use it as it is.
9538           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9539 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9540           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9541 $as_echo_n "checking for RM... " >&6; }
9542           if test ! -x "$tool_specified"; then
9543             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9544 $as_echo "not found" >&6; }
9545             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9546           fi
9547           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9548 $as_echo "$tool_specified" >&6; }
9549         fi
9550       fi
9551     fi
9552 
9553   fi
9554 
9555 
9556 
9557   if test "x$RM" = x; then
9558     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9559   fi
9560 
9561 
9562 
9563 
9564 
9565   # Publish this variable in the help.
9566 
9567 
9568   if [ -z "${RMDIR+x}" ]; then
9569     # The variable is not set by user, try to locate tool using the code snippet
9570     for ac_prog in rmdir
9571 do
9572   # Extract the first word of "$ac_prog", so it can be a program name with args.
9573 set dummy $ac_prog; ac_word=$2
9574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9575 $as_echo_n "checking for $ac_word... " >&6; }
9576 if ${ac_cv_path_RMDIR+:} false; then :
9577   $as_echo_n "(cached) " >&6
9578 else
9579   case $RMDIR in
9580   [\\/]* | ?:[\\/]*)
9581   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9582   ;;
9583   *)
9584   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9585 for as_dir in $PATH
9586 do
9587   IFS=$as_save_IFS
9588   test -z "$as_dir" && as_dir=.
9589     for ac_exec_ext in '' $ac_executable_extensions; do
9590   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9591     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9592     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9593     break 2
9594   fi
9595 done
9596   done
9597 IFS=$as_save_IFS
9598 
9599   ;;
9600 esac
9601 fi
9602 RMDIR=$ac_cv_path_RMDIR
9603 if test -n "$RMDIR"; then
9604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9605 $as_echo "$RMDIR" >&6; }
9606 else
9607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9608 $as_echo "no" >&6; }
9609 fi
9610 
9611 
9612   test -n "$RMDIR" && break
9613 done
9614 
9615   else
9616     # The variable is set, but is it from the command line or the environment?
9617 
9618     # Try to remove the string !RMDIR! from our list.
9619     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9620     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9621       # If it failed, the variable was not from the command line. Ignore it,
9622       # but warn the user (except for BASH, which is always set by the calling BASH).
9623       if test "xRMDIR" != xBASH; then
9624         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9625 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9626       fi
9627       # Try to locate tool using the code snippet
9628       for ac_prog in rmdir
9629 do
9630   # Extract the first word of "$ac_prog", so it can be a program name with args.
9631 set dummy $ac_prog; ac_word=$2
9632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9633 $as_echo_n "checking for $ac_word... " >&6; }
9634 if ${ac_cv_path_RMDIR+:} false; then :
9635   $as_echo_n "(cached) " >&6
9636 else
9637   case $RMDIR in
9638   [\\/]* | ?:[\\/]*)
9639   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9640   ;;
9641   *)
9642   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9643 for as_dir in $PATH
9644 do
9645   IFS=$as_save_IFS
9646   test -z "$as_dir" && as_dir=.
9647     for ac_exec_ext in '' $ac_executable_extensions; do
9648   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9649     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9650     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9651     break 2
9652   fi
9653 done
9654   done
9655 IFS=$as_save_IFS
9656 
9657   ;;
9658 esac
9659 fi
9660 RMDIR=$ac_cv_path_RMDIR
9661 if test -n "$RMDIR"; then
9662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9663 $as_echo "$RMDIR" >&6; }
9664 else
9665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9666 $as_echo "no" >&6; }
9667 fi
9668 
9669 
9670   test -n "$RMDIR" && break
9671 done
9672 
9673     else
9674       # If it succeeded, then it was overridden by the user. We will use it
9675       # for the tool.
9676 
9677       # First remove it from the list of overridden variables, so we can test
9678       # for unknown variables in the end.
9679       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9680 
9681       # Check if we try to supply an empty value
9682       if test "x$RMDIR" = x; then
9683         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9684 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9685         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9686 $as_echo_n "checking for RMDIR... " >&6; }
9687         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9688 $as_echo "disabled" >&6; }
9689       else
9690         # Check if the provided tool contains a complete path.
9691         tool_specified="$RMDIR"
9692         tool_basename="${tool_specified##*/}"
9693         if test "x$tool_basename" = "x$tool_specified"; then
9694           # A command without a complete path is provided, search $PATH.
9695           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9696 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9697           # Extract the first word of "$tool_basename", so it can be a program name with args.
9698 set dummy $tool_basename; ac_word=$2
9699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9700 $as_echo_n "checking for $ac_word... " >&6; }
9701 if ${ac_cv_path_RMDIR+:} false; then :
9702   $as_echo_n "(cached) " >&6
9703 else
9704   case $RMDIR in
9705   [\\/]* | ?:[\\/]*)
9706   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9707   ;;
9708   *)
9709   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9710 for as_dir in $PATH
9711 do
9712   IFS=$as_save_IFS
9713   test -z "$as_dir" && as_dir=.
9714     for ac_exec_ext in '' $ac_executable_extensions; do
9715   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9716     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9717     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9718     break 2
9719   fi
9720 done
9721   done
9722 IFS=$as_save_IFS
9723 
9724   ;;
9725 esac
9726 fi
9727 RMDIR=$ac_cv_path_RMDIR
9728 if test -n "$RMDIR"; then
9729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9730 $as_echo "$RMDIR" >&6; }
9731 else
9732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9733 $as_echo "no" >&6; }
9734 fi
9735 
9736 
9737           if test "x$RMDIR" = x; then
9738             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9739           fi
9740         else
9741           # Otherwise we believe it is a complete path. Use it as it is.
9742           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9743 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9744           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9745 $as_echo_n "checking for RMDIR... " >&6; }
9746           if test ! -x "$tool_specified"; then
9747             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9748 $as_echo "not found" >&6; }
9749             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9750           fi
9751           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9752 $as_echo "$tool_specified" >&6; }
9753         fi
9754       fi
9755     fi
9756 
9757   fi
9758 
9759 
9760 
9761   if test "x$RMDIR" = x; then
9762     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9763   fi
9764 
9765 
9766 
9767 
9768 
9769   # Publish this variable in the help.
9770 
9771 
9772   if [ -z "${SH+x}" ]; then
9773     # The variable is not set by user, try to locate tool using the code snippet
9774     for ac_prog in sh
9775 do
9776   # Extract the first word of "$ac_prog", so it can be a program name with args.
9777 set dummy $ac_prog; ac_word=$2
9778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9779 $as_echo_n "checking for $ac_word... " >&6; }
9780 if ${ac_cv_path_SH+:} false; then :
9781   $as_echo_n "(cached) " >&6
9782 else
9783   case $SH in
9784   [\\/]* | ?:[\\/]*)
9785   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9786   ;;
9787   *)
9788   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9789 for as_dir in $PATH
9790 do
9791   IFS=$as_save_IFS
9792   test -z "$as_dir" && as_dir=.
9793     for ac_exec_ext in '' $ac_executable_extensions; do
9794   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9795     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9796     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9797     break 2
9798   fi
9799 done
9800   done
9801 IFS=$as_save_IFS
9802 
9803   ;;
9804 esac
9805 fi
9806 SH=$ac_cv_path_SH
9807 if test -n "$SH"; then
9808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9809 $as_echo "$SH" >&6; }
9810 else
9811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9812 $as_echo "no" >&6; }
9813 fi
9814 
9815 
9816   test -n "$SH" && break
9817 done
9818 
9819   else
9820     # The variable is set, but is it from the command line or the environment?
9821 
9822     # Try to remove the string !SH! from our list.
9823     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9824     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9825       # If it failed, the variable was not from the command line. Ignore it,
9826       # but warn the user (except for BASH, which is always set by the calling BASH).
9827       if test "xSH" != xBASH; then
9828         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9829 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9830       fi
9831       # Try to locate tool using the code snippet
9832       for ac_prog in sh
9833 do
9834   # Extract the first word of "$ac_prog", so it can be a program name with args.
9835 set dummy $ac_prog; ac_word=$2
9836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9837 $as_echo_n "checking for $ac_word... " >&6; }
9838 if ${ac_cv_path_SH+:} false; then :
9839   $as_echo_n "(cached) " >&6
9840 else
9841   case $SH in
9842   [\\/]* | ?:[\\/]*)
9843   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9844   ;;
9845   *)
9846   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9847 for as_dir in $PATH
9848 do
9849   IFS=$as_save_IFS
9850   test -z "$as_dir" && as_dir=.
9851     for ac_exec_ext in '' $ac_executable_extensions; do
9852   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9853     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9854     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9855     break 2
9856   fi
9857 done
9858   done
9859 IFS=$as_save_IFS
9860 
9861   ;;
9862 esac
9863 fi
9864 SH=$ac_cv_path_SH
9865 if test -n "$SH"; then
9866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9867 $as_echo "$SH" >&6; }
9868 else
9869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9870 $as_echo "no" >&6; }
9871 fi
9872 
9873 
9874   test -n "$SH" && break
9875 done
9876 
9877     else
9878       # If it succeeded, then it was overridden by the user. We will use it
9879       # for the tool.
9880 
9881       # First remove it from the list of overridden variables, so we can test
9882       # for unknown variables in the end.
9883       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9884 
9885       # Check if we try to supply an empty value
9886       if test "x$SH" = x; then
9887         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
9888 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
9889         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9890 $as_echo_n "checking for SH... " >&6; }
9891         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9892 $as_echo "disabled" >&6; }
9893       else
9894         # Check if the provided tool contains a complete path.
9895         tool_specified="$SH"
9896         tool_basename="${tool_specified##*/}"
9897         if test "x$tool_basename" = "x$tool_specified"; then
9898           # A command without a complete path is provided, search $PATH.
9899           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9900 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9901           # Extract the first word of "$tool_basename", so it can be a program name with args.
9902 set dummy $tool_basename; ac_word=$2
9903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9904 $as_echo_n "checking for $ac_word... " >&6; }
9905 if ${ac_cv_path_SH+:} false; then :
9906   $as_echo_n "(cached) " >&6
9907 else
9908   case $SH in
9909   [\\/]* | ?:[\\/]*)
9910   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9911   ;;
9912   *)
9913   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9914 for as_dir in $PATH
9915 do
9916   IFS=$as_save_IFS
9917   test -z "$as_dir" && as_dir=.
9918     for ac_exec_ext in '' $ac_executable_extensions; do
9919   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9920     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9921     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9922     break 2
9923   fi
9924 done
9925   done
9926 IFS=$as_save_IFS
9927 
9928   ;;
9929 esac
9930 fi
9931 SH=$ac_cv_path_SH
9932 if test -n "$SH"; then
9933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9934 $as_echo "$SH" >&6; }
9935 else
9936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9937 $as_echo "no" >&6; }
9938 fi
9939 
9940 
9941           if test "x$SH" = x; then
9942             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9943           fi
9944         else
9945           # Otherwise we believe it is a complete path. Use it as it is.
9946           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9947 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9948           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9949 $as_echo_n "checking for SH... " >&6; }
9950           if test ! -x "$tool_specified"; then
9951             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9952 $as_echo "not found" >&6; }
9953             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9954           fi
9955           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9956 $as_echo "$tool_specified" >&6; }
9957         fi
9958       fi
9959     fi
9960 
9961   fi
9962 
9963 
9964 
9965   if test "x$SH" = x; then
9966     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9967   fi
9968 
9969 
9970 
9971 
9972 
9973   # Publish this variable in the help.
9974 
9975 
9976   if [ -z "${SORT+x}" ]; then
9977     # The variable is not set by user, try to locate tool using the code snippet
9978     for ac_prog in sort
9979 do
9980   # Extract the first word of "$ac_prog", so it can be a program name with args.
9981 set dummy $ac_prog; ac_word=$2
9982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9983 $as_echo_n "checking for $ac_word... " >&6; }
9984 if ${ac_cv_path_SORT+:} false; then :
9985   $as_echo_n "(cached) " >&6
9986 else
9987   case $SORT in
9988   [\\/]* | ?:[\\/]*)
9989   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9990   ;;
9991   *)
9992   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9993 for as_dir in $PATH
9994 do
9995   IFS=$as_save_IFS
9996   test -z "$as_dir" && as_dir=.
9997     for ac_exec_ext in '' $ac_executable_extensions; do
9998   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9999     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10000     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10001     break 2
10002   fi
10003 done
10004   done
10005 IFS=$as_save_IFS
10006 
10007   ;;
10008 esac
10009 fi
10010 SORT=$ac_cv_path_SORT
10011 if test -n "$SORT"; then
10012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10013 $as_echo "$SORT" >&6; }
10014 else
10015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10016 $as_echo "no" >&6; }
10017 fi
10018 
10019 
10020   test -n "$SORT" && break
10021 done
10022 
10023   else
10024     # The variable is set, but is it from the command line or the environment?
10025 
10026     # Try to remove the string !SORT! from our list.
10027     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10028     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10029       # If it failed, the variable was not from the command line. Ignore it,
10030       # but warn the user (except for BASH, which is always set by the calling BASH).
10031       if test "xSORT" != xBASH; then
10032         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10033 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10034       fi
10035       # Try to locate tool using the code snippet
10036       for ac_prog in sort
10037 do
10038   # Extract the first word of "$ac_prog", so it can be a program name with args.
10039 set dummy $ac_prog; ac_word=$2
10040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10041 $as_echo_n "checking for $ac_word... " >&6; }
10042 if ${ac_cv_path_SORT+:} false; then :
10043   $as_echo_n "(cached) " >&6
10044 else
10045   case $SORT in
10046   [\\/]* | ?:[\\/]*)
10047   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10048   ;;
10049   *)
10050   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10051 for as_dir in $PATH
10052 do
10053   IFS=$as_save_IFS
10054   test -z "$as_dir" && as_dir=.
10055     for ac_exec_ext in '' $ac_executable_extensions; do
10056   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10057     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10058     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10059     break 2
10060   fi
10061 done
10062   done
10063 IFS=$as_save_IFS
10064 
10065   ;;
10066 esac
10067 fi
10068 SORT=$ac_cv_path_SORT
10069 if test -n "$SORT"; then
10070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10071 $as_echo "$SORT" >&6; }
10072 else
10073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10074 $as_echo "no" >&6; }
10075 fi
10076 
10077 
10078   test -n "$SORT" && break
10079 done
10080 
10081     else
10082       # If it succeeded, then it was overridden by the user. We will use it
10083       # for the tool.
10084 
10085       # First remove it from the list of overridden variables, so we can test
10086       # for unknown variables in the end.
10087       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10088 
10089       # Check if we try to supply an empty value
10090       if test "x$SORT" = x; then
10091         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10092 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10093         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10094 $as_echo_n "checking for SORT... " >&6; }
10095         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10096 $as_echo "disabled" >&6; }
10097       else
10098         # Check if the provided tool contains a complete path.
10099         tool_specified="$SORT"
10100         tool_basename="${tool_specified##*/}"
10101         if test "x$tool_basename" = "x$tool_specified"; then
10102           # A command without a complete path is provided, search $PATH.
10103           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10104 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10105           # Extract the first word of "$tool_basename", so it can be a program name with args.
10106 set dummy $tool_basename; ac_word=$2
10107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10108 $as_echo_n "checking for $ac_word... " >&6; }
10109 if ${ac_cv_path_SORT+:} false; then :
10110   $as_echo_n "(cached) " >&6
10111 else
10112   case $SORT in
10113   [\\/]* | ?:[\\/]*)
10114   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10115   ;;
10116   *)
10117   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10118 for as_dir in $PATH
10119 do
10120   IFS=$as_save_IFS
10121   test -z "$as_dir" && as_dir=.
10122     for ac_exec_ext in '' $ac_executable_extensions; do
10123   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10124     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10125     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10126     break 2
10127   fi
10128 done
10129   done
10130 IFS=$as_save_IFS
10131 
10132   ;;
10133 esac
10134 fi
10135 SORT=$ac_cv_path_SORT
10136 if test -n "$SORT"; then
10137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10138 $as_echo "$SORT" >&6; }
10139 else
10140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10141 $as_echo "no" >&6; }
10142 fi
10143 
10144 
10145           if test "x$SORT" = x; then
10146             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10147           fi
10148         else
10149           # Otherwise we believe it is a complete path. Use it as it is.
10150           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10151 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10152           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10153 $as_echo_n "checking for SORT... " >&6; }
10154           if test ! -x "$tool_specified"; then
10155             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10156 $as_echo "not found" >&6; }
10157             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10158           fi
10159           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10160 $as_echo "$tool_specified" >&6; }
10161         fi
10162       fi
10163     fi
10164 
10165   fi
10166 
10167 
10168 
10169   if test "x$SORT" = x; then
10170     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10171   fi
10172 
10173 
10174 
10175 
10176 
10177   # Publish this variable in the help.
10178 
10179 
10180   if [ -z "${TAIL+x}" ]; then
10181     # The variable is not set by user, try to locate tool using the code snippet
10182     for ac_prog in tail
10183 do
10184   # Extract the first word of "$ac_prog", so it can be a program name with args.
10185 set dummy $ac_prog; ac_word=$2
10186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10187 $as_echo_n "checking for $ac_word... " >&6; }
10188 if ${ac_cv_path_TAIL+:} false; then :
10189   $as_echo_n "(cached) " >&6
10190 else
10191   case $TAIL in
10192   [\\/]* | ?:[\\/]*)
10193   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10194   ;;
10195   *)
10196   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10197 for as_dir in $PATH
10198 do
10199   IFS=$as_save_IFS
10200   test -z "$as_dir" && as_dir=.
10201     for ac_exec_ext in '' $ac_executable_extensions; do
10202   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10203     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10204     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10205     break 2
10206   fi
10207 done
10208   done
10209 IFS=$as_save_IFS
10210 
10211   ;;
10212 esac
10213 fi
10214 TAIL=$ac_cv_path_TAIL
10215 if test -n "$TAIL"; then
10216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10217 $as_echo "$TAIL" >&6; }
10218 else
10219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10220 $as_echo "no" >&6; }
10221 fi
10222 
10223 
10224   test -n "$TAIL" && break
10225 done
10226 
10227   else
10228     # The variable is set, but is it from the command line or the environment?
10229 
10230     # Try to remove the string !TAIL! from our list.
10231     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10232     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10233       # If it failed, the variable was not from the command line. Ignore it,
10234       # but warn the user (except for BASH, which is always set by the calling BASH).
10235       if test "xTAIL" != xBASH; then
10236         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10237 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10238       fi
10239       # Try to locate tool using the code snippet
10240       for ac_prog in tail
10241 do
10242   # Extract the first word of "$ac_prog", so it can be a program name with args.
10243 set dummy $ac_prog; ac_word=$2
10244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10245 $as_echo_n "checking for $ac_word... " >&6; }
10246 if ${ac_cv_path_TAIL+:} false; then :
10247   $as_echo_n "(cached) " >&6
10248 else
10249   case $TAIL in
10250   [\\/]* | ?:[\\/]*)
10251   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10252   ;;
10253   *)
10254   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10255 for as_dir in $PATH
10256 do
10257   IFS=$as_save_IFS
10258   test -z "$as_dir" && as_dir=.
10259     for ac_exec_ext in '' $ac_executable_extensions; do
10260   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10261     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10262     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10263     break 2
10264   fi
10265 done
10266   done
10267 IFS=$as_save_IFS
10268 
10269   ;;
10270 esac
10271 fi
10272 TAIL=$ac_cv_path_TAIL
10273 if test -n "$TAIL"; then
10274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10275 $as_echo "$TAIL" >&6; }
10276 else
10277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10278 $as_echo "no" >&6; }
10279 fi
10280 
10281 
10282   test -n "$TAIL" && break
10283 done
10284 
10285     else
10286       # If it succeeded, then it was overridden by the user. We will use it
10287       # for the tool.
10288 
10289       # First remove it from the list of overridden variables, so we can test
10290       # for unknown variables in the end.
10291       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10292 
10293       # Check if we try to supply an empty value
10294       if test "x$TAIL" = x; then
10295         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10296 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10297         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10298 $as_echo_n "checking for TAIL... " >&6; }
10299         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10300 $as_echo "disabled" >&6; }
10301       else
10302         # Check if the provided tool contains a complete path.
10303         tool_specified="$TAIL"
10304         tool_basename="${tool_specified##*/}"
10305         if test "x$tool_basename" = "x$tool_specified"; then
10306           # A command without a complete path is provided, search $PATH.
10307           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10308 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10309           # Extract the first word of "$tool_basename", so it can be a program name with args.
10310 set dummy $tool_basename; ac_word=$2
10311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10312 $as_echo_n "checking for $ac_word... " >&6; }
10313 if ${ac_cv_path_TAIL+:} false; then :
10314   $as_echo_n "(cached) " >&6
10315 else
10316   case $TAIL in
10317   [\\/]* | ?:[\\/]*)
10318   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10319   ;;
10320   *)
10321   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10322 for as_dir in $PATH
10323 do
10324   IFS=$as_save_IFS
10325   test -z "$as_dir" && as_dir=.
10326     for ac_exec_ext in '' $ac_executable_extensions; do
10327   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10328     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10329     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10330     break 2
10331   fi
10332 done
10333   done
10334 IFS=$as_save_IFS
10335 
10336   ;;
10337 esac
10338 fi
10339 TAIL=$ac_cv_path_TAIL
10340 if test -n "$TAIL"; then
10341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10342 $as_echo "$TAIL" >&6; }
10343 else
10344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10345 $as_echo "no" >&6; }
10346 fi
10347 
10348 
10349           if test "x$TAIL" = x; then
10350             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10351           fi
10352         else
10353           # Otherwise we believe it is a complete path. Use it as it is.
10354           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10355 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10356           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10357 $as_echo_n "checking for TAIL... " >&6; }
10358           if test ! -x "$tool_specified"; then
10359             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10360 $as_echo "not found" >&6; }
10361             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10362           fi
10363           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10364 $as_echo "$tool_specified" >&6; }
10365         fi
10366       fi
10367     fi
10368 
10369   fi
10370 
10371 
10372 
10373   if test "x$TAIL" = x; then
10374     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10375   fi
10376 
10377 
10378 
10379 
10380 
10381   # Publish this variable in the help.
10382 
10383 
10384   if [ -z "${TAR+x}" ]; then
10385     # The variable is not set by user, try to locate tool using the code snippet
10386     for ac_prog in tar
10387 do
10388   # Extract the first word of "$ac_prog", so it can be a program name with args.
10389 set dummy $ac_prog; ac_word=$2
10390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10391 $as_echo_n "checking for $ac_word... " >&6; }
10392 if ${ac_cv_path_TAR+:} false; then :
10393   $as_echo_n "(cached) " >&6
10394 else
10395   case $TAR in
10396   [\\/]* | ?:[\\/]*)
10397   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10398   ;;
10399   *)
10400   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10401 for as_dir in $PATH
10402 do
10403   IFS=$as_save_IFS
10404   test -z "$as_dir" && as_dir=.
10405     for ac_exec_ext in '' $ac_executable_extensions; do
10406   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10407     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10408     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10409     break 2
10410   fi
10411 done
10412   done
10413 IFS=$as_save_IFS
10414 
10415   ;;
10416 esac
10417 fi
10418 TAR=$ac_cv_path_TAR
10419 if test -n "$TAR"; then
10420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10421 $as_echo "$TAR" >&6; }
10422 else
10423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10424 $as_echo "no" >&6; }
10425 fi
10426 
10427 
10428   test -n "$TAR" && break
10429 done
10430 
10431   else
10432     # The variable is set, but is it from the command line or the environment?
10433 
10434     # Try to remove the string !TAR! from our list.
10435     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10436     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10437       # If it failed, the variable was not from the command line. Ignore it,
10438       # but warn the user (except for BASH, which is always set by the calling BASH).
10439       if test "xTAR" != xBASH; then
10440         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10441 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10442       fi
10443       # Try to locate tool using the code snippet
10444       for ac_prog in tar
10445 do
10446   # Extract the first word of "$ac_prog", so it can be a program name with args.
10447 set dummy $ac_prog; ac_word=$2
10448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10449 $as_echo_n "checking for $ac_word... " >&6; }
10450 if ${ac_cv_path_TAR+:} false; then :
10451   $as_echo_n "(cached) " >&6
10452 else
10453   case $TAR in
10454   [\\/]* | ?:[\\/]*)
10455   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10456   ;;
10457   *)
10458   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10459 for as_dir in $PATH
10460 do
10461   IFS=$as_save_IFS
10462   test -z "$as_dir" && as_dir=.
10463     for ac_exec_ext in '' $ac_executable_extensions; do
10464   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10465     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10466     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10467     break 2
10468   fi
10469 done
10470   done
10471 IFS=$as_save_IFS
10472 
10473   ;;
10474 esac
10475 fi
10476 TAR=$ac_cv_path_TAR
10477 if test -n "$TAR"; then
10478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10479 $as_echo "$TAR" >&6; }
10480 else
10481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10482 $as_echo "no" >&6; }
10483 fi
10484 
10485 
10486   test -n "$TAR" && break
10487 done
10488 
10489     else
10490       # If it succeeded, then it was overridden by the user. We will use it
10491       # for the tool.
10492 
10493       # First remove it from the list of overridden variables, so we can test
10494       # for unknown variables in the end.
10495       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10496 
10497       # Check if we try to supply an empty value
10498       if test "x$TAR" = x; then
10499         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10500 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10501         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10502 $as_echo_n "checking for TAR... " >&6; }
10503         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10504 $as_echo "disabled" >&6; }
10505       else
10506         # Check if the provided tool contains a complete path.
10507         tool_specified="$TAR"
10508         tool_basename="${tool_specified##*/}"
10509         if test "x$tool_basename" = "x$tool_specified"; then
10510           # A command without a complete path is provided, search $PATH.
10511           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10512 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10513           # Extract the first word of "$tool_basename", so it can be a program name with args.
10514 set dummy $tool_basename; ac_word=$2
10515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10516 $as_echo_n "checking for $ac_word... " >&6; }
10517 if ${ac_cv_path_TAR+:} false; then :
10518   $as_echo_n "(cached) " >&6
10519 else
10520   case $TAR in
10521   [\\/]* | ?:[\\/]*)
10522   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10523   ;;
10524   *)
10525   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10526 for as_dir in $PATH
10527 do
10528   IFS=$as_save_IFS
10529   test -z "$as_dir" && as_dir=.
10530     for ac_exec_ext in '' $ac_executable_extensions; do
10531   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10532     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10533     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10534     break 2
10535   fi
10536 done
10537   done
10538 IFS=$as_save_IFS
10539 
10540   ;;
10541 esac
10542 fi
10543 TAR=$ac_cv_path_TAR
10544 if test -n "$TAR"; then
10545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10546 $as_echo "$TAR" >&6; }
10547 else
10548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10549 $as_echo "no" >&6; }
10550 fi
10551 
10552 
10553           if test "x$TAR" = x; then
10554             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10555           fi
10556         else
10557           # Otherwise we believe it is a complete path. Use it as it is.
10558           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10559 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10560           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10561 $as_echo_n "checking for TAR... " >&6; }
10562           if test ! -x "$tool_specified"; then
10563             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10564 $as_echo "not found" >&6; }
10565             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10566           fi
10567           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10568 $as_echo "$tool_specified" >&6; }
10569         fi
10570       fi
10571     fi
10572 
10573   fi
10574 
10575 
10576 
10577   if test "x$TAR" = x; then
10578     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10579   fi
10580 
10581 
10582 
10583 
10584 
10585   # Publish this variable in the help.
10586 
10587 
10588   if [ -z "${TEE+x}" ]; then
10589     # The variable is not set by user, try to locate tool using the code snippet
10590     for ac_prog in tee
10591 do
10592   # Extract the first word of "$ac_prog", so it can be a program name with args.
10593 set dummy $ac_prog; ac_word=$2
10594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10595 $as_echo_n "checking for $ac_word... " >&6; }
10596 if ${ac_cv_path_TEE+:} false; then :
10597   $as_echo_n "(cached) " >&6
10598 else
10599   case $TEE in
10600   [\\/]* | ?:[\\/]*)
10601   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10602   ;;
10603   *)
10604   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10605 for as_dir in $PATH
10606 do
10607   IFS=$as_save_IFS
10608   test -z "$as_dir" && as_dir=.
10609     for ac_exec_ext in '' $ac_executable_extensions; do
10610   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10611     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10612     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10613     break 2
10614   fi
10615 done
10616   done
10617 IFS=$as_save_IFS
10618 
10619   ;;
10620 esac
10621 fi
10622 TEE=$ac_cv_path_TEE
10623 if test -n "$TEE"; then
10624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10625 $as_echo "$TEE" >&6; }
10626 else
10627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10628 $as_echo "no" >&6; }
10629 fi
10630 
10631 
10632   test -n "$TEE" && break
10633 done
10634 
10635   else
10636     # The variable is set, but is it from the command line or the environment?
10637 
10638     # Try to remove the string !TEE! from our list.
10639     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10640     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10641       # If it failed, the variable was not from the command line. Ignore it,
10642       # but warn the user (except for BASH, which is always set by the calling BASH).
10643       if test "xTEE" != xBASH; then
10644         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10645 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10646       fi
10647       # Try to locate tool using the code snippet
10648       for ac_prog in tee
10649 do
10650   # Extract the first word of "$ac_prog", so it can be a program name with args.
10651 set dummy $ac_prog; ac_word=$2
10652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10653 $as_echo_n "checking for $ac_word... " >&6; }
10654 if ${ac_cv_path_TEE+:} false; then :
10655   $as_echo_n "(cached) " >&6
10656 else
10657   case $TEE in
10658   [\\/]* | ?:[\\/]*)
10659   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10660   ;;
10661   *)
10662   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10663 for as_dir in $PATH
10664 do
10665   IFS=$as_save_IFS
10666   test -z "$as_dir" && as_dir=.
10667     for ac_exec_ext in '' $ac_executable_extensions; do
10668   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10669     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10670     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10671     break 2
10672   fi
10673 done
10674   done
10675 IFS=$as_save_IFS
10676 
10677   ;;
10678 esac
10679 fi
10680 TEE=$ac_cv_path_TEE
10681 if test -n "$TEE"; then
10682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10683 $as_echo "$TEE" >&6; }
10684 else
10685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10686 $as_echo "no" >&6; }
10687 fi
10688 
10689 
10690   test -n "$TEE" && break
10691 done
10692 
10693     else
10694       # If it succeeded, then it was overridden by the user. We will use it
10695       # for the tool.
10696 
10697       # First remove it from the list of overridden variables, so we can test
10698       # for unknown variables in the end.
10699       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10700 
10701       # Check if we try to supply an empty value
10702       if test "x$TEE" = x; then
10703         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10704 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10705         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10706 $as_echo_n "checking for TEE... " >&6; }
10707         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10708 $as_echo "disabled" >&6; }
10709       else
10710         # Check if the provided tool contains a complete path.
10711         tool_specified="$TEE"
10712         tool_basename="${tool_specified##*/}"
10713         if test "x$tool_basename" = "x$tool_specified"; then
10714           # A command without a complete path is provided, search $PATH.
10715           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10716 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10717           # Extract the first word of "$tool_basename", so it can be a program name with args.
10718 set dummy $tool_basename; ac_word=$2
10719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10720 $as_echo_n "checking for $ac_word... " >&6; }
10721 if ${ac_cv_path_TEE+:} false; then :
10722   $as_echo_n "(cached) " >&6
10723 else
10724   case $TEE in
10725   [\\/]* | ?:[\\/]*)
10726   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10727   ;;
10728   *)
10729   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10730 for as_dir in $PATH
10731 do
10732   IFS=$as_save_IFS
10733   test -z "$as_dir" && as_dir=.
10734     for ac_exec_ext in '' $ac_executable_extensions; do
10735   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10736     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10737     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10738     break 2
10739   fi
10740 done
10741   done
10742 IFS=$as_save_IFS
10743 
10744   ;;
10745 esac
10746 fi
10747 TEE=$ac_cv_path_TEE
10748 if test -n "$TEE"; then
10749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10750 $as_echo "$TEE" >&6; }
10751 else
10752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10753 $as_echo "no" >&6; }
10754 fi
10755 
10756 
10757           if test "x$TEE" = x; then
10758             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10759           fi
10760         else
10761           # Otherwise we believe it is a complete path. Use it as it is.
10762           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10763 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10764           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10765 $as_echo_n "checking for TEE... " >&6; }
10766           if test ! -x "$tool_specified"; then
10767             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10768 $as_echo "not found" >&6; }
10769             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10770           fi
10771           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10772 $as_echo "$tool_specified" >&6; }
10773         fi
10774       fi
10775     fi
10776 
10777   fi
10778 
10779 
10780 
10781   if test "x$TEE" = x; then
10782     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10783   fi
10784 
10785 
10786 
10787 
10788 
10789   # Publish this variable in the help.
10790 
10791 
10792   if [ -z "${TOUCH+x}" ]; then
10793     # The variable is not set by user, try to locate tool using the code snippet
10794     for ac_prog in touch
10795 do
10796   # Extract the first word of "$ac_prog", so it can be a program name with args.
10797 set dummy $ac_prog; ac_word=$2
10798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10799 $as_echo_n "checking for $ac_word... " >&6; }
10800 if ${ac_cv_path_TOUCH+:} false; then :
10801   $as_echo_n "(cached) " >&6
10802 else
10803   case $TOUCH in
10804   [\\/]* | ?:[\\/]*)
10805   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10806   ;;
10807   *)
10808   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10809 for as_dir in $PATH
10810 do
10811   IFS=$as_save_IFS
10812   test -z "$as_dir" && as_dir=.
10813     for ac_exec_ext in '' $ac_executable_extensions; do
10814   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10815     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10816     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10817     break 2
10818   fi
10819 done
10820   done
10821 IFS=$as_save_IFS
10822 
10823   ;;
10824 esac
10825 fi
10826 TOUCH=$ac_cv_path_TOUCH
10827 if test -n "$TOUCH"; then
10828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10829 $as_echo "$TOUCH" >&6; }
10830 else
10831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10832 $as_echo "no" >&6; }
10833 fi
10834 
10835 
10836   test -n "$TOUCH" && break
10837 done
10838 
10839   else
10840     # The variable is set, but is it from the command line or the environment?
10841 
10842     # Try to remove the string !TOUCH! from our list.
10843     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10844     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10845       # If it failed, the variable was not from the command line. Ignore it,
10846       # but warn the user (except for BASH, which is always set by the calling BASH).
10847       if test "xTOUCH" != xBASH; then
10848         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10849 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10850       fi
10851       # Try to locate tool using the code snippet
10852       for ac_prog in touch
10853 do
10854   # Extract the first word of "$ac_prog", so it can be a program name with args.
10855 set dummy $ac_prog; ac_word=$2
10856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10857 $as_echo_n "checking for $ac_word... " >&6; }
10858 if ${ac_cv_path_TOUCH+:} false; then :
10859   $as_echo_n "(cached) " >&6
10860 else
10861   case $TOUCH in
10862   [\\/]* | ?:[\\/]*)
10863   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10864   ;;
10865   *)
10866   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10867 for as_dir in $PATH
10868 do
10869   IFS=$as_save_IFS
10870   test -z "$as_dir" && as_dir=.
10871     for ac_exec_ext in '' $ac_executable_extensions; do
10872   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10873     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10874     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10875     break 2
10876   fi
10877 done
10878   done
10879 IFS=$as_save_IFS
10880 
10881   ;;
10882 esac
10883 fi
10884 TOUCH=$ac_cv_path_TOUCH
10885 if test -n "$TOUCH"; then
10886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10887 $as_echo "$TOUCH" >&6; }
10888 else
10889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10890 $as_echo "no" >&6; }
10891 fi
10892 
10893 
10894   test -n "$TOUCH" && break
10895 done
10896 
10897     else
10898       # If it succeeded, then it was overridden by the user. We will use it
10899       # for the tool.
10900 
10901       # First remove it from the list of overridden variables, so we can test
10902       # for unknown variables in the end.
10903       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10904 
10905       # Check if we try to supply an empty value
10906       if test "x$TOUCH" = x; then
10907         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
10908 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
10909         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10910 $as_echo_n "checking for TOUCH... " >&6; }
10911         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10912 $as_echo "disabled" >&6; }
10913       else
10914         # Check if the provided tool contains a complete path.
10915         tool_specified="$TOUCH"
10916         tool_basename="${tool_specified##*/}"
10917         if test "x$tool_basename" = "x$tool_specified"; then
10918           # A command without a complete path is provided, search $PATH.
10919           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10920 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10921           # Extract the first word of "$tool_basename", so it can be a program name with args.
10922 set dummy $tool_basename; ac_word=$2
10923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10924 $as_echo_n "checking for $ac_word... " >&6; }
10925 if ${ac_cv_path_TOUCH+:} false; then :
10926   $as_echo_n "(cached) " >&6
10927 else
10928   case $TOUCH in
10929   [\\/]* | ?:[\\/]*)
10930   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10931   ;;
10932   *)
10933   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10934 for as_dir in $PATH
10935 do
10936   IFS=$as_save_IFS
10937   test -z "$as_dir" && as_dir=.
10938     for ac_exec_ext in '' $ac_executable_extensions; do
10939   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10940     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10941     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10942     break 2
10943   fi
10944 done
10945   done
10946 IFS=$as_save_IFS
10947 
10948   ;;
10949 esac
10950 fi
10951 TOUCH=$ac_cv_path_TOUCH
10952 if test -n "$TOUCH"; then
10953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10954 $as_echo "$TOUCH" >&6; }
10955 else
10956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10957 $as_echo "no" >&6; }
10958 fi
10959 
10960 
10961           if test "x$TOUCH" = x; then
10962             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10963           fi
10964         else
10965           # Otherwise we believe it is a complete path. Use it as it is.
10966           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10967 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10968           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10969 $as_echo_n "checking for TOUCH... " >&6; }
10970           if test ! -x "$tool_specified"; then
10971             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10972 $as_echo "not found" >&6; }
10973             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10974           fi
10975           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10976 $as_echo "$tool_specified" >&6; }
10977         fi
10978       fi
10979     fi
10980 
10981   fi
10982 
10983 
10984 
10985   if test "x$TOUCH" = x; then
10986     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10987   fi
10988 
10989 
10990 
10991 
10992 
10993   # Publish this variable in the help.
10994 
10995 
10996   if [ -z "${TR+x}" ]; then
10997     # The variable is not set by user, try to locate tool using the code snippet
10998     for ac_prog in tr
10999 do
11000   # Extract the first word of "$ac_prog", so it can be a program name with args.
11001 set dummy $ac_prog; ac_word=$2
11002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11003 $as_echo_n "checking for $ac_word... " >&6; }
11004 if ${ac_cv_path_TR+:} false; then :
11005   $as_echo_n "(cached) " >&6
11006 else
11007   case $TR in
11008   [\\/]* | ?:[\\/]*)
11009   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11010   ;;
11011   *)
11012   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11013 for as_dir in $PATH
11014 do
11015   IFS=$as_save_IFS
11016   test -z "$as_dir" && as_dir=.
11017     for ac_exec_ext in '' $ac_executable_extensions; do
11018   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11019     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11020     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11021     break 2
11022   fi
11023 done
11024   done
11025 IFS=$as_save_IFS
11026 
11027   ;;
11028 esac
11029 fi
11030 TR=$ac_cv_path_TR
11031 if test -n "$TR"; then
11032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11033 $as_echo "$TR" >&6; }
11034 else
11035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11036 $as_echo "no" >&6; }
11037 fi
11038 
11039 
11040   test -n "$TR" && break
11041 done
11042 
11043   else
11044     # The variable is set, but is it from the command line or the environment?
11045 
11046     # Try to remove the string !TR! from our list.
11047     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11048     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11049       # If it failed, the variable was not from the command line. Ignore it,
11050       # but warn the user (except for BASH, which is always set by the calling BASH).
11051       if test "xTR" != xBASH; then
11052         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11053 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11054       fi
11055       # Try to locate tool using the code snippet
11056       for ac_prog in tr
11057 do
11058   # Extract the first word of "$ac_prog", so it can be a program name with args.
11059 set dummy $ac_prog; ac_word=$2
11060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11061 $as_echo_n "checking for $ac_word... " >&6; }
11062 if ${ac_cv_path_TR+:} false; then :
11063   $as_echo_n "(cached) " >&6
11064 else
11065   case $TR in
11066   [\\/]* | ?:[\\/]*)
11067   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11068   ;;
11069   *)
11070   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11071 for as_dir in $PATH
11072 do
11073   IFS=$as_save_IFS
11074   test -z "$as_dir" && as_dir=.
11075     for ac_exec_ext in '' $ac_executable_extensions; do
11076   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11077     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11078     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11079     break 2
11080   fi
11081 done
11082   done
11083 IFS=$as_save_IFS
11084 
11085   ;;
11086 esac
11087 fi
11088 TR=$ac_cv_path_TR
11089 if test -n "$TR"; then
11090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11091 $as_echo "$TR" >&6; }
11092 else
11093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11094 $as_echo "no" >&6; }
11095 fi
11096 
11097 
11098   test -n "$TR" && break
11099 done
11100 
11101     else
11102       # If it succeeded, then it was overridden by the user. We will use it
11103       # for the tool.
11104 
11105       # First remove it from the list of overridden variables, so we can test
11106       # for unknown variables in the end.
11107       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11108 
11109       # Check if we try to supply an empty value
11110       if test "x$TR" = x; then
11111         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11112 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11113         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11114 $as_echo_n "checking for TR... " >&6; }
11115         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11116 $as_echo "disabled" >&6; }
11117       else
11118         # Check if the provided tool contains a complete path.
11119         tool_specified="$TR"
11120         tool_basename="${tool_specified##*/}"
11121         if test "x$tool_basename" = "x$tool_specified"; then
11122           # A command without a complete path is provided, search $PATH.
11123           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11124 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11125           # Extract the first word of "$tool_basename", so it can be a program name with args.
11126 set dummy $tool_basename; ac_word=$2
11127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11128 $as_echo_n "checking for $ac_word... " >&6; }
11129 if ${ac_cv_path_TR+:} false; then :
11130   $as_echo_n "(cached) " >&6
11131 else
11132   case $TR in
11133   [\\/]* | ?:[\\/]*)
11134   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11135   ;;
11136   *)
11137   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11138 for as_dir in $PATH
11139 do
11140   IFS=$as_save_IFS
11141   test -z "$as_dir" && as_dir=.
11142     for ac_exec_ext in '' $ac_executable_extensions; do
11143   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11144     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11145     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11146     break 2
11147   fi
11148 done
11149   done
11150 IFS=$as_save_IFS
11151 
11152   ;;
11153 esac
11154 fi
11155 TR=$ac_cv_path_TR
11156 if test -n "$TR"; then
11157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11158 $as_echo "$TR" >&6; }
11159 else
11160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11161 $as_echo "no" >&6; }
11162 fi
11163 
11164 
11165           if test "x$TR" = x; then
11166             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11167           fi
11168         else
11169           # Otherwise we believe it is a complete path. Use it as it is.
11170           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11171 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11172           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11173 $as_echo_n "checking for TR... " >&6; }
11174           if test ! -x "$tool_specified"; then
11175             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11176 $as_echo "not found" >&6; }
11177             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11178           fi
11179           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11180 $as_echo "$tool_specified" >&6; }
11181         fi
11182       fi
11183     fi
11184 
11185   fi
11186 
11187 
11188 
11189   if test "x$TR" = x; then
11190     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11191   fi
11192 
11193 
11194 
11195 
11196 
11197   # Publish this variable in the help.
11198 
11199 
11200   if [ -z "${UNAME+x}" ]; then
11201     # The variable is not set by user, try to locate tool using the code snippet
11202     for ac_prog in uname
11203 do
11204   # Extract the first word of "$ac_prog", so it can be a program name with args.
11205 set dummy $ac_prog; ac_word=$2
11206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11207 $as_echo_n "checking for $ac_word... " >&6; }
11208 if ${ac_cv_path_UNAME+:} false; then :
11209   $as_echo_n "(cached) " >&6
11210 else
11211   case $UNAME in
11212   [\\/]* | ?:[\\/]*)
11213   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11214   ;;
11215   *)
11216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11217 for as_dir in $PATH
11218 do
11219   IFS=$as_save_IFS
11220   test -z "$as_dir" && as_dir=.
11221     for ac_exec_ext in '' $ac_executable_extensions; do
11222   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11223     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11224     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11225     break 2
11226   fi
11227 done
11228   done
11229 IFS=$as_save_IFS
11230 
11231   ;;
11232 esac
11233 fi
11234 UNAME=$ac_cv_path_UNAME
11235 if test -n "$UNAME"; then
11236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11237 $as_echo "$UNAME" >&6; }
11238 else
11239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11240 $as_echo "no" >&6; }
11241 fi
11242 
11243 
11244   test -n "$UNAME" && break
11245 done
11246 
11247   else
11248     # The variable is set, but is it from the command line or the environment?
11249 
11250     # Try to remove the string !UNAME! from our list.
11251     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11252     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11253       # If it failed, the variable was not from the command line. Ignore it,
11254       # but warn the user (except for BASH, which is always set by the calling BASH).
11255       if test "xUNAME" != xBASH; then
11256         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11257 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11258       fi
11259       # Try to locate tool using the code snippet
11260       for ac_prog in uname
11261 do
11262   # Extract the first word of "$ac_prog", so it can be a program name with args.
11263 set dummy $ac_prog; ac_word=$2
11264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11265 $as_echo_n "checking for $ac_word... " >&6; }
11266 if ${ac_cv_path_UNAME+:} false; then :
11267   $as_echo_n "(cached) " >&6
11268 else
11269   case $UNAME in
11270   [\\/]* | ?:[\\/]*)
11271   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11272   ;;
11273   *)
11274   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11275 for as_dir in $PATH
11276 do
11277   IFS=$as_save_IFS
11278   test -z "$as_dir" && as_dir=.
11279     for ac_exec_ext in '' $ac_executable_extensions; do
11280   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11281     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11282     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11283     break 2
11284   fi
11285 done
11286   done
11287 IFS=$as_save_IFS
11288 
11289   ;;
11290 esac
11291 fi
11292 UNAME=$ac_cv_path_UNAME
11293 if test -n "$UNAME"; then
11294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11295 $as_echo "$UNAME" >&6; }
11296 else
11297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11298 $as_echo "no" >&6; }
11299 fi
11300 
11301 
11302   test -n "$UNAME" && break
11303 done
11304 
11305     else
11306       # If it succeeded, then it was overridden by the user. We will use it
11307       # for the tool.
11308 
11309       # First remove it from the list of overridden variables, so we can test
11310       # for unknown variables in the end.
11311       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11312 
11313       # Check if we try to supply an empty value
11314       if test "x$UNAME" = x; then
11315         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11316 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11317         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11318 $as_echo_n "checking for UNAME... " >&6; }
11319         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11320 $as_echo "disabled" >&6; }
11321       else
11322         # Check if the provided tool contains a complete path.
11323         tool_specified="$UNAME"
11324         tool_basename="${tool_specified##*/}"
11325         if test "x$tool_basename" = "x$tool_specified"; then
11326           # A command without a complete path is provided, search $PATH.
11327           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11328 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11329           # Extract the first word of "$tool_basename", so it can be a program name with args.
11330 set dummy $tool_basename; ac_word=$2
11331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11332 $as_echo_n "checking for $ac_word... " >&6; }
11333 if ${ac_cv_path_UNAME+:} false; then :
11334   $as_echo_n "(cached) " >&6
11335 else
11336   case $UNAME in
11337   [\\/]* | ?:[\\/]*)
11338   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11339   ;;
11340   *)
11341   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11342 for as_dir in $PATH
11343 do
11344   IFS=$as_save_IFS
11345   test -z "$as_dir" && as_dir=.
11346     for ac_exec_ext in '' $ac_executable_extensions; do
11347   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11348     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11349     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11350     break 2
11351   fi
11352 done
11353   done
11354 IFS=$as_save_IFS
11355 
11356   ;;
11357 esac
11358 fi
11359 UNAME=$ac_cv_path_UNAME
11360 if test -n "$UNAME"; then
11361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11362 $as_echo "$UNAME" >&6; }
11363 else
11364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11365 $as_echo "no" >&6; }
11366 fi
11367 
11368 
11369           if test "x$UNAME" = x; then
11370             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11371           fi
11372         else
11373           # Otherwise we believe it is a complete path. Use it as it is.
11374           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11375 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11376           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11377 $as_echo_n "checking for UNAME... " >&6; }
11378           if test ! -x "$tool_specified"; then
11379             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11380 $as_echo "not found" >&6; }
11381             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11382           fi
11383           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11384 $as_echo "$tool_specified" >&6; }
11385         fi
11386       fi
11387     fi
11388 
11389   fi
11390 
11391 
11392 
11393   if test "x$UNAME" = x; then
11394     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11395   fi
11396 
11397 
11398 
11399 
11400 
11401   # Publish this variable in the help.
11402 
11403 
11404   if [ -z "${UNIQ+x}" ]; then
11405     # The variable is not set by user, try to locate tool using the code snippet
11406     for ac_prog in uniq
11407 do
11408   # Extract the first word of "$ac_prog", so it can be a program name with args.
11409 set dummy $ac_prog; ac_word=$2
11410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11411 $as_echo_n "checking for $ac_word... " >&6; }
11412 if ${ac_cv_path_UNIQ+:} false; then :
11413   $as_echo_n "(cached) " >&6
11414 else
11415   case $UNIQ in
11416   [\\/]* | ?:[\\/]*)
11417   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11418   ;;
11419   *)
11420   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11421 for as_dir in $PATH
11422 do
11423   IFS=$as_save_IFS
11424   test -z "$as_dir" && as_dir=.
11425     for ac_exec_ext in '' $ac_executable_extensions; do
11426   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11427     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11428     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11429     break 2
11430   fi
11431 done
11432   done
11433 IFS=$as_save_IFS
11434 
11435   ;;
11436 esac
11437 fi
11438 UNIQ=$ac_cv_path_UNIQ
11439 if test -n "$UNIQ"; then
11440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11441 $as_echo "$UNIQ" >&6; }
11442 else
11443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11444 $as_echo "no" >&6; }
11445 fi
11446 
11447 
11448   test -n "$UNIQ" && break
11449 done
11450 
11451   else
11452     # The variable is set, but is it from the command line or the environment?
11453 
11454     # Try to remove the string !UNIQ! from our list.
11455     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11456     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11457       # If it failed, the variable was not from the command line. Ignore it,
11458       # but warn the user (except for BASH, which is always set by the calling BASH).
11459       if test "xUNIQ" != xBASH; then
11460         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11461 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11462       fi
11463       # Try to locate tool using the code snippet
11464       for ac_prog in uniq
11465 do
11466   # Extract the first word of "$ac_prog", so it can be a program name with args.
11467 set dummy $ac_prog; ac_word=$2
11468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11469 $as_echo_n "checking for $ac_word... " >&6; }
11470 if ${ac_cv_path_UNIQ+:} false; then :
11471   $as_echo_n "(cached) " >&6
11472 else
11473   case $UNIQ in
11474   [\\/]* | ?:[\\/]*)
11475   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11476   ;;
11477   *)
11478   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11479 for as_dir in $PATH
11480 do
11481   IFS=$as_save_IFS
11482   test -z "$as_dir" && as_dir=.
11483     for ac_exec_ext in '' $ac_executable_extensions; do
11484   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11485     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11486     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11487     break 2
11488   fi
11489 done
11490   done
11491 IFS=$as_save_IFS
11492 
11493   ;;
11494 esac
11495 fi
11496 UNIQ=$ac_cv_path_UNIQ
11497 if test -n "$UNIQ"; then
11498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11499 $as_echo "$UNIQ" >&6; }
11500 else
11501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11502 $as_echo "no" >&6; }
11503 fi
11504 
11505 
11506   test -n "$UNIQ" && break
11507 done
11508 
11509     else
11510       # If it succeeded, then it was overridden by the user. We will use it
11511       # for the tool.
11512 
11513       # First remove it from the list of overridden variables, so we can test
11514       # for unknown variables in the end.
11515       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11516 
11517       # Check if we try to supply an empty value
11518       if test "x$UNIQ" = x; then
11519         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11520 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11521         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11522 $as_echo_n "checking for UNIQ... " >&6; }
11523         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11524 $as_echo "disabled" >&6; }
11525       else
11526         # Check if the provided tool contains a complete path.
11527         tool_specified="$UNIQ"
11528         tool_basename="${tool_specified##*/}"
11529         if test "x$tool_basename" = "x$tool_specified"; then
11530           # A command without a complete path is provided, search $PATH.
11531           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11532 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11533           # Extract the first word of "$tool_basename", so it can be a program name with args.
11534 set dummy $tool_basename; ac_word=$2
11535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11536 $as_echo_n "checking for $ac_word... " >&6; }
11537 if ${ac_cv_path_UNIQ+:} false; then :
11538   $as_echo_n "(cached) " >&6
11539 else
11540   case $UNIQ in
11541   [\\/]* | ?:[\\/]*)
11542   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11543   ;;
11544   *)
11545   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11546 for as_dir in $PATH
11547 do
11548   IFS=$as_save_IFS
11549   test -z "$as_dir" && as_dir=.
11550     for ac_exec_ext in '' $ac_executable_extensions; do
11551   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11552     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11553     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11554     break 2
11555   fi
11556 done
11557   done
11558 IFS=$as_save_IFS
11559 
11560   ;;
11561 esac
11562 fi
11563 UNIQ=$ac_cv_path_UNIQ
11564 if test -n "$UNIQ"; then
11565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11566 $as_echo "$UNIQ" >&6; }
11567 else
11568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11569 $as_echo "no" >&6; }
11570 fi
11571 
11572 
11573           if test "x$UNIQ" = x; then
11574             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11575           fi
11576         else
11577           # Otherwise we believe it is a complete path. Use it as it is.
11578           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11579 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11580           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11581 $as_echo_n "checking for UNIQ... " >&6; }
11582           if test ! -x "$tool_specified"; then
11583             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11584 $as_echo "not found" >&6; }
11585             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11586           fi
11587           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11588 $as_echo "$tool_specified" >&6; }
11589         fi
11590       fi
11591     fi
11592 
11593   fi
11594 
11595 
11596 
11597   if test "x$UNIQ" = x; then
11598     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11599   fi
11600 
11601 
11602 
11603 
11604 
11605   # Publish this variable in the help.
11606 
11607 
11608   if [ -z "${WC+x}" ]; then
11609     # The variable is not set by user, try to locate tool using the code snippet
11610     for ac_prog in wc
11611 do
11612   # Extract the first word of "$ac_prog", so it can be a program name with args.
11613 set dummy $ac_prog; ac_word=$2
11614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11615 $as_echo_n "checking for $ac_word... " >&6; }
11616 if ${ac_cv_path_WC+:} false; then :
11617   $as_echo_n "(cached) " >&6
11618 else
11619   case $WC in
11620   [\\/]* | ?:[\\/]*)
11621   ac_cv_path_WC="$WC" # Let the user override the test with a path.
11622   ;;
11623   *)
11624   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11625 for as_dir in $PATH
11626 do
11627   IFS=$as_save_IFS
11628   test -z "$as_dir" && as_dir=.
11629     for ac_exec_ext in '' $ac_executable_extensions; do
11630   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11631     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11632     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11633     break 2
11634   fi
11635 done
11636   done
11637 IFS=$as_save_IFS
11638 
11639   ;;
11640 esac
11641 fi
11642 WC=$ac_cv_path_WC
11643 if test -n "$WC"; then
11644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11645 $as_echo "$WC" >&6; }
11646 else
11647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11648 $as_echo "no" >&6; }
11649 fi
11650 
11651 
11652   test -n "$WC" && break
11653 done
11654 
11655   else
11656     # The variable is set, but is it from the command line or the environment?
11657 
11658     # Try to remove the string !WC! from our list.
11659     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11660     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11661       # If it failed, the variable was not from the command line. Ignore it,
11662       # but warn the user (except for BASH, which is always set by the calling BASH).
11663       if test "xWC" != xBASH; then
11664         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11665 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11666       fi
11667       # Try to locate tool using the code snippet
11668       for ac_prog in wc
11669 do
11670   # Extract the first word of "$ac_prog", so it can be a program name with args.
11671 set dummy $ac_prog; ac_word=$2
11672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11673 $as_echo_n "checking for $ac_word... " >&6; }
11674 if ${ac_cv_path_WC+:} false; then :
11675   $as_echo_n "(cached) " >&6
11676 else
11677   case $WC in
11678   [\\/]* | ?:[\\/]*)
11679   ac_cv_path_WC="$WC" # Let the user override the test with a path.
11680   ;;
11681   *)
11682   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11683 for as_dir in $PATH
11684 do
11685   IFS=$as_save_IFS
11686   test -z "$as_dir" && as_dir=.
11687     for ac_exec_ext in '' $ac_executable_extensions; do
11688   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11689     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11690     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11691     break 2
11692   fi
11693 done
11694   done
11695 IFS=$as_save_IFS
11696 
11697   ;;
11698 esac
11699 fi
11700 WC=$ac_cv_path_WC
11701 if test -n "$WC"; then
11702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11703 $as_echo "$WC" >&6; }
11704 else
11705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11706 $as_echo "no" >&6; }
11707 fi
11708 
11709 
11710   test -n "$WC" && break
11711 done
11712 
11713     else
11714       # If it succeeded, then it was overridden by the user. We will use it
11715       # for the tool.
11716 
11717       # First remove it from the list of overridden variables, so we can test
11718       # for unknown variables in the end.
11719       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11720 
11721       # Check if we try to supply an empty value
11722       if test "x$WC" = x; then
11723         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11724 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11725         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11726 $as_echo_n "checking for WC... " >&6; }
11727         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11728 $as_echo "disabled" >&6; }
11729       else
11730         # Check if the provided tool contains a complete path.
11731         tool_specified="$WC"
11732         tool_basename="${tool_specified##*/}"
11733         if test "x$tool_basename" = "x$tool_specified"; then
11734           # A command without a complete path is provided, search $PATH.
11735           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11736 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11737           # Extract the first word of "$tool_basename", so it can be a program name with args.
11738 set dummy $tool_basename; ac_word=$2
11739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11740 $as_echo_n "checking for $ac_word... " >&6; }
11741 if ${ac_cv_path_WC+:} false; then :
11742   $as_echo_n "(cached) " >&6
11743 else
11744   case $WC in
11745   [\\/]* | ?:[\\/]*)
11746   ac_cv_path_WC="$WC" # Let the user override the test with a path.
11747   ;;
11748   *)
11749   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11750 for as_dir in $PATH
11751 do
11752   IFS=$as_save_IFS
11753   test -z "$as_dir" && as_dir=.
11754     for ac_exec_ext in '' $ac_executable_extensions; do
11755   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11756     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11757     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11758     break 2
11759   fi
11760 done
11761   done
11762 IFS=$as_save_IFS
11763 
11764   ;;
11765 esac
11766 fi
11767 WC=$ac_cv_path_WC
11768 if test -n "$WC"; then
11769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11770 $as_echo "$WC" >&6; }
11771 else
11772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11773 $as_echo "no" >&6; }
11774 fi
11775 
11776 
11777           if test "x$WC" = x; then
11778             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11779           fi
11780         else
11781           # Otherwise we believe it is a complete path. Use it as it is.
11782           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11783 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11784           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11785 $as_echo_n "checking for WC... " >&6; }
11786           if test ! -x "$tool_specified"; then
11787             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11788 $as_echo "not found" >&6; }
11789             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11790           fi
11791           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11792 $as_echo "$tool_specified" >&6; }
11793         fi
11794       fi
11795     fi
11796 
11797   fi
11798 
11799 
11800 
11801   if test "x$WC" = x; then
11802     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11803   fi
11804 
11805 
11806 
11807 
11808 
11809   # Publish this variable in the help.
11810 
11811 
11812   if [ -z "${WHICH+x}" ]; then
11813     # The variable is not set by user, try to locate tool using the code snippet
11814     for ac_prog in which
11815 do
11816   # Extract the first word of "$ac_prog", so it can be a program name with args.
11817 set dummy $ac_prog; ac_word=$2
11818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11819 $as_echo_n "checking for $ac_word... " >&6; }
11820 if ${ac_cv_path_WHICH+:} false; then :
11821   $as_echo_n "(cached) " >&6
11822 else
11823   case $WHICH in
11824   [\\/]* | ?:[\\/]*)
11825   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11826   ;;
11827   *)
11828   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11829 for as_dir in $PATH
11830 do
11831   IFS=$as_save_IFS
11832   test -z "$as_dir" && as_dir=.
11833     for ac_exec_ext in '' $ac_executable_extensions; do
11834   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11835     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11836     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11837     break 2
11838   fi
11839 done
11840   done
11841 IFS=$as_save_IFS
11842 
11843   ;;
11844 esac
11845 fi
11846 WHICH=$ac_cv_path_WHICH
11847 if test -n "$WHICH"; then
11848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11849 $as_echo "$WHICH" >&6; }
11850 else
11851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11852 $as_echo "no" >&6; }
11853 fi
11854 
11855 
11856   test -n "$WHICH" && break
11857 done
11858 
11859   else
11860     # The variable is set, but is it from the command line or the environment?
11861 
11862     # Try to remove the string !WHICH! from our list.
11863     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11864     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11865       # If it failed, the variable was not from the command line. Ignore it,
11866       # but warn the user (except for BASH, which is always set by the calling BASH).
11867       if test "xWHICH" != xBASH; then
11868         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11869 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11870       fi
11871       # Try to locate tool using the code snippet
11872       for ac_prog in which
11873 do
11874   # Extract the first word of "$ac_prog", so it can be a program name with args.
11875 set dummy $ac_prog; ac_word=$2
11876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11877 $as_echo_n "checking for $ac_word... " >&6; }
11878 if ${ac_cv_path_WHICH+:} false; then :
11879   $as_echo_n "(cached) " >&6
11880 else
11881   case $WHICH in
11882   [\\/]* | ?:[\\/]*)
11883   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11884   ;;
11885   *)
11886   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11887 for as_dir in $PATH
11888 do
11889   IFS=$as_save_IFS
11890   test -z "$as_dir" && as_dir=.
11891     for ac_exec_ext in '' $ac_executable_extensions; do
11892   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11893     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11894     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11895     break 2
11896   fi
11897 done
11898   done
11899 IFS=$as_save_IFS
11900 
11901   ;;
11902 esac
11903 fi
11904 WHICH=$ac_cv_path_WHICH
11905 if test -n "$WHICH"; then
11906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11907 $as_echo "$WHICH" >&6; }
11908 else
11909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11910 $as_echo "no" >&6; }
11911 fi
11912 
11913 
11914   test -n "$WHICH" && break
11915 done
11916 
11917     else
11918       # If it succeeded, then it was overridden by the user. We will use it
11919       # for the tool.
11920 
11921       # First remove it from the list of overridden variables, so we can test
11922       # for unknown variables in the end.
11923       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11924 
11925       # Check if we try to supply an empty value
11926       if test "x$WHICH" = x; then
11927         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
11928 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
11929         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11930 $as_echo_n "checking for WHICH... " >&6; }
11931         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11932 $as_echo "disabled" >&6; }
11933       else
11934         # Check if the provided tool contains a complete path.
11935         tool_specified="$WHICH"
11936         tool_basename="${tool_specified##*/}"
11937         if test "x$tool_basename" = "x$tool_specified"; then
11938           # A command without a complete path is provided, search $PATH.
11939           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11940 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11941           # Extract the first word of "$tool_basename", so it can be a program name with args.
11942 set dummy $tool_basename; ac_word=$2
11943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11944 $as_echo_n "checking for $ac_word... " >&6; }
11945 if ${ac_cv_path_WHICH+:} false; then :
11946   $as_echo_n "(cached) " >&6
11947 else
11948   case $WHICH in
11949   [\\/]* | ?:[\\/]*)
11950   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11951   ;;
11952   *)
11953   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11954 for as_dir in $PATH
11955 do
11956   IFS=$as_save_IFS
11957   test -z "$as_dir" && as_dir=.
11958     for ac_exec_ext in '' $ac_executable_extensions; do
11959   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11960     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11961     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11962     break 2
11963   fi
11964 done
11965   done
11966 IFS=$as_save_IFS
11967 
11968   ;;
11969 esac
11970 fi
11971 WHICH=$ac_cv_path_WHICH
11972 if test -n "$WHICH"; then
11973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11974 $as_echo "$WHICH" >&6; }
11975 else
11976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11977 $as_echo "no" >&6; }
11978 fi
11979 
11980 
11981           if test "x$WHICH" = x; then
11982             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11983           fi
11984         else
11985           # Otherwise we believe it is a complete path. Use it as it is.
11986           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11987 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11988           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11989 $as_echo_n "checking for WHICH... " >&6; }
11990           if test ! -x "$tool_specified"; then
11991             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11992 $as_echo "not found" >&6; }
11993             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11994           fi
11995           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11996 $as_echo "$tool_specified" >&6; }
11997         fi
11998       fi
11999     fi
12000 
12001   fi
12002 
12003 
12004 
12005   if test "x$WHICH" = x; then
12006     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12007   fi
12008 
12009 
12010 
12011 
12012 
12013   # Publish this variable in the help.
12014 
12015 
12016   if [ -z "${XARGS+x}" ]; then
12017     # The variable is not set by user, try to locate tool using the code snippet
12018     for ac_prog in xargs
12019 do
12020   # Extract the first word of "$ac_prog", so it can be a program name with args.
12021 set dummy $ac_prog; ac_word=$2
12022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12023 $as_echo_n "checking for $ac_word... " >&6; }
12024 if ${ac_cv_path_XARGS+:} false; then :
12025   $as_echo_n "(cached) " >&6
12026 else
12027   case $XARGS in
12028   [\\/]* | ?:[\\/]*)
12029   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12030   ;;
12031   *)
12032   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12033 for as_dir in $PATH
12034 do
12035   IFS=$as_save_IFS
12036   test -z "$as_dir" && as_dir=.
12037     for ac_exec_ext in '' $ac_executable_extensions; do
12038   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12039     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12040     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12041     break 2
12042   fi
12043 done
12044   done
12045 IFS=$as_save_IFS
12046 
12047   ;;
12048 esac
12049 fi
12050 XARGS=$ac_cv_path_XARGS
12051 if test -n "$XARGS"; then
12052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12053 $as_echo "$XARGS" >&6; }
12054 else
12055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12056 $as_echo "no" >&6; }
12057 fi
12058 
12059 
12060   test -n "$XARGS" && break
12061 done
12062 
12063   else
12064     # The variable is set, but is it from the command line or the environment?
12065 
12066     # Try to remove the string !XARGS! from our list.
12067     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12068     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12069       # If it failed, the variable was not from the command line. Ignore it,
12070       # but warn the user (except for BASH, which is always set by the calling BASH).
12071       if test "xXARGS" != xBASH; then
12072         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12073 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12074       fi
12075       # Try to locate tool using the code snippet
12076       for ac_prog in xargs
12077 do
12078   # Extract the first word of "$ac_prog", so it can be a program name with args.
12079 set dummy $ac_prog; ac_word=$2
12080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12081 $as_echo_n "checking for $ac_word... " >&6; }
12082 if ${ac_cv_path_XARGS+:} false; then :
12083   $as_echo_n "(cached) " >&6
12084 else
12085   case $XARGS in
12086   [\\/]* | ?:[\\/]*)
12087   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12088   ;;
12089   *)
12090   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12091 for as_dir in $PATH
12092 do
12093   IFS=$as_save_IFS
12094   test -z "$as_dir" && as_dir=.
12095     for ac_exec_ext in '' $ac_executable_extensions; do
12096   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12097     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12098     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12099     break 2
12100   fi
12101 done
12102   done
12103 IFS=$as_save_IFS
12104 
12105   ;;
12106 esac
12107 fi
12108 XARGS=$ac_cv_path_XARGS
12109 if test -n "$XARGS"; then
12110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12111 $as_echo "$XARGS" >&6; }
12112 else
12113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12114 $as_echo "no" >&6; }
12115 fi
12116 
12117 
12118   test -n "$XARGS" && break
12119 done
12120 
12121     else
12122       # If it succeeded, then it was overridden by the user. We will use it
12123       # for the tool.
12124 
12125       # First remove it from the list of overridden variables, so we can test
12126       # for unknown variables in the end.
12127       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12128 
12129       # Check if we try to supply an empty value
12130       if test "x$XARGS" = x; then
12131         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12132 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12133         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12134 $as_echo_n "checking for XARGS... " >&6; }
12135         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12136 $as_echo "disabled" >&6; }
12137       else
12138         # Check if the provided tool contains a complete path.
12139         tool_specified="$XARGS"
12140         tool_basename="${tool_specified##*/}"
12141         if test "x$tool_basename" = "x$tool_specified"; then
12142           # A command without a complete path is provided, search $PATH.
12143           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12144 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12145           # Extract the first word of "$tool_basename", so it can be a program name with args.
12146 set dummy $tool_basename; ac_word=$2
12147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12148 $as_echo_n "checking for $ac_word... " >&6; }
12149 if ${ac_cv_path_XARGS+:} false; then :
12150   $as_echo_n "(cached) " >&6
12151 else
12152   case $XARGS in
12153   [\\/]* | ?:[\\/]*)
12154   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12155   ;;
12156   *)
12157   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12158 for as_dir in $PATH
12159 do
12160   IFS=$as_save_IFS
12161   test -z "$as_dir" && as_dir=.
12162     for ac_exec_ext in '' $ac_executable_extensions; do
12163   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12164     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12165     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12166     break 2
12167   fi
12168 done
12169   done
12170 IFS=$as_save_IFS
12171 
12172   ;;
12173 esac
12174 fi
12175 XARGS=$ac_cv_path_XARGS
12176 if test -n "$XARGS"; then
12177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12178 $as_echo "$XARGS" >&6; }
12179 else
12180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12181 $as_echo "no" >&6; }
12182 fi
12183 
12184 
12185           if test "x$XARGS" = x; then
12186             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12187           fi
12188         else
12189           # Otherwise we believe it is a complete path. Use it as it is.
12190           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12191 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12192           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12193 $as_echo_n "checking for XARGS... " >&6; }
12194           if test ! -x "$tool_specified"; then
12195             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12196 $as_echo "not found" >&6; }
12197             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12198           fi
12199           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12200 $as_echo "$tool_specified" >&6; }
12201         fi
12202       fi
12203     fi
12204 
12205   fi
12206 
12207 
12208 
12209   if test "x$XARGS" = x; then
12210     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12211   fi
12212 
12213 
12214 
12215   # Then required tools that require some special treatment.
12216 
12217 
12218   # Publish this variable in the help.
12219 
12220 
12221   if [ -z "${AWK+x}" ]; then
12222     # The variable is not set by user, try to locate tool using the code snippet
12223     for ac_prog in gawk mawk nawk awk
12224 do
12225   # Extract the first word of "$ac_prog", so it can be a program name with args.
12226 set dummy $ac_prog; ac_word=$2
12227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12228 $as_echo_n "checking for $ac_word... " >&6; }
12229 if ${ac_cv_prog_AWK+:} false; then :
12230   $as_echo_n "(cached) " >&6
12231 else
12232   if test -n "$AWK"; then
12233   ac_cv_prog_AWK="$AWK" # Let the user override the test.
12234 else
12235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12236 for as_dir in $PATH
12237 do
12238   IFS=$as_save_IFS
12239   test -z "$as_dir" && as_dir=.
12240     for ac_exec_ext in '' $ac_executable_extensions; do
12241   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12242     ac_cv_prog_AWK="$ac_prog"
12243     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12244     break 2
12245   fi
12246 done
12247   done
12248 IFS=$as_save_IFS
12249 
12250 fi
12251 fi
12252 AWK=$ac_cv_prog_AWK
12253 if test -n "$AWK"; then
12254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12255 $as_echo "$AWK" >&6; }
12256 else
12257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12258 $as_echo "no" >&6; }
12259 fi
12260 
12261 
12262   test -n "$AWK" && break
12263 done
12264 
12265   else
12266     # The variable is set, but is it from the command line or the environment?
12267 
12268     # Try to remove the string !AWK! from our list.
12269     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12270     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12271       # If it failed, the variable was not from the command line. Ignore it,
12272       # but warn the user (except for BASH, which is always set by the calling BASH).
12273       if test "xAWK" != xBASH; then
12274         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12275 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12276       fi
12277       # Try to locate tool using the code snippet
12278       for ac_prog in gawk mawk nawk awk
12279 do
12280   # Extract the first word of "$ac_prog", so it can be a program name with args.
12281 set dummy $ac_prog; ac_word=$2
12282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12283 $as_echo_n "checking for $ac_word... " >&6; }
12284 if ${ac_cv_prog_AWK+:} false; then :
12285   $as_echo_n "(cached) " >&6
12286 else
12287   if test -n "$AWK"; then
12288   ac_cv_prog_AWK="$AWK" # Let the user override the test.
12289 else
12290 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12291 for as_dir in $PATH
12292 do
12293   IFS=$as_save_IFS
12294   test -z "$as_dir" && as_dir=.
12295     for ac_exec_ext in '' $ac_executable_extensions; do
12296   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12297     ac_cv_prog_AWK="$ac_prog"
12298     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12299     break 2
12300   fi
12301 done
12302   done
12303 IFS=$as_save_IFS
12304 
12305 fi
12306 fi
12307 AWK=$ac_cv_prog_AWK
12308 if test -n "$AWK"; then
12309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12310 $as_echo "$AWK" >&6; }
12311 else
12312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12313 $as_echo "no" >&6; }
12314 fi
12315 
12316 
12317   test -n "$AWK" && break
12318 done
12319 
12320     else
12321       # If it succeeded, then it was overridden by the user. We will use it
12322       # for the tool.
12323 
12324       # First remove it from the list of overridden variables, so we can test
12325       # for unknown variables in the end.
12326       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12327 
12328       # Check if we try to supply an empty value
12329       if test "x$AWK" = x; then
12330         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12331 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12332         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12333 $as_echo_n "checking for AWK... " >&6; }
12334         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12335 $as_echo "disabled" >&6; }
12336       else
12337         # Check if the provided tool contains a complete path.
12338         tool_specified="$AWK"
12339         tool_basename="${tool_specified##*/}"
12340         if test "x$tool_basename" = "x$tool_specified"; then
12341           # A command without a complete path is provided, search $PATH.
12342           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12343 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12344           # Extract the first word of "$tool_basename", so it can be a program name with args.
12345 set dummy $tool_basename; ac_word=$2
12346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12347 $as_echo_n "checking for $ac_word... " >&6; }
12348 if ${ac_cv_path_AWK+:} false; then :
12349   $as_echo_n "(cached) " >&6
12350 else
12351   case $AWK in
12352   [\\/]* | ?:[\\/]*)
12353   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12354   ;;
12355   *)
12356   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12357 for as_dir in $PATH
12358 do
12359   IFS=$as_save_IFS
12360   test -z "$as_dir" && as_dir=.
12361     for ac_exec_ext in '' $ac_executable_extensions; do
12362   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12363     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12364     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12365     break 2
12366   fi
12367 done
12368   done
12369 IFS=$as_save_IFS
12370 
12371   ;;
12372 esac
12373 fi
12374 AWK=$ac_cv_path_AWK
12375 if test -n "$AWK"; then
12376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12377 $as_echo "$AWK" >&6; }
12378 else
12379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12380 $as_echo "no" >&6; }
12381 fi
12382 
12383 
12384           if test "x$AWK" = x; then
12385             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12386           fi
12387         else
12388           # Otherwise we believe it is a complete path. Use it as it is.
12389           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12390 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12391           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12392 $as_echo_n "checking for AWK... " >&6; }
12393           if test ! -x "$tool_specified"; then
12394             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12395 $as_echo "not found" >&6; }
12396             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12397           fi
12398           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12399 $as_echo "$tool_specified" >&6; }
12400         fi
12401       fi
12402     fi
12403 
12404   fi
12405 
12406 
12407   if test "x$AWK" = x; then
12408     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12409   fi
12410 
12411 
12412 
12413 
12414   # Publish this variable in the help.
12415 
12416 
12417   if [ -z "${GREP+x}" ]; then
12418     # The variable is not set by user, try to locate tool using the code snippet
12419     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12420 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12421 if ${ac_cv_path_GREP+:} false; then :
12422   $as_echo_n "(cached) " >&6
12423 else
12424   if test -z "$GREP"; then
12425   ac_path_GREP_found=false
12426   # Loop through the user's path and test for each of PROGNAME-LIST
12427   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12428 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12429 do
12430   IFS=$as_save_IFS
12431   test -z "$as_dir" && as_dir=.
12432     for ac_prog in grep ggrep; do
12433     for ac_exec_ext in '' $ac_executable_extensions; do
12434       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12435       as_fn_executable_p "$ac_path_GREP" || continue
12436 # Check for GNU ac_path_GREP and select it if it is found.
12437   # Check for GNU $ac_path_GREP
12438 case `"$ac_path_GREP" --version 2>&1` in
12439 *GNU*)
12440   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12441 *)
12442   ac_count=0
12443   $as_echo_n 0123456789 >"conftest.in"
12444   while :
12445   do
12446     cat "conftest.in" "conftest.in" >"conftest.tmp"
12447     mv "conftest.tmp" "conftest.in"
12448     cp "conftest.in" "conftest.nl"
12449     $as_echo 'GREP' >> "conftest.nl"
12450     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12451     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12452     as_fn_arith $ac_count + 1 && ac_count=$as_val
12453     if test $ac_count -gt ${ac_path_GREP_max-0}; then
12454       # Best one so far, save it but keep looking for a better one
12455       ac_cv_path_GREP="$ac_path_GREP"
12456       ac_path_GREP_max=$ac_count
12457     fi
12458     # 10*(2^10) chars as input seems more than enough
12459     test $ac_count -gt 10 && break
12460   done
12461   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12462 esac
12463 
12464       $ac_path_GREP_found && break 3
12465     done
12466   done
12467   done
12468 IFS=$as_save_IFS
12469   if test -z "$ac_cv_path_GREP"; then
12470     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12471   fi
12472 else
12473   ac_cv_path_GREP=$GREP
12474 fi
12475 
12476 fi
12477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12478 $as_echo "$ac_cv_path_GREP" >&6; }
12479  GREP="$ac_cv_path_GREP"
12480 
12481 
12482   else
12483     # The variable is set, but is it from the command line or the environment?
12484 
12485     # Try to remove the string !GREP! from our list.
12486     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12487     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12488       # If it failed, the variable was not from the command line. Ignore it,
12489       # but warn the user (except for BASH, which is always set by the calling BASH).
12490       if test "xGREP" != xBASH; then
12491         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12492 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12493       fi
12494       # Try to locate tool using the code snippet
12495       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12496 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12497 if ${ac_cv_path_GREP+:} false; then :
12498   $as_echo_n "(cached) " >&6
12499 else
12500   if test -z "$GREP"; then
12501   ac_path_GREP_found=false
12502   # Loop through the user's path and test for each of PROGNAME-LIST
12503   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12504 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12505 do
12506   IFS=$as_save_IFS
12507   test -z "$as_dir" && as_dir=.
12508     for ac_prog in grep ggrep; do
12509     for ac_exec_ext in '' $ac_executable_extensions; do
12510       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12511       as_fn_executable_p "$ac_path_GREP" || continue
12512 # Check for GNU ac_path_GREP and select it if it is found.
12513   # Check for GNU $ac_path_GREP
12514 case `"$ac_path_GREP" --version 2>&1` in
12515 *GNU*)
12516   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12517 *)
12518   ac_count=0
12519   $as_echo_n 0123456789 >"conftest.in"
12520   while :
12521   do
12522     cat "conftest.in" "conftest.in" >"conftest.tmp"
12523     mv "conftest.tmp" "conftest.in"
12524     cp "conftest.in" "conftest.nl"
12525     $as_echo 'GREP' >> "conftest.nl"
12526     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12527     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12528     as_fn_arith $ac_count + 1 && ac_count=$as_val
12529     if test $ac_count -gt ${ac_path_GREP_max-0}; then
12530       # Best one so far, save it but keep looking for a better one
12531       ac_cv_path_GREP="$ac_path_GREP"
12532       ac_path_GREP_max=$ac_count
12533     fi
12534     # 10*(2^10) chars as input seems more than enough
12535     test $ac_count -gt 10 && break
12536   done
12537   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12538 esac
12539 
12540       $ac_path_GREP_found && break 3
12541     done
12542   done
12543   done
12544 IFS=$as_save_IFS
12545   if test -z "$ac_cv_path_GREP"; then
12546     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12547   fi
12548 else
12549   ac_cv_path_GREP=$GREP
12550 fi
12551 
12552 fi
12553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12554 $as_echo "$ac_cv_path_GREP" >&6; }
12555  GREP="$ac_cv_path_GREP"
12556 
12557 
12558     else
12559       # If it succeeded, then it was overridden by the user. We will use it
12560       # for the tool.
12561 
12562       # First remove it from the list of overridden variables, so we can test
12563       # for unknown variables in the end.
12564       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12565 
12566       # Check if we try to supply an empty value
12567       if test "x$GREP" = x; then
12568         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12569 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12570         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12571 $as_echo_n "checking for GREP... " >&6; }
12572         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12573 $as_echo "disabled" >&6; }
12574       else
12575         # Check if the provided tool contains a complete path.
12576         tool_specified="$GREP"
12577         tool_basename="${tool_specified##*/}"
12578         if test "x$tool_basename" = "x$tool_specified"; then
12579           # A command without a complete path is provided, search $PATH.
12580           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12581 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12582           # Extract the first word of "$tool_basename", so it can be a program name with args.
12583 set dummy $tool_basename; ac_word=$2
12584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12585 $as_echo_n "checking for $ac_word... " >&6; }
12586 if ${ac_cv_path_GREP+:} false; then :
12587   $as_echo_n "(cached) " >&6
12588 else
12589   case $GREP in
12590   [\\/]* | ?:[\\/]*)
12591   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12592   ;;
12593   *)
12594   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12595 for as_dir in $PATH
12596 do
12597   IFS=$as_save_IFS
12598   test -z "$as_dir" && as_dir=.
12599     for ac_exec_ext in '' $ac_executable_extensions; do
12600   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12601     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12602     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12603     break 2
12604   fi
12605 done
12606   done
12607 IFS=$as_save_IFS
12608 
12609   ;;
12610 esac
12611 fi
12612 GREP=$ac_cv_path_GREP
12613 if test -n "$GREP"; then
12614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12615 $as_echo "$GREP" >&6; }
12616 else
12617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12618 $as_echo "no" >&6; }
12619 fi
12620 
12621 
12622           if test "x$GREP" = x; then
12623             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12624           fi
12625         else
12626           # Otherwise we believe it is a complete path. Use it as it is.
12627           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12628 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12629           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12630 $as_echo_n "checking for GREP... " >&6; }
12631           if test ! -x "$tool_specified"; then
12632             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12633 $as_echo "not found" >&6; }
12634             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12635           fi
12636           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12637 $as_echo "$tool_specified" >&6; }
12638         fi
12639       fi
12640     fi
12641 
12642   fi
12643 
12644 
12645   if test "x$GREP" = x; then
12646     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12647   fi
12648 
12649 
12650 
12651 
12652   # Publish this variable in the help.
12653 
12654 
12655   if [ -z "${EGREP+x}" ]; then
12656     # The variable is not set by user, try to locate tool using the code snippet
12657     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12658 $as_echo_n "checking for egrep... " >&6; }
12659 if ${ac_cv_path_EGREP+:} false; then :
12660   $as_echo_n "(cached) " >&6
12661 else
12662   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12663    then ac_cv_path_EGREP="$GREP -E"
12664    else
12665      if test -z "$EGREP"; then
12666   ac_path_EGREP_found=false
12667   # Loop through the user's path and test for each of PROGNAME-LIST
12668   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12669 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12670 do
12671   IFS=$as_save_IFS
12672   test -z "$as_dir" && as_dir=.
12673     for ac_prog in egrep; do
12674     for ac_exec_ext in '' $ac_executable_extensions; do
12675       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12676       as_fn_executable_p "$ac_path_EGREP" || continue
12677 # Check for GNU ac_path_EGREP and select it if it is found.
12678   # Check for GNU $ac_path_EGREP
12679 case `"$ac_path_EGREP" --version 2>&1` in
12680 *GNU*)
12681   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12682 *)
12683   ac_count=0
12684   $as_echo_n 0123456789 >"conftest.in"
12685   while :
12686   do
12687     cat "conftest.in" "conftest.in" >"conftest.tmp"
12688     mv "conftest.tmp" "conftest.in"
12689     cp "conftest.in" "conftest.nl"
12690     $as_echo 'EGREP' >> "conftest.nl"
12691     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12692     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12693     as_fn_arith $ac_count + 1 && ac_count=$as_val
12694     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12695       # Best one so far, save it but keep looking for a better one
12696       ac_cv_path_EGREP="$ac_path_EGREP"
12697       ac_path_EGREP_max=$ac_count
12698     fi
12699     # 10*(2^10) chars as input seems more than enough
12700     test $ac_count -gt 10 && break
12701   done
12702   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12703 esac
12704 
12705       $ac_path_EGREP_found && break 3
12706     done
12707   done
12708   done
12709 IFS=$as_save_IFS
12710   if test -z "$ac_cv_path_EGREP"; then
12711     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12712   fi
12713 else
12714   ac_cv_path_EGREP=$EGREP
12715 fi
12716 
12717    fi
12718 fi
12719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12720 $as_echo "$ac_cv_path_EGREP" >&6; }
12721  EGREP="$ac_cv_path_EGREP"
12722 
12723 
12724   else
12725     # The variable is set, but is it from the command line or the environment?
12726 
12727     # Try to remove the string !EGREP! from our list.
12728     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12729     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12730       # If it failed, the variable was not from the command line. Ignore it,
12731       # but warn the user (except for BASH, which is always set by the calling BASH).
12732       if test "xEGREP" != xBASH; then
12733         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12734 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12735       fi
12736       # Try to locate tool using the code snippet
12737       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12738 $as_echo_n "checking for egrep... " >&6; }
12739 if ${ac_cv_path_EGREP+:} false; then :
12740   $as_echo_n "(cached) " >&6
12741 else
12742   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12743    then ac_cv_path_EGREP="$GREP -E"
12744    else
12745      if test -z "$EGREP"; then
12746   ac_path_EGREP_found=false
12747   # Loop through the user's path and test for each of PROGNAME-LIST
12748   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12749 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12750 do
12751   IFS=$as_save_IFS
12752   test -z "$as_dir" && as_dir=.
12753     for ac_prog in egrep; do
12754     for ac_exec_ext in '' $ac_executable_extensions; do
12755       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12756       as_fn_executable_p "$ac_path_EGREP" || continue
12757 # Check for GNU ac_path_EGREP and select it if it is found.
12758   # Check for GNU $ac_path_EGREP
12759 case `"$ac_path_EGREP" --version 2>&1` in
12760 *GNU*)
12761   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12762 *)
12763   ac_count=0
12764   $as_echo_n 0123456789 >"conftest.in"
12765   while :
12766   do
12767     cat "conftest.in" "conftest.in" >"conftest.tmp"
12768     mv "conftest.tmp" "conftest.in"
12769     cp "conftest.in" "conftest.nl"
12770     $as_echo 'EGREP' >> "conftest.nl"
12771     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12772     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12773     as_fn_arith $ac_count + 1 && ac_count=$as_val
12774     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12775       # Best one so far, save it but keep looking for a better one
12776       ac_cv_path_EGREP="$ac_path_EGREP"
12777       ac_path_EGREP_max=$ac_count
12778     fi
12779     # 10*(2^10) chars as input seems more than enough
12780     test $ac_count -gt 10 && break
12781   done
12782   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12783 esac
12784 
12785       $ac_path_EGREP_found && break 3
12786     done
12787   done
12788   done
12789 IFS=$as_save_IFS
12790   if test -z "$ac_cv_path_EGREP"; then
12791     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12792   fi
12793 else
12794   ac_cv_path_EGREP=$EGREP
12795 fi
12796 
12797    fi
12798 fi
12799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12800 $as_echo "$ac_cv_path_EGREP" >&6; }
12801  EGREP="$ac_cv_path_EGREP"
12802 
12803 
12804     else
12805       # If it succeeded, then it was overridden by the user. We will use it
12806       # for the tool.
12807 
12808       # First remove it from the list of overridden variables, so we can test
12809       # for unknown variables in the end.
12810       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12811 
12812       # Check if we try to supply an empty value
12813       if test "x$EGREP" = x; then
12814         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
12815 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
12816         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12817 $as_echo_n "checking for EGREP... " >&6; }
12818         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12819 $as_echo "disabled" >&6; }
12820       else
12821         # Check if the provided tool contains a complete path.
12822         tool_specified="$EGREP"
12823         tool_basename="${tool_specified##*/}"
12824         if test "x$tool_basename" = "x$tool_specified"; then
12825           # A command without a complete path is provided, search $PATH.
12826           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12827 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12828           # Extract the first word of "$tool_basename", so it can be a program name with args.
12829 set dummy $tool_basename; ac_word=$2
12830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12831 $as_echo_n "checking for $ac_word... " >&6; }
12832 if ${ac_cv_path_EGREP+:} false; then :
12833   $as_echo_n "(cached) " >&6
12834 else
12835   case $EGREP in
12836   [\\/]* | ?:[\\/]*)
12837   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12838   ;;
12839   *)
12840   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12841 for as_dir in $PATH
12842 do
12843   IFS=$as_save_IFS
12844   test -z "$as_dir" && as_dir=.
12845     for ac_exec_ext in '' $ac_executable_extensions; do
12846   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12847     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12848     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12849     break 2
12850   fi
12851 done
12852   done
12853 IFS=$as_save_IFS
12854 
12855   ;;
12856 esac
12857 fi
12858 EGREP=$ac_cv_path_EGREP
12859 if test -n "$EGREP"; then
12860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12861 $as_echo "$EGREP" >&6; }
12862 else
12863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12864 $as_echo "no" >&6; }
12865 fi
12866 
12867 
12868           if test "x$EGREP" = x; then
12869             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12870           fi
12871         else
12872           # Otherwise we believe it is a complete path. Use it as it is.
12873           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12874 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12875           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12876 $as_echo_n "checking for EGREP... " >&6; }
12877           if test ! -x "$tool_specified"; then
12878             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12879 $as_echo "not found" >&6; }
12880             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12881           fi
12882           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12883 $as_echo "$tool_specified" >&6; }
12884         fi
12885       fi
12886     fi
12887 
12888   fi
12889 
12890 
12891   if test "x$EGREP" = x; then
12892     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12893   fi
12894 
12895 
12896 
12897 
12898   # Publish this variable in the help.
12899 
12900 
12901   if [ -z "${FGREP+x}" ]; then
12902     # The variable is not set by user, try to locate tool using the code snippet
12903     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12904 $as_echo_n "checking for fgrep... " >&6; }
12905 if ${ac_cv_path_FGREP+:} false; then :
12906   $as_echo_n "(cached) " >&6
12907 else
12908   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12909    then ac_cv_path_FGREP="$GREP -F"
12910    else
12911      if test -z "$FGREP"; then
12912   ac_path_FGREP_found=false
12913   # Loop through the user's path and test for each of PROGNAME-LIST
12914   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12915 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12916 do
12917   IFS=$as_save_IFS
12918   test -z "$as_dir" && as_dir=.
12919     for ac_prog in fgrep; do
12920     for ac_exec_ext in '' $ac_executable_extensions; do
12921       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12922       as_fn_executable_p "$ac_path_FGREP" || continue
12923 # Check for GNU ac_path_FGREP and select it if it is found.
12924   # Check for GNU $ac_path_FGREP
12925 case `"$ac_path_FGREP" --version 2>&1` in
12926 *GNU*)
12927   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12928 *)
12929   ac_count=0
12930   $as_echo_n 0123456789 >"conftest.in"
12931   while :
12932   do
12933     cat "conftest.in" "conftest.in" >"conftest.tmp"
12934     mv "conftest.tmp" "conftest.in"
12935     cp "conftest.in" "conftest.nl"
12936     $as_echo 'FGREP' >> "conftest.nl"
12937     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12938     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12939     as_fn_arith $ac_count + 1 && ac_count=$as_val
12940     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12941       # Best one so far, save it but keep looking for a better one
12942       ac_cv_path_FGREP="$ac_path_FGREP"
12943       ac_path_FGREP_max=$ac_count
12944     fi
12945     # 10*(2^10) chars as input seems more than enough
12946     test $ac_count -gt 10 && break
12947   done
12948   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12949 esac
12950 
12951       $ac_path_FGREP_found && break 3
12952     done
12953   done
12954   done
12955 IFS=$as_save_IFS
12956   if test -z "$ac_cv_path_FGREP"; then
12957     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12958   fi
12959 else
12960   ac_cv_path_FGREP=$FGREP
12961 fi
12962 
12963    fi
12964 fi
12965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12966 $as_echo "$ac_cv_path_FGREP" >&6; }
12967  FGREP="$ac_cv_path_FGREP"
12968 
12969 
12970   else
12971     # The variable is set, but is it from the command line or the environment?
12972 
12973     # Try to remove the string !FGREP! from our list.
12974     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12975     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12976       # If it failed, the variable was not from the command line. Ignore it,
12977       # but warn the user (except for BASH, which is always set by the calling BASH).
12978       if test "xFGREP" != xBASH; then
12979         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12980 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12981       fi
12982       # Try to locate tool using the code snippet
12983       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12984 $as_echo_n "checking for fgrep... " >&6; }
12985 if ${ac_cv_path_FGREP+:} false; then :
12986   $as_echo_n "(cached) " >&6
12987 else
12988   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12989    then ac_cv_path_FGREP="$GREP -F"
12990    else
12991      if test -z "$FGREP"; then
12992   ac_path_FGREP_found=false
12993   # Loop through the user's path and test for each of PROGNAME-LIST
12994   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12995 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12996 do
12997   IFS=$as_save_IFS
12998   test -z "$as_dir" && as_dir=.
12999     for ac_prog in fgrep; do
13000     for ac_exec_ext in '' $ac_executable_extensions; do
13001       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13002       as_fn_executable_p "$ac_path_FGREP" || continue
13003 # Check for GNU ac_path_FGREP and select it if it is found.
13004   # Check for GNU $ac_path_FGREP
13005 case `"$ac_path_FGREP" --version 2>&1` in
13006 *GNU*)
13007   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13008 *)
13009   ac_count=0
13010   $as_echo_n 0123456789 >"conftest.in"
13011   while :
13012   do
13013     cat "conftest.in" "conftest.in" >"conftest.tmp"
13014     mv "conftest.tmp" "conftest.in"
13015     cp "conftest.in" "conftest.nl"
13016     $as_echo 'FGREP' >> "conftest.nl"
13017     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13018     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13019     as_fn_arith $ac_count + 1 && ac_count=$as_val
13020     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13021       # Best one so far, save it but keep looking for a better one
13022       ac_cv_path_FGREP="$ac_path_FGREP"
13023       ac_path_FGREP_max=$ac_count
13024     fi
13025     # 10*(2^10) chars as input seems more than enough
13026     test $ac_count -gt 10 && break
13027   done
13028   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13029 esac
13030 
13031       $ac_path_FGREP_found && break 3
13032     done
13033   done
13034   done
13035 IFS=$as_save_IFS
13036   if test -z "$ac_cv_path_FGREP"; then
13037     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13038   fi
13039 else
13040   ac_cv_path_FGREP=$FGREP
13041 fi
13042 
13043    fi
13044 fi
13045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13046 $as_echo "$ac_cv_path_FGREP" >&6; }
13047  FGREP="$ac_cv_path_FGREP"
13048 
13049 
13050     else
13051       # If it succeeded, then it was overridden by the user. We will use it
13052       # for the tool.
13053 
13054       # First remove it from the list of overridden variables, so we can test
13055       # for unknown variables in the end.
13056       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13057 
13058       # Check if we try to supply an empty value
13059       if test "x$FGREP" = x; then
13060         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13061 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13062         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13063 $as_echo_n "checking for FGREP... " >&6; }
13064         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13065 $as_echo "disabled" >&6; }
13066       else
13067         # Check if the provided tool contains a complete path.
13068         tool_specified="$FGREP"
13069         tool_basename="${tool_specified##*/}"
13070         if test "x$tool_basename" = "x$tool_specified"; then
13071           # A command without a complete path is provided, search $PATH.
13072           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13073 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13074           # Extract the first word of "$tool_basename", so it can be a program name with args.
13075 set dummy $tool_basename; ac_word=$2
13076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13077 $as_echo_n "checking for $ac_word... " >&6; }
13078 if ${ac_cv_path_FGREP+:} false; then :
13079   $as_echo_n "(cached) " >&6
13080 else
13081   case $FGREP in
13082   [\\/]* | ?:[\\/]*)
13083   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13084   ;;
13085   *)
13086   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13087 for as_dir in $PATH
13088 do
13089   IFS=$as_save_IFS
13090   test -z "$as_dir" && as_dir=.
13091     for ac_exec_ext in '' $ac_executable_extensions; do
13092   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13093     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13094     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13095     break 2
13096   fi
13097 done
13098   done
13099 IFS=$as_save_IFS
13100 
13101   ;;
13102 esac
13103 fi
13104 FGREP=$ac_cv_path_FGREP
13105 if test -n "$FGREP"; then
13106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13107 $as_echo "$FGREP" >&6; }
13108 else
13109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13110 $as_echo "no" >&6; }
13111 fi
13112 
13113 
13114           if test "x$FGREP" = x; then
13115             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13116           fi
13117         else
13118           # Otherwise we believe it is a complete path. Use it as it is.
13119           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13120 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13121           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13122 $as_echo_n "checking for FGREP... " >&6; }
13123           if test ! -x "$tool_specified"; then
13124             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13125 $as_echo "not found" >&6; }
13126             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13127           fi
13128           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13129 $as_echo "$tool_specified" >&6; }
13130         fi
13131       fi
13132     fi
13133 
13134   fi
13135 
13136 
13137   if test "x$FGREP" = x; then
13138     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13139   fi
13140 
13141 
13142 
13143 
13144   # Publish this variable in the help.
13145 
13146 
13147   if [ -z "${SED+x}" ]; then
13148     # The variable is not set by user, try to locate tool using the code snippet
13149     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13150 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13151 if ${ac_cv_path_SED+:} false; then :
13152   $as_echo_n "(cached) " >&6
13153 else
13154             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13155      for ac_i in 1 2 3 4 5 6 7; do
13156        ac_script="$ac_script$as_nl$ac_script"
13157      done
13158      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13159      { ac_script=; unset ac_script;}
13160      if test -z "$SED"; then
13161   ac_path_SED_found=false
13162   # Loop through the user's path and test for each of PROGNAME-LIST
13163   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13164 for as_dir in $PATH
13165 do
13166   IFS=$as_save_IFS
13167   test -z "$as_dir" && as_dir=.
13168     for ac_prog in sed gsed; do
13169     for ac_exec_ext in '' $ac_executable_extensions; do
13170       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13171       as_fn_executable_p "$ac_path_SED" || continue
13172 # Check for GNU ac_path_SED and select it if it is found.
13173   # Check for GNU $ac_path_SED
13174 case `"$ac_path_SED" --version 2>&1` in
13175 *GNU*)
13176   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13177 *)
13178   ac_count=0
13179   $as_echo_n 0123456789 >"conftest.in"
13180   while :
13181   do
13182     cat "conftest.in" "conftest.in" >"conftest.tmp"
13183     mv "conftest.tmp" "conftest.in"
13184     cp "conftest.in" "conftest.nl"
13185     $as_echo '' >> "conftest.nl"
13186     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13187     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13188     as_fn_arith $ac_count + 1 && ac_count=$as_val
13189     if test $ac_count -gt ${ac_path_SED_max-0}; then
13190       # Best one so far, save it but keep looking for a better one
13191       ac_cv_path_SED="$ac_path_SED"
13192       ac_path_SED_max=$ac_count
13193     fi
13194     # 10*(2^10) chars as input seems more than enough
13195     test $ac_count -gt 10 && break
13196   done
13197   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13198 esac
13199 
13200       $ac_path_SED_found && break 3
13201     done
13202   done
13203   done
13204 IFS=$as_save_IFS
13205   if test -z "$ac_cv_path_SED"; then
13206     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13207   fi
13208 else
13209   ac_cv_path_SED=$SED
13210 fi
13211 
13212 fi
13213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13214 $as_echo "$ac_cv_path_SED" >&6; }
13215  SED="$ac_cv_path_SED"
13216   rm -f conftest.sed
13217 
13218   else
13219     # The variable is set, but is it from the command line or the environment?
13220 
13221     # Try to remove the string !SED! from our list.
13222     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13223     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13224       # If it failed, the variable was not from the command line. Ignore it,
13225       # but warn the user (except for BASH, which is always set by the calling BASH).
13226       if test "xSED" != xBASH; then
13227         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13228 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13229       fi
13230       # Try to locate tool using the code snippet
13231       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13232 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13233 if ${ac_cv_path_SED+:} false; then :
13234   $as_echo_n "(cached) " >&6
13235 else
13236             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13237      for ac_i in 1 2 3 4 5 6 7; do
13238        ac_script="$ac_script$as_nl$ac_script"
13239      done
13240      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13241      { ac_script=; unset ac_script;}
13242      if test -z "$SED"; then
13243   ac_path_SED_found=false
13244   # Loop through the user's path and test for each of PROGNAME-LIST
13245   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13246 for as_dir in $PATH
13247 do
13248   IFS=$as_save_IFS
13249   test -z "$as_dir" && as_dir=.
13250     for ac_prog in sed gsed; do
13251     for ac_exec_ext in '' $ac_executable_extensions; do
13252       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13253       as_fn_executable_p "$ac_path_SED" || continue
13254 # Check for GNU ac_path_SED and select it if it is found.
13255   # Check for GNU $ac_path_SED
13256 case `"$ac_path_SED" --version 2>&1` in
13257 *GNU*)
13258   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13259 *)
13260   ac_count=0
13261   $as_echo_n 0123456789 >"conftest.in"
13262   while :
13263   do
13264     cat "conftest.in" "conftest.in" >"conftest.tmp"
13265     mv "conftest.tmp" "conftest.in"
13266     cp "conftest.in" "conftest.nl"
13267     $as_echo '' >> "conftest.nl"
13268     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13269     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13270     as_fn_arith $ac_count + 1 && ac_count=$as_val
13271     if test $ac_count -gt ${ac_path_SED_max-0}; then
13272       # Best one so far, save it but keep looking for a better one
13273       ac_cv_path_SED="$ac_path_SED"
13274       ac_path_SED_max=$ac_count
13275     fi
13276     # 10*(2^10) chars as input seems more than enough
13277     test $ac_count -gt 10 && break
13278   done
13279   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13280 esac
13281 
13282       $ac_path_SED_found && break 3
13283     done
13284   done
13285   done
13286 IFS=$as_save_IFS
13287   if test -z "$ac_cv_path_SED"; then
13288     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13289   fi
13290 else
13291   ac_cv_path_SED=$SED
13292 fi
13293 
13294 fi
13295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13296 $as_echo "$ac_cv_path_SED" >&6; }
13297  SED="$ac_cv_path_SED"
13298   rm -f conftest.sed
13299 
13300     else
13301       # If it succeeded, then it was overridden by the user. We will use it
13302       # for the tool.
13303 
13304       # First remove it from the list of overridden variables, so we can test
13305       # for unknown variables in the end.
13306       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13307 
13308       # Check if we try to supply an empty value
13309       if test "x$SED" = x; then
13310         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13311 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13312         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13313 $as_echo_n "checking for SED... " >&6; }
13314         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13315 $as_echo "disabled" >&6; }
13316       else
13317         # Check if the provided tool contains a complete path.
13318         tool_specified="$SED"
13319         tool_basename="${tool_specified##*/}"
13320         if test "x$tool_basename" = "x$tool_specified"; then
13321           # A command without a complete path is provided, search $PATH.
13322           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13323 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13324           # Extract the first word of "$tool_basename", so it can be a program name with args.
13325 set dummy $tool_basename; ac_word=$2
13326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13327 $as_echo_n "checking for $ac_word... " >&6; }
13328 if ${ac_cv_path_SED+:} false; then :
13329   $as_echo_n "(cached) " >&6
13330 else
13331   case $SED in
13332   [\\/]* | ?:[\\/]*)
13333   ac_cv_path_SED="$SED" # Let the user override the test with a path.
13334   ;;
13335   *)
13336   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13337 for as_dir in $PATH
13338 do
13339   IFS=$as_save_IFS
13340   test -z "$as_dir" && as_dir=.
13341     for ac_exec_ext in '' $ac_executable_extensions; do
13342   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13343     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13344     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13345     break 2
13346   fi
13347 done
13348   done
13349 IFS=$as_save_IFS
13350 
13351   ;;
13352 esac
13353 fi
13354 SED=$ac_cv_path_SED
13355 if test -n "$SED"; then
13356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13357 $as_echo "$SED" >&6; }
13358 else
13359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13360 $as_echo "no" >&6; }
13361 fi
13362 
13363 
13364           if test "x$SED" = x; then
13365             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13366           fi
13367         else
13368           # Otherwise we believe it is a complete path. Use it as it is.
13369           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13370 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13371           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13372 $as_echo_n "checking for SED... " >&6; }
13373           if test ! -x "$tool_specified"; then
13374             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13375 $as_echo "not found" >&6; }
13376             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13377           fi
13378           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13379 $as_echo "$tool_specified" >&6; }
13380         fi
13381       fi
13382     fi
13383 
13384   fi
13385 
13386 
13387   if test "x$SED" = x; then
13388     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13389   fi
13390 
13391 
13392 
13393   # Always force rm.
13394   RM="$RM -f"
13395 
13396   # pwd behaves differently on various platforms and some don't support the -L flag.
13397   # Always use the bash builtin pwd to get uniform behavior.
13398   THEPWDCMD=pwd
13399 
13400   # These are not required on all platforms
13401 
13402 
13403   # Publish this variable in the help.
13404 
13405 
13406   if [ -z "${CYGPATH+x}" ]; then
13407     # The variable is not set by user, try to locate tool using the code snippet
13408     for ac_prog in cygpath
13409 do
13410   # Extract the first word of "$ac_prog", so it can be a program name with args.
13411 set dummy $ac_prog; ac_word=$2
13412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13413 $as_echo_n "checking for $ac_word... " >&6; }
13414 if ${ac_cv_path_CYGPATH+:} false; then :
13415   $as_echo_n "(cached) " >&6
13416 else
13417   case $CYGPATH in
13418   [\\/]* | ?:[\\/]*)
13419   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13420   ;;
13421   *)
13422   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13423 for as_dir in $PATH
13424 do
13425   IFS=$as_save_IFS
13426   test -z "$as_dir" && as_dir=.
13427     for ac_exec_ext in '' $ac_executable_extensions; do
13428   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13429     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13430     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13431     break 2
13432   fi
13433 done
13434   done
13435 IFS=$as_save_IFS
13436 
13437   ;;
13438 esac
13439 fi
13440 CYGPATH=$ac_cv_path_CYGPATH
13441 if test -n "$CYGPATH"; then
13442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13443 $as_echo "$CYGPATH" >&6; }
13444 else
13445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13446 $as_echo "no" >&6; }
13447 fi
13448 
13449 
13450   test -n "$CYGPATH" && break
13451 done
13452 
13453   else
13454     # The variable is set, but is it from the command line or the environment?
13455 
13456     # Try to remove the string !CYGPATH! from our list.
13457     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13458     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13459       # If it failed, the variable was not from the command line. Ignore it,
13460       # but warn the user (except for BASH, which is always set by the calling BASH).
13461       if test "xCYGPATH" != xBASH; then
13462         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13463 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13464       fi
13465       # Try to locate tool using the code snippet
13466       for ac_prog in cygpath
13467 do
13468   # Extract the first word of "$ac_prog", so it can be a program name with args.
13469 set dummy $ac_prog; ac_word=$2
13470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13471 $as_echo_n "checking for $ac_word... " >&6; }
13472 if ${ac_cv_path_CYGPATH+:} false; then :
13473   $as_echo_n "(cached) " >&6
13474 else
13475   case $CYGPATH in
13476   [\\/]* | ?:[\\/]*)
13477   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13478   ;;
13479   *)
13480   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13481 for as_dir in $PATH
13482 do
13483   IFS=$as_save_IFS
13484   test -z "$as_dir" && as_dir=.
13485     for ac_exec_ext in '' $ac_executable_extensions; do
13486   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13487     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13489     break 2
13490   fi
13491 done
13492   done
13493 IFS=$as_save_IFS
13494 
13495   ;;
13496 esac
13497 fi
13498 CYGPATH=$ac_cv_path_CYGPATH
13499 if test -n "$CYGPATH"; then
13500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13501 $as_echo "$CYGPATH" >&6; }
13502 else
13503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13504 $as_echo "no" >&6; }
13505 fi
13506 
13507 
13508   test -n "$CYGPATH" && break
13509 done
13510 
13511     else
13512       # If it succeeded, then it was overridden by the user. We will use it
13513       # for the tool.
13514 
13515       # First remove it from the list of overridden variables, so we can test
13516       # for unknown variables in the end.
13517       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13518 
13519       # Check if we try to supply an empty value
13520       if test "x$CYGPATH" = x; then
13521         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13522 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13523         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13524 $as_echo_n "checking for CYGPATH... " >&6; }
13525         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13526 $as_echo "disabled" >&6; }
13527       else
13528         # Check if the provided tool contains a complete path.
13529         tool_specified="$CYGPATH"
13530         tool_basename="${tool_specified##*/}"
13531         if test "x$tool_basename" = "x$tool_specified"; then
13532           # A command without a complete path is provided, search $PATH.
13533           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13534 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13535           # Extract the first word of "$tool_basename", so it can be a program name with args.
13536 set dummy $tool_basename; ac_word=$2
13537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13538 $as_echo_n "checking for $ac_word... " >&6; }
13539 if ${ac_cv_path_CYGPATH+:} false; then :
13540   $as_echo_n "(cached) " >&6
13541 else
13542   case $CYGPATH in
13543   [\\/]* | ?:[\\/]*)
13544   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13545   ;;
13546   *)
13547   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13548 for as_dir in $PATH
13549 do
13550   IFS=$as_save_IFS
13551   test -z "$as_dir" && as_dir=.
13552     for ac_exec_ext in '' $ac_executable_extensions; do
13553   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13554     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13555     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13556     break 2
13557   fi
13558 done
13559   done
13560 IFS=$as_save_IFS
13561 
13562   ;;
13563 esac
13564 fi
13565 CYGPATH=$ac_cv_path_CYGPATH
13566 if test -n "$CYGPATH"; then
13567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13568 $as_echo "$CYGPATH" >&6; }
13569 else
13570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13571 $as_echo "no" >&6; }
13572 fi
13573 
13574 
13575           if test "x$CYGPATH" = x; then
13576             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13577           fi
13578         else
13579           # Otherwise we believe it is a complete path. Use it as it is.
13580           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13581 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13582           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13583 $as_echo_n "checking for CYGPATH... " >&6; }
13584           if test ! -x "$tool_specified"; then
13585             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13586 $as_echo "not found" >&6; }
13587             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13588           fi
13589           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13590 $as_echo "$tool_specified" >&6; }
13591         fi
13592       fi
13593     fi
13594 
13595   fi
13596 
13597 
13598 
13599 
13600   # Publish this variable in the help.
13601 
13602 
13603   if [ -z "${READLINK+x}" ]; then
13604     # The variable is not set by user, try to locate tool using the code snippet
13605     for ac_prog in greadlink readlink
13606 do
13607   # Extract the first word of "$ac_prog", so it can be a program name with args.
13608 set dummy $ac_prog; ac_word=$2
13609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13610 $as_echo_n "checking for $ac_word... " >&6; }
13611 if ${ac_cv_path_READLINK+:} false; then :
13612   $as_echo_n "(cached) " >&6
13613 else
13614   case $READLINK in
13615   [\\/]* | ?:[\\/]*)
13616   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13617   ;;
13618   *)
13619   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13620 for as_dir in $PATH
13621 do
13622   IFS=$as_save_IFS
13623   test -z "$as_dir" && as_dir=.
13624     for ac_exec_ext in '' $ac_executable_extensions; do
13625   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13626     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13627     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13628     break 2
13629   fi
13630 done
13631   done
13632 IFS=$as_save_IFS
13633 
13634   ;;
13635 esac
13636 fi
13637 READLINK=$ac_cv_path_READLINK
13638 if test -n "$READLINK"; then
13639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13640 $as_echo "$READLINK" >&6; }
13641 else
13642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13643 $as_echo "no" >&6; }
13644 fi
13645 
13646 
13647   test -n "$READLINK" && break
13648 done
13649 
13650   else
13651     # The variable is set, but is it from the command line or the environment?
13652 
13653     # Try to remove the string !READLINK! from our list.
13654     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13655     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13656       # If it failed, the variable was not from the command line. Ignore it,
13657       # but warn the user (except for BASH, which is always set by the calling BASH).
13658       if test "xREADLINK" != xBASH; then
13659         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13660 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13661       fi
13662       # Try to locate tool using the code snippet
13663       for ac_prog in greadlink readlink
13664 do
13665   # Extract the first word of "$ac_prog", so it can be a program name with args.
13666 set dummy $ac_prog; ac_word=$2
13667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13668 $as_echo_n "checking for $ac_word... " >&6; }
13669 if ${ac_cv_path_READLINK+:} false; then :
13670   $as_echo_n "(cached) " >&6
13671 else
13672   case $READLINK in
13673   [\\/]* | ?:[\\/]*)
13674   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13675   ;;
13676   *)
13677   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13678 for as_dir in $PATH
13679 do
13680   IFS=$as_save_IFS
13681   test -z "$as_dir" && as_dir=.
13682     for ac_exec_ext in '' $ac_executable_extensions; do
13683   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13684     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13685     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13686     break 2
13687   fi
13688 done
13689   done
13690 IFS=$as_save_IFS
13691 
13692   ;;
13693 esac
13694 fi
13695 READLINK=$ac_cv_path_READLINK
13696 if test -n "$READLINK"; then
13697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13698 $as_echo "$READLINK" >&6; }
13699 else
13700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13701 $as_echo "no" >&6; }
13702 fi
13703 
13704 
13705   test -n "$READLINK" && break
13706 done
13707 
13708     else
13709       # If it succeeded, then it was overridden by the user. We will use it
13710       # for the tool.
13711 
13712       # First remove it from the list of overridden variables, so we can test
13713       # for unknown variables in the end.
13714       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13715 
13716       # Check if we try to supply an empty value
13717       if test "x$READLINK" = x; then
13718         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13719 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13720         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13721 $as_echo_n "checking for READLINK... " >&6; }
13722         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13723 $as_echo "disabled" >&6; }
13724       else
13725         # Check if the provided tool contains a complete path.
13726         tool_specified="$READLINK"
13727         tool_basename="${tool_specified##*/}"
13728         if test "x$tool_basename" = "x$tool_specified"; then
13729           # A command without a complete path is provided, search $PATH.
13730           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13731 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13732           # Extract the first word of "$tool_basename", so it can be a program name with args.
13733 set dummy $tool_basename; ac_word=$2
13734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13735 $as_echo_n "checking for $ac_word... " >&6; }
13736 if ${ac_cv_path_READLINK+:} false; then :
13737   $as_echo_n "(cached) " >&6
13738 else
13739   case $READLINK in
13740   [\\/]* | ?:[\\/]*)
13741   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13742   ;;
13743   *)
13744   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13745 for as_dir in $PATH
13746 do
13747   IFS=$as_save_IFS
13748   test -z "$as_dir" && as_dir=.
13749     for ac_exec_ext in '' $ac_executable_extensions; do
13750   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13751     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13752     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13753     break 2
13754   fi
13755 done
13756   done
13757 IFS=$as_save_IFS
13758 
13759   ;;
13760 esac
13761 fi
13762 READLINK=$ac_cv_path_READLINK
13763 if test -n "$READLINK"; then
13764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13765 $as_echo "$READLINK" >&6; }
13766 else
13767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13768 $as_echo "no" >&6; }
13769 fi
13770 
13771 
13772           if test "x$READLINK" = x; then
13773             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13774           fi
13775         else
13776           # Otherwise we believe it is a complete path. Use it as it is.
13777           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13778 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13779           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13780 $as_echo_n "checking for READLINK... " >&6; }
13781           if test ! -x "$tool_specified"; then
13782             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13783 $as_echo "not found" >&6; }
13784             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13785           fi
13786           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13787 $as_echo "$tool_specified" >&6; }
13788         fi
13789       fi
13790     fi
13791 
13792   fi
13793 
13794 
13795 
13796 
13797   # Publish this variable in the help.
13798 
13799 
13800   if [ -z "${DF+x}" ]; then
13801     # The variable is not set by user, try to locate tool using the code snippet
13802     for ac_prog in df
13803 do
13804   # Extract the first word of "$ac_prog", so it can be a program name with args.
13805 set dummy $ac_prog; ac_word=$2
13806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13807 $as_echo_n "checking for $ac_word... " >&6; }
13808 if ${ac_cv_path_DF+:} false; then :
13809   $as_echo_n "(cached) " >&6
13810 else
13811   case $DF in
13812   [\\/]* | ?:[\\/]*)
13813   ac_cv_path_DF="$DF" # Let the user override the test with a path.
13814   ;;
13815   *)
13816   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13817 for as_dir in $PATH
13818 do
13819   IFS=$as_save_IFS
13820   test -z "$as_dir" && as_dir=.
13821     for ac_exec_ext in '' $ac_executable_extensions; do
13822   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13823     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13824     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13825     break 2
13826   fi
13827 done
13828   done
13829 IFS=$as_save_IFS
13830 
13831   ;;
13832 esac
13833 fi
13834 DF=$ac_cv_path_DF
13835 if test -n "$DF"; then
13836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13837 $as_echo "$DF" >&6; }
13838 else
13839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13840 $as_echo "no" >&6; }
13841 fi
13842 
13843 
13844   test -n "$DF" && break
13845 done
13846 
13847   else
13848     # The variable is set, but is it from the command line or the environment?
13849 
13850     # Try to remove the string !DF! from our list.
13851     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13852     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13853       # If it failed, the variable was not from the command line. Ignore it,
13854       # but warn the user (except for BASH, which is always set by the calling BASH).
13855       if test "xDF" != xBASH; then
13856         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13857 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13858       fi
13859       # Try to locate tool using the code snippet
13860       for ac_prog in df
13861 do
13862   # Extract the first word of "$ac_prog", so it can be a program name with args.
13863 set dummy $ac_prog; ac_word=$2
13864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13865 $as_echo_n "checking for $ac_word... " >&6; }
13866 if ${ac_cv_path_DF+:} false; then :
13867   $as_echo_n "(cached) " >&6
13868 else
13869   case $DF in
13870   [\\/]* | ?:[\\/]*)
13871   ac_cv_path_DF="$DF" # Let the user override the test with a path.
13872   ;;
13873   *)
13874   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13875 for as_dir in $PATH
13876 do
13877   IFS=$as_save_IFS
13878   test -z "$as_dir" && as_dir=.
13879     for ac_exec_ext in '' $ac_executable_extensions; do
13880   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13881     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13882     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13883     break 2
13884   fi
13885 done
13886   done
13887 IFS=$as_save_IFS
13888 
13889   ;;
13890 esac
13891 fi
13892 DF=$ac_cv_path_DF
13893 if test -n "$DF"; then
13894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13895 $as_echo "$DF" >&6; }
13896 else
13897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13898 $as_echo "no" >&6; }
13899 fi
13900 
13901 
13902   test -n "$DF" && break
13903 done
13904 
13905     else
13906       # If it succeeded, then it was overridden by the user. We will use it
13907       # for the tool.
13908 
13909       # First remove it from the list of overridden variables, so we can test
13910       # for unknown variables in the end.
13911       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13912 
13913       # Check if we try to supply an empty value
13914       if test "x$DF" = x; then
13915         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
13916 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
13917         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13918 $as_echo_n "checking for DF... " >&6; }
13919         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13920 $as_echo "disabled" >&6; }
13921       else
13922         # Check if the provided tool contains a complete path.
13923         tool_specified="$DF"
13924         tool_basename="${tool_specified##*/}"
13925         if test "x$tool_basename" = "x$tool_specified"; then
13926           # A command without a complete path is provided, search $PATH.
13927           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13928 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13929           # Extract the first word of "$tool_basename", so it can be a program name with args.
13930 set dummy $tool_basename; ac_word=$2
13931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13932 $as_echo_n "checking for $ac_word... " >&6; }
13933 if ${ac_cv_path_DF+:} false; then :
13934   $as_echo_n "(cached) " >&6
13935 else
13936   case $DF in
13937   [\\/]* | ?:[\\/]*)
13938   ac_cv_path_DF="$DF" # Let the user override the test with a path.
13939   ;;
13940   *)
13941   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13942 for as_dir in $PATH
13943 do
13944   IFS=$as_save_IFS
13945   test -z "$as_dir" && as_dir=.
13946     for ac_exec_ext in '' $ac_executable_extensions; do
13947   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13948     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13949     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13950     break 2
13951   fi
13952 done
13953   done
13954 IFS=$as_save_IFS
13955 
13956   ;;
13957 esac
13958 fi
13959 DF=$ac_cv_path_DF
13960 if test -n "$DF"; then
13961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13962 $as_echo "$DF" >&6; }
13963 else
13964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13965 $as_echo "no" >&6; }
13966 fi
13967 
13968 
13969           if test "x$DF" = x; then
13970             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13971           fi
13972         else
13973           # Otherwise we believe it is a complete path. Use it as it is.
13974           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13975 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13976           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13977 $as_echo_n "checking for DF... " >&6; }
13978           if test ! -x "$tool_specified"; then
13979             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13980 $as_echo "not found" >&6; }
13981             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13982           fi
13983           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13984 $as_echo "$tool_specified" >&6; }
13985         fi
13986       fi
13987     fi
13988 
13989   fi
13990 
13991 
13992 
13993 
13994   # Publish this variable in the help.
13995 
13996 
13997   if [ -z "${CPIO+x}" ]; then
13998     # The variable is not set by user, try to locate tool using the code snippet
13999     for ac_prog in cpio bsdcpio
14000 do
14001   # Extract the first word of "$ac_prog", so it can be a program name with args.
14002 set dummy $ac_prog; ac_word=$2
14003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14004 $as_echo_n "checking for $ac_word... " >&6; }
14005 if ${ac_cv_path_CPIO+:} false; then :
14006   $as_echo_n "(cached) " >&6
14007 else
14008   case $CPIO in
14009   [\\/]* | ?:[\\/]*)
14010   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14011   ;;
14012   *)
14013   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14014 for as_dir in $PATH
14015 do
14016   IFS=$as_save_IFS
14017   test -z "$as_dir" && as_dir=.
14018     for ac_exec_ext in '' $ac_executable_extensions; do
14019   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14020     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14021     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14022     break 2
14023   fi
14024 done
14025   done
14026 IFS=$as_save_IFS
14027 
14028   ;;
14029 esac
14030 fi
14031 CPIO=$ac_cv_path_CPIO
14032 if test -n "$CPIO"; then
14033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14034 $as_echo "$CPIO" >&6; }
14035 else
14036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14037 $as_echo "no" >&6; }
14038 fi
14039 
14040 
14041   test -n "$CPIO" && break
14042 done
14043 
14044   else
14045     # The variable is set, but is it from the command line or the environment?
14046 
14047     # Try to remove the string !CPIO! from our list.
14048     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14049     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14050       # If it failed, the variable was not from the command line. Ignore it,
14051       # but warn the user (except for BASH, which is always set by the calling BASH).
14052       if test "xCPIO" != xBASH; then
14053         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14054 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14055       fi
14056       # Try to locate tool using the code snippet
14057       for ac_prog in cpio bsdcpio
14058 do
14059   # Extract the first word of "$ac_prog", so it can be a program name with args.
14060 set dummy $ac_prog; ac_word=$2
14061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14062 $as_echo_n "checking for $ac_word... " >&6; }
14063 if ${ac_cv_path_CPIO+:} false; then :
14064   $as_echo_n "(cached) " >&6
14065 else
14066   case $CPIO in
14067   [\\/]* | ?:[\\/]*)
14068   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14069   ;;
14070   *)
14071   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14072 for as_dir in $PATH
14073 do
14074   IFS=$as_save_IFS
14075   test -z "$as_dir" && as_dir=.
14076     for ac_exec_ext in '' $ac_executable_extensions; do
14077   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14078     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14079     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14080     break 2
14081   fi
14082 done
14083   done
14084 IFS=$as_save_IFS
14085 
14086   ;;
14087 esac
14088 fi
14089 CPIO=$ac_cv_path_CPIO
14090 if test -n "$CPIO"; then
14091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14092 $as_echo "$CPIO" >&6; }
14093 else
14094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14095 $as_echo "no" >&6; }
14096 fi
14097 
14098 
14099   test -n "$CPIO" && break
14100 done
14101 
14102     else
14103       # If it succeeded, then it was overridden by the user. We will use it
14104       # for the tool.
14105 
14106       # First remove it from the list of overridden variables, so we can test
14107       # for unknown variables in the end.
14108       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14109 
14110       # Check if we try to supply an empty value
14111       if test "x$CPIO" = x; then
14112         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14113 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14114         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14115 $as_echo_n "checking for CPIO... " >&6; }
14116         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14117 $as_echo "disabled" >&6; }
14118       else
14119         # Check if the provided tool contains a complete path.
14120         tool_specified="$CPIO"
14121         tool_basename="${tool_specified##*/}"
14122         if test "x$tool_basename" = "x$tool_specified"; then
14123           # A command without a complete path is provided, search $PATH.
14124           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14125 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14126           # Extract the first word of "$tool_basename", so it can be a program name with args.
14127 set dummy $tool_basename; ac_word=$2
14128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14129 $as_echo_n "checking for $ac_word... " >&6; }
14130 if ${ac_cv_path_CPIO+:} false; then :
14131   $as_echo_n "(cached) " >&6
14132 else
14133   case $CPIO in
14134   [\\/]* | ?:[\\/]*)
14135   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14136   ;;
14137   *)
14138   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14139 for as_dir in $PATH
14140 do
14141   IFS=$as_save_IFS
14142   test -z "$as_dir" && as_dir=.
14143     for ac_exec_ext in '' $ac_executable_extensions; do
14144   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14145     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14146     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14147     break 2
14148   fi
14149 done
14150   done
14151 IFS=$as_save_IFS
14152 
14153   ;;
14154 esac
14155 fi
14156 CPIO=$ac_cv_path_CPIO
14157 if test -n "$CPIO"; then
14158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14159 $as_echo "$CPIO" >&6; }
14160 else
14161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14162 $as_echo "no" >&6; }
14163 fi
14164 
14165 
14166           if test "x$CPIO" = x; then
14167             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14168           fi
14169         else
14170           # Otherwise we believe it is a complete path. Use it as it is.
14171           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14172 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14173           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14174 $as_echo_n "checking for CPIO... " >&6; }
14175           if test ! -x "$tool_specified"; then
14176             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14177 $as_echo "not found" >&6; }
14178             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14179           fi
14180           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14181 $as_echo "$tool_specified" >&6; }
14182         fi
14183       fi
14184     fi
14185 
14186   fi
14187 
14188 
14189 
14190 
14191   # Publish this variable in the help.
14192 
14193 
14194   if [ -z "${NICE+x}" ]; then
14195     # The variable is not set by user, try to locate tool using the code snippet
14196     for ac_prog in nice
14197 do
14198   # Extract the first word of "$ac_prog", so it can be a program name with args.
14199 set dummy $ac_prog; ac_word=$2
14200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14201 $as_echo_n "checking for $ac_word... " >&6; }
14202 if ${ac_cv_path_NICE+:} false; then :
14203   $as_echo_n "(cached) " >&6
14204 else
14205   case $NICE in
14206   [\\/]* | ?:[\\/]*)
14207   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14208   ;;
14209   *)
14210   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14211 for as_dir in $PATH
14212 do
14213   IFS=$as_save_IFS
14214   test -z "$as_dir" && as_dir=.
14215     for ac_exec_ext in '' $ac_executable_extensions; do
14216   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14217     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14218     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14219     break 2
14220   fi
14221 done
14222   done
14223 IFS=$as_save_IFS
14224 
14225   ;;
14226 esac
14227 fi
14228 NICE=$ac_cv_path_NICE
14229 if test -n "$NICE"; then
14230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14231 $as_echo "$NICE" >&6; }
14232 else
14233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14234 $as_echo "no" >&6; }
14235 fi
14236 
14237 
14238   test -n "$NICE" && break
14239 done
14240 
14241   else
14242     # The variable is set, but is it from the command line or the environment?
14243 
14244     # Try to remove the string !NICE! from our list.
14245     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14246     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14247       # If it failed, the variable was not from the command line. Ignore it,
14248       # but warn the user (except for BASH, which is always set by the calling BASH).
14249       if test "xNICE" != xBASH; then
14250         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14251 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14252       fi
14253       # Try to locate tool using the code snippet
14254       for ac_prog in nice
14255 do
14256   # Extract the first word of "$ac_prog", so it can be a program name with args.
14257 set dummy $ac_prog; ac_word=$2
14258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14259 $as_echo_n "checking for $ac_word... " >&6; }
14260 if ${ac_cv_path_NICE+:} false; then :
14261   $as_echo_n "(cached) " >&6
14262 else
14263   case $NICE in
14264   [\\/]* | ?:[\\/]*)
14265   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14266   ;;
14267   *)
14268   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14269 for as_dir in $PATH
14270 do
14271   IFS=$as_save_IFS
14272   test -z "$as_dir" && as_dir=.
14273     for ac_exec_ext in '' $ac_executable_extensions; do
14274   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14275     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14276     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14277     break 2
14278   fi
14279 done
14280   done
14281 IFS=$as_save_IFS
14282 
14283   ;;
14284 esac
14285 fi
14286 NICE=$ac_cv_path_NICE
14287 if test -n "$NICE"; then
14288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14289 $as_echo "$NICE" >&6; }
14290 else
14291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14292 $as_echo "no" >&6; }
14293 fi
14294 
14295 
14296   test -n "$NICE" && break
14297 done
14298 
14299     else
14300       # If it succeeded, then it was overridden by the user. We will use it
14301       # for the tool.
14302 
14303       # First remove it from the list of overridden variables, so we can test
14304       # for unknown variables in the end.
14305       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14306 
14307       # Check if we try to supply an empty value
14308       if test "x$NICE" = x; then
14309         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14310 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14311         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14312 $as_echo_n "checking for NICE... " >&6; }
14313         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14314 $as_echo "disabled" >&6; }
14315       else
14316         # Check if the provided tool contains a complete path.
14317         tool_specified="$NICE"
14318         tool_basename="${tool_specified##*/}"
14319         if test "x$tool_basename" = "x$tool_specified"; then
14320           # A command without a complete path is provided, search $PATH.
14321           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14322 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14323           # Extract the first word of "$tool_basename", so it can be a program name with args.
14324 set dummy $tool_basename; ac_word=$2
14325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14326 $as_echo_n "checking for $ac_word... " >&6; }
14327 if ${ac_cv_path_NICE+:} false; then :
14328   $as_echo_n "(cached) " >&6
14329 else
14330   case $NICE in
14331   [\\/]* | ?:[\\/]*)
14332   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14333   ;;
14334   *)
14335   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14336 for as_dir in $PATH
14337 do
14338   IFS=$as_save_IFS
14339   test -z "$as_dir" && as_dir=.
14340     for ac_exec_ext in '' $ac_executable_extensions; do
14341   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14342     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14343     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14344     break 2
14345   fi
14346 done
14347   done
14348 IFS=$as_save_IFS
14349 
14350   ;;
14351 esac
14352 fi
14353 NICE=$ac_cv_path_NICE
14354 if test -n "$NICE"; then
14355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14356 $as_echo "$NICE" >&6; }
14357 else
14358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14359 $as_echo "no" >&6; }
14360 fi
14361 
14362 
14363           if test "x$NICE" = x; then
14364             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14365           fi
14366         else
14367           # Otherwise we believe it is a complete path. Use it as it is.
14368           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14369 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14370           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14371 $as_echo_n "checking for NICE... " >&6; }
14372           if test ! -x "$tool_specified"; then
14373             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14374 $as_echo "not found" >&6; }
14375             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14376           fi
14377           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14378 $as_echo "$tool_specified" >&6; }
14379         fi
14380       fi
14381     fi
14382 
14383   fi
14384 
14385 
14386 
14387 
14388 # Now we can determine OpenJDK build and target platforms. This is required to
14389 # have early on.
14390 # Make sure we can run config.sub.
14391 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14392   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14393 
14394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14395 $as_echo_n "checking build system type... " >&6; }
14396 if ${ac_cv_build+:} false; then :
14397   $as_echo_n "(cached) " >&6
14398 else
14399   ac_build_alias=$build_alias
14400 test "x$ac_build_alias" = x &&
14401   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14402 test "x$ac_build_alias" = x &&
14403   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14404 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14405   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14406 
14407 fi
14408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14409 $as_echo "$ac_cv_build" >&6; }
14410 case $ac_cv_build in
14411 *-*-*) ;;
14412 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14413 esac
14414 build=$ac_cv_build
14415 ac_save_IFS=$IFS; IFS='-'
14416 set x $ac_cv_build
14417 shift
14418 build_cpu=$1
14419 build_vendor=$2
14420 shift; shift
14421 # Remember, the first character of IFS is used to create $*,
14422 # except with old shells:
14423 build_os=$*
14424 IFS=$ac_save_IFS
14425 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14426 
14427 
14428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14429 $as_echo_n "checking host system type... " >&6; }
14430 if ${ac_cv_host+:} false; then :
14431   $as_echo_n "(cached) " >&6
14432 else
14433   if test "x$host_alias" = x; then
14434   ac_cv_host=$ac_cv_build
14435 else
14436   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14437     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14438 fi
14439 
14440 fi
14441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14442 $as_echo "$ac_cv_host" >&6; }
14443 case $ac_cv_host in
14444 *-*-*) ;;
14445 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14446 esac
14447 host=$ac_cv_host
14448 ac_save_IFS=$IFS; IFS='-'
14449 set x $ac_cv_host
14450 shift
14451 host_cpu=$1
14452 host_vendor=$2
14453 shift; shift
14454 # Remember, the first character of IFS is used to create $*,
14455 # except with old shells:
14456 host_os=$*
14457 IFS=$ac_save_IFS
14458 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14459 
14460 
14461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14462 $as_echo_n "checking target system type... " >&6; }
14463 if ${ac_cv_target+:} false; then :
14464   $as_echo_n "(cached) " >&6
14465 else
14466   if test "x$target_alias" = x; then
14467   ac_cv_target=$ac_cv_host
14468 else
14469   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14470     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14471 fi
14472 
14473 fi
14474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14475 $as_echo "$ac_cv_target" >&6; }
14476 case $ac_cv_target in
14477 *-*-*) ;;
14478 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14479 esac
14480 target=$ac_cv_target
14481 ac_save_IFS=$IFS; IFS='-'
14482 set x $ac_cv_target
14483 shift
14484 target_cpu=$1
14485 target_vendor=$2
14486 shift; shift
14487 # Remember, the first character of IFS is used to create $*,
14488 # except with old shells:
14489 target_os=$*
14490 IFS=$ac_save_IFS
14491 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14492 
14493 
14494 # The aliases save the names the user supplied, while $host etc.
14495 # will get canonicalized.
14496 test -n "$target_alias" &&
14497   test "$program_prefix$program_suffix$program_transform_name" = \
14498     NONENONEs,x,x, &&
14499   program_prefix=${target_alias}-
14500 
14501   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14502   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14503   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14504   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14505   # to use the configure naming style.
14506 
14507 
14508 
14509 
14510 
14511   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14512   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14513   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14514   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14515   OPENJDK_TARGET_AUTOCONF_NAME="$host"
14516   OPENJDK_BUILD_AUTOCONF_NAME="$build"
14517 
14518 
14519 
14520   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14521 
14522   case "$build_os" in
14523     *linux*)
14524       VAR_OS=linux
14525       VAR_OS_TYPE=unix
14526       ;;
14527     *solaris*)
14528       VAR_OS=solaris
14529       VAR_OS_TYPE=unix
14530       ;;
14531     *darwin*)
14532       VAR_OS=macosx
14533       VAR_OS_TYPE=unix
14534       ;;
14535     *bsd*)
14536       VAR_OS=bsd
14537       VAR_OS_TYPE=unix
14538       ;;
14539     *cygwin*)
14540       VAR_OS=windows
14541       VAR_OS_ENV=windows.cygwin
14542       ;;
14543     *mingw*)
14544       VAR_OS=windows
14545       VAR_OS_ENV=windows.msys
14546       ;;
14547     *aix*)
14548       VAR_OS=aix
14549       VAR_OS_TYPE=unix
14550       ;;
14551     *)
14552       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14553       ;;
14554   esac
14555 
14556 
14557   # First argument is the cpu name from the trip/quad
14558   case "$build_cpu" in
14559     x86_64)
14560       VAR_CPU=x86_64
14561       VAR_CPU_ARCH=x86
14562       VAR_CPU_BITS=64
14563       VAR_CPU_ENDIAN=little
14564       ;;
14565     i?86)
14566       VAR_CPU=x86
14567       VAR_CPU_ARCH=x86
14568       VAR_CPU_BITS=32
14569       VAR_CPU_ENDIAN=little
14570       ;;
14571     arm*)
14572       VAR_CPU=arm
14573       VAR_CPU_ARCH=arm
14574       VAR_CPU_BITS=32
14575       VAR_CPU_ENDIAN=little
14576       ;;
14577     aarch64)
14578       VAR_CPU=aarch64
14579       VAR_CPU_ARCH=aarch64
14580       VAR_CPU_BITS=64
14581       VAR_CPU_ENDIAN=little
14582       ;;
14583     powerpc)
14584       VAR_CPU=ppc
14585       VAR_CPU_ARCH=ppc
14586       VAR_CPU_BITS=32
14587       VAR_CPU_ENDIAN=big
14588       ;;
14589     powerpc64)
14590       VAR_CPU=ppc64
14591       VAR_CPU_ARCH=ppc
14592       VAR_CPU_BITS=64
14593       VAR_CPU_ENDIAN=big
14594       ;;
14595     powerpc64le)
14596       VAR_CPU=ppc64
14597       VAR_CPU_ARCH=ppc
14598       VAR_CPU_BITS=64
14599       VAR_CPU_ENDIAN=little
14600       ;;
14601     s390)
14602       VAR_CPU=s390
14603       VAR_CPU_ARCH=s390
14604       VAR_CPU_BITS=32
14605       VAR_CPU_ENDIAN=big
14606       ;;
14607     s390x)
14608       VAR_CPU=s390x
14609       VAR_CPU_ARCH=s390
14610       VAR_CPU_BITS=64
14611       VAR_CPU_ENDIAN=big
14612       ;;
14613     sparc)
14614       VAR_CPU=sparc
14615       VAR_CPU_ARCH=sparc
14616       VAR_CPU_BITS=32
14617       VAR_CPU_ENDIAN=big
14618       ;;
14619     sparcv9|sparc64)
14620       VAR_CPU=sparcv9
14621       VAR_CPU_ARCH=sparc
14622       VAR_CPU_BITS=64
14623       VAR_CPU_ENDIAN=big
14624       ;;
14625     *)
14626       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14627       ;;
14628   esac
14629 
14630   # ..and setup our own variables. (Do this explicitely to facilitate searching)
14631   OPENJDK_BUILD_OS="$VAR_OS"
14632   if test "x$VAR_OS_TYPE" != x; then
14633     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14634   else
14635     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14636   fi
14637   if test "x$VAR_OS_ENV" != x; then
14638     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14639   else
14640     OPENJDK_BUILD_OS_ENV="$VAR_OS"
14641   fi
14642   OPENJDK_BUILD_CPU="$VAR_CPU"
14643   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14644   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14645   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14646 
14647 
14648 
14649 
14650 
14651 
14652 
14653 
14654   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14655 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
14656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14657 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14658 
14659   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14660 
14661   case "$host_os" in
14662     *linux*)
14663       VAR_OS=linux
14664       VAR_OS_TYPE=unix
14665       ;;
14666     *solaris*)
14667       VAR_OS=solaris
14668       VAR_OS_TYPE=unix
14669       ;;
14670     *darwin*)
14671       VAR_OS=macosx
14672       VAR_OS_TYPE=unix
14673       ;;
14674     *bsd*)
14675       VAR_OS=bsd
14676       VAR_OS_TYPE=unix
14677       ;;
14678     *cygwin*)
14679       VAR_OS=windows
14680       VAR_OS_ENV=windows.cygwin
14681       ;;
14682     *mingw*)
14683       VAR_OS=windows
14684       VAR_OS_ENV=windows.msys
14685       ;;
14686     *aix*)
14687       VAR_OS=aix
14688       VAR_OS_TYPE=unix
14689       ;;
14690     *)
14691       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14692       ;;
14693   esac
14694 
14695 
14696   # First argument is the cpu name from the trip/quad
14697   case "$host_cpu" in
14698     x86_64)
14699       VAR_CPU=x86_64
14700       VAR_CPU_ARCH=x86
14701       VAR_CPU_BITS=64
14702       VAR_CPU_ENDIAN=little
14703       ;;
14704     i?86)
14705       VAR_CPU=x86
14706       VAR_CPU_ARCH=x86
14707       VAR_CPU_BITS=32
14708       VAR_CPU_ENDIAN=little
14709       ;;
14710     arm*)
14711       VAR_CPU=arm
14712       VAR_CPU_ARCH=arm
14713       VAR_CPU_BITS=32
14714       VAR_CPU_ENDIAN=little
14715       ;;
14716     aarch64)
14717       VAR_CPU=aarch64
14718       VAR_CPU_ARCH=aarch64
14719       VAR_CPU_BITS=64
14720       VAR_CPU_ENDIAN=little
14721       ;;
14722     powerpc)
14723       VAR_CPU=ppc
14724       VAR_CPU_ARCH=ppc
14725       VAR_CPU_BITS=32
14726       VAR_CPU_ENDIAN=big
14727       ;;
14728     powerpc64)
14729       VAR_CPU=ppc64
14730       VAR_CPU_ARCH=ppc
14731       VAR_CPU_BITS=64
14732       VAR_CPU_ENDIAN=big
14733       ;;
14734     powerpc64le)
14735       VAR_CPU=ppc64
14736       VAR_CPU_ARCH=ppc
14737       VAR_CPU_BITS=64
14738       VAR_CPU_ENDIAN=little
14739       ;;
14740     s390)
14741       VAR_CPU=s390
14742       VAR_CPU_ARCH=s390
14743       VAR_CPU_BITS=32
14744       VAR_CPU_ENDIAN=big
14745       ;;
14746     s390x)
14747       VAR_CPU=s390x
14748       VAR_CPU_ARCH=s390
14749       VAR_CPU_BITS=64
14750       VAR_CPU_ENDIAN=big
14751       ;;
14752     sparc)
14753       VAR_CPU=sparc
14754       VAR_CPU_ARCH=sparc
14755       VAR_CPU_BITS=32
14756       VAR_CPU_ENDIAN=big
14757       ;;
14758     sparcv9|sparc64)
14759       VAR_CPU=sparcv9
14760       VAR_CPU_ARCH=sparc
14761       VAR_CPU_BITS=64
14762       VAR_CPU_ENDIAN=big
14763       ;;
14764     *)
14765       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14766       ;;
14767   esac
14768 
14769   # ... and setup our own variables. (Do this explicitely to facilitate searching)
14770   OPENJDK_TARGET_OS="$VAR_OS"
14771   if test "x$VAR_OS_TYPE" != x; then
14772     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14773   else
14774     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14775   fi
14776   if test "x$VAR_OS_ENV" != x; then
14777     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14778   else
14779     OPENJDK_TARGET_OS_ENV="$VAR_OS"
14780   fi
14781   OPENJDK_TARGET_CPU="$VAR_CPU"
14782   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14783   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14784   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14785 
14786 
14787 
14788 
14789 
14790 
14791 
14792 
14793   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14794 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
14795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14796 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14797 
14798 
14799 
14800 # Check whether --with-target-bits was given.
14801 if test "${with_target_bits+set}" = set; then :
14802   withval=$with_target_bits;
14803 fi
14804 
14805 
14806   # We have three types of compiles:
14807   # native  == normal compilation, target system == build system
14808   # cross   == traditional cross compilation, target system != build system; special toolchain needed
14809   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14810   #
14811   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14812     # We're doing a proper cross-compilation
14813     COMPILE_TYPE="cross"
14814   else
14815     COMPILE_TYPE="native"
14816   fi
14817 
14818   if test "x$with_target_bits" != x; then
14819     if test "x$COMPILE_TYPE" = "xcross"; then
14820       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
14821     fi
14822 
14823     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14824       # A reduced build is requested
14825       COMPILE_TYPE="reduced"
14826       OPENJDK_TARGET_CPU_BITS=32
14827       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
14828         OPENJDK_TARGET_CPU=x86
14829       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
14830         OPENJDK_TARGET_CPU=sparc
14831       else
14832         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
14833       fi
14834     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
14835       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
14836     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
14837       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
14838 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
14839     else
14840       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
14841     fi
14842   fi
14843 
14844 
14845   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
14846 $as_echo_n "checking compilation type... " >&6; }
14847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
14848 $as_echo "$COMPILE_TYPE" >&6; }
14849 
14850 
14851   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
14852     REQUIRED_OS_NAME=SunOS
14853     REQUIRED_OS_VERSION=5.10
14854   fi
14855   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
14856     REQUIRED_OS_NAME=Linux
14857     REQUIRED_OS_VERSION=2.6
14858   fi
14859   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14860     REQUIRED_OS_NAME=Windows
14861     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
14862       REQUIRED_OS_VERSION=5.2
14863     else
14864       REQUIRED_OS_VERSION=5.1
14865     fi
14866   fi
14867   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14868     REQUIRED_OS_NAME=Darwin
14869     REQUIRED_OS_VERSION=11.2
14870   fi
14871 
14872 
14873 
14874 
14875 
14876   # Also store the legacy naming of the cpu.
14877   # Ie i586 and amd64 instead of x86 and x86_64
14878   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
14879   if test "x$OPENJDK_TARGET_CPU" = xx86; then
14880     OPENJDK_TARGET_CPU_LEGACY="i586"
14881   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14882     # On all platforms except MacOSX replace x86_64 with amd64.
14883     OPENJDK_TARGET_CPU_LEGACY="amd64"
14884   fi
14885 
14886 
14887   # And the second legacy naming of the cpu.
14888   # Ie i386 and amd64 instead of x86 and x86_64.
14889   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14890   if test "x$OPENJDK_TARGET_CPU" = xx86; then
14891     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14892   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14893     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14894   fi
14895 
14896 
14897   # This is the name of the cpu (but using i386 and amd64 instead of
14898   # x86 and x86_64, respectively), preceeded by a /, to be used when
14899   # locating libraries. On macosx, it's empty, though.
14900   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14901   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14902     OPENJDK_TARGET_CPU_LIBDIR=""
14903   fi
14904 
14905 
14906   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
14907   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
14908   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
14909   OPENJDK_TARGET_CPU_ISADIR=""
14910   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14911     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14912       OPENJDK_TARGET_CPU_ISADIR="/amd64"
14913     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
14914       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
14915     fi
14916   fi
14917 
14918 
14919   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
14920   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
14921   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
14922     # On linux only, we replace x86 with i386.
14923     OPENJDK_TARGET_CPU_OSARCH="i386"
14924   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14925     # On all platforms except macosx, we replace x86_64 with amd64.
14926     OPENJDK_TARGET_CPU_OSARCH="amd64"
14927   fi
14928 
14929 
14930   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14931   if test "x$OPENJDK_TARGET_CPU" = xx86; then
14932     OPENJDK_TARGET_CPU_JLI="i386"
14933   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14934     # On all platforms except macosx, we replace x86_64 with amd64.
14935     OPENJDK_TARGET_CPU_JLI="amd64"
14936   fi
14937   # Now setup the -D flags for building libjli.
14938   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14939   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14940     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14941       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14942     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14943       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14944     fi
14945   fi
14946 
14947 
14948   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14949       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14950   else
14951       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14952   fi
14953 
14954 
14955   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14956     A_LP64="LP64:="
14957     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14958     # unpack200.exe
14959     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14960       ADD_LP64="-D_LP64=1"
14961     fi
14962   fi
14963   LP64=$A_LP64
14964 
14965 
14966   if test "x$COMPILE_TYPE" = "xcross"; then
14967     # FIXME: ... or should this include reduced builds..?
14968     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14969   else
14970     DEFINE_CROSS_COMPILE_ARCH=""
14971   fi
14972 
14973 
14974   # ZERO_ARCHDEF is used to enable architecture-specific code
14975   case "${OPENJDK_TARGET_CPU}" in
14976     ppc)     ZERO_ARCHDEF=PPC32 ;;
14977     ppc64)   ZERO_ARCHDEF=PPC64 ;;
14978     s390*)   ZERO_ARCHDEF=S390  ;;
14979     sparc*)  ZERO_ARCHDEF=SPARC ;;
14980     x86_64*) ZERO_ARCHDEF=AMD64 ;;
14981     x86)     ZERO_ARCHDEF=IA32  ;;
14982     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14983   esac
14984 
14985 
14986 
14987 
14988 # Continue setting up basic stuff. Most remaining code require fundamental tools.
14989 
14990   # Save the current directory this script was started from
14991   CURDIR="$PWD"
14992 
14993   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
14994   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
14995   # was not available at that time.
14996   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
14997   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
14998     ORIGINAL_PATH="$REWRITTEN_PATH"
14999     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15000 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15001   fi
15002 
15003   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15004     PATH_SEP=";"
15005 
15006   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15007   if test $SRC_ROOT_LENGTH -gt 100; then
15008     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15009   fi
15010 
15011   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15012     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15013 $as_echo_n "checking cygwin release... " >&6; }
15014     CYGWIN_VERSION=`$UNAME -r`
15015     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15016 $as_echo "$CYGWIN_VERSION" >&6; }
15017     WINDOWS_ENV_VENDOR='cygwin'
15018     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15019 
15020     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15021     if test "x$CYGWIN_VERSION_OLD" != x; then
15022       { $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
15023 $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;}
15024       as_fn_error $? "Cannot continue" "$LINENO" 5
15025     fi
15026     if test "x$CYGPATH" = x; then
15027       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15028     fi
15029     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15030 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15031     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15032     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15033     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15034     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15035     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15036 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
15037     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15038     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15039     if test "x$test_cygdrive_prefix" = x; then
15040       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15041     fi
15042   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15043     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15044 $as_echo_n "checking msys release... " >&6; }
15045     MSYS_VERSION=`$UNAME -r`
15046     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15047 $as_echo "$MSYS_VERSION" >&6; }
15048 
15049     WINDOWS_ENV_VENDOR='msys'
15050     WINDOWS_ENV_VERSION="$MSYS_VERSION"
15051 
15052     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15053 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
15054     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15055     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15056 
15057   windows_path="$MSYS_ROOT_PATH"
15058   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15059     unix_path=`$CYGPATH -u "$windows_path"`
15060     MSYS_ROOT_PATH="$unix_path"
15061   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15062     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15063     MSYS_ROOT_PATH="$unix_path"
15064   fi
15065 
15066     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15067 $as_echo "$MSYS_ROOT_PATH" >&6; }
15068     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15069   else
15070     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15071   fi
15072 
15073   # Test if windows or unix (cygwin/msys) find is first in path.
15074   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15075 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15076   FIND_BINARY_OUTPUT=`find --version 2>&1`
15077   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15078     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15079 $as_echo "unix style" >&6; }
15080   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15081     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15082 $as_echo "Windows" >&6; }
15083     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15084 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15085     { $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
15086 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15087     as_fn_error $? "Cannot continue" "$LINENO" 5
15088   else
15089     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15090 $as_echo "unknown" >&6; }
15091     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15092 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15093   fi
15094 
15095   else
15096     PATH_SEP=":"
15097   fi
15098 
15099 
15100   # We get the top-level directory from the supporting wrappers.
15101   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15102 $as_echo_n "checking for top-level directory... " >&6; }
15103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15104 $as_echo "$TOPDIR" >&6; }
15105 
15106 
15107   # Save the original version of TOPDIR for string comparisons
15108   ORIGINAL_TOPDIR="$TOPDIR"
15109 
15110 
15111   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15112 
15113   # Only process if variable expands to non-empty
15114 
15115   if test "x$CURDIR" != x; then
15116     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15117 
15118   # Input might be given as Windows format, start by converting to
15119   # unix format.
15120   path="$CURDIR"
15121   new_path=`$CYGPATH -u "$path"`
15122 
15123   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15124   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15125   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15126   # "foo.exe" is OK but "foo" is an error.
15127   #
15128   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15129   # It is also a way to make sure we got the proper file name for the real test later on.
15130   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15131   if test "x$test_shortpath" = x; then
15132     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15133 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15134     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15135   fi
15136 
15137   # Call helper function which possibly converts this using DOS-style short mode.
15138   # If so, the updated path is stored in $new_path.
15139 
15140   input_path="$new_path"
15141   # Check if we need to convert this using DOS-style short mode. If the path
15142   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15143   # take no chances and rewrite it.
15144   # Note: m4 eats our [], so we need to use [ and ] instead.
15145   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15146   if test "x$has_forbidden_chars" != x; then
15147     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15148     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15149     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15150     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15151       # Going to short mode and back again did indeed matter. Since short mode is
15152       # case insensitive, let's make it lowercase to improve readability.
15153       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15154       # Now convert it back to Unix-style (cygpath)
15155       input_path=`$CYGPATH -u "$shortmode_path"`
15156       new_path="$input_path"
15157     fi
15158   fi
15159 
15160   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15161   if test "x$test_cygdrive_prefix" = x; then
15162     # As a simple fix, exclude /usr/bin since it's not a real path.
15163     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15164       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15165       # a path prefixed by /cygdrive for fixpath to work.
15166       new_path="$CYGWIN_ROOT_PATH$input_path"
15167     fi
15168   fi
15169 
15170 
15171   if test "x$path" != "x$new_path"; then
15172     CURDIR="$new_path"
15173     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15174 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15175   fi
15176 
15177     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15178 
15179   path="$CURDIR"
15180   has_colon=`$ECHO $path | $GREP ^.:`
15181   new_path="$path"
15182   if test "x$has_colon" = x; then
15183     # Not in mixed or Windows style, start by that.
15184     new_path=`cmd //c echo $path`
15185   fi
15186 
15187 
15188   input_path="$new_path"
15189   # Check if we need to convert this using DOS-style short mode. If the path
15190   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15191   # take no chances and rewrite it.
15192   # Note: m4 eats our [], so we need to use [ and ] instead.
15193   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15194   if test "x$has_forbidden_chars" != x; then
15195     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15196     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15197   fi
15198 
15199 
15200   windows_path="$new_path"
15201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15202     unix_path=`$CYGPATH -u "$windows_path"`
15203     new_path="$unix_path"
15204   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15205     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15206     new_path="$unix_path"
15207   fi
15208 
15209   if test "x$path" != "x$new_path"; then
15210     CURDIR="$new_path"
15211     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15212 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15213   fi
15214 
15215   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15216   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15217 
15218     else
15219       # We're on a unix platform. Hooray! :)
15220       path="$CURDIR"
15221       has_space=`$ECHO "$path" | $GREP " "`
15222       if test "x$has_space" != x; then
15223         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15224 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15225         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15226       fi
15227 
15228       # Use eval to expand a potential ~
15229       eval path="$path"
15230       if test ! -f "$path" && test ! -d "$path"; then
15231         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15232       fi
15233 
15234       CURDIR="`cd "$path"; $THEPWDCMD -L`"
15235     fi
15236   fi
15237 
15238 
15239   # Only process if variable expands to non-empty
15240 
15241   if test "x$TOPDIR" != x; then
15242     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15243 
15244   # Input might be given as Windows format, start by converting to
15245   # unix format.
15246   path="$TOPDIR"
15247   new_path=`$CYGPATH -u "$path"`
15248 
15249   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15250   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15251   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15252   # "foo.exe" is OK but "foo" is an error.
15253   #
15254   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15255   # It is also a way to make sure we got the proper file name for the real test later on.
15256   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15257   if test "x$test_shortpath" = x; then
15258     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15259 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15260     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15261   fi
15262 
15263   # Call helper function which possibly converts this using DOS-style short mode.
15264   # If so, the updated path is stored in $new_path.
15265 
15266   input_path="$new_path"
15267   # Check if we need to convert this using DOS-style short mode. If the path
15268   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15269   # take no chances and rewrite it.
15270   # Note: m4 eats our [], so we need to use [ and ] instead.
15271   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15272   if test "x$has_forbidden_chars" != x; then
15273     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15274     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15275     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15276     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15277       # Going to short mode and back again did indeed matter. Since short mode is
15278       # case insensitive, let's make it lowercase to improve readability.
15279       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15280       # Now convert it back to Unix-style (cygpath)
15281       input_path=`$CYGPATH -u "$shortmode_path"`
15282       new_path="$input_path"
15283     fi
15284   fi
15285 
15286   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15287   if test "x$test_cygdrive_prefix" = x; then
15288     # As a simple fix, exclude /usr/bin since it's not a real path.
15289     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15290       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15291       # a path prefixed by /cygdrive for fixpath to work.
15292       new_path="$CYGWIN_ROOT_PATH$input_path"
15293     fi
15294   fi
15295 
15296 
15297   if test "x$path" != "x$new_path"; then
15298     TOPDIR="$new_path"
15299     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15300 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15301   fi
15302 
15303     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15304 
15305   path="$TOPDIR"
15306   has_colon=`$ECHO $path | $GREP ^.:`
15307   new_path="$path"
15308   if test "x$has_colon" = x; then
15309     # Not in mixed or Windows style, start by that.
15310     new_path=`cmd //c echo $path`
15311   fi
15312 
15313 
15314   input_path="$new_path"
15315   # Check if we need to convert this using DOS-style short mode. If the path
15316   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15317   # take no chances and rewrite it.
15318   # Note: m4 eats our [], so we need to use [ and ] instead.
15319   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15320   if test "x$has_forbidden_chars" != x; then
15321     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15322     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15323   fi
15324 
15325 
15326   windows_path="$new_path"
15327   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15328     unix_path=`$CYGPATH -u "$windows_path"`
15329     new_path="$unix_path"
15330   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15331     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15332     new_path="$unix_path"
15333   fi
15334 
15335   if test "x$path" != "x$new_path"; then
15336     TOPDIR="$new_path"
15337     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15338 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15339   fi
15340 
15341   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15342   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15343 
15344     else
15345       # We're on a unix platform. Hooray! :)
15346       path="$TOPDIR"
15347       has_space=`$ECHO "$path" | $GREP " "`
15348       if test "x$has_space" != x; then
15349         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15350 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15351         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15352       fi
15353 
15354       # Use eval to expand a potential ~
15355       eval path="$path"
15356       if test ! -f "$path" && test ! -d "$path"; then
15357         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15358       fi
15359 
15360       TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15361     fi
15362   fi
15363 
15364   # SRC_ROOT is a traditional alias for TOPDIR.
15365   SRC_ROOT=$TOPDIR
15366 
15367   # Calculate a canonical version of TOPDIR for string comparisons
15368   CANONICAL_TOPDIR=$TOPDIR
15369 
15370   if test "x$OPENJDK_BUILD_OS" != xwindows; then
15371     # Follow a chain of symbolic links. Use readlink
15372     # where it exists, else fall back to horribly
15373     # complicated shell code.
15374     if test "x$READLINK_TESTED" != yes; then
15375       # On MacOSX there is a readlink tool with a different
15376       # purpose than the GNU readlink tool. Check the found readlink.
15377       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15378       if test "x$ISGNU" = x; then
15379         # A readlink that we do not know how to use.
15380         # Are there other non-GNU readlinks out there?
15381         READLINK_TESTED=yes
15382         READLINK=
15383       fi
15384     fi
15385 
15386     if test "x$READLINK" != x; then
15387       CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15388     else
15389       # Save the current directory for restoring afterwards
15390       STARTDIR=$PWD
15391       COUNTER=0
15392       sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15393       sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15394       cd $sym_link_dir
15395       # Use -P flag to resolve symlinks in directories.
15396       cd `$THEPWDCMD -P`
15397       sym_link_dir=`$THEPWDCMD -P`
15398       # Resolve file symlinks
15399       while test $COUNTER -lt 20; do
15400         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15401         if test "x$ISLINK" == x; then
15402           # This is not a symbolic link! We are done!
15403           break
15404         fi
15405         # Again resolve directory symlinks since the target of the just found
15406         # link could be in a different directory
15407         cd `$DIRNAME $ISLINK`
15408         sym_link_dir=`$THEPWDCMD -P`
15409         sym_link_file=`$BASENAME $ISLINK`
15410         let COUNTER=COUNTER+1
15411       done
15412       cd $STARTDIR
15413       CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15414     fi
15415   fi
15416 
15417 
15418 
15419   # Locate the directory of this script.
15420   AUTOCONF_DIR=$TOPDIR/common/autoconf
15421 
15422 
15423 # Check if it's a pure open build or if custom sources are to be used.
15424 
15425   # Check whether --enable-openjdk-only was given.
15426 if test "${enable_openjdk_only+set}" = set; then :
15427   enableval=$enable_openjdk_only;
15428 else
15429   enable_openjdk_only="no"
15430 fi
15431 
15432 
15433   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15434 $as_echo_n "checking for presence of closed sources... " >&6; }
15435   if test -d "$SRC_ROOT/jdk/src/closed"; then
15436     CLOSED_SOURCE_PRESENT=yes
15437   else
15438     CLOSED_SOURCE_PRESENT=no
15439   fi
15440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15441 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15442 
15443   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15444 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15445   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15447 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15448 
15449   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15450     OPENJDK=true
15451     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15452       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15453 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15454     fi
15455   else
15456     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15457       OPENJDK=true
15458     else
15459       OPENJDK=false
15460     fi
15461   fi
15462 
15463   if test "x$OPENJDK" = "xtrue"; then
15464     SET_OPENJDK="OPENJDK=true"
15465   fi
15466 
15467 
15468 
15469   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15470   # the IncludeCustomExtension macro.
15471 
15472 
15473 # Check whether --with-custom-make-dir was given.
15474 if test "${with_custom_make_dir+set}" = set; then :
15475   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
15476 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15477 fi
15478 
15479 
15480 
15481 
15482 # These are needed to be able to create a configuration name (and thus the output directory)
15483 
15484   ###############################################################################
15485   #
15486   # Check which variant of the JDK that we want to build.
15487   # Currently we have:
15488   #    normal:   standard edition
15489   # but the custom make system may add other variants
15490   #
15491   # Effectively the JDK variant gives a name to a specific set of
15492   # modules to compile into the JDK. In the future, these modules
15493   # might even be Jigsaw modules.
15494   #
15495   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15496 $as_echo_n "checking which variant of the JDK to build... " >&6; }
15497 
15498 # Check whether --with-jdk-variant was given.
15499 if test "${with_jdk_variant+set}" = set; then :
15500   withval=$with_jdk_variant;
15501 fi
15502 
15503 
15504   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15505     JDK_VARIANT="normal"
15506   else
15507     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15508   fi
15509 
15510 
15511 
15512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15513 $as_echo "$JDK_VARIANT" >&6; }
15514 
15515 
15516 ###############################################################################
15517 #
15518 # Check which interpreter of the JVM we want to build.
15519 # Currently we have:
15520 #    template: Template interpreter (the default)
15521 #    cpp     : C++ interpreter
15522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15523 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15524 
15525 # Check whether --with-jvm-interpreter was given.
15526 if test "${with_jvm_interpreter+set}" = set; then :
15527   withval=$with_jvm_interpreter;
15528 fi
15529 
15530 
15531 if test "x$with_jvm_interpreter" = x; then
15532      with_jvm_interpreter="template"
15533 fi
15534 
15535 JVM_INTERPRETER="$with_jvm_interpreter"
15536 
15537 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15538    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15539 fi
15540 
15541 
15542 
15543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
15544 $as_echo "$with_jvm_interpreter" >&6; }
15545 
15546 
15547 
15548   ###############################################################################
15549   #
15550   # Check which variants of the JVM that we want to build.
15551   # Currently we have:
15552   #    server: normal interpreter and a tiered C1/C2 compiler
15553   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
15554   #    minimal1: reduced form of client with optional VM services and features stripped out
15555   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
15556   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
15557   #    zero: no machine code interpreter, no compiler
15558   #    zeroshark: zero interpreter and shark/llvm compiler backend
15559 #    core: interpreter only, no compiler (only works on some platforms)
15560   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15561 $as_echo_n "checking which variants of the JVM to build... " >&6; }
15562 
15563 # Check whether --with-jvm-variants was given.
15564 if test "${with_jvm_variants+set}" = set; then :
15565   withval=$with_jvm_variants;
15566 fi
15567 
15568 
15569   if test "x$with_jvm_variants" = x; then
15570     with_jvm_variants="server"
15571   fi
15572 
15573   JVM_VARIANTS=",$with_jvm_variants,"
15574   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,//'`
15575 
15576   if test "x$TEST_VARIANTS" != "x,"; then
15577      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
15578   fi
15579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15580 $as_echo "$with_jvm_variants" >&6; }
15581 
15582   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15583   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15584   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15585   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
15586   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15587   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15588   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15589 
15590   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15591     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15592       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15593     fi
15594   fi
15595   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15596     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15597       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
15598     fi
15599   fi
15600   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15601     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15602       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15603     fi
15604   fi
15605 
15606   # Replace the commas with AND for use in the build directory name.
15607   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15608   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/'`
15609   if test "x$COUNT_VARIANTS" != "x,1"; then
15610     BUILDING_MULTIPLE_JVM_VARIANTS=yes
15611   else
15612     BUILDING_MULTIPLE_JVM_VARIANTS=no
15613   fi
15614 
15615 
15616 
15617 
15618 
15619 
15620 
15621 
15622 
15623 
15624   INCLUDE_SA=true
15625   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15626     INCLUDE_SA=false
15627   fi
15628   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15629     INCLUDE_SA=false
15630   fi
15631   if test "x$OPENJDK_TARGET_OS" = xaix ; then
15632     INCLUDE_SA=false
15633   fi
15634   if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15635     INCLUDE_SA=false
15636   fi
15637 
15638 
15639   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15640     MACOSX_UNIVERSAL="true"
15641   fi
15642 
15643 
15644 
15645 
15646   ###############################################################################
15647   #
15648   # Set the debug level
15649   #    release: no debug information, all optimizations, no asserts.
15650   #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
15651   #    fastdebug: debug information (-g), all optimizations, all asserts
15652   #    slowdebug: debug information (-g), no optimizations, all asserts
15653   #
15654   DEBUG_LEVEL="release"
15655   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15656 $as_echo_n "checking which debug level to use... " >&6; }
15657   # Check whether --enable-debug was given.
15658 if test "${enable_debug+set}" = set; then :
15659   enableval=$enable_debug;
15660         ENABLE_DEBUG="${enableval}"
15661         DEBUG_LEVEL="fastdebug"
15662 
15663 else
15664   ENABLE_DEBUG="no"
15665 fi
15666 
15667 
15668 
15669 # Check whether --with-debug-level was given.
15670 if test "${with_debug_level+set}" = set; then :
15671   withval=$with_debug_level;
15672         DEBUG_LEVEL="${withval}"
15673         if test "x$ENABLE_DEBUG" = xyes; then
15674           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15675         fi
15676 
15677 fi
15678 
15679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15680 $as_echo "$DEBUG_LEVEL" >&6; }
15681 
15682   if test "x$DEBUG_LEVEL" != xrelease && \
15683       test "x$DEBUG_LEVEL" != xoptimized && \
15684       test "x$DEBUG_LEVEL" != xfastdebug && \
15685       test "x$DEBUG_LEVEL" != xslowdebug; then
15686     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15687   fi
15688 
15689 
15690   ###############################################################################
15691   #
15692   # Setup legacy vars/targets and new vars to deal with different debug levels.
15693   #
15694 
15695   case $DEBUG_LEVEL in
15696     release )
15697       VARIANT="OPT"
15698       FASTDEBUG="false"
15699       DEBUG_CLASSFILES="false"
15700       BUILD_VARIANT_RELEASE=""
15701       HOTSPOT_DEBUG_LEVEL="product"
15702       HOTSPOT_EXPORT="product"
15703       ;;
15704     fastdebug )
15705       VARIANT="DBG"
15706       FASTDEBUG="true"
15707       DEBUG_CLASSFILES="true"
15708       BUILD_VARIANT_RELEASE="-fastdebug"
15709       HOTSPOT_DEBUG_LEVEL="fastdebug"
15710       HOTSPOT_EXPORT="fastdebug"
15711       ;;
15712     slowdebug )
15713       VARIANT="DBG"
15714       FASTDEBUG="false"
15715       DEBUG_CLASSFILES="true"
15716       BUILD_VARIANT_RELEASE="-debug"
15717       HOTSPOT_DEBUG_LEVEL="debug"
15718       HOTSPOT_EXPORT="debug"
15719       ;;
15720     optimized )
15721       VARIANT="OPT"
15722       FASTDEBUG="false"
15723       DEBUG_CLASSFILES="false"
15724       BUILD_VARIANT_RELEASE="-optimized"
15725       HOTSPOT_DEBUG_LEVEL="optimized"
15726       HOTSPOT_EXPORT="optimized"
15727       ;;
15728   esac
15729 
15730   # The debug level 'optimized' is a little special because it is currently only
15731   # applicable to the HotSpot build where it means to build a completely
15732   # optimized version of the VM without any debugging code (like for the
15733   # 'release' debug level which is called 'product' in the HotSpot build) but
15734   # with the exception that it can contain additional code which is otherwise
15735   # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15736   # test new and/or experimental features which are not intended for customer
15737   # shipment. Because these new features need to be tested and benchmarked in
15738   # real world scenarios, we want to build the containing JDK at the 'release'
15739   # debug level.
15740   if test "x$DEBUG_LEVEL" = xoptimized; then
15741     DEBUG_LEVEL="release"
15742   fi
15743 
15744   #####
15745   # Generate the legacy makefile targets for hotspot.
15746   # The hotspot api for selecting the build artifacts, really, needs to be improved.
15747   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15748   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15749   # But until then ...
15750   HOTSPOT_TARGET=""
15751 
15752   if test "x$JVM_VARIANT_SERVER" = xtrue; then
15753     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15754   fi
15755 
15756   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15757     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15758   fi
15759 
15760   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15761     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15762   fi
15763 
15764   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15765     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
15766   fi
15767 
15768   if test "x$JVM_VARIANT_ZERO" = xtrue; then
15769     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15770   fi
15771 
15772   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15773     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15774   fi
15775 
15776   if test "x$JVM_VARIANT_CORE" = xtrue; then
15777     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15778   fi
15779 
15780   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15781 
15782   # On Macosx universal binaries are produced, but they only contain
15783   # 64 bit intel. This invalidates control of which jvms are built
15784   # from configure, but only server is valid anyway. Fix this
15785   # when hotspot makefiles are rewritten.
15786   if test "x$MACOSX_UNIVERSAL" = xtrue; then
15787     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15788   fi
15789 
15790   #####
15791 
15792 
15793 
15794 
15795 
15796 
15797 
15798 
15799 # With basic setup done, call the custom early hook.
15800 
15801 
15802 # Check if we have devkits, extra paths or sysroot set.
15803 
15804 
15805 # Check whether --with-devkit was given.
15806 if test "${with_devkit+set}" = set; then :
15807   withval=$with_devkit;
15808 
15809   # Only process if variable expands to non-empty
15810 
15811   if test "x$with_devkit" != x; then
15812     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15813 
15814   # Input might be given as Windows format, start by converting to
15815   # unix format.
15816   path="$with_devkit"
15817   new_path=`$CYGPATH -u "$path"`
15818 
15819   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15820   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15821   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15822   # "foo.exe" is OK but "foo" is an error.
15823   #
15824   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15825   # It is also a way to make sure we got the proper file name for the real test later on.
15826   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15827   if test "x$test_shortpath" = x; then
15828     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15829 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15830     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15831   fi
15832 
15833   # Call helper function which possibly converts this using DOS-style short mode.
15834   # If so, the updated path is stored in $new_path.
15835 
15836   input_path="$new_path"
15837   # Check if we need to convert this using DOS-style short mode. If the path
15838   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15839   # take no chances and rewrite it.
15840   # Note: m4 eats our [], so we need to use [ and ] instead.
15841   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15842   if test "x$has_forbidden_chars" != x; then
15843     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15844     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15845     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15846     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15847       # Going to short mode and back again did indeed matter. Since short mode is
15848       # case insensitive, let's make it lowercase to improve readability.
15849       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15850       # Now convert it back to Unix-style (cygpath)
15851       input_path=`$CYGPATH -u "$shortmode_path"`
15852       new_path="$input_path"
15853     fi
15854   fi
15855 
15856   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15857   if test "x$test_cygdrive_prefix" = x; then
15858     # As a simple fix, exclude /usr/bin since it's not a real path.
15859     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15860       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15861       # a path prefixed by /cygdrive for fixpath to work.
15862       new_path="$CYGWIN_ROOT_PATH$input_path"
15863     fi
15864   fi
15865 
15866 
15867   if test "x$path" != "x$new_path"; then
15868     with_devkit="$new_path"
15869     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15870 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15871   fi
15872 
15873     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15874 
15875   path="$with_devkit"
15876   has_colon=`$ECHO $path | $GREP ^.:`
15877   new_path="$path"
15878   if test "x$has_colon" = x; then
15879     # Not in mixed or Windows style, start by that.
15880     new_path=`cmd //c echo $path`
15881   fi
15882 
15883 
15884   input_path="$new_path"
15885   # Check if we need to convert this using DOS-style short mode. If the path
15886   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15887   # take no chances and rewrite it.
15888   # Note: m4 eats our [], so we need to use [ and ] instead.
15889   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15890   if test "x$has_forbidden_chars" != x; then
15891     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15892     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15893   fi
15894 
15895 
15896   windows_path="$new_path"
15897   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15898     unix_path=`$CYGPATH -u "$windows_path"`
15899     new_path="$unix_path"
15900   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15901     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15902     new_path="$unix_path"
15903   fi
15904 
15905   if test "x$path" != "x$new_path"; then
15906     with_devkit="$new_path"
15907     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15908 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15909   fi
15910 
15911   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15912   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15913 
15914     else
15915       # We're on a unix platform. Hooray! :)
15916       path="$with_devkit"
15917       has_space=`$ECHO "$path" | $GREP " "`
15918       if test "x$has_space" != x; then
15919         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15920 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15921         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15922       fi
15923 
15924       # Use eval to expand a potential ~
15925       eval path="$path"
15926       if test ! -f "$path" && test ! -d "$path"; then
15927         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
15928       fi
15929 
15930       with_devkit="`cd "$path"; $THEPWDCMD -L`"
15931     fi
15932   fi
15933 
15934         DEVKIT_ROOT="$with_devkit"
15935         # Check for a meta data info file in the root of the devkit
15936         if test -f "$DEVKIT_ROOT/devkit.info"; then
15937           . $DEVKIT_ROOT/devkit.info
15938           # This potentially sets the following:
15939           # A descriptive name of the devkit
15940 
15941   if test "x$DEVKIT_NAME" = x; then
15942     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
15943   fi
15944 
15945           # Corresponds to --with-extra-path
15946 
15947   if test "x$DEVKIT_EXTRA_PATH" = x; then
15948     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
15949   fi
15950 
15951           # Corresponds to --with-toolchain-path
15952 
15953   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15954     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
15955   fi
15956 
15957           # Corresponds to --with-sysroot
15958 
15959   if test "x$DEVKIT_SYSROOT" = x; then
15960     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
15961   fi
15962 
15963 
15964           # Identifies the Visual Studio version in the devkit
15965 
15966   if test "x$DEVKIT_VS_VERSION" = x; then
15967     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
15968   fi
15969 
15970           # The Visual Studio include environment variable
15971 
15972   if test "x$DEVKIT_VS_INCLUDE" = x; then
15973     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
15974   fi
15975 
15976           # The Visual Studio lib environment variable
15977 
15978   if test "x$DEVKIT_VS_LIB" = x; then
15979     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
15980   fi
15981 
15982           # Corresponds to --with-msvcr-dll
15983 
15984   if test "x$DEVKIT_MSVCR_DLL" = x; then
15985     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
15986   fi
15987 
15988           # Corresponds to --with-msvcp-dll
15989 
15990   if test "x$DEVKIT_MSVCP_DLL" = x; then
15991     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
15992   fi
15993 
15994         fi
15995 
15996         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
15997 $as_echo_n "checking for devkit... " >&6; }
15998         if test "x$DEVKIT_NAME" != x; then
15999           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16000 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16001         else
16002           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16003 $as_echo "$DEVKIT_ROOT" >&6; }
16004         fi
16005 
16006 
16007   if test "x$DEVKIT_EXTRA_PATH" != x; then
16008     if test "x$EXTRA_PATH" = x; then
16009       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16010     else
16011       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16012     fi
16013   fi
16014 
16015 
16016         # Fallback default of just /bin if DEVKIT_PATH is not defined
16017         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16018           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16019         fi
16020 
16021   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16022     if test "x$TOOLCHAIN_PATH" = x; then
16023       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16024     else
16025       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16026     fi
16027   fi
16028 
16029 
16030         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16031         # places for backwards compatiblity.
16032         if test "x$DEVKIT_SYSROOT" != x; then
16033           SYSROOT="$DEVKIT_SYSROOT"
16034         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16035           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16036         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16037           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16038         fi
16039 
16040 
16041 fi
16042 
16043 
16044   # You can force the sysroot if the sysroot encoded into the compiler tools
16045   # is not correct.
16046 
16047 # Check whether --with-sys-root was given.
16048 if test "${with_sys_root+set}" = set; then :
16049   withval=$with_sys_root; SYSROOT=$with_sys_root
16050 
16051 fi
16052 
16053 
16054 
16055 # Check whether --with-sysroot was given.
16056 if test "${with_sysroot+set}" = set; then :
16057   withval=$with_sysroot; SYSROOT=$with_sysroot
16058 
16059 fi
16060 
16061 
16062 
16063 # Check whether --with-tools-dir was given.
16064 if test "${with_tools_dir+set}" = set; then :
16065   withval=$with_tools_dir;
16066   if test "x$with_tools_dir" != x; then
16067     if test "x$TOOLCHAIN_PATH" = x; then
16068       TOOLCHAIN_PATH="$with_tools_dir"
16069     else
16070       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16071     fi
16072   fi
16073 
16074 
16075 fi
16076 
16077 
16078 
16079 # Check whether --with-toolchain-path was given.
16080 if test "${with_toolchain_path+set}" = set; then :
16081   withval=$with_toolchain_path;
16082   if test "x$with_toolchain_path" != x; then
16083     if test "x$TOOLCHAIN_PATH" = x; then
16084       TOOLCHAIN_PATH="$with_toolchain_path"
16085     else
16086       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16087     fi
16088   fi
16089 
16090 
16091 fi
16092 
16093 
16094 
16095 # Check whether --with-extra-path was given.
16096 if test "${with_extra_path+set}" = set; then :
16097   withval=$with_extra_path;
16098   if test "x$with_extra_path" != x; then
16099     if test "x$EXTRA_PATH" = x; then
16100       EXTRA_PATH="$with_extra_path"
16101     else
16102       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16103     fi
16104   fi
16105 
16106 
16107 fi
16108 
16109 
16110   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16111     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16112     # If not, detect if Xcode is installed by running xcodebuild -version
16113     # if no Xcode installed, xcodebuild exits with 1
16114     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16115     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16116       # We need to use xcodebuild in the toolchain dir provided by the user, this will
16117       # fall back on the stub binary in /usr/bin/xcodebuild
16118       # Extract the first word of "xcodebuild", so it can be a program name with args.
16119 set dummy xcodebuild; ac_word=$2
16120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16121 $as_echo_n "checking for $ac_word... " >&6; }
16122 if ${ac_cv_path_XCODEBUILD+:} false; then :
16123   $as_echo_n "(cached) " >&6
16124 else
16125   case $XCODEBUILD in
16126   [\\/]* | ?:[\\/]*)
16127   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16128   ;;
16129   *)
16130   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16131 for as_dir in $TOOLCHAIN_PATH
16132 do
16133   IFS=$as_save_IFS
16134   test -z "$as_dir" && as_dir=.
16135     for ac_exec_ext in '' $ac_executable_extensions; do
16136   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16137     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16138     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16139     break 2
16140   fi
16141 done
16142   done
16143 IFS=$as_save_IFS
16144 
16145   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16146   ;;
16147 esac
16148 fi
16149 XCODEBUILD=$ac_cv_path_XCODEBUILD
16150 if test -n "$XCODEBUILD"; then
16151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16152 $as_echo "$XCODEBUILD" >&6; }
16153 else
16154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16155 $as_echo "no" >&6; }
16156 fi
16157 
16158 
16159     else
16160       # this should result in SYSROOT being empty, unless --with-sysroot is provided
16161       # when only the command line tools are installed there are no SDKs, so headers
16162       # are copied into the system frameworks
16163       XCODEBUILD=
16164 
16165     fi
16166 
16167     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16168 $as_echo_n "checking for sdk name... " >&6; }
16169 
16170 # Check whether --with-sdk-name was given.
16171 if test "${with_sdk_name+set}" = set; then :
16172   withval=$with_sdk_name; SDKNAME=$with_sdk_name
16173 
16174 fi
16175 
16176     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16177 $as_echo "$SDKNAME" >&6; }
16178 
16179     # if toolchain path is specified then don't rely on system headers, they may not compile
16180     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16181     test -z "$TOOLCHAIN_PATH" && \
16182       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16183 
16184     if test -z "$SYSROOT"; then
16185       if test -n "$XCODEBUILD"; then
16186         # if we don't have system headers, use default SDK name (last resort)
16187         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16188           SDKNAME=${SDKNAME:-macosx}
16189         fi
16190 
16191         if test -n "$SDKNAME"; then
16192           # Call xcodebuild to determine SYSROOT
16193           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16194         fi
16195       else
16196         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16197           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
16198         fi
16199       fi
16200     else
16201       # warn user if --with-sdk-name was also set
16202       if test -n "$with_sdk_name"; then
16203         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16204 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16205       fi
16206     fi
16207 
16208     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16209       # If no system framework headers, then SYSROOT must be set, or we won't build
16210       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
16211     fi
16212 
16213     # Perform a basic sanity test
16214     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16215       if test -z "$SYSROOT"; then
16216         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
16217       else
16218         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16219       fi
16220     fi
16221 
16222     # set SDKROOT too, Xcode tools will pick it up
16223     SDKROOT=$SYSROOT
16224 
16225   fi
16226 
16227   # Prepend the extra path to the global path
16228 
16229   if test "x$EXTRA_PATH" != x; then
16230     if test "x$PATH" = x; then
16231       PATH="$EXTRA_PATH"
16232     else
16233       PATH="$EXTRA_PATH:$PATH"
16234     fi
16235   fi
16236 
16237 
16238   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16239     # Add extra search paths on solaris for utilities like ar and as etc...
16240     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16241   fi
16242 
16243   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16244 $as_echo_n "checking for sysroot... " >&6; }
16245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16246 $as_echo "$SYSROOT" >&6; }
16247   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16248 $as_echo_n "checking for toolchain path... " >&6; }
16249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16250 $as_echo "$TOOLCHAIN_PATH" >&6; }
16251   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16252 $as_echo_n "checking for extra path... " >&6; }
16253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16254 $as_echo "$EXTRA_PATH" >&6; }
16255 
16256 
16257 # To properly create a configuration name, we need to have the OpenJDK target
16258 # and options (variants and debug level) parsed.
16259 
16260 
16261 
16262 # Check whether --with-conf-name was given.
16263 if test "${with_conf_name+set}" = set; then :
16264   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16265 fi
16266 
16267 
16268   # Test from where we are running configure, in or outside of src root.
16269   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16270 $as_echo_n "checking where to store configuration... " >&6; }
16271   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16272       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16273       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16274     # We are running configure from the src root.
16275     # Create a default ./build/target-variant-debuglevel output root.
16276     if test "x${CONF_NAME}" = x; then
16277       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16278 $as_echo "in default location" >&6; }
16279       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16280     else
16281       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16282 $as_echo "in build directory with custom name" >&6; }
16283     fi
16284     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16285     $MKDIR -p "$OUTPUT_ROOT"
16286     if test ! -d "$OUTPUT_ROOT"; then
16287       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16288     fi
16289   else
16290     # We are running configure from outside of the src dir.
16291     # Then use the current directory as output dir!
16292     # If configuration is situated in normal build directory, just use the build
16293     # directory name as configuration name, otherwise use the complete path.
16294     if test "x${CONF_NAME}" = x; then
16295       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16296     fi
16297     OUTPUT_ROOT="$CURDIR"
16298     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16299 $as_echo "in current directory" >&6; }
16300 
16301     # WARNING: This might be a bad thing to do. You need to be sure you want to
16302     # have a configuration in this directory. Do some sanity checks!
16303 
16304     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16305       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16306       # other files
16307       files_present=`$LS $OUTPUT_ROOT`
16308       # Configure has already touched config.log and confdefs.h in the current dir when this check
16309       # is performed.
16310       filtered_files=`$ECHO "$files_present" \
16311           | $SED -e 's/config.log//g' \
16312               -e 's/configure.log//g' \
16313               -e 's/confdefs.h//g' \
16314               -e 's/ //g' \
16315           | $TR -d '\n'`
16316       if test "x$filtered_files" != x; then
16317         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16318 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
16319         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16320 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16321         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16322 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16323         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16324 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16325         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16326 $as_echo "$as_me: seriously mess up just about everything." >&6;}
16327         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16328 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16329         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16330 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16331         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16332       fi
16333     fi
16334   fi
16335   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16336 $as_echo_n "checking what configuration name to use... " >&6; }
16337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16338 $as_echo "$CONF_NAME" >&6; }
16339 
16340 
16341   # Only process if variable expands to non-empty
16342 
16343   if test "x$OUTPUT_ROOT" != x; then
16344     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16345 
16346   # Input might be given as Windows format, start by converting to
16347   # unix format.
16348   path="$OUTPUT_ROOT"
16349   new_path=`$CYGPATH -u "$path"`
16350 
16351   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16352   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16353   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16354   # "foo.exe" is OK but "foo" is an error.
16355   #
16356   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16357   # It is also a way to make sure we got the proper file name for the real test later on.
16358   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16359   if test "x$test_shortpath" = x; then
16360     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16361 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16362     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16363   fi
16364 
16365   # Call helper function which possibly converts this using DOS-style short mode.
16366   # If so, the updated path is stored in $new_path.
16367 
16368   input_path="$new_path"
16369   # Check if we need to convert this using DOS-style short mode. If the path
16370   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16371   # take no chances and rewrite it.
16372   # Note: m4 eats our [], so we need to use [ and ] instead.
16373   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16374   if test "x$has_forbidden_chars" != x; then
16375     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16376     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16377     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16378     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16379       # Going to short mode and back again did indeed matter. Since short mode is
16380       # case insensitive, let's make it lowercase to improve readability.
16381       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16382       # Now convert it back to Unix-style (cygpath)
16383       input_path=`$CYGPATH -u "$shortmode_path"`
16384       new_path="$input_path"
16385     fi
16386   fi
16387 
16388   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16389   if test "x$test_cygdrive_prefix" = x; then
16390     # As a simple fix, exclude /usr/bin since it's not a real path.
16391     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16392       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16393       # a path prefixed by /cygdrive for fixpath to work.
16394       new_path="$CYGWIN_ROOT_PATH$input_path"
16395     fi
16396   fi
16397 
16398 
16399   if test "x$path" != "x$new_path"; then
16400     OUTPUT_ROOT="$new_path"
16401     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16402 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16403   fi
16404 
16405     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16406 
16407   path="$OUTPUT_ROOT"
16408   has_colon=`$ECHO $path | $GREP ^.:`
16409   new_path="$path"
16410   if test "x$has_colon" = x; then
16411     # Not in mixed or Windows style, start by that.
16412     new_path=`cmd //c echo $path`
16413   fi
16414 
16415 
16416   input_path="$new_path"
16417   # Check if we need to convert this using DOS-style short mode. If the path
16418   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16419   # take no chances and rewrite it.
16420   # Note: m4 eats our [], so we need to use [ and ] instead.
16421   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16422   if test "x$has_forbidden_chars" != x; then
16423     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16424     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16425   fi
16426 
16427 
16428   windows_path="$new_path"
16429   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16430     unix_path=`$CYGPATH -u "$windows_path"`
16431     new_path="$unix_path"
16432   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16433     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16434     new_path="$unix_path"
16435   fi
16436 
16437   if test "x$path" != "x$new_path"; then
16438     OUTPUT_ROOT="$new_path"
16439     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16440 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16441   fi
16442 
16443   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16444   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16445 
16446     else
16447       # We're on a unix platform. Hooray! :)
16448       path="$OUTPUT_ROOT"
16449       has_space=`$ECHO "$path" | $GREP " "`
16450       if test "x$has_space" != x; then
16451         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16452 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16453         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16454       fi
16455 
16456       # Use eval to expand a potential ~
16457       eval path="$path"
16458       if test ! -f "$path" && test ! -d "$path"; then
16459         as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16460       fi
16461 
16462       OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16463     fi
16464   fi
16465 
16466 
16467   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16468   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16469 
16470   SPEC=$OUTPUT_ROOT/spec.gmk
16471 
16472   CONF_NAME=$CONF_NAME
16473 
16474   OUTPUT_ROOT=$OUTPUT_ROOT
16475 
16476 
16477 
16478   # The spec.gmk file contains all variables for the make system.
16479   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16480 
16481   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16482   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16483 
16484   # The bootcycle-spec.gmk file contains support for boot cycle builds.
16485   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16486 
16487   # The compare.sh is used to compare the build output to other builds.
16488   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16489 
16490   # The generated Makefile knows where the spec.gmk is and where the source is.
16491   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16492   # which will look for generated configurations
16493   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16494 
16495 
16496 
16497 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16498 
16499   for ac_prog in apt-get yum port pkgutil pkgadd
16500 do
16501   # Extract the first word of "$ac_prog", so it can be a program name with args.
16502 set dummy $ac_prog; ac_word=$2
16503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16504 $as_echo_n "checking for $ac_word... " >&6; }
16505 if ${ac_cv_prog_PKGHANDLER+:} false; then :
16506   $as_echo_n "(cached) " >&6
16507 else
16508   if test -n "$PKGHANDLER"; then
16509   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16510 else
16511 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16512 for as_dir in $PATH
16513 do
16514   IFS=$as_save_IFS
16515   test -z "$as_dir" && as_dir=.
16516     for ac_exec_ext in '' $ac_executable_extensions; do
16517   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16518     ac_cv_prog_PKGHANDLER="$ac_prog"
16519     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16520     break 2
16521   fi
16522 done
16523   done
16524 IFS=$as_save_IFS
16525 
16526 fi
16527 fi
16528 PKGHANDLER=$ac_cv_prog_PKGHANDLER
16529 if test -n "$PKGHANDLER"; then
16530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16531 $as_echo "$PKGHANDLER" >&6; }
16532 else
16533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16534 $as_echo "no" >&6; }
16535 fi
16536 
16537 
16538   test -n "$PKGHANDLER" && break
16539 done
16540 
16541 
16542 
16543 # Setup tools that requires more complex handling, or that is not needed by the configure script.
16544 
16545 
16546 
16547   # Publish this variable in the help.
16548 
16549 
16550   if [ -z "${MAKE+x}" ]; then
16551     # The variable is not set by user, try to locate tool using the code snippet
16552 
16553     # Try our hardest to locate a correct version of GNU make
16554     for ac_prog in gmake
16555 do
16556   # Extract the first word of "$ac_prog", so it can be a program name with args.
16557 set dummy $ac_prog; ac_word=$2
16558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16559 $as_echo_n "checking for $ac_word... " >&6; }
16560 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16561   $as_echo_n "(cached) " >&6
16562 else
16563   case $CHECK_GMAKE in
16564   [\\/]* | ?:[\\/]*)
16565   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16566   ;;
16567   *)
16568   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16569 for as_dir in $PATH
16570 do
16571   IFS=$as_save_IFS
16572   test -z "$as_dir" && as_dir=.
16573     for ac_exec_ext in '' $ac_executable_extensions; do
16574   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16575     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16576     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16577     break 2
16578   fi
16579 done
16580   done
16581 IFS=$as_save_IFS
16582 
16583   ;;
16584 esac
16585 fi
16586 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16587 if test -n "$CHECK_GMAKE"; then
16588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16589 $as_echo "$CHECK_GMAKE" >&6; }
16590 else
16591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16592 $as_echo "no" >&6; }
16593 fi
16594 
16595 
16596   test -n "$CHECK_GMAKE" && break
16597 done
16598 
16599 
16600   MAKE_CANDIDATE=""$CHECK_GMAKE""
16601   DESCRIPTION="gmake in PATH"
16602 
16603   # On Cygwin, we require a newer version of make than on other platforms
16604   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16605     MAKE_VERSION_EXPR="-e 4\."
16606     MAKE_REQUIRED_VERSION="4.0"
16607    else
16608     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16609     MAKE_REQUIRED_VERSION="3.81"
16610   fi
16611 
16612   if test "x$MAKE_CANDIDATE" != x; then
16613     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16614 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16615     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16616     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16617     if test "x$IS_GNU_MAKE" = x; then
16618       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16619 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16620     else
16621       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16622       if test "x$IS_MODERN_MAKE" = x; then
16623         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16624 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16625       else
16626         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16627           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16628             MAKE_EXPECTED_ENV='cygwin'
16629           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16630             MAKE_EXPECTED_ENV='msys'
16631           else
16632             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16633           fi
16634           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16635           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16636         else
16637           # Not relevant for non-Windows
16638           IS_MAKE_CORRECT_ENV=true
16639         fi
16640         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16641           { $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
16642 $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;}
16643         else
16644           FOUND_MAKE=$MAKE_CANDIDATE
16645 
16646   # Only process if variable expands to non-empty
16647 
16648   if test "x$FOUND_MAKE" != x; then
16649     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16650 
16651   # First separate the path from the arguments. This will split at the first
16652   # space.
16653   complete="$FOUND_MAKE"
16654   path="${complete%% *}"
16655   tmp="$complete EOL"
16656   arguments="${tmp#* }"
16657 
16658   # Input might be given as Windows format, start by converting to
16659   # unix format.
16660   new_path=`$CYGPATH -u "$path"`
16661 
16662   # Now try to locate executable using which
16663   new_path=`$WHICH "$new_path" 2> /dev/null`
16664   # bat and cmd files are not always considered executable in cygwin causing which
16665   # to not find them
16666   if test "x$new_path" = x \
16667       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16668       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16669     new_path=`$CYGPATH -u "$path"`
16670   fi
16671   if test "x$new_path" = x; then
16672     # Oops. Which didn't find the executable.
16673     # The splitting of arguments from the executable at a space might have been incorrect,
16674     # since paths with space are more likely in Windows. Give it another try with the whole
16675     # argument.
16676     path="$complete"
16677     arguments="EOL"
16678     new_path=`$CYGPATH -u "$path"`
16679     new_path=`$WHICH "$new_path" 2> /dev/null`
16680     # bat and cmd files are not always considered executable in cygwin causing which
16681     # to not find them
16682     if test "x$new_path" = x \
16683         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16684         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16685       new_path=`$CYGPATH -u "$path"`
16686     fi
16687     if test "x$new_path" = x; then
16688       # It's still not found. Now this is an unrecoverable error.
16689       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16690 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16691       has_space=`$ECHO "$complete" | $GREP " "`
16692       if test "x$has_space" != x; then
16693         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16694 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16695       fi
16696       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16697     fi
16698   fi
16699 
16700   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16701   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16702   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16703   # "foo.exe" is OK but "foo" is an error.
16704   #
16705   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16706   # It is also a way to make sure we got the proper file name for the real test later on.
16707   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16708   if test "x$test_shortpath" = x; then
16709     # Short path failed, file does not exist as specified.
16710     # Try adding .exe or .cmd
16711     if test -f "${new_path}.exe"; then
16712       input_to_shortpath="${new_path}.exe"
16713     elif test -f "${new_path}.cmd"; then
16714       input_to_shortpath="${new_path}.cmd"
16715     else
16716       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16717 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16718       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16719 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16720       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16721     fi
16722   else
16723     input_to_shortpath="$new_path"
16724   fi
16725 
16726   # Call helper function which possibly converts this using DOS-style short mode.
16727   # If so, the updated path is stored in $new_path.
16728   new_path="$input_to_shortpath"
16729 
16730   input_path="$input_to_shortpath"
16731   # Check if we need to convert this using DOS-style short mode. If the path
16732   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16733   # take no chances and rewrite it.
16734   # Note: m4 eats our [], so we need to use [ and ] instead.
16735   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16736   if test "x$has_forbidden_chars" != x; then
16737     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16738     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16739     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16740     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16741       # Going to short mode and back again did indeed matter. Since short mode is
16742       # case insensitive, let's make it lowercase to improve readability.
16743       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16744       # Now convert it back to Unix-style (cygpath)
16745       input_path=`$CYGPATH -u "$shortmode_path"`
16746       new_path="$input_path"
16747     fi
16748   fi
16749 
16750   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16751   if test "x$test_cygdrive_prefix" = x; then
16752     # As a simple fix, exclude /usr/bin since it's not a real path.
16753     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16754       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16755       # a path prefixed by /cygdrive for fixpath to work.
16756       new_path="$CYGWIN_ROOT_PATH$input_path"
16757     fi
16758   fi
16759 
16760   # remove trailing .exe if any
16761   new_path="${new_path/%.exe/}"
16762 
16763     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16764 
16765   # First separate the path from the arguments. This will split at the first
16766   # space.
16767   complete="$FOUND_MAKE"
16768   path="${complete%% *}"
16769   tmp="$complete EOL"
16770   arguments="${tmp#* }"
16771 
16772   # Input might be given as Windows format, start by converting to
16773   # unix format.
16774   new_path="$path"
16775 
16776   windows_path="$new_path"
16777   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16778     unix_path=`$CYGPATH -u "$windows_path"`
16779     new_path="$unix_path"
16780   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16781     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16782     new_path="$unix_path"
16783   fi
16784 
16785 
16786   # Now try to locate executable using which
16787   new_path=`$WHICH "$new_path" 2> /dev/null`
16788 
16789   if test "x$new_path" = x; then
16790     # Oops. Which didn't find the executable.
16791     # The splitting of arguments from the executable at a space might have been incorrect,
16792     # since paths with space are more likely in Windows. Give it another try with the whole
16793     # argument.
16794     path="$complete"
16795     arguments="EOL"
16796     new_path="$path"
16797 
16798   windows_path="$new_path"
16799   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16800     unix_path=`$CYGPATH -u "$windows_path"`
16801     new_path="$unix_path"
16802   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16803     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16804     new_path="$unix_path"
16805   fi
16806 
16807 
16808     new_path=`$WHICH "$new_path" 2> /dev/null`
16809     # bat and cmd files are not always considered executable in MSYS causing which
16810     # to not find them
16811     if test "x$new_path" = x \
16812         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16813         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16814       new_path="$path"
16815 
16816   windows_path="$new_path"
16817   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16818     unix_path=`$CYGPATH -u "$windows_path"`
16819     new_path="$unix_path"
16820   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16821     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16822     new_path="$unix_path"
16823   fi
16824 
16825     fi
16826 
16827     if test "x$new_path" = x; then
16828       # It's still not found. Now this is an unrecoverable error.
16829       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16830 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16831       has_space=`$ECHO "$complete" | $GREP " "`
16832       if test "x$has_space" != x; then
16833         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16834 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16835       fi
16836       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16837     fi
16838   fi
16839 
16840   # Now new_path has a complete unix path to the binary
16841   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16842     # Keep paths in /bin as-is, but remove trailing .exe if any
16843     new_path="${new_path/%.exe/}"
16844     # Do not save /bin paths to all_fixpath_prefixes!
16845   else
16846     # Not in mixed or Windows style, start by that.
16847     new_path=`cmd //c echo $new_path`
16848 
16849   input_path="$new_path"
16850   # Check if we need to convert this using DOS-style short mode. If the path
16851   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16852   # take no chances and rewrite it.
16853   # Note: m4 eats our [], so we need to use [ and ] instead.
16854   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16855   if test "x$has_forbidden_chars" != x; then
16856     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16857     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16858   fi
16859 
16860     # Output is in $new_path
16861 
16862   windows_path="$new_path"
16863   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16864     unix_path=`$CYGPATH -u "$windows_path"`
16865     new_path="$unix_path"
16866   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16867     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16868     new_path="$unix_path"
16869   fi
16870 
16871     # remove trailing .exe if any
16872     new_path="${new_path/%.exe/}"
16873 
16874     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16875     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16876   fi
16877 
16878     else
16879       # We're on a unix platform. Hooray! :)
16880       # First separate the path from the arguments. This will split at the first
16881       # space.
16882       complete="$FOUND_MAKE"
16883       path="${complete%% *}"
16884       tmp="$complete EOL"
16885       arguments="${tmp#* }"
16886 
16887       # Cannot rely on the command "which" here since it doesn't always work.
16888       is_absolute_path=`$ECHO "$path" | $GREP ^/`
16889       if test -z "$is_absolute_path"; then
16890         # Path to executable is not absolute. Find it.
16891         IFS_save="$IFS"
16892         IFS=:
16893         for p in $PATH; do
16894           if test -f "$p/$path" && test -x "$p/$path"; then
16895             new_path="$p/$path"
16896             break
16897           fi
16898         done
16899         IFS="$IFS_save"
16900       else
16901         # This is an absolute path, we can use it without further modifications.
16902         new_path="$path"
16903       fi
16904 
16905       if test "x$new_path" = x; then
16906         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16907 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16908         has_space=`$ECHO "$complete" | $GREP " "`
16909         if test "x$has_space" != x; then
16910           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16911 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16912         fi
16913         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16914       fi
16915     fi
16916 
16917     # Now join together the path and the arguments once again
16918     if test "x$arguments" != xEOL; then
16919       new_complete="$new_path ${arguments% *}"
16920     else
16921       new_complete="$new_path"
16922     fi
16923 
16924     if test "x$complete" != "x$new_complete"; then
16925       FOUND_MAKE="$new_complete"
16926       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16927 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16928     fi
16929   fi
16930 
16931         fi
16932       fi
16933     fi
16934   fi
16935 
16936 
16937     if test "x$FOUND_MAKE" = x; then
16938       for ac_prog in make
16939 do
16940   # Extract the first word of "$ac_prog", so it can be a program name with args.
16941 set dummy $ac_prog; ac_word=$2
16942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16943 $as_echo_n "checking for $ac_word... " >&6; }
16944 if ${ac_cv_path_CHECK_MAKE+:} false; then :
16945   $as_echo_n "(cached) " >&6
16946 else
16947   case $CHECK_MAKE in
16948   [\\/]* | ?:[\\/]*)
16949   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16950   ;;
16951   *)
16952   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16953 for as_dir in $PATH
16954 do
16955   IFS=$as_save_IFS
16956   test -z "$as_dir" && as_dir=.
16957     for ac_exec_ext in '' $ac_executable_extensions; do
16958   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16959     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16960     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16961     break 2
16962   fi
16963 done
16964   done
16965 IFS=$as_save_IFS
16966 
16967   ;;
16968 esac
16969 fi
16970 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16971 if test -n "$CHECK_MAKE"; then
16972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16973 $as_echo "$CHECK_MAKE" >&6; }
16974 else
16975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16976 $as_echo "no" >&6; }
16977 fi
16978 
16979 
16980   test -n "$CHECK_MAKE" && break
16981 done
16982 
16983 
16984   MAKE_CANDIDATE=""$CHECK_MAKE""
16985   DESCRIPTION="make in PATH"
16986 
16987   # On Cygwin, we require a newer version of make than on other platforms
16988   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16989     MAKE_VERSION_EXPR="-e 4\."
16990     MAKE_REQUIRED_VERSION="4.0"
16991    else
16992     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16993     MAKE_REQUIRED_VERSION="3.81"
16994   fi
16995 
16996   if test "x$MAKE_CANDIDATE" != x; then
16997     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16998 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16999     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17000     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17001     if test "x$IS_GNU_MAKE" = x; then
17002       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17003 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17004     else
17005       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17006       if test "x$IS_MODERN_MAKE" = x; then
17007         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17008 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17009       else
17010         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17011           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17012             MAKE_EXPECTED_ENV='cygwin'
17013           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17014             MAKE_EXPECTED_ENV='msys'
17015           else
17016             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17017           fi
17018           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17019           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17020         else
17021           # Not relevant for non-Windows
17022           IS_MAKE_CORRECT_ENV=true
17023         fi
17024         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17025           { $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
17026 $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;}
17027         else
17028           FOUND_MAKE=$MAKE_CANDIDATE
17029 
17030   # Only process if variable expands to non-empty
17031 
17032   if test "x$FOUND_MAKE" != x; then
17033     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17034 
17035   # First separate the path from the arguments. This will split at the first
17036   # space.
17037   complete="$FOUND_MAKE"
17038   path="${complete%% *}"
17039   tmp="$complete EOL"
17040   arguments="${tmp#* }"
17041 
17042   # Input might be given as Windows format, start by converting to
17043   # unix format.
17044   new_path=`$CYGPATH -u "$path"`
17045 
17046   # Now try to locate executable using which
17047   new_path=`$WHICH "$new_path" 2> /dev/null`
17048   # bat and cmd files are not always considered executable in cygwin causing which
17049   # to not find them
17050   if test "x$new_path" = x \
17051       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17052       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17053     new_path=`$CYGPATH -u "$path"`
17054   fi
17055   if test "x$new_path" = x; then
17056     # Oops. Which didn't find the executable.
17057     # The splitting of arguments from the executable at a space might have been incorrect,
17058     # since paths with space are more likely in Windows. Give it another try with the whole
17059     # argument.
17060     path="$complete"
17061     arguments="EOL"
17062     new_path=`$CYGPATH -u "$path"`
17063     new_path=`$WHICH "$new_path" 2> /dev/null`
17064     # bat and cmd files are not always considered executable in cygwin causing which
17065     # to not find them
17066     if test "x$new_path" = x \
17067         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17068         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17069       new_path=`$CYGPATH -u "$path"`
17070     fi
17071     if test "x$new_path" = x; then
17072       # It's still not found. Now this is an unrecoverable error.
17073       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17074 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17075       has_space=`$ECHO "$complete" | $GREP " "`
17076       if test "x$has_space" != x; then
17077         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17078 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17079       fi
17080       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17081     fi
17082   fi
17083 
17084   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17085   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17086   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17087   # "foo.exe" is OK but "foo" is an error.
17088   #
17089   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17090   # It is also a way to make sure we got the proper file name for the real test later on.
17091   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17092   if test "x$test_shortpath" = x; then
17093     # Short path failed, file does not exist as specified.
17094     # Try adding .exe or .cmd
17095     if test -f "${new_path}.exe"; then
17096       input_to_shortpath="${new_path}.exe"
17097     elif test -f "${new_path}.cmd"; then
17098       input_to_shortpath="${new_path}.cmd"
17099     else
17100       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17101 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17102       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17103 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17104       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17105     fi
17106   else
17107     input_to_shortpath="$new_path"
17108   fi
17109 
17110   # Call helper function which possibly converts this using DOS-style short mode.
17111   # If so, the updated path is stored in $new_path.
17112   new_path="$input_to_shortpath"
17113 
17114   input_path="$input_to_shortpath"
17115   # Check if we need to convert this using DOS-style short mode. If the path
17116   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17117   # take no chances and rewrite it.
17118   # Note: m4 eats our [], so we need to use [ and ] instead.
17119   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17120   if test "x$has_forbidden_chars" != x; then
17121     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17122     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17123     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17124     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17125       # Going to short mode and back again did indeed matter. Since short mode is
17126       # case insensitive, let's make it lowercase to improve readability.
17127       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17128       # Now convert it back to Unix-style (cygpath)
17129       input_path=`$CYGPATH -u "$shortmode_path"`
17130       new_path="$input_path"
17131     fi
17132   fi
17133 
17134   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17135   if test "x$test_cygdrive_prefix" = x; then
17136     # As a simple fix, exclude /usr/bin since it's not a real path.
17137     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17138       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17139       # a path prefixed by /cygdrive for fixpath to work.
17140       new_path="$CYGWIN_ROOT_PATH$input_path"
17141     fi
17142   fi
17143 
17144   # remove trailing .exe if any
17145   new_path="${new_path/%.exe/}"
17146 
17147     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17148 
17149   # First separate the path from the arguments. This will split at the first
17150   # space.
17151   complete="$FOUND_MAKE"
17152   path="${complete%% *}"
17153   tmp="$complete EOL"
17154   arguments="${tmp#* }"
17155 
17156   # Input might be given as Windows format, start by converting to
17157   # unix format.
17158   new_path="$path"
17159 
17160   windows_path="$new_path"
17161   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17162     unix_path=`$CYGPATH -u "$windows_path"`
17163     new_path="$unix_path"
17164   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17165     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17166     new_path="$unix_path"
17167   fi
17168 
17169 
17170   # Now try to locate executable using which
17171   new_path=`$WHICH "$new_path" 2> /dev/null`
17172 
17173   if test "x$new_path" = x; then
17174     # Oops. Which didn't find the executable.
17175     # The splitting of arguments from the executable at a space might have been incorrect,
17176     # since paths with space are more likely in Windows. Give it another try with the whole
17177     # argument.
17178     path="$complete"
17179     arguments="EOL"
17180     new_path="$path"
17181 
17182   windows_path="$new_path"
17183   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17184     unix_path=`$CYGPATH -u "$windows_path"`
17185     new_path="$unix_path"
17186   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17187     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17188     new_path="$unix_path"
17189   fi
17190 
17191 
17192     new_path=`$WHICH "$new_path" 2> /dev/null`
17193     # bat and cmd files are not always considered executable in MSYS causing which
17194     # to not find them
17195     if test "x$new_path" = x \
17196         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17197         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17198       new_path="$path"
17199 
17200   windows_path="$new_path"
17201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17202     unix_path=`$CYGPATH -u "$windows_path"`
17203     new_path="$unix_path"
17204   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17205     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17206     new_path="$unix_path"
17207   fi
17208 
17209     fi
17210 
17211     if test "x$new_path" = x; then
17212       # It's still not found. Now this is an unrecoverable error.
17213       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17214 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17215       has_space=`$ECHO "$complete" | $GREP " "`
17216       if test "x$has_space" != x; then
17217         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17218 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17219       fi
17220       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17221     fi
17222   fi
17223 
17224   # Now new_path has a complete unix path to the binary
17225   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17226     # Keep paths in /bin as-is, but remove trailing .exe if any
17227     new_path="${new_path/%.exe/}"
17228     # Do not save /bin paths to all_fixpath_prefixes!
17229   else
17230     # Not in mixed or Windows style, start by that.
17231     new_path=`cmd //c echo $new_path`
17232 
17233   input_path="$new_path"
17234   # Check if we need to convert this using DOS-style short mode. If the path
17235   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17236   # take no chances and rewrite it.
17237   # Note: m4 eats our [], so we need to use [ and ] instead.
17238   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17239   if test "x$has_forbidden_chars" != x; then
17240     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17241     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17242   fi
17243 
17244     # Output is in $new_path
17245 
17246   windows_path="$new_path"
17247   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17248     unix_path=`$CYGPATH -u "$windows_path"`
17249     new_path="$unix_path"
17250   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17251     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17252     new_path="$unix_path"
17253   fi
17254 
17255     # remove trailing .exe if any
17256     new_path="${new_path/%.exe/}"
17257 
17258     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17259     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17260   fi
17261 
17262     else
17263       # We're on a unix platform. Hooray! :)
17264       # First separate the path from the arguments. This will split at the first
17265       # space.
17266       complete="$FOUND_MAKE"
17267       path="${complete%% *}"
17268       tmp="$complete EOL"
17269       arguments="${tmp#* }"
17270 
17271       # Cannot rely on the command "which" here since it doesn't always work.
17272       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17273       if test -z "$is_absolute_path"; then
17274         # Path to executable is not absolute. Find it.
17275         IFS_save="$IFS"
17276         IFS=:
17277         for p in $PATH; do
17278           if test -f "$p/$path" && test -x "$p/$path"; then
17279             new_path="$p/$path"
17280             break
17281           fi
17282         done
17283         IFS="$IFS_save"
17284       else
17285         # This is an absolute path, we can use it without further modifications.
17286         new_path="$path"
17287       fi
17288 
17289       if test "x$new_path" = x; then
17290         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17291 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17292         has_space=`$ECHO "$complete" | $GREP " "`
17293         if test "x$has_space" != x; then
17294           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17295 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17296         fi
17297         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17298       fi
17299     fi
17300 
17301     # Now join together the path and the arguments once again
17302     if test "x$arguments" != xEOL; then
17303       new_complete="$new_path ${arguments% *}"
17304     else
17305       new_complete="$new_path"
17306     fi
17307 
17308     if test "x$complete" != "x$new_complete"; then
17309       FOUND_MAKE="$new_complete"
17310       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17311 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17312     fi
17313   fi
17314 
17315         fi
17316       fi
17317     fi
17318   fi
17319 
17320     fi
17321 
17322     if test "x$FOUND_MAKE" = x; then
17323       if test "x$TOOLCHAIN_PATH" != x; then
17324         # We have a toolchain path, check that as well before giving up.
17325         OLD_PATH=$PATH
17326         PATH=$TOOLCHAIN_PATH:$PATH
17327         for ac_prog in gmake
17328 do
17329   # Extract the first word of "$ac_prog", so it can be a program name with args.
17330 set dummy $ac_prog; ac_word=$2
17331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17332 $as_echo_n "checking for $ac_word... " >&6; }
17333 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17334   $as_echo_n "(cached) " >&6
17335 else
17336   case $CHECK_TOOLSDIR_GMAKE in
17337   [\\/]* | ?:[\\/]*)
17338   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17339   ;;
17340   *)
17341   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17342 for as_dir in $PATH
17343 do
17344   IFS=$as_save_IFS
17345   test -z "$as_dir" && as_dir=.
17346     for ac_exec_ext in '' $ac_executable_extensions; do
17347   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17348     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17349     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17350     break 2
17351   fi
17352 done
17353   done
17354 IFS=$as_save_IFS
17355 
17356   ;;
17357 esac
17358 fi
17359 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17360 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17362 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17363 else
17364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17365 $as_echo "no" >&6; }
17366 fi
17367 
17368 
17369   test -n "$CHECK_TOOLSDIR_GMAKE" && break
17370 done
17371 
17372 
17373   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17374   DESCRIPTION="gmake in tools-dir"
17375 
17376   # On Cygwin, we require a newer version of make than on other platforms
17377   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17378     MAKE_VERSION_EXPR="-e 4\."
17379     MAKE_REQUIRED_VERSION="4.0"
17380    else
17381     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17382     MAKE_REQUIRED_VERSION="3.81"
17383   fi
17384 
17385   if test "x$MAKE_CANDIDATE" != x; then
17386     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17387 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17388     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17389     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17390     if test "x$IS_GNU_MAKE" = x; then
17391       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17392 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17393     else
17394       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17395       if test "x$IS_MODERN_MAKE" = x; then
17396         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17397 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17398       else
17399         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17400           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17401             MAKE_EXPECTED_ENV='cygwin'
17402           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17403             MAKE_EXPECTED_ENV='msys'
17404           else
17405             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17406           fi
17407           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17408           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17409         else
17410           # Not relevant for non-Windows
17411           IS_MAKE_CORRECT_ENV=true
17412         fi
17413         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17414           { $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
17415 $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;}
17416         else
17417           FOUND_MAKE=$MAKE_CANDIDATE
17418 
17419   # Only process if variable expands to non-empty
17420 
17421   if test "x$FOUND_MAKE" != x; then
17422     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17423 
17424   # First separate the path from the arguments. This will split at the first
17425   # space.
17426   complete="$FOUND_MAKE"
17427   path="${complete%% *}"
17428   tmp="$complete EOL"
17429   arguments="${tmp#* }"
17430 
17431   # Input might be given as Windows format, start by converting to
17432   # unix format.
17433   new_path=`$CYGPATH -u "$path"`
17434 
17435   # Now try to locate executable using which
17436   new_path=`$WHICH "$new_path" 2> /dev/null`
17437   # bat and cmd files are not always considered executable in cygwin causing which
17438   # to not find them
17439   if test "x$new_path" = x \
17440       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17441       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17442     new_path=`$CYGPATH -u "$path"`
17443   fi
17444   if test "x$new_path" = x; then
17445     # Oops. Which didn't find the executable.
17446     # The splitting of arguments from the executable at a space might have been incorrect,
17447     # since paths with space are more likely in Windows. Give it another try with the whole
17448     # argument.
17449     path="$complete"
17450     arguments="EOL"
17451     new_path=`$CYGPATH -u "$path"`
17452     new_path=`$WHICH "$new_path" 2> /dev/null`
17453     # bat and cmd files are not always considered executable in cygwin causing which
17454     # to not find them
17455     if test "x$new_path" = x \
17456         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17457         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17458       new_path=`$CYGPATH -u "$path"`
17459     fi
17460     if test "x$new_path" = x; then
17461       # It's still not found. Now this is an unrecoverable error.
17462       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17463 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17464       has_space=`$ECHO "$complete" | $GREP " "`
17465       if test "x$has_space" != x; then
17466         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17467 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17468       fi
17469       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17470     fi
17471   fi
17472 
17473   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17474   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17475   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17476   # "foo.exe" is OK but "foo" is an error.
17477   #
17478   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17479   # It is also a way to make sure we got the proper file name for the real test later on.
17480   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17481   if test "x$test_shortpath" = x; then
17482     # Short path failed, file does not exist as specified.
17483     # Try adding .exe or .cmd
17484     if test -f "${new_path}.exe"; then
17485       input_to_shortpath="${new_path}.exe"
17486     elif test -f "${new_path}.cmd"; then
17487       input_to_shortpath="${new_path}.cmd"
17488     else
17489       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17490 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17491       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17492 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17493       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17494     fi
17495   else
17496     input_to_shortpath="$new_path"
17497   fi
17498 
17499   # Call helper function which possibly converts this using DOS-style short mode.
17500   # If so, the updated path is stored in $new_path.
17501   new_path="$input_to_shortpath"
17502 
17503   input_path="$input_to_shortpath"
17504   # Check if we need to convert this using DOS-style short mode. If the path
17505   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17506   # take no chances and rewrite it.
17507   # Note: m4 eats our [], so we need to use [ and ] instead.
17508   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17509   if test "x$has_forbidden_chars" != x; then
17510     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17511     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17512     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17513     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17514       # Going to short mode and back again did indeed matter. Since short mode is
17515       # case insensitive, let's make it lowercase to improve readability.
17516       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17517       # Now convert it back to Unix-style (cygpath)
17518       input_path=`$CYGPATH -u "$shortmode_path"`
17519       new_path="$input_path"
17520     fi
17521   fi
17522 
17523   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17524   if test "x$test_cygdrive_prefix" = x; then
17525     # As a simple fix, exclude /usr/bin since it's not a real path.
17526     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17527       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17528       # a path prefixed by /cygdrive for fixpath to work.
17529       new_path="$CYGWIN_ROOT_PATH$input_path"
17530     fi
17531   fi
17532 
17533   # remove trailing .exe if any
17534   new_path="${new_path/%.exe/}"
17535 
17536     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17537 
17538   # First separate the path from the arguments. This will split at the first
17539   # space.
17540   complete="$FOUND_MAKE"
17541   path="${complete%% *}"
17542   tmp="$complete EOL"
17543   arguments="${tmp#* }"
17544 
17545   # Input might be given as Windows format, start by converting to
17546   # unix format.
17547   new_path="$path"
17548 
17549   windows_path="$new_path"
17550   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17551     unix_path=`$CYGPATH -u "$windows_path"`
17552     new_path="$unix_path"
17553   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17554     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17555     new_path="$unix_path"
17556   fi
17557 
17558 
17559   # Now try to locate executable using which
17560   new_path=`$WHICH "$new_path" 2> /dev/null`
17561 
17562   if test "x$new_path" = x; then
17563     # Oops. Which didn't find the executable.
17564     # The splitting of arguments from the executable at a space might have been incorrect,
17565     # since paths with space are more likely in Windows. Give it another try with the whole
17566     # argument.
17567     path="$complete"
17568     arguments="EOL"
17569     new_path="$path"
17570 
17571   windows_path="$new_path"
17572   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17573     unix_path=`$CYGPATH -u "$windows_path"`
17574     new_path="$unix_path"
17575   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17576     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17577     new_path="$unix_path"
17578   fi
17579 
17580 
17581     new_path=`$WHICH "$new_path" 2> /dev/null`
17582     # bat and cmd files are not always considered executable in MSYS causing which
17583     # to not find them
17584     if test "x$new_path" = x \
17585         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17586         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17587       new_path="$path"
17588 
17589   windows_path="$new_path"
17590   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17591     unix_path=`$CYGPATH -u "$windows_path"`
17592     new_path="$unix_path"
17593   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17594     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17595     new_path="$unix_path"
17596   fi
17597 
17598     fi
17599 
17600     if test "x$new_path" = x; then
17601       # It's still not found. Now this is an unrecoverable error.
17602       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17603 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17604       has_space=`$ECHO "$complete" | $GREP " "`
17605       if test "x$has_space" != x; then
17606         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17607 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17608       fi
17609       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17610     fi
17611   fi
17612 
17613   # Now new_path has a complete unix path to the binary
17614   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17615     # Keep paths in /bin as-is, but remove trailing .exe if any
17616     new_path="${new_path/%.exe/}"
17617     # Do not save /bin paths to all_fixpath_prefixes!
17618   else
17619     # Not in mixed or Windows style, start by that.
17620     new_path=`cmd //c echo $new_path`
17621 
17622   input_path="$new_path"
17623   # Check if we need to convert this using DOS-style short mode. If the path
17624   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17625   # take no chances and rewrite it.
17626   # Note: m4 eats our [], so we need to use [ and ] instead.
17627   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17628   if test "x$has_forbidden_chars" != x; then
17629     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17630     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17631   fi
17632 
17633     # Output is in $new_path
17634 
17635   windows_path="$new_path"
17636   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17637     unix_path=`$CYGPATH -u "$windows_path"`
17638     new_path="$unix_path"
17639   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17640     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17641     new_path="$unix_path"
17642   fi
17643 
17644     # remove trailing .exe if any
17645     new_path="${new_path/%.exe/}"
17646 
17647     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17648     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17649   fi
17650 
17651     else
17652       # We're on a unix platform. Hooray! :)
17653       # First separate the path from the arguments. This will split at the first
17654       # space.
17655       complete="$FOUND_MAKE"
17656       path="${complete%% *}"
17657       tmp="$complete EOL"
17658       arguments="${tmp#* }"
17659 
17660       # Cannot rely on the command "which" here since it doesn't always work.
17661       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17662       if test -z "$is_absolute_path"; then
17663         # Path to executable is not absolute. Find it.
17664         IFS_save="$IFS"
17665         IFS=:
17666         for p in $PATH; do
17667           if test -f "$p/$path" && test -x "$p/$path"; then
17668             new_path="$p/$path"
17669             break
17670           fi
17671         done
17672         IFS="$IFS_save"
17673       else
17674         # This is an absolute path, we can use it without further modifications.
17675         new_path="$path"
17676       fi
17677 
17678       if test "x$new_path" = x; then
17679         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17680 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17681         has_space=`$ECHO "$complete" | $GREP " "`
17682         if test "x$has_space" != x; then
17683           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17684 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17685         fi
17686         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17687       fi
17688     fi
17689 
17690     # Now join together the path and the arguments once again
17691     if test "x$arguments" != xEOL; then
17692       new_complete="$new_path ${arguments% *}"
17693     else
17694       new_complete="$new_path"
17695     fi
17696 
17697     if test "x$complete" != "x$new_complete"; then
17698       FOUND_MAKE="$new_complete"
17699       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17700 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17701     fi
17702   fi
17703 
17704         fi
17705       fi
17706     fi
17707   fi
17708 
17709         if test "x$FOUND_MAKE" = x; then
17710           for ac_prog in make
17711 do
17712   # Extract the first word of "$ac_prog", so it can be a program name with args.
17713 set dummy $ac_prog; ac_word=$2
17714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17715 $as_echo_n "checking for $ac_word... " >&6; }
17716 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17717   $as_echo_n "(cached) " >&6
17718 else
17719   case $CHECK_TOOLSDIR_MAKE in
17720   [\\/]* | ?:[\\/]*)
17721   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17722   ;;
17723   *)
17724   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17725 for as_dir in $PATH
17726 do
17727   IFS=$as_save_IFS
17728   test -z "$as_dir" && as_dir=.
17729     for ac_exec_ext in '' $ac_executable_extensions; do
17730   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17731     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17732     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17733     break 2
17734   fi
17735 done
17736   done
17737 IFS=$as_save_IFS
17738 
17739   ;;
17740 esac
17741 fi
17742 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17743 if test -n "$CHECK_TOOLSDIR_MAKE"; then
17744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17745 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17746 else
17747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17748 $as_echo "no" >&6; }
17749 fi
17750 
17751 
17752   test -n "$CHECK_TOOLSDIR_MAKE" && break
17753 done
17754 
17755 
17756   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17757   DESCRIPTION="make in tools-dir"
17758 
17759   # On Cygwin, we require a newer version of make than on other platforms
17760   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17761     MAKE_VERSION_EXPR="-e 4\."
17762     MAKE_REQUIRED_VERSION="4.0"
17763    else
17764     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17765     MAKE_REQUIRED_VERSION="3.81"
17766   fi
17767 
17768   if test "x$MAKE_CANDIDATE" != x; then
17769     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17770 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17771     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17772     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17773     if test "x$IS_GNU_MAKE" = x; then
17774       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17775 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17776     else
17777       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17778       if test "x$IS_MODERN_MAKE" = x; then
17779         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17780 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17781       else
17782         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17783           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17784             MAKE_EXPECTED_ENV='cygwin'
17785           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17786             MAKE_EXPECTED_ENV='msys'
17787           else
17788             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17789           fi
17790           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17791           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17792         else
17793           # Not relevant for non-Windows
17794           IS_MAKE_CORRECT_ENV=true
17795         fi
17796         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17797           { $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
17798 $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;}
17799         else
17800           FOUND_MAKE=$MAKE_CANDIDATE
17801 
17802   # Only process if variable expands to non-empty
17803 
17804   if test "x$FOUND_MAKE" != x; then
17805     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17806 
17807   # First separate the path from the arguments. This will split at the first
17808   # space.
17809   complete="$FOUND_MAKE"
17810   path="${complete%% *}"
17811   tmp="$complete EOL"
17812   arguments="${tmp#* }"
17813 
17814   # Input might be given as Windows format, start by converting to
17815   # unix format.
17816   new_path=`$CYGPATH -u "$path"`
17817 
17818   # Now try to locate executable using which
17819   new_path=`$WHICH "$new_path" 2> /dev/null`
17820   # bat and cmd files are not always considered executable in cygwin causing which
17821   # to not find them
17822   if test "x$new_path" = x \
17823       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17824       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17825     new_path=`$CYGPATH -u "$path"`
17826   fi
17827   if test "x$new_path" = x; then
17828     # Oops. Which didn't find the executable.
17829     # The splitting of arguments from the executable at a space might have been incorrect,
17830     # since paths with space are more likely in Windows. Give it another try with the whole
17831     # argument.
17832     path="$complete"
17833     arguments="EOL"
17834     new_path=`$CYGPATH -u "$path"`
17835     new_path=`$WHICH "$new_path" 2> /dev/null`
17836     # bat and cmd files are not always considered executable in cygwin causing which
17837     # to not find them
17838     if test "x$new_path" = x \
17839         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17840         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17841       new_path=`$CYGPATH -u "$path"`
17842     fi
17843     if test "x$new_path" = x; then
17844       # It's still not found. Now this is an unrecoverable error.
17845       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17846 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17847       has_space=`$ECHO "$complete" | $GREP " "`
17848       if test "x$has_space" != x; then
17849         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17850 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17851       fi
17852       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17853     fi
17854   fi
17855 
17856   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17857   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17858   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17859   # "foo.exe" is OK but "foo" is an error.
17860   #
17861   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17862   # It is also a way to make sure we got the proper file name for the real test later on.
17863   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17864   if test "x$test_shortpath" = x; then
17865     # Short path failed, file does not exist as specified.
17866     # Try adding .exe or .cmd
17867     if test -f "${new_path}.exe"; then
17868       input_to_shortpath="${new_path}.exe"
17869     elif test -f "${new_path}.cmd"; then
17870       input_to_shortpath="${new_path}.cmd"
17871     else
17872       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17873 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17874       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17875 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17876       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17877     fi
17878   else
17879     input_to_shortpath="$new_path"
17880   fi
17881 
17882   # Call helper function which possibly converts this using DOS-style short mode.
17883   # If so, the updated path is stored in $new_path.
17884   new_path="$input_to_shortpath"
17885 
17886   input_path="$input_to_shortpath"
17887   # Check if we need to convert this using DOS-style short mode. If the path
17888   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17889   # take no chances and rewrite it.
17890   # Note: m4 eats our [], so we need to use [ and ] instead.
17891   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17892   if test "x$has_forbidden_chars" != x; then
17893     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17894     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17895     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17896     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17897       # Going to short mode and back again did indeed matter. Since short mode is
17898       # case insensitive, let's make it lowercase to improve readability.
17899       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17900       # Now convert it back to Unix-style (cygpath)
17901       input_path=`$CYGPATH -u "$shortmode_path"`
17902       new_path="$input_path"
17903     fi
17904   fi
17905 
17906   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17907   if test "x$test_cygdrive_prefix" = x; then
17908     # As a simple fix, exclude /usr/bin since it's not a real path.
17909     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17910       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17911       # a path prefixed by /cygdrive for fixpath to work.
17912       new_path="$CYGWIN_ROOT_PATH$input_path"
17913     fi
17914   fi
17915 
17916   # remove trailing .exe if any
17917   new_path="${new_path/%.exe/}"
17918 
17919     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17920 
17921   # First separate the path from the arguments. This will split at the first
17922   # space.
17923   complete="$FOUND_MAKE"
17924   path="${complete%% *}"
17925   tmp="$complete EOL"
17926   arguments="${tmp#* }"
17927 
17928   # Input might be given as Windows format, start by converting to
17929   # unix format.
17930   new_path="$path"
17931 
17932   windows_path="$new_path"
17933   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17934     unix_path=`$CYGPATH -u "$windows_path"`
17935     new_path="$unix_path"
17936   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17937     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17938     new_path="$unix_path"
17939   fi
17940 
17941 
17942   # Now try to locate executable using which
17943   new_path=`$WHICH "$new_path" 2> /dev/null`
17944 
17945   if test "x$new_path" = x; then
17946     # Oops. Which didn't find the executable.
17947     # The splitting of arguments from the executable at a space might have been incorrect,
17948     # since paths with space are more likely in Windows. Give it another try with the whole
17949     # argument.
17950     path="$complete"
17951     arguments="EOL"
17952     new_path="$path"
17953 
17954   windows_path="$new_path"
17955   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17956     unix_path=`$CYGPATH -u "$windows_path"`
17957     new_path="$unix_path"
17958   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17959     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17960     new_path="$unix_path"
17961   fi
17962 
17963 
17964     new_path=`$WHICH "$new_path" 2> /dev/null`
17965     # bat and cmd files are not always considered executable in MSYS causing which
17966     # to not find them
17967     if test "x$new_path" = x \
17968         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17969         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17970       new_path="$path"
17971 
17972   windows_path="$new_path"
17973   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17974     unix_path=`$CYGPATH -u "$windows_path"`
17975     new_path="$unix_path"
17976   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17977     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17978     new_path="$unix_path"
17979   fi
17980 
17981     fi
17982 
17983     if test "x$new_path" = x; then
17984       # It's still not found. Now this is an unrecoverable error.
17985       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17986 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17987       has_space=`$ECHO "$complete" | $GREP " "`
17988       if test "x$has_space" != x; then
17989         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17990 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17991       fi
17992       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17993     fi
17994   fi
17995 
17996   # Now new_path has a complete unix path to the binary
17997   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17998     # Keep paths in /bin as-is, but remove trailing .exe if any
17999     new_path="${new_path/%.exe/}"
18000     # Do not save /bin paths to all_fixpath_prefixes!
18001   else
18002     # Not in mixed or Windows style, start by that.
18003     new_path=`cmd //c echo $new_path`
18004 
18005   input_path="$new_path"
18006   # Check if we need to convert this using DOS-style short mode. If the path
18007   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18008   # take no chances and rewrite it.
18009   # Note: m4 eats our [], so we need to use [ and ] instead.
18010   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18011   if test "x$has_forbidden_chars" != x; then
18012     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18013     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18014   fi
18015 
18016     # Output is in $new_path
18017 
18018   windows_path="$new_path"
18019   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18020     unix_path=`$CYGPATH -u "$windows_path"`
18021     new_path="$unix_path"
18022   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18023     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18024     new_path="$unix_path"
18025   fi
18026 
18027     # remove trailing .exe if any
18028     new_path="${new_path/%.exe/}"
18029 
18030     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18031     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18032   fi
18033 
18034     else
18035       # We're on a unix platform. Hooray! :)
18036       # First separate the path from the arguments. This will split at the first
18037       # space.
18038       complete="$FOUND_MAKE"
18039       path="${complete%% *}"
18040       tmp="$complete EOL"
18041       arguments="${tmp#* }"
18042 
18043       # Cannot rely on the command "which" here since it doesn't always work.
18044       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18045       if test -z "$is_absolute_path"; then
18046         # Path to executable is not absolute. Find it.
18047         IFS_save="$IFS"
18048         IFS=:
18049         for p in $PATH; do
18050           if test -f "$p/$path" && test -x "$p/$path"; then
18051             new_path="$p/$path"
18052             break
18053           fi
18054         done
18055         IFS="$IFS_save"
18056       else
18057         # This is an absolute path, we can use it without further modifications.
18058         new_path="$path"
18059       fi
18060 
18061       if test "x$new_path" = x; then
18062         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18063 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18064         has_space=`$ECHO "$complete" | $GREP " "`
18065         if test "x$has_space" != x; then
18066           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18067 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18068         fi
18069         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18070       fi
18071     fi
18072 
18073     # Now join together the path and the arguments once again
18074     if test "x$arguments" != xEOL; then
18075       new_complete="$new_path ${arguments% *}"
18076     else
18077       new_complete="$new_path"
18078     fi
18079 
18080     if test "x$complete" != "x$new_complete"; then
18081       FOUND_MAKE="$new_complete"
18082       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18083 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18084     fi
18085   fi
18086 
18087         fi
18088       fi
18089     fi
18090   fi
18091 
18092         fi
18093         PATH=$OLD_PATH
18094       fi
18095     fi
18096 
18097     if test "x$FOUND_MAKE" = x; then
18098       as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
18099     fi
18100 
18101   else
18102     # The variable is set, but is it from the command line or the environment?
18103 
18104     # Try to remove the string !MAKE! from our list.
18105     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18106     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18107       # If it failed, the variable was not from the command line. Ignore it,
18108       # but warn the user (except for BASH, which is always set by the calling BASH).
18109       if test "xMAKE" != xBASH; then
18110         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18111 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18112       fi
18113       # Try to locate tool using the code snippet
18114 
18115     # Try our hardest to locate a correct version of GNU make
18116     for ac_prog in gmake
18117 do
18118   # Extract the first word of "$ac_prog", so it can be a program name with args.
18119 set dummy $ac_prog; ac_word=$2
18120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18121 $as_echo_n "checking for $ac_word... " >&6; }
18122 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18123   $as_echo_n "(cached) " >&6
18124 else
18125   case $CHECK_GMAKE in
18126   [\\/]* | ?:[\\/]*)
18127   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18128   ;;
18129   *)
18130   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18131 for as_dir in $PATH
18132 do
18133   IFS=$as_save_IFS
18134   test -z "$as_dir" && as_dir=.
18135     for ac_exec_ext in '' $ac_executable_extensions; do
18136   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18137     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18138     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18139     break 2
18140   fi
18141 done
18142   done
18143 IFS=$as_save_IFS
18144 
18145   ;;
18146 esac
18147 fi
18148 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18149 if test -n "$CHECK_GMAKE"; then
18150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18151 $as_echo "$CHECK_GMAKE" >&6; }
18152 else
18153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18154 $as_echo "no" >&6; }
18155 fi
18156 
18157 
18158   test -n "$CHECK_GMAKE" && break
18159 done
18160 
18161 
18162   MAKE_CANDIDATE=""$CHECK_GMAKE""
18163   DESCRIPTION="gmake in PATH"
18164 
18165   # On Cygwin, we require a newer version of make than on other platforms
18166   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18167     MAKE_VERSION_EXPR="-e 4\."
18168     MAKE_REQUIRED_VERSION="4.0"
18169    else
18170     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18171     MAKE_REQUIRED_VERSION="3.81"
18172   fi
18173 
18174   if test "x$MAKE_CANDIDATE" != x; then
18175     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18176 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18177     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18178     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18179     if test "x$IS_GNU_MAKE" = x; then
18180       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18181 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18182     else
18183       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18184       if test "x$IS_MODERN_MAKE" = x; then
18185         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
18186 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
18187       else
18188         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18189           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18190             MAKE_EXPECTED_ENV='cygwin'
18191           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18192             MAKE_EXPECTED_ENV='msys'
18193           else
18194             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18195           fi
18196           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18197           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18198         else
18199           # Not relevant for non-Windows
18200           IS_MAKE_CORRECT_ENV=true
18201         fi
18202         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18203           { $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
18204 $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;}
18205         else
18206           FOUND_MAKE=$MAKE_CANDIDATE
18207 
18208   # Only process if variable expands to non-empty
18209 
18210   if test "x$FOUND_MAKE" != x; then
18211     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18212 
18213   # First separate the path from the arguments. This will split at the first
18214   # space.
18215   complete="$FOUND_MAKE"
18216   path="${complete%% *}"
18217   tmp="$complete EOL"
18218   arguments="${tmp#* }"
18219 
18220   # Input might be given as Windows format, start by converting to
18221   # unix format.
18222   new_path=`$CYGPATH -u "$path"`
18223 
18224   # Now try to locate executable using which
18225   new_path=`$WHICH "$new_path" 2> /dev/null`
18226   # bat and cmd files are not always considered executable in cygwin causing which
18227   # to not find them
18228   if test "x$new_path" = x \
18229       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18230       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18231     new_path=`$CYGPATH -u "$path"`
18232   fi
18233   if test "x$new_path" = x; then
18234     # Oops. Which didn't find the executable.
18235     # The splitting of arguments from the executable at a space might have been incorrect,
18236     # since paths with space are more likely in Windows. Give it another try with the whole
18237     # argument.
18238     path="$complete"
18239     arguments="EOL"
18240     new_path=`$CYGPATH -u "$path"`
18241     new_path=`$WHICH "$new_path" 2> /dev/null`
18242     # bat and cmd files are not always considered executable in cygwin causing which
18243     # to not find them
18244     if test "x$new_path" = x \
18245         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18246         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18247       new_path=`$CYGPATH -u "$path"`
18248     fi
18249     if test "x$new_path" = x; then
18250       # It's still not found. Now this is an unrecoverable error.
18251       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18252 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18253       has_space=`$ECHO "$complete" | $GREP " "`
18254       if test "x$has_space" != x; then
18255         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18256 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18257       fi
18258       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18259     fi
18260   fi
18261 
18262   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18263   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18264   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18265   # "foo.exe" is OK but "foo" is an error.
18266   #
18267   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18268   # It is also a way to make sure we got the proper file name for the real test later on.
18269   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18270   if test "x$test_shortpath" = x; then
18271     # Short path failed, file does not exist as specified.
18272     # Try adding .exe or .cmd
18273     if test -f "${new_path}.exe"; then
18274       input_to_shortpath="${new_path}.exe"
18275     elif test -f "${new_path}.cmd"; then
18276       input_to_shortpath="${new_path}.cmd"
18277     else
18278       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18279 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18280       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18281 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18282       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18283     fi
18284   else
18285     input_to_shortpath="$new_path"
18286   fi
18287 
18288   # Call helper function which possibly converts this using DOS-style short mode.
18289   # If so, the updated path is stored in $new_path.
18290   new_path="$input_to_shortpath"
18291 
18292   input_path="$input_to_shortpath"
18293   # Check if we need to convert this using DOS-style short mode. If the path
18294   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18295   # take no chances and rewrite it.
18296   # Note: m4 eats our [], so we need to use [ and ] instead.
18297   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18298   if test "x$has_forbidden_chars" != x; then
18299     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18300     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18301     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18302     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18303       # Going to short mode and back again did indeed matter. Since short mode is
18304       # case insensitive, let's make it lowercase to improve readability.
18305       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18306       # Now convert it back to Unix-style (cygpath)
18307       input_path=`$CYGPATH -u "$shortmode_path"`
18308       new_path="$input_path"
18309     fi
18310   fi
18311 
18312   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18313   if test "x$test_cygdrive_prefix" = x; then
18314     # As a simple fix, exclude /usr/bin since it's not a real path.
18315     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18316       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18317       # a path prefixed by /cygdrive for fixpath to work.
18318       new_path="$CYGWIN_ROOT_PATH$input_path"
18319     fi
18320   fi
18321 
18322   # remove trailing .exe if any
18323   new_path="${new_path/%.exe/}"
18324 
18325     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18326 
18327   # First separate the path from the arguments. This will split at the first
18328   # space.
18329   complete="$FOUND_MAKE"
18330   path="${complete%% *}"
18331   tmp="$complete EOL"
18332   arguments="${tmp#* }"
18333 
18334   # Input might be given as Windows format, start by converting to
18335   # unix format.
18336   new_path="$path"
18337 
18338   windows_path="$new_path"
18339   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18340     unix_path=`$CYGPATH -u "$windows_path"`
18341     new_path="$unix_path"
18342   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18343     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18344     new_path="$unix_path"
18345   fi
18346 
18347 
18348   # Now try to locate executable using which
18349   new_path=`$WHICH "$new_path" 2> /dev/null`
18350 
18351   if test "x$new_path" = x; then
18352     # Oops. Which didn't find the executable.
18353     # The splitting of arguments from the executable at a space might have been incorrect,
18354     # since paths with space are more likely in Windows. Give it another try with the whole
18355     # argument.
18356     path="$complete"
18357     arguments="EOL"
18358     new_path="$path"
18359 
18360   windows_path="$new_path"
18361   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18362     unix_path=`$CYGPATH -u "$windows_path"`
18363     new_path="$unix_path"
18364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18365     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18366     new_path="$unix_path"
18367   fi
18368 
18369 
18370     new_path=`$WHICH "$new_path" 2> /dev/null`
18371     # bat and cmd files are not always considered executable in MSYS causing which
18372     # to not find them
18373     if test "x$new_path" = x \
18374         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18375         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18376       new_path="$path"
18377 
18378   windows_path="$new_path"
18379   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18380     unix_path=`$CYGPATH -u "$windows_path"`
18381     new_path="$unix_path"
18382   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18383     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18384     new_path="$unix_path"
18385   fi
18386 
18387     fi
18388 
18389     if test "x$new_path" = x; then
18390       # It's still not found. Now this is an unrecoverable error.
18391       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18392 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18393       has_space=`$ECHO "$complete" | $GREP " "`
18394       if test "x$has_space" != x; then
18395         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18396 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18397       fi
18398       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18399     fi
18400   fi
18401 
18402   # Now new_path has a complete unix path to the binary
18403   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18404     # Keep paths in /bin as-is, but remove trailing .exe if any
18405     new_path="${new_path/%.exe/}"
18406     # Do not save /bin paths to all_fixpath_prefixes!
18407   else
18408     # Not in mixed or Windows style, start by that.
18409     new_path=`cmd //c echo $new_path`
18410 
18411   input_path="$new_path"
18412   # Check if we need to convert this using DOS-style short mode. If the path
18413   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18414   # take no chances and rewrite it.
18415   # Note: m4 eats our [], so we need to use [ and ] instead.
18416   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18417   if test "x$has_forbidden_chars" != x; then
18418     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18419     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18420   fi
18421 
18422     # Output is in $new_path
18423 
18424   windows_path="$new_path"
18425   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18426     unix_path=`$CYGPATH -u "$windows_path"`
18427     new_path="$unix_path"
18428   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18429     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18430     new_path="$unix_path"
18431   fi
18432 
18433     # remove trailing .exe if any
18434     new_path="${new_path/%.exe/}"
18435 
18436     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18437     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18438   fi
18439 
18440     else
18441       # We're on a unix platform. Hooray! :)
18442       # First separate the path from the arguments. This will split at the first
18443       # space.
18444       complete="$FOUND_MAKE"
18445       path="${complete%% *}"
18446       tmp="$complete EOL"
18447       arguments="${tmp#* }"
18448 
18449       # Cannot rely on the command "which" here since it doesn't always work.
18450       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18451       if test -z "$is_absolute_path"; then
18452         # Path to executable is not absolute. Find it.
18453         IFS_save="$IFS"
18454         IFS=:
18455         for p in $PATH; do
18456           if test -f "$p/$path" && test -x "$p/$path"; then
18457             new_path="$p/$path"
18458             break
18459           fi
18460         done
18461         IFS="$IFS_save"
18462       else
18463         # This is an absolute path, we can use it without further modifications.
18464         new_path="$path"
18465       fi
18466 
18467       if test "x$new_path" = x; then
18468         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18469 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18470         has_space=`$ECHO "$complete" | $GREP " "`
18471         if test "x$has_space" != x; then
18472           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18473 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18474         fi
18475         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18476       fi
18477     fi
18478 
18479     # Now join together the path and the arguments once again
18480     if test "x$arguments" != xEOL; then
18481       new_complete="$new_path ${arguments% *}"
18482     else
18483       new_complete="$new_path"
18484     fi
18485 
18486     if test "x$complete" != "x$new_complete"; then
18487       FOUND_MAKE="$new_complete"
18488       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18489 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18490     fi
18491   fi
18492 
18493         fi
18494       fi
18495     fi
18496   fi
18497 
18498 
18499     if test "x$FOUND_MAKE" = x; then
18500       for ac_prog in make
18501 do
18502   # Extract the first word of "$ac_prog", so it can be a program name with args.
18503 set dummy $ac_prog; ac_word=$2
18504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18505 $as_echo_n "checking for $ac_word... " >&6; }
18506 if ${ac_cv_path_CHECK_MAKE+:} false; then :
18507   $as_echo_n "(cached) " >&6
18508 else
18509   case $CHECK_MAKE in
18510   [\\/]* | ?:[\\/]*)
18511   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18512   ;;
18513   *)
18514   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18515 for as_dir in $PATH
18516 do
18517   IFS=$as_save_IFS
18518   test -z "$as_dir" && as_dir=.
18519     for ac_exec_ext in '' $ac_executable_extensions; do
18520   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18521     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18522     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18523     break 2
18524   fi
18525 done
18526   done
18527 IFS=$as_save_IFS
18528 
18529   ;;
18530 esac
18531 fi
18532 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18533 if test -n "$CHECK_MAKE"; then
18534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18535 $as_echo "$CHECK_MAKE" >&6; }
18536 else
18537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18538 $as_echo "no" >&6; }
18539 fi
18540 
18541 
18542   test -n "$CHECK_MAKE" && break
18543 done
18544 
18545 
18546   MAKE_CANDIDATE=""$CHECK_MAKE""
18547   DESCRIPTION="make in PATH"
18548 
18549   # On Cygwin, we require a newer version of make than on other platforms
18550   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18551     MAKE_VERSION_EXPR="-e 4\."
18552     MAKE_REQUIRED_VERSION="4.0"
18553    else
18554     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18555     MAKE_REQUIRED_VERSION="3.81"
18556   fi
18557 
18558   if test "x$MAKE_CANDIDATE" != x; then
18559     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18560 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18561     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18562     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18563     if test "x$IS_GNU_MAKE" = x; then
18564       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18565 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18566     else
18567       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18568       if test "x$IS_MODERN_MAKE" = x; then
18569         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
18570 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
18571       else
18572         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18573           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18574             MAKE_EXPECTED_ENV='cygwin'
18575           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18576             MAKE_EXPECTED_ENV='msys'
18577           else
18578             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18579           fi
18580           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18581           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18582         else
18583           # Not relevant for non-Windows
18584           IS_MAKE_CORRECT_ENV=true
18585         fi
18586         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18587           { $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
18588 $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;}
18589         else
18590           FOUND_MAKE=$MAKE_CANDIDATE
18591 
18592   # Only process if variable expands to non-empty
18593 
18594   if test "x$FOUND_MAKE" != x; then
18595     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18596 
18597   # First separate the path from the arguments. This will split at the first
18598   # space.
18599   complete="$FOUND_MAKE"
18600   path="${complete%% *}"
18601   tmp="$complete EOL"
18602   arguments="${tmp#* }"
18603 
18604   # Input might be given as Windows format, start by converting to
18605   # unix format.
18606   new_path=`$CYGPATH -u "$path"`
18607 
18608   # Now try to locate executable using which
18609   new_path=`$WHICH "$new_path" 2> /dev/null`
18610   # bat and cmd files are not always considered executable in cygwin causing which
18611   # to not find them
18612   if test "x$new_path" = x \
18613       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18614       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18615     new_path=`$CYGPATH -u "$path"`
18616   fi
18617   if test "x$new_path" = x; then
18618     # Oops. Which didn't find the executable.
18619     # The splitting of arguments from the executable at a space might have been incorrect,
18620     # since paths with space are more likely in Windows. Give it another try with the whole
18621     # argument.
18622     path="$complete"
18623     arguments="EOL"
18624     new_path=`$CYGPATH -u "$path"`
18625     new_path=`$WHICH "$new_path" 2> /dev/null`
18626     # bat and cmd files are not always considered executable in cygwin causing which
18627     # to not find them
18628     if test "x$new_path" = x \
18629         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18630         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18631       new_path=`$CYGPATH -u "$path"`
18632     fi
18633     if test "x$new_path" = x; then
18634       # It's still not found. Now this is an unrecoverable error.
18635       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18636 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18637       has_space=`$ECHO "$complete" | $GREP " "`
18638       if test "x$has_space" != x; then
18639         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18640 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18641       fi
18642       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18643     fi
18644   fi
18645 
18646   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18647   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18648   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18649   # "foo.exe" is OK but "foo" is an error.
18650   #
18651   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18652   # It is also a way to make sure we got the proper file name for the real test later on.
18653   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18654   if test "x$test_shortpath" = x; then
18655     # Short path failed, file does not exist as specified.
18656     # Try adding .exe or .cmd
18657     if test -f "${new_path}.exe"; then
18658       input_to_shortpath="${new_path}.exe"
18659     elif test -f "${new_path}.cmd"; then
18660       input_to_shortpath="${new_path}.cmd"
18661     else
18662       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18663 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18664       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18665 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18666       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18667     fi
18668   else
18669     input_to_shortpath="$new_path"
18670   fi
18671 
18672   # Call helper function which possibly converts this using DOS-style short mode.
18673   # If so, the updated path is stored in $new_path.
18674   new_path="$input_to_shortpath"
18675 
18676   input_path="$input_to_shortpath"
18677   # Check if we need to convert this using DOS-style short mode. If the path
18678   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18679   # take no chances and rewrite it.
18680   # Note: m4 eats our [], so we need to use [ and ] instead.
18681   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18682   if test "x$has_forbidden_chars" != x; then
18683     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18684     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18685     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18686     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18687       # Going to short mode and back again did indeed matter. Since short mode is
18688       # case insensitive, let's make it lowercase to improve readability.
18689       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18690       # Now convert it back to Unix-style (cygpath)
18691       input_path=`$CYGPATH -u "$shortmode_path"`
18692       new_path="$input_path"
18693     fi
18694   fi
18695 
18696   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18697   if test "x$test_cygdrive_prefix" = x; then
18698     # As a simple fix, exclude /usr/bin since it's not a real path.
18699     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18700       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18701       # a path prefixed by /cygdrive for fixpath to work.
18702       new_path="$CYGWIN_ROOT_PATH$input_path"
18703     fi
18704   fi
18705 
18706   # remove trailing .exe if any
18707   new_path="${new_path/%.exe/}"
18708 
18709     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18710 
18711   # First separate the path from the arguments. This will split at the first
18712   # space.
18713   complete="$FOUND_MAKE"
18714   path="${complete%% *}"
18715   tmp="$complete EOL"
18716   arguments="${tmp#* }"
18717 
18718   # Input might be given as Windows format, start by converting to
18719   # unix format.
18720   new_path="$path"
18721 
18722   windows_path="$new_path"
18723   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18724     unix_path=`$CYGPATH -u "$windows_path"`
18725     new_path="$unix_path"
18726   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18727     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18728     new_path="$unix_path"
18729   fi
18730 
18731 
18732   # Now try to locate executable using which
18733   new_path=`$WHICH "$new_path" 2> /dev/null`
18734 
18735   if test "x$new_path" = x; then
18736     # Oops. Which didn't find the executable.
18737     # The splitting of arguments from the executable at a space might have been incorrect,
18738     # since paths with space are more likely in Windows. Give it another try with the whole
18739     # argument.
18740     path="$complete"
18741     arguments="EOL"
18742     new_path="$path"
18743 
18744   windows_path="$new_path"
18745   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18746     unix_path=`$CYGPATH -u "$windows_path"`
18747     new_path="$unix_path"
18748   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18749     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18750     new_path="$unix_path"
18751   fi
18752 
18753 
18754     new_path=`$WHICH "$new_path" 2> /dev/null`
18755     # bat and cmd files are not always considered executable in MSYS causing which
18756     # to not find them
18757     if test "x$new_path" = x \
18758         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18759         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18760       new_path="$path"
18761 
18762   windows_path="$new_path"
18763   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18764     unix_path=`$CYGPATH -u "$windows_path"`
18765     new_path="$unix_path"
18766   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18767     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18768     new_path="$unix_path"
18769   fi
18770 
18771     fi
18772 
18773     if test "x$new_path" = x; then
18774       # It's still not found. Now this is an unrecoverable error.
18775       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18776 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18777       has_space=`$ECHO "$complete" | $GREP " "`
18778       if test "x$has_space" != x; then
18779         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18780 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18781       fi
18782       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18783     fi
18784   fi
18785 
18786   # Now new_path has a complete unix path to the binary
18787   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18788     # Keep paths in /bin as-is, but remove trailing .exe if any
18789     new_path="${new_path/%.exe/}"
18790     # Do not save /bin paths to all_fixpath_prefixes!
18791   else
18792     # Not in mixed or Windows style, start by that.
18793     new_path=`cmd //c echo $new_path`
18794 
18795   input_path="$new_path"
18796   # Check if we need to convert this using DOS-style short mode. If the path
18797   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18798   # take no chances and rewrite it.
18799   # Note: m4 eats our [], so we need to use [ and ] instead.
18800   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18801   if test "x$has_forbidden_chars" != x; then
18802     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18803     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18804   fi
18805 
18806     # Output is in $new_path
18807 
18808   windows_path="$new_path"
18809   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18810     unix_path=`$CYGPATH -u "$windows_path"`
18811     new_path="$unix_path"
18812   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18813     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18814     new_path="$unix_path"
18815   fi
18816 
18817     # remove trailing .exe if any
18818     new_path="${new_path/%.exe/}"
18819 
18820     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18821     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18822   fi
18823 
18824     else
18825       # We're on a unix platform. Hooray! :)
18826       # First separate the path from the arguments. This will split at the first
18827       # space.
18828       complete="$FOUND_MAKE"
18829       path="${complete%% *}"
18830       tmp="$complete EOL"
18831       arguments="${tmp#* }"
18832 
18833       # Cannot rely on the command "which" here since it doesn't always work.
18834       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18835       if test -z "$is_absolute_path"; then
18836         # Path to executable is not absolute. Find it.
18837         IFS_save="$IFS"
18838         IFS=:
18839         for p in $PATH; do
18840           if test -f "$p/$path" && test -x "$p/$path"; then
18841             new_path="$p/$path"
18842             break
18843           fi
18844         done
18845         IFS="$IFS_save"
18846       else
18847         # This is an absolute path, we can use it without further modifications.
18848         new_path="$path"
18849       fi
18850 
18851       if test "x$new_path" = x; then
18852         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18853 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18854         has_space=`$ECHO "$complete" | $GREP " "`
18855         if test "x$has_space" != x; then
18856           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18857 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18858         fi
18859         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18860       fi
18861     fi
18862 
18863     # Now join together the path and the arguments once again
18864     if test "x$arguments" != xEOL; then
18865       new_complete="$new_path ${arguments% *}"
18866     else
18867       new_complete="$new_path"
18868     fi
18869 
18870     if test "x$complete" != "x$new_complete"; then
18871       FOUND_MAKE="$new_complete"
18872       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18873 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18874     fi
18875   fi
18876 
18877         fi
18878       fi
18879     fi
18880   fi
18881 
18882     fi
18883 
18884     if test "x$FOUND_MAKE" = x; then
18885       if test "x$TOOLCHAIN_PATH" != x; then
18886         # We have a toolchain path, check that as well before giving up.
18887         OLD_PATH=$PATH
18888         PATH=$TOOLCHAIN_PATH:$PATH
18889         for ac_prog in gmake
18890 do
18891   # Extract the first word of "$ac_prog", so it can be a program name with args.
18892 set dummy $ac_prog; 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_CHECK_TOOLSDIR_GMAKE+:} false; then :
18896   $as_echo_n "(cached) " >&6
18897 else
18898   case $CHECK_TOOLSDIR_GMAKE in
18899   [\\/]* | ?:[\\/]*)
18900   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # 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_CHECK_TOOLSDIR_GMAKE="$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 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18922 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18924 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18925 else
18926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18927 $as_echo "no" >&6; }
18928 fi
18929 
18930 
18931   test -n "$CHECK_TOOLSDIR_GMAKE" && break
18932 done
18933 
18934 
18935   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18936   DESCRIPTION="gmake in tools-dir"
18937 
18938   # On Cygwin, we require a newer version of make than on other platforms
18939   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18940     MAKE_VERSION_EXPR="-e 4\."
18941     MAKE_REQUIRED_VERSION="4.0"
18942    else
18943     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18944     MAKE_REQUIRED_VERSION="3.81"
18945   fi
18946 
18947   if test "x$MAKE_CANDIDATE" != x; then
18948     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18949 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18950     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18951     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18952     if test "x$IS_GNU_MAKE" = x; then
18953       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18954 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18955     else
18956       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18957       if test "x$IS_MODERN_MAKE" = x; then
18958         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
18959 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
18960       else
18961         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18962           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18963             MAKE_EXPECTED_ENV='cygwin'
18964           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18965             MAKE_EXPECTED_ENV='msys'
18966           else
18967             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18968           fi
18969           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18970           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18971         else
18972           # Not relevant for non-Windows
18973           IS_MAKE_CORRECT_ENV=true
18974         fi
18975         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18976           { $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
18977 $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;}
18978         else
18979           FOUND_MAKE=$MAKE_CANDIDATE
18980 
18981   # Only process if variable expands to non-empty
18982 
18983   if test "x$FOUND_MAKE" != x; then
18984     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18985 
18986   # First separate the path from the arguments. This will split at the first
18987   # space.
18988   complete="$FOUND_MAKE"
18989   path="${complete%% *}"
18990   tmp="$complete EOL"
18991   arguments="${tmp#* }"
18992 
18993   # Input might be given as Windows format, start by converting to
18994   # unix format.
18995   new_path=`$CYGPATH -u "$path"`
18996 
18997   # Now try to locate executable using which
18998   new_path=`$WHICH "$new_path" 2> /dev/null`
18999   # bat and cmd files are not always considered executable in cygwin causing which
19000   # to not find them
19001   if test "x$new_path" = x \
19002       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19003       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19004     new_path=`$CYGPATH -u "$path"`
19005   fi
19006   if test "x$new_path" = x; then
19007     # Oops. Which didn't find the executable.
19008     # The splitting of arguments from the executable at a space might have been incorrect,
19009     # since paths with space are more likely in Windows. Give it another try with the whole
19010     # argument.
19011     path="$complete"
19012     arguments="EOL"
19013     new_path=`$CYGPATH -u "$path"`
19014     new_path=`$WHICH "$new_path" 2> /dev/null`
19015     # bat and cmd files are not always considered executable in cygwin causing which
19016     # to not find them
19017     if test "x$new_path" = x \
19018         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19019         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19020       new_path=`$CYGPATH -u "$path"`
19021     fi
19022     if test "x$new_path" = x; then
19023       # It's still not found. Now this is an unrecoverable error.
19024       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19025 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19026       has_space=`$ECHO "$complete" | $GREP " "`
19027       if test "x$has_space" != x; then
19028         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19029 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19030       fi
19031       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19032     fi
19033   fi
19034 
19035   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19036   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19037   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19038   # "foo.exe" is OK but "foo" is an error.
19039   #
19040   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19041   # It is also a way to make sure we got the proper file name for the real test later on.
19042   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19043   if test "x$test_shortpath" = x; then
19044     # Short path failed, file does not exist as specified.
19045     # Try adding .exe or .cmd
19046     if test -f "${new_path}.exe"; then
19047       input_to_shortpath="${new_path}.exe"
19048     elif test -f "${new_path}.cmd"; then
19049       input_to_shortpath="${new_path}.cmd"
19050     else
19051       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19052 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19053       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19054 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19055       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19056     fi
19057   else
19058     input_to_shortpath="$new_path"
19059   fi
19060 
19061   # Call helper function which possibly converts this using DOS-style short mode.
19062   # If so, the updated path is stored in $new_path.
19063   new_path="$input_to_shortpath"
19064 
19065   input_path="$input_to_shortpath"
19066   # Check if we need to convert this using DOS-style short mode. If the path
19067   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19068   # take no chances and rewrite it.
19069   # Note: m4 eats our [], so we need to use [ and ] instead.
19070   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19071   if test "x$has_forbidden_chars" != x; then
19072     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19073     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19074     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19075     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19076       # Going to short mode and back again did indeed matter. Since short mode is
19077       # case insensitive, let's make it lowercase to improve readability.
19078       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19079       # Now convert it back to Unix-style (cygpath)
19080       input_path=`$CYGPATH -u "$shortmode_path"`
19081       new_path="$input_path"
19082     fi
19083   fi
19084 
19085   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19086   if test "x$test_cygdrive_prefix" = x; then
19087     # As a simple fix, exclude /usr/bin since it's not a real path.
19088     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19089       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19090       # a path prefixed by /cygdrive for fixpath to work.
19091       new_path="$CYGWIN_ROOT_PATH$input_path"
19092     fi
19093   fi
19094 
19095   # remove trailing .exe if any
19096   new_path="${new_path/%.exe/}"
19097 
19098     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19099 
19100   # First separate the path from the arguments. This will split at the first
19101   # space.
19102   complete="$FOUND_MAKE"
19103   path="${complete%% *}"
19104   tmp="$complete EOL"
19105   arguments="${tmp#* }"
19106 
19107   # Input might be given as Windows format, start by converting to
19108   # unix format.
19109   new_path="$path"
19110 
19111   windows_path="$new_path"
19112   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19113     unix_path=`$CYGPATH -u "$windows_path"`
19114     new_path="$unix_path"
19115   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19116     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19117     new_path="$unix_path"
19118   fi
19119 
19120 
19121   # Now try to locate executable using which
19122   new_path=`$WHICH "$new_path" 2> /dev/null`
19123 
19124   if test "x$new_path" = x; then
19125     # Oops. Which didn't find the executable.
19126     # The splitting of arguments from the executable at a space might have been incorrect,
19127     # since paths with space are more likely in Windows. Give it another try with the whole
19128     # argument.
19129     path="$complete"
19130     arguments="EOL"
19131     new_path="$path"
19132 
19133   windows_path="$new_path"
19134   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19135     unix_path=`$CYGPATH -u "$windows_path"`
19136     new_path="$unix_path"
19137   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19138     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19139     new_path="$unix_path"
19140   fi
19141 
19142 
19143     new_path=`$WHICH "$new_path" 2> /dev/null`
19144     # bat and cmd files are not always considered executable in MSYS causing which
19145     # to not find them
19146     if test "x$new_path" = x \
19147         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19148         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19149       new_path="$path"
19150 
19151   windows_path="$new_path"
19152   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19153     unix_path=`$CYGPATH -u "$windows_path"`
19154     new_path="$unix_path"
19155   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19156     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19157     new_path="$unix_path"
19158   fi
19159 
19160     fi
19161 
19162     if test "x$new_path" = x; then
19163       # It's still not found. Now this is an unrecoverable error.
19164       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19165 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19166       has_space=`$ECHO "$complete" | $GREP " "`
19167       if test "x$has_space" != x; then
19168         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19169 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19170       fi
19171       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19172     fi
19173   fi
19174 
19175   # Now new_path has a complete unix path to the binary
19176   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19177     # Keep paths in /bin as-is, but remove trailing .exe if any
19178     new_path="${new_path/%.exe/}"
19179     # Do not save /bin paths to all_fixpath_prefixes!
19180   else
19181     # Not in mixed or Windows style, start by that.
19182     new_path=`cmd //c echo $new_path`
19183 
19184   input_path="$new_path"
19185   # Check if we need to convert this using DOS-style short mode. If the path
19186   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19187   # take no chances and rewrite it.
19188   # Note: m4 eats our [], so we need to use [ and ] instead.
19189   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19190   if test "x$has_forbidden_chars" != x; then
19191     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19192     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19193   fi
19194 
19195     # Output is in $new_path
19196 
19197   windows_path="$new_path"
19198   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19199     unix_path=`$CYGPATH -u "$windows_path"`
19200     new_path="$unix_path"
19201   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19202     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19203     new_path="$unix_path"
19204   fi
19205 
19206     # remove trailing .exe if any
19207     new_path="${new_path/%.exe/}"
19208 
19209     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19210     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19211   fi
19212 
19213     else
19214       # We're on a unix platform. Hooray! :)
19215       # First separate the path from the arguments. This will split at the first
19216       # space.
19217       complete="$FOUND_MAKE"
19218       path="${complete%% *}"
19219       tmp="$complete EOL"
19220       arguments="${tmp#* }"
19221 
19222       # Cannot rely on the command "which" here since it doesn't always work.
19223       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19224       if test -z "$is_absolute_path"; then
19225         # Path to executable is not absolute. Find it.
19226         IFS_save="$IFS"
19227         IFS=:
19228         for p in $PATH; do
19229           if test -f "$p/$path" && test -x "$p/$path"; then
19230             new_path="$p/$path"
19231             break
19232           fi
19233         done
19234         IFS="$IFS_save"
19235       else
19236         # This is an absolute path, we can use it without further modifications.
19237         new_path="$path"
19238       fi
19239 
19240       if test "x$new_path" = x; then
19241         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19242 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19243         has_space=`$ECHO "$complete" | $GREP " "`
19244         if test "x$has_space" != x; then
19245           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19246 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19247         fi
19248         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19249       fi
19250     fi
19251 
19252     # Now join together the path and the arguments once again
19253     if test "x$arguments" != xEOL; then
19254       new_complete="$new_path ${arguments% *}"
19255     else
19256       new_complete="$new_path"
19257     fi
19258 
19259     if test "x$complete" != "x$new_complete"; then
19260       FOUND_MAKE="$new_complete"
19261       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19262 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19263     fi
19264   fi
19265 
19266         fi
19267       fi
19268     fi
19269   fi
19270 
19271         if test "x$FOUND_MAKE" = x; then
19272           for ac_prog in make
19273 do
19274   # Extract the first word of "$ac_prog", so it can be a program name with args.
19275 set dummy $ac_prog; ac_word=$2
19276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19277 $as_echo_n "checking for $ac_word... " >&6; }
19278 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19279   $as_echo_n "(cached) " >&6
19280 else
19281   case $CHECK_TOOLSDIR_MAKE in
19282   [\\/]* | ?:[\\/]*)
19283   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19284   ;;
19285   *)
19286   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19287 for as_dir in $PATH
19288 do
19289   IFS=$as_save_IFS
19290   test -z "$as_dir" && as_dir=.
19291     for ac_exec_ext in '' $ac_executable_extensions; do
19292   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19293     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19294     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19295     break 2
19296   fi
19297 done
19298   done
19299 IFS=$as_save_IFS
19300 
19301   ;;
19302 esac
19303 fi
19304 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19305 if test -n "$CHECK_TOOLSDIR_MAKE"; then
19306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19307 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19308 else
19309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19310 $as_echo "no" >&6; }
19311 fi
19312 
19313 
19314   test -n "$CHECK_TOOLSDIR_MAKE" && break
19315 done
19316 
19317 
19318   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19319   DESCRIPTION="make in tools-dir"
19320 
19321   # On Cygwin, we require a newer version of make than on other platforms
19322   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19323     MAKE_VERSION_EXPR="-e 4\."
19324     MAKE_REQUIRED_VERSION="4.0"
19325    else
19326     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19327     MAKE_REQUIRED_VERSION="3.81"
19328   fi
19329 
19330   if test "x$MAKE_CANDIDATE" != x; then
19331     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19332 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19333     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19334     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19335     if test "x$IS_GNU_MAKE" = x; then
19336       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19337 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19338     else
19339       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19340       if test "x$IS_MODERN_MAKE" = x; then
19341         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
19342 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
19343       else
19344         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19345           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19346             MAKE_EXPECTED_ENV='cygwin'
19347           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19348             MAKE_EXPECTED_ENV='msys'
19349           else
19350             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19351           fi
19352           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19353           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19354         else
19355           # Not relevant for non-Windows
19356           IS_MAKE_CORRECT_ENV=true
19357         fi
19358         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19359           { $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
19360 $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;}
19361         else
19362           FOUND_MAKE=$MAKE_CANDIDATE
19363 
19364   # Only process if variable expands to non-empty
19365 
19366   if test "x$FOUND_MAKE" != x; then
19367     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19368 
19369   # First separate the path from the arguments. This will split at the first
19370   # space.
19371   complete="$FOUND_MAKE"
19372   path="${complete%% *}"
19373   tmp="$complete EOL"
19374   arguments="${tmp#* }"
19375 
19376   # Input might be given as Windows format, start by converting to
19377   # unix format.
19378   new_path=`$CYGPATH -u "$path"`
19379 
19380   # Now try to locate executable using which
19381   new_path=`$WHICH "$new_path" 2> /dev/null`
19382   # bat and cmd files are not always considered executable in cygwin causing which
19383   # to not find them
19384   if test "x$new_path" = x \
19385       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19386       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19387     new_path=`$CYGPATH -u "$path"`
19388   fi
19389   if test "x$new_path" = x; then
19390     # Oops. Which didn't find the executable.
19391     # The splitting of arguments from the executable at a space might have been incorrect,
19392     # since paths with space are more likely in Windows. Give it another try with the whole
19393     # argument.
19394     path="$complete"
19395     arguments="EOL"
19396     new_path=`$CYGPATH -u "$path"`
19397     new_path=`$WHICH "$new_path" 2> /dev/null`
19398     # bat and cmd files are not always considered executable in cygwin causing which
19399     # to not find them
19400     if test "x$new_path" = x \
19401         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19402         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19403       new_path=`$CYGPATH -u "$path"`
19404     fi
19405     if test "x$new_path" = x; then
19406       # It's still not found. Now this is an unrecoverable error.
19407       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19408 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19409       has_space=`$ECHO "$complete" | $GREP " "`
19410       if test "x$has_space" != x; then
19411         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19412 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19413       fi
19414       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19415     fi
19416   fi
19417 
19418   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19419   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19420   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19421   # "foo.exe" is OK but "foo" is an error.
19422   #
19423   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19424   # It is also a way to make sure we got the proper file name for the real test later on.
19425   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19426   if test "x$test_shortpath" = x; then
19427     # Short path failed, file does not exist as specified.
19428     # Try adding .exe or .cmd
19429     if test -f "${new_path}.exe"; then
19430       input_to_shortpath="${new_path}.exe"
19431     elif test -f "${new_path}.cmd"; then
19432       input_to_shortpath="${new_path}.cmd"
19433     else
19434       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19435 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19436       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19437 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19438       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19439     fi
19440   else
19441     input_to_shortpath="$new_path"
19442   fi
19443 
19444   # Call helper function which possibly converts this using DOS-style short mode.
19445   # If so, the updated path is stored in $new_path.
19446   new_path="$input_to_shortpath"
19447 
19448   input_path="$input_to_shortpath"
19449   # Check if we need to convert this using DOS-style short mode. If the path
19450   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19451   # take no chances and rewrite it.
19452   # Note: m4 eats our [], so we need to use [ and ] instead.
19453   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19454   if test "x$has_forbidden_chars" != x; then
19455     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19456     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19457     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19458     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19459       # Going to short mode and back again did indeed matter. Since short mode is
19460       # case insensitive, let's make it lowercase to improve readability.
19461       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19462       # Now convert it back to Unix-style (cygpath)
19463       input_path=`$CYGPATH -u "$shortmode_path"`
19464       new_path="$input_path"
19465     fi
19466   fi
19467 
19468   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19469   if test "x$test_cygdrive_prefix" = x; then
19470     # As a simple fix, exclude /usr/bin since it's not a real path.
19471     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19472       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19473       # a path prefixed by /cygdrive for fixpath to work.
19474       new_path="$CYGWIN_ROOT_PATH$input_path"
19475     fi
19476   fi
19477 
19478   # remove trailing .exe if any
19479   new_path="${new_path/%.exe/}"
19480 
19481     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19482 
19483   # First separate the path from the arguments. This will split at the first
19484   # space.
19485   complete="$FOUND_MAKE"
19486   path="${complete%% *}"
19487   tmp="$complete EOL"
19488   arguments="${tmp#* }"
19489 
19490   # Input might be given as Windows format, start by converting to
19491   # unix format.
19492   new_path="$path"
19493 
19494   windows_path="$new_path"
19495   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19496     unix_path=`$CYGPATH -u "$windows_path"`
19497     new_path="$unix_path"
19498   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19499     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19500     new_path="$unix_path"
19501   fi
19502 
19503 
19504   # Now try to locate executable using which
19505   new_path=`$WHICH "$new_path" 2> /dev/null`
19506 
19507   if test "x$new_path" = x; then
19508     # Oops. Which didn't find the executable.
19509     # The splitting of arguments from the executable at a space might have been incorrect,
19510     # since paths with space are more likely in Windows. Give it another try with the whole
19511     # argument.
19512     path="$complete"
19513     arguments="EOL"
19514     new_path="$path"
19515 
19516   windows_path="$new_path"
19517   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19518     unix_path=`$CYGPATH -u "$windows_path"`
19519     new_path="$unix_path"
19520   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19521     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19522     new_path="$unix_path"
19523   fi
19524 
19525 
19526     new_path=`$WHICH "$new_path" 2> /dev/null`
19527     # bat and cmd files are not always considered executable in MSYS causing which
19528     # to not find them
19529     if test "x$new_path" = x \
19530         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19531         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19532       new_path="$path"
19533 
19534   windows_path="$new_path"
19535   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19536     unix_path=`$CYGPATH -u "$windows_path"`
19537     new_path="$unix_path"
19538   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19539     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19540     new_path="$unix_path"
19541   fi
19542 
19543     fi
19544 
19545     if test "x$new_path" = x; then
19546       # It's still not found. Now this is an unrecoverable error.
19547       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19548 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19549       has_space=`$ECHO "$complete" | $GREP " "`
19550       if test "x$has_space" != x; then
19551         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19552 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19553       fi
19554       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19555     fi
19556   fi
19557 
19558   # Now new_path has a complete unix path to the binary
19559   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19560     # Keep paths in /bin as-is, but remove trailing .exe if any
19561     new_path="${new_path/%.exe/}"
19562     # Do not save /bin paths to all_fixpath_prefixes!
19563   else
19564     # Not in mixed or Windows style, start by that.
19565     new_path=`cmd //c echo $new_path`
19566 
19567   input_path="$new_path"
19568   # Check if we need to convert this using DOS-style short mode. If the path
19569   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19570   # take no chances and rewrite it.
19571   # Note: m4 eats our [], so we need to use [ and ] instead.
19572   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19573   if test "x$has_forbidden_chars" != x; then
19574     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19575     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19576   fi
19577 
19578     # Output is in $new_path
19579 
19580   windows_path="$new_path"
19581   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19582     unix_path=`$CYGPATH -u "$windows_path"`
19583     new_path="$unix_path"
19584   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19585     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19586     new_path="$unix_path"
19587   fi
19588 
19589     # remove trailing .exe if any
19590     new_path="${new_path/%.exe/}"
19591 
19592     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19593     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19594   fi
19595 
19596     else
19597       # We're on a unix platform. Hooray! :)
19598       # First separate the path from the arguments. This will split at the first
19599       # space.
19600       complete="$FOUND_MAKE"
19601       path="${complete%% *}"
19602       tmp="$complete EOL"
19603       arguments="${tmp#* }"
19604 
19605       # Cannot rely on the command "which" here since it doesn't always work.
19606       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19607       if test -z "$is_absolute_path"; then
19608         # Path to executable is not absolute. Find it.
19609         IFS_save="$IFS"
19610         IFS=:
19611         for p in $PATH; do
19612           if test -f "$p/$path" && test -x "$p/$path"; then
19613             new_path="$p/$path"
19614             break
19615           fi
19616         done
19617         IFS="$IFS_save"
19618       else
19619         # This is an absolute path, we can use it without further modifications.
19620         new_path="$path"
19621       fi
19622 
19623       if test "x$new_path" = x; then
19624         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19625 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19626         has_space=`$ECHO "$complete" | $GREP " "`
19627         if test "x$has_space" != x; then
19628           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19629 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19630         fi
19631         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19632       fi
19633     fi
19634 
19635     # Now join together the path and the arguments once again
19636     if test "x$arguments" != xEOL; then
19637       new_complete="$new_path ${arguments% *}"
19638     else
19639       new_complete="$new_path"
19640     fi
19641 
19642     if test "x$complete" != "x$new_complete"; then
19643       FOUND_MAKE="$new_complete"
19644       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19645 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19646     fi
19647   fi
19648 
19649         fi
19650       fi
19651     fi
19652   fi
19653 
19654         fi
19655         PATH=$OLD_PATH
19656       fi
19657     fi
19658 
19659     if test "x$FOUND_MAKE" = x; then
19660       as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
19661     fi
19662 
19663     else
19664       # If it succeeded, then it was overridden by the user. We will use it
19665       # for the tool.
19666 
19667       # First remove it from the list of overridden variables, so we can test
19668       # for unknown variables in the end.
19669       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19670 
19671       # Check if we try to supply an empty value
19672       if test "x$MAKE" = x; then
19673         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19674 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19675         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19676 $as_echo_n "checking for MAKE... " >&6; }
19677         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19678 $as_echo "disabled" >&6; }
19679       else
19680         # Check if the provided tool contains a complete path.
19681         tool_specified="$MAKE"
19682         tool_basename="${tool_specified##*/}"
19683         if test "x$tool_basename" = "x$tool_specified"; then
19684           # A command without a complete path is provided, search $PATH.
19685           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19686 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19687           # Extract the first word of "$tool_basename", so it can be a program name with args.
19688 set dummy $tool_basename; ac_word=$2
19689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19690 $as_echo_n "checking for $ac_word... " >&6; }
19691 if ${ac_cv_path_MAKE+:} false; then :
19692   $as_echo_n "(cached) " >&6
19693 else
19694   case $MAKE in
19695   [\\/]* | ?:[\\/]*)
19696   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19697   ;;
19698   *)
19699   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19700 for as_dir in $PATH
19701 do
19702   IFS=$as_save_IFS
19703   test -z "$as_dir" && as_dir=.
19704     for ac_exec_ext in '' $ac_executable_extensions; do
19705   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19706     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19707     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19708     break 2
19709   fi
19710 done
19711   done
19712 IFS=$as_save_IFS
19713 
19714   ;;
19715 esac
19716 fi
19717 MAKE=$ac_cv_path_MAKE
19718 if test -n "$MAKE"; then
19719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19720 $as_echo "$MAKE" >&6; }
19721 else
19722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19723 $as_echo "no" >&6; }
19724 fi
19725 
19726 
19727           if test "x$MAKE" = x; then
19728             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19729           fi
19730         else
19731           # Otherwise we believe it is a complete path. Use it as it is.
19732           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19733 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19734           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19735 $as_echo_n "checking for MAKE... " >&6; }
19736           if test ! -x "$tool_specified"; then
19737             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19738 $as_echo "not found" >&6; }
19739             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19740           fi
19741           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19742 $as_echo "$tool_specified" >&6; }
19743         fi
19744       fi
19745     fi
19746 
19747     # If MAKE was set by user, verify the version
19748 
19749   MAKE_CANDIDATE=""$MAKE""
19750   DESCRIPTION="user supplied MAKE=$MAKE"
19751 
19752   # On Cygwin, we require a newer version of make than on other platforms
19753   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19754     MAKE_VERSION_EXPR="-e 4\."
19755     MAKE_REQUIRED_VERSION="4.0"
19756    else
19757     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19758     MAKE_REQUIRED_VERSION="3.81"
19759   fi
19760 
19761   if test "x$MAKE_CANDIDATE" != x; then
19762     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19763 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19764     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19765     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19766     if test "x$IS_GNU_MAKE" = x; then
19767       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19768 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19769     else
19770       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19771       if test "x$IS_MODERN_MAKE" = x; then
19772         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
19773 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
19774       else
19775         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19776           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19777             MAKE_EXPECTED_ENV='cygwin'
19778           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19779             MAKE_EXPECTED_ENV='msys'
19780           else
19781             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19782           fi
19783           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19784           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19785         else
19786           # Not relevant for non-Windows
19787           IS_MAKE_CORRECT_ENV=true
19788         fi
19789         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19790           { $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
19791 $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;}
19792         else
19793           FOUND_MAKE=$MAKE_CANDIDATE
19794 
19795   # Only process if variable expands to non-empty
19796 
19797   if test "x$FOUND_MAKE" != x; then
19798     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19799 
19800   # First separate the path from the arguments. This will split at the first
19801   # space.
19802   complete="$FOUND_MAKE"
19803   path="${complete%% *}"
19804   tmp="$complete EOL"
19805   arguments="${tmp#* }"
19806 
19807   # Input might be given as Windows format, start by converting to
19808   # unix format.
19809   new_path=`$CYGPATH -u "$path"`
19810 
19811   # Now try to locate executable using which
19812   new_path=`$WHICH "$new_path" 2> /dev/null`
19813   # bat and cmd files are not always considered executable in cygwin causing which
19814   # to not find them
19815   if test "x$new_path" = x \
19816       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19817       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19818     new_path=`$CYGPATH -u "$path"`
19819   fi
19820   if test "x$new_path" = x; then
19821     # Oops. Which didn't find the executable.
19822     # The splitting of arguments from the executable at a space might have been incorrect,
19823     # since paths with space are more likely in Windows. Give it another try with the whole
19824     # argument.
19825     path="$complete"
19826     arguments="EOL"
19827     new_path=`$CYGPATH -u "$path"`
19828     new_path=`$WHICH "$new_path" 2> /dev/null`
19829     # bat and cmd files are not always considered executable in cygwin causing which
19830     # to not find them
19831     if test "x$new_path" = x \
19832         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19833         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19834       new_path=`$CYGPATH -u "$path"`
19835     fi
19836     if test "x$new_path" = x; then
19837       # It's still not found. Now this is an unrecoverable error.
19838       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19839 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19840       has_space=`$ECHO "$complete" | $GREP " "`
19841       if test "x$has_space" != x; then
19842         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19843 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19844       fi
19845       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19846     fi
19847   fi
19848 
19849   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19850   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19851   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19852   # "foo.exe" is OK but "foo" is an error.
19853   #
19854   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19855   # It is also a way to make sure we got the proper file name for the real test later on.
19856   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19857   if test "x$test_shortpath" = x; then
19858     # Short path failed, file does not exist as specified.
19859     # Try adding .exe or .cmd
19860     if test -f "${new_path}.exe"; then
19861       input_to_shortpath="${new_path}.exe"
19862     elif test -f "${new_path}.cmd"; then
19863       input_to_shortpath="${new_path}.cmd"
19864     else
19865       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19866 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19867       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19868 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19869       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19870     fi
19871   else
19872     input_to_shortpath="$new_path"
19873   fi
19874 
19875   # Call helper function which possibly converts this using DOS-style short mode.
19876   # If so, the updated path is stored in $new_path.
19877   new_path="$input_to_shortpath"
19878 
19879   input_path="$input_to_shortpath"
19880   # Check if we need to convert this using DOS-style short mode. If the path
19881   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19882   # take no chances and rewrite it.
19883   # Note: m4 eats our [], so we need to use [ and ] instead.
19884   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19885   if test "x$has_forbidden_chars" != x; then
19886     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19887     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19888     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19889     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19890       # Going to short mode and back again did indeed matter. Since short mode is
19891       # case insensitive, let's make it lowercase to improve readability.
19892       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19893       # Now convert it back to Unix-style (cygpath)
19894       input_path=`$CYGPATH -u "$shortmode_path"`
19895       new_path="$input_path"
19896     fi
19897   fi
19898 
19899   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19900   if test "x$test_cygdrive_prefix" = x; then
19901     # As a simple fix, exclude /usr/bin since it's not a real path.
19902     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19903       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19904       # a path prefixed by /cygdrive for fixpath to work.
19905       new_path="$CYGWIN_ROOT_PATH$input_path"
19906     fi
19907   fi
19908 
19909   # remove trailing .exe if any
19910   new_path="${new_path/%.exe/}"
19911 
19912     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19913 
19914   # First separate the path from the arguments. This will split at the first
19915   # space.
19916   complete="$FOUND_MAKE"
19917   path="${complete%% *}"
19918   tmp="$complete EOL"
19919   arguments="${tmp#* }"
19920 
19921   # Input might be given as Windows format, start by converting to
19922   # unix format.
19923   new_path="$path"
19924 
19925   windows_path="$new_path"
19926   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19927     unix_path=`$CYGPATH -u "$windows_path"`
19928     new_path="$unix_path"
19929   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19930     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19931     new_path="$unix_path"
19932   fi
19933 
19934 
19935   # Now try to locate executable using which
19936   new_path=`$WHICH "$new_path" 2> /dev/null`
19937 
19938   if test "x$new_path" = x; then
19939     # Oops. Which didn't find the executable.
19940     # The splitting of arguments from the executable at a space might have been incorrect,
19941     # since paths with space are more likely in Windows. Give it another try with the whole
19942     # argument.
19943     path="$complete"
19944     arguments="EOL"
19945     new_path="$path"
19946 
19947   windows_path="$new_path"
19948   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19949     unix_path=`$CYGPATH -u "$windows_path"`
19950     new_path="$unix_path"
19951   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19952     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19953     new_path="$unix_path"
19954   fi
19955 
19956 
19957     new_path=`$WHICH "$new_path" 2> /dev/null`
19958     # bat and cmd files are not always considered executable in MSYS causing which
19959     # to not find them
19960     if test "x$new_path" = x \
19961         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19962         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19963       new_path="$path"
19964 
19965   windows_path="$new_path"
19966   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19967     unix_path=`$CYGPATH -u "$windows_path"`
19968     new_path="$unix_path"
19969   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19970     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19971     new_path="$unix_path"
19972   fi
19973 
19974     fi
19975 
19976     if test "x$new_path" = x; then
19977       # It's still not found. Now this is an unrecoverable error.
19978       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19979 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19980       has_space=`$ECHO "$complete" | $GREP " "`
19981       if test "x$has_space" != x; then
19982         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19983 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19984       fi
19985       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19986     fi
19987   fi
19988 
19989   # Now new_path has a complete unix path to the binary
19990   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19991     # Keep paths in /bin as-is, but remove trailing .exe if any
19992     new_path="${new_path/%.exe/}"
19993     # Do not save /bin paths to all_fixpath_prefixes!
19994   else
19995     # Not in mixed or Windows style, start by that.
19996     new_path=`cmd //c echo $new_path`
19997 
19998   input_path="$new_path"
19999   # Check if we need to convert this using DOS-style short mode. If the path
20000   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20001   # take no chances and rewrite it.
20002   # Note: m4 eats our [], so we need to use [ and ] instead.
20003   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20004   if test "x$has_forbidden_chars" != x; then
20005     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20006     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20007   fi
20008 
20009     # Output is in $new_path
20010 
20011   windows_path="$new_path"
20012   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20013     unix_path=`$CYGPATH -u "$windows_path"`
20014     new_path="$unix_path"
20015   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20016     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20017     new_path="$unix_path"
20018   fi
20019 
20020     # remove trailing .exe if any
20021     new_path="${new_path/%.exe/}"
20022 
20023     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20024     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20025   fi
20026 
20027     else
20028       # We're on a unix platform. Hooray! :)
20029       # First separate the path from the arguments. This will split at the first
20030       # space.
20031       complete="$FOUND_MAKE"
20032       path="${complete%% *}"
20033       tmp="$complete EOL"
20034       arguments="${tmp#* }"
20035 
20036       # Cannot rely on the command "which" here since it doesn't always work.
20037       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20038       if test -z "$is_absolute_path"; then
20039         # Path to executable is not absolute. Find it.
20040         IFS_save="$IFS"
20041         IFS=:
20042         for p in $PATH; do
20043           if test -f "$p/$path" && test -x "$p/$path"; then
20044             new_path="$p/$path"
20045             break
20046           fi
20047         done
20048         IFS="$IFS_save"
20049       else
20050         # This is an absolute path, we can use it without further modifications.
20051         new_path="$path"
20052       fi
20053 
20054       if test "x$new_path" = x; then
20055         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20056 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20057         has_space=`$ECHO "$complete" | $GREP " "`
20058         if test "x$has_space" != x; then
20059           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20060 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20061         fi
20062         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20063       fi
20064     fi
20065 
20066     # Now join together the path and the arguments once again
20067     if test "x$arguments" != xEOL; then
20068       new_complete="$new_path ${arguments% *}"
20069     else
20070       new_complete="$new_path"
20071     fi
20072 
20073     if test "x$complete" != "x$new_complete"; then
20074       FOUND_MAKE="$new_complete"
20075       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20076 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20077     fi
20078   fi
20079 
20080         fi
20081       fi
20082     fi
20083   fi
20084 
20085     if test "x$FOUND_MAKE" = x; then
20086       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20087     fi
20088 
20089   fi
20090 
20091 
20092   MAKE=$FOUND_MAKE
20093 
20094   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20095 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20096 
20097 
20098   # Check if make supports the output sync option and if so, setup using it.
20099   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20100 $as_echo_n "checking if make --output-sync is supported... " >&6; }
20101   if $MAKE --version -O > /dev/null 2>&1; then
20102     OUTPUT_SYNC_SUPPORTED=true
20103     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20104 $as_echo "yes" >&6; }
20105     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20106 $as_echo_n "checking for output-sync value... " >&6; }
20107 
20108 # Check whether --with-output-sync was given.
20109 if test "${with_output_sync+set}" = set; then :
20110   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20111 fi
20112 
20113     if test "x$OUTPUT_SYNC" = "x"; then
20114       OUTPUT_SYNC=none
20115     fi
20116     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20117 $as_echo "$OUTPUT_SYNC" >&6; }
20118     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20119       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20120     fi
20121   else
20122     OUTPUT_SYNC_SUPPORTED=false
20123     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20124 $as_echo "no" >&6; }
20125   fi
20126 
20127 
20128 
20129 
20130 
20131 
20132   # Test if find supports -delete
20133   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20134 $as_echo_n "checking if find supports -delete... " >&6; }
20135   FIND_DELETE="-delete"
20136 
20137   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20138 
20139   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20140 
20141   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20142   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20143     # No, it does not.
20144     rm $DELETEDIR/TestIfFindSupportsDelete
20145     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20146       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20147       FIND_DELETE="-print | xargs rm"
20148     else
20149       FIND_DELETE="-exec rm \{\} \+"
20150     fi
20151     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20152 $as_echo "no" >&6; }
20153   else
20154     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20155 $as_echo "yes" >&6; }
20156   fi
20157   rmdir $DELETEDIR
20158 
20159 
20160 
20161   # These tools might not be installed by default,
20162   # need hint on how to install them.
20163 
20164 
20165 
20166   # Publish this variable in the help.
20167 
20168 
20169   if [ -z "${UNZIP+x}" ]; then
20170     # The variable is not set by user, try to locate tool using the code snippet
20171     for ac_prog in unzip
20172 do
20173   # Extract the first word of "$ac_prog", so it can be a program name with args.
20174 set dummy $ac_prog; ac_word=$2
20175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20176 $as_echo_n "checking for $ac_word... " >&6; }
20177 if ${ac_cv_path_UNZIP+:} false; then :
20178   $as_echo_n "(cached) " >&6
20179 else
20180   case $UNZIP in
20181   [\\/]* | ?:[\\/]*)
20182   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20183   ;;
20184   *)
20185   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20186 for as_dir in $PATH
20187 do
20188   IFS=$as_save_IFS
20189   test -z "$as_dir" && as_dir=.
20190     for ac_exec_ext in '' $ac_executable_extensions; do
20191   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20192     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20193     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20194     break 2
20195   fi
20196 done
20197   done
20198 IFS=$as_save_IFS
20199 
20200   ;;
20201 esac
20202 fi
20203 UNZIP=$ac_cv_path_UNZIP
20204 if test -n "$UNZIP"; then
20205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20206 $as_echo "$UNZIP" >&6; }
20207 else
20208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20209 $as_echo "no" >&6; }
20210 fi
20211 
20212 
20213   test -n "$UNZIP" && break
20214 done
20215 
20216   else
20217     # The variable is set, but is it from the command line or the environment?
20218 
20219     # Try to remove the string !UNZIP! from our list.
20220     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20221     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20222       # If it failed, the variable was not from the command line. Ignore it,
20223       # but warn the user (except for BASH, which is always set by the calling BASH).
20224       if test "xUNZIP" != xBASH; then
20225         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20226 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20227       fi
20228       # Try to locate tool using the code snippet
20229       for ac_prog in unzip
20230 do
20231   # Extract the first word of "$ac_prog", so it can be a program name with args.
20232 set dummy $ac_prog; ac_word=$2
20233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20234 $as_echo_n "checking for $ac_word... " >&6; }
20235 if ${ac_cv_path_UNZIP+:} false; then :
20236   $as_echo_n "(cached) " >&6
20237 else
20238   case $UNZIP in
20239   [\\/]* | ?:[\\/]*)
20240   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20241   ;;
20242   *)
20243   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20244 for as_dir in $PATH
20245 do
20246   IFS=$as_save_IFS
20247   test -z "$as_dir" && as_dir=.
20248     for ac_exec_ext in '' $ac_executable_extensions; do
20249   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20250     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20251     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20252     break 2
20253   fi
20254 done
20255   done
20256 IFS=$as_save_IFS
20257 
20258   ;;
20259 esac
20260 fi
20261 UNZIP=$ac_cv_path_UNZIP
20262 if test -n "$UNZIP"; then
20263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20264 $as_echo "$UNZIP" >&6; }
20265 else
20266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20267 $as_echo "no" >&6; }
20268 fi
20269 
20270 
20271   test -n "$UNZIP" && break
20272 done
20273 
20274     else
20275       # If it succeeded, then it was overridden by the user. We will use it
20276       # for the tool.
20277 
20278       # First remove it from the list of overridden variables, so we can test
20279       # for unknown variables in the end.
20280       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20281 
20282       # Check if we try to supply an empty value
20283       if test "x$UNZIP" = x; then
20284         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20285 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20286         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20287 $as_echo_n "checking for UNZIP... " >&6; }
20288         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20289 $as_echo "disabled" >&6; }
20290       else
20291         # Check if the provided tool contains a complete path.
20292         tool_specified="$UNZIP"
20293         tool_basename="${tool_specified##*/}"
20294         if test "x$tool_basename" = "x$tool_specified"; then
20295           # A command without a complete path is provided, search $PATH.
20296           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20297 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20298           # Extract the first word of "$tool_basename", so it can be a program name with args.
20299 set dummy $tool_basename; ac_word=$2
20300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20301 $as_echo_n "checking for $ac_word... " >&6; }
20302 if ${ac_cv_path_UNZIP+:} false; then :
20303   $as_echo_n "(cached) " >&6
20304 else
20305   case $UNZIP in
20306   [\\/]* | ?:[\\/]*)
20307   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20308   ;;
20309   *)
20310   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20311 for as_dir in $PATH
20312 do
20313   IFS=$as_save_IFS
20314   test -z "$as_dir" && as_dir=.
20315     for ac_exec_ext in '' $ac_executable_extensions; do
20316   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20317     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20318     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20319     break 2
20320   fi
20321 done
20322   done
20323 IFS=$as_save_IFS
20324 
20325   ;;
20326 esac
20327 fi
20328 UNZIP=$ac_cv_path_UNZIP
20329 if test -n "$UNZIP"; then
20330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20331 $as_echo "$UNZIP" >&6; }
20332 else
20333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20334 $as_echo "no" >&6; }
20335 fi
20336 
20337 
20338           if test "x$UNZIP" = x; then
20339             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20340           fi
20341         else
20342           # Otherwise we believe it is a complete path. Use it as it is.
20343           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20344 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20345           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20346 $as_echo_n "checking for UNZIP... " >&6; }
20347           if test ! -x "$tool_specified"; then
20348             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20349 $as_echo "not found" >&6; }
20350             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20351           fi
20352           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20353 $as_echo "$tool_specified" >&6; }
20354         fi
20355       fi
20356     fi
20357 
20358   fi
20359 
20360 
20361 
20362   if test "x$UNZIP" = x; then
20363     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20364   fi
20365 
20366 
20367 
20368 
20369 
20370   # Publish this variable in the help.
20371 
20372 
20373   if [ -z "${ZIP+x}" ]; then
20374     # The variable is not set by user, try to locate tool using the code snippet
20375     for ac_prog in zip
20376 do
20377   # Extract the first word of "$ac_prog", so it can be a program name with args.
20378 set dummy $ac_prog; ac_word=$2
20379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20380 $as_echo_n "checking for $ac_word... " >&6; }
20381 if ${ac_cv_path_ZIP+:} false; then :
20382   $as_echo_n "(cached) " >&6
20383 else
20384   case $ZIP in
20385   [\\/]* | ?:[\\/]*)
20386   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20387   ;;
20388   *)
20389   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20390 for as_dir in $PATH
20391 do
20392   IFS=$as_save_IFS
20393   test -z "$as_dir" && as_dir=.
20394     for ac_exec_ext in '' $ac_executable_extensions; do
20395   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20396     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20397     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20398     break 2
20399   fi
20400 done
20401   done
20402 IFS=$as_save_IFS
20403 
20404   ;;
20405 esac
20406 fi
20407 ZIP=$ac_cv_path_ZIP
20408 if test -n "$ZIP"; then
20409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20410 $as_echo "$ZIP" >&6; }
20411 else
20412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20413 $as_echo "no" >&6; }
20414 fi
20415 
20416 
20417   test -n "$ZIP" && break
20418 done
20419 
20420   else
20421     # The variable is set, but is it from the command line or the environment?
20422 
20423     # Try to remove the string !ZIP! from our list.
20424     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20425     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20426       # If it failed, the variable was not from the command line. Ignore it,
20427       # but warn the user (except for BASH, which is always set by the calling BASH).
20428       if test "xZIP" != xBASH; then
20429         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20430 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20431       fi
20432       # Try to locate tool using the code snippet
20433       for ac_prog in zip
20434 do
20435   # Extract the first word of "$ac_prog", so it can be a program name with args.
20436 set dummy $ac_prog; ac_word=$2
20437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20438 $as_echo_n "checking for $ac_word... " >&6; }
20439 if ${ac_cv_path_ZIP+:} false; then :
20440   $as_echo_n "(cached) " >&6
20441 else
20442   case $ZIP in
20443   [\\/]* | ?:[\\/]*)
20444   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20445   ;;
20446   *)
20447   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20448 for as_dir in $PATH
20449 do
20450   IFS=$as_save_IFS
20451   test -z "$as_dir" && as_dir=.
20452     for ac_exec_ext in '' $ac_executable_extensions; do
20453   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20454     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20455     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20456     break 2
20457   fi
20458 done
20459   done
20460 IFS=$as_save_IFS
20461 
20462   ;;
20463 esac
20464 fi
20465 ZIP=$ac_cv_path_ZIP
20466 if test -n "$ZIP"; then
20467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20468 $as_echo "$ZIP" >&6; }
20469 else
20470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20471 $as_echo "no" >&6; }
20472 fi
20473 
20474 
20475   test -n "$ZIP" && break
20476 done
20477 
20478     else
20479       # If it succeeded, then it was overridden by the user. We will use it
20480       # for the tool.
20481 
20482       # First remove it from the list of overridden variables, so we can test
20483       # for unknown variables in the end.
20484       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20485 
20486       # Check if we try to supply an empty value
20487       if test "x$ZIP" = x; then
20488         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20489 $as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20490         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20491 $as_echo_n "checking for ZIP... " >&6; }
20492         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20493 $as_echo "disabled" >&6; }
20494       else
20495         # Check if the provided tool contains a complete path.
20496         tool_specified="$ZIP"
20497         tool_basename="${tool_specified##*/}"
20498         if test "x$tool_basename" = "x$tool_specified"; then
20499           # A command without a complete path is provided, search $PATH.
20500           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20501 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20502           # Extract the first word of "$tool_basename", so it can be a program name with args.
20503 set dummy $tool_basename; ac_word=$2
20504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20505 $as_echo_n "checking for $ac_word... " >&6; }
20506 if ${ac_cv_path_ZIP+:} false; then :
20507   $as_echo_n "(cached) " >&6
20508 else
20509   case $ZIP in
20510   [\\/]* | ?:[\\/]*)
20511   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20512   ;;
20513   *)
20514   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20515 for as_dir in $PATH
20516 do
20517   IFS=$as_save_IFS
20518   test -z "$as_dir" && as_dir=.
20519     for ac_exec_ext in '' $ac_executable_extensions; do
20520   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20521     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20522     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20523     break 2
20524   fi
20525 done
20526   done
20527 IFS=$as_save_IFS
20528 
20529   ;;
20530 esac
20531 fi
20532 ZIP=$ac_cv_path_ZIP
20533 if test -n "$ZIP"; then
20534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20535 $as_echo "$ZIP" >&6; }
20536 else
20537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20538 $as_echo "no" >&6; }
20539 fi
20540 
20541 
20542           if test "x$ZIP" = x; then
20543             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20544           fi
20545         else
20546           # Otherwise we believe it is a complete path. Use it as it is.
20547           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20548 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20549           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20550 $as_echo_n "checking for ZIP... " >&6; }
20551           if test ! -x "$tool_specified"; then
20552             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20553 $as_echo "not found" >&6; }
20554             as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20555           fi
20556           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20557 $as_echo "$tool_specified" >&6; }
20558         fi
20559       fi
20560     fi
20561 
20562   fi
20563 
20564 
20565 
20566   if test "x$ZIP" = x; then
20567     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20568   fi
20569 
20570 
20571 
20572   # Non-required basic tools
20573 
20574 
20575 
20576   # Publish this variable in the help.
20577 
20578 
20579   if [ -z "${LDD+x}" ]; then
20580     # The variable is not set by user, try to locate tool using the code snippet
20581     for ac_prog in ldd
20582 do
20583   # Extract the first word of "$ac_prog", so it can be a program name with args.
20584 set dummy $ac_prog; ac_word=$2
20585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20586 $as_echo_n "checking for $ac_word... " >&6; }
20587 if ${ac_cv_path_LDD+:} false; then :
20588   $as_echo_n "(cached) " >&6
20589 else
20590   case $LDD in
20591   [\\/]* | ?:[\\/]*)
20592   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20593   ;;
20594   *)
20595   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20596 for as_dir in $PATH
20597 do
20598   IFS=$as_save_IFS
20599   test -z "$as_dir" && as_dir=.
20600     for ac_exec_ext in '' $ac_executable_extensions; do
20601   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20602     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20603     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20604     break 2
20605   fi
20606 done
20607   done
20608 IFS=$as_save_IFS
20609 
20610   ;;
20611 esac
20612 fi
20613 LDD=$ac_cv_path_LDD
20614 if test -n "$LDD"; then
20615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20616 $as_echo "$LDD" >&6; }
20617 else
20618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20619 $as_echo "no" >&6; }
20620 fi
20621 
20622 
20623   test -n "$LDD" && break
20624 done
20625 
20626   else
20627     # The variable is set, but is it from the command line or the environment?
20628 
20629     # Try to remove the string !LDD! from our list.
20630     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20631     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20632       # If it failed, the variable was not from the command line. Ignore it,
20633       # but warn the user (except for BASH, which is always set by the calling BASH).
20634       if test "xLDD" != xBASH; then
20635         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20636 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20637       fi
20638       # Try to locate tool using the code snippet
20639       for ac_prog in ldd
20640 do
20641   # Extract the first word of "$ac_prog", so it can be a program name with args.
20642 set dummy $ac_prog; ac_word=$2
20643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20644 $as_echo_n "checking for $ac_word... " >&6; }
20645 if ${ac_cv_path_LDD+:} false; then :
20646   $as_echo_n "(cached) " >&6
20647 else
20648   case $LDD in
20649   [\\/]* | ?:[\\/]*)
20650   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20651   ;;
20652   *)
20653   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20654 for as_dir in $PATH
20655 do
20656   IFS=$as_save_IFS
20657   test -z "$as_dir" && as_dir=.
20658     for ac_exec_ext in '' $ac_executable_extensions; do
20659   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20660     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20661     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20662     break 2
20663   fi
20664 done
20665   done
20666 IFS=$as_save_IFS
20667 
20668   ;;
20669 esac
20670 fi
20671 LDD=$ac_cv_path_LDD
20672 if test -n "$LDD"; then
20673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20674 $as_echo "$LDD" >&6; }
20675 else
20676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20677 $as_echo "no" >&6; }
20678 fi
20679 
20680 
20681   test -n "$LDD" && break
20682 done
20683 
20684     else
20685       # If it succeeded, then it was overridden by the user. We will use it
20686       # for the tool.
20687 
20688       # First remove it from the list of overridden variables, so we can test
20689       # for unknown variables in the end.
20690       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20691 
20692       # Check if we try to supply an empty value
20693       if test "x$LDD" = x; then
20694         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20695 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20696         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20697 $as_echo_n "checking for LDD... " >&6; }
20698         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20699 $as_echo "disabled" >&6; }
20700       else
20701         # Check if the provided tool contains a complete path.
20702         tool_specified="$LDD"
20703         tool_basename="${tool_specified##*/}"
20704         if test "x$tool_basename" = "x$tool_specified"; then
20705           # A command without a complete path is provided, search $PATH.
20706           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20707 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20708           # Extract the first word of "$tool_basename", so it can be a program name with args.
20709 set dummy $tool_basename; ac_word=$2
20710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20711 $as_echo_n "checking for $ac_word... " >&6; }
20712 if ${ac_cv_path_LDD+:} false; then :
20713   $as_echo_n "(cached) " >&6
20714 else
20715   case $LDD in
20716   [\\/]* | ?:[\\/]*)
20717   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20718   ;;
20719   *)
20720   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20721 for as_dir in $PATH
20722 do
20723   IFS=$as_save_IFS
20724   test -z "$as_dir" && as_dir=.
20725     for ac_exec_ext in '' $ac_executable_extensions; do
20726   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20727     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20728     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20729     break 2
20730   fi
20731 done
20732   done
20733 IFS=$as_save_IFS
20734 
20735   ;;
20736 esac
20737 fi
20738 LDD=$ac_cv_path_LDD
20739 if test -n "$LDD"; then
20740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20741 $as_echo "$LDD" >&6; }
20742 else
20743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20744 $as_echo "no" >&6; }
20745 fi
20746 
20747 
20748           if test "x$LDD" = x; then
20749             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20750           fi
20751         else
20752           # Otherwise we believe it is a complete path. Use it as it is.
20753           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20754 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20755           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20756 $as_echo_n "checking for LDD... " >&6; }
20757           if test ! -x "$tool_specified"; then
20758             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20759 $as_echo "not found" >&6; }
20760             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20761           fi
20762           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20763 $as_echo "$tool_specified" >&6; }
20764         fi
20765       fi
20766     fi
20767 
20768   fi
20769 
20770 
20771   if test "x$LDD" = "x"; then
20772     # List shared lib dependencies is used for
20773     # debug output and checking for forbidden dependencies.
20774     # We can build without it.
20775     LDD="true"
20776   fi
20777 
20778 
20779   # Publish this variable in the help.
20780 
20781 
20782   if [ -z "${OTOOL+x}" ]; then
20783     # The variable is not set by user, try to locate tool using the code snippet
20784     for ac_prog in otool
20785 do
20786   # Extract the first word of "$ac_prog", so it can be a program name with args.
20787 set dummy $ac_prog; ac_word=$2
20788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20789 $as_echo_n "checking for $ac_word... " >&6; }
20790 if ${ac_cv_path_OTOOL+:} false; then :
20791   $as_echo_n "(cached) " >&6
20792 else
20793   case $OTOOL in
20794   [\\/]* | ?:[\\/]*)
20795   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20796   ;;
20797   *)
20798   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20799 for as_dir in $PATH
20800 do
20801   IFS=$as_save_IFS
20802   test -z "$as_dir" && as_dir=.
20803     for ac_exec_ext in '' $ac_executable_extensions; do
20804   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20805     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20806     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20807     break 2
20808   fi
20809 done
20810   done
20811 IFS=$as_save_IFS
20812 
20813   ;;
20814 esac
20815 fi
20816 OTOOL=$ac_cv_path_OTOOL
20817 if test -n "$OTOOL"; then
20818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20819 $as_echo "$OTOOL" >&6; }
20820 else
20821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20822 $as_echo "no" >&6; }
20823 fi
20824 
20825 
20826   test -n "$OTOOL" && break
20827 done
20828 
20829   else
20830     # The variable is set, but is it from the command line or the environment?
20831 
20832     # Try to remove the string !OTOOL! from our list.
20833     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
20834     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20835       # If it failed, the variable was not from the command line. Ignore it,
20836       # but warn the user (except for BASH, which is always set by the calling BASH).
20837       if test "xOTOOL" != xBASH; then
20838         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
20839 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
20840       fi
20841       # Try to locate tool using the code snippet
20842       for ac_prog in otool
20843 do
20844   # Extract the first word of "$ac_prog", so it can be a program name with args.
20845 set dummy $ac_prog; ac_word=$2
20846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20847 $as_echo_n "checking for $ac_word... " >&6; }
20848 if ${ac_cv_path_OTOOL+:} false; then :
20849   $as_echo_n "(cached) " >&6
20850 else
20851   case $OTOOL in
20852   [\\/]* | ?:[\\/]*)
20853   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20854   ;;
20855   *)
20856   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20857 for as_dir in $PATH
20858 do
20859   IFS=$as_save_IFS
20860   test -z "$as_dir" && as_dir=.
20861     for ac_exec_ext in '' $ac_executable_extensions; do
20862   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20863     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20864     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20865     break 2
20866   fi
20867 done
20868   done
20869 IFS=$as_save_IFS
20870 
20871   ;;
20872 esac
20873 fi
20874 OTOOL=$ac_cv_path_OTOOL
20875 if test -n "$OTOOL"; then
20876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20877 $as_echo "$OTOOL" >&6; }
20878 else
20879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20880 $as_echo "no" >&6; }
20881 fi
20882 
20883 
20884   test -n "$OTOOL" && break
20885 done
20886 
20887     else
20888       # If it succeeded, then it was overridden by the user. We will use it
20889       # for the tool.
20890 
20891       # First remove it from the list of overridden variables, so we can test
20892       # for unknown variables in the end.
20893       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20894 
20895       # Check if we try to supply an empty value
20896       if test "x$OTOOL" = x; then
20897         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
20898 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
20899         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20900 $as_echo_n "checking for OTOOL... " >&6; }
20901         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20902 $as_echo "disabled" >&6; }
20903       else
20904         # Check if the provided tool contains a complete path.
20905         tool_specified="$OTOOL"
20906         tool_basename="${tool_specified##*/}"
20907         if test "x$tool_basename" = "x$tool_specified"; then
20908           # A command without a complete path is provided, search $PATH.
20909           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
20910 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
20911           # Extract the first word of "$tool_basename", so it can be a program name with args.
20912 set dummy $tool_basename; ac_word=$2
20913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20914 $as_echo_n "checking for $ac_word... " >&6; }
20915 if ${ac_cv_path_OTOOL+:} false; then :
20916   $as_echo_n "(cached) " >&6
20917 else
20918   case $OTOOL in
20919   [\\/]* | ?:[\\/]*)
20920   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20921   ;;
20922   *)
20923   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20924 for as_dir in $PATH
20925 do
20926   IFS=$as_save_IFS
20927   test -z "$as_dir" && as_dir=.
20928     for ac_exec_ext in '' $ac_executable_extensions; do
20929   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20930     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20931     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20932     break 2
20933   fi
20934 done
20935   done
20936 IFS=$as_save_IFS
20937 
20938   ;;
20939 esac
20940 fi
20941 OTOOL=$ac_cv_path_OTOOL
20942 if test -n "$OTOOL"; then
20943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20944 $as_echo "$OTOOL" >&6; }
20945 else
20946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20947 $as_echo "no" >&6; }
20948 fi
20949 
20950 
20951           if test "x$OTOOL" = x; then
20952             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20953           fi
20954         else
20955           # Otherwise we believe it is a complete path. Use it as it is.
20956           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
20957 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
20958           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20959 $as_echo_n "checking for OTOOL... " >&6; }
20960           if test ! -x "$tool_specified"; then
20961             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20962 $as_echo "not found" >&6; }
20963             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
20964           fi
20965           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20966 $as_echo "$tool_specified" >&6; }
20967         fi
20968       fi
20969     fi
20970 
20971   fi
20972 
20973 
20974   if test "x$OTOOL" = "x"; then
20975     OTOOL="true"
20976   fi
20977 
20978 
20979   # Publish this variable in the help.
20980 
20981 
20982   if [ -z "${READELF+x}" ]; then
20983     # The variable is not set by user, try to locate tool using the code snippet
20984     for ac_prog in greadelf readelf
20985 do
20986   # Extract the first word of "$ac_prog", so it can be a program name with args.
20987 set dummy $ac_prog; ac_word=$2
20988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20989 $as_echo_n "checking for $ac_word... " >&6; }
20990 if ${ac_cv_path_READELF+:} false; then :
20991   $as_echo_n "(cached) " >&6
20992 else
20993   case $READELF in
20994   [\\/]* | ?:[\\/]*)
20995   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
20996   ;;
20997   *)
20998   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20999 for as_dir in $PATH
21000 do
21001   IFS=$as_save_IFS
21002   test -z "$as_dir" && as_dir=.
21003     for ac_exec_ext in '' $ac_executable_extensions; do
21004   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21005     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21006     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21007     break 2
21008   fi
21009 done
21010   done
21011 IFS=$as_save_IFS
21012 
21013   ;;
21014 esac
21015 fi
21016 READELF=$ac_cv_path_READELF
21017 if test -n "$READELF"; then
21018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21019 $as_echo "$READELF" >&6; }
21020 else
21021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21022 $as_echo "no" >&6; }
21023 fi
21024 
21025 
21026   test -n "$READELF" && break
21027 done
21028 
21029   else
21030     # The variable is set, but is it from the command line or the environment?
21031 
21032     # Try to remove the string !READELF! from our list.
21033     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21034     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21035       # If it failed, the variable was not from the command line. Ignore it,
21036       # but warn the user (except for BASH, which is always set by the calling BASH).
21037       if test "xREADELF" != xBASH; then
21038         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21039 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21040       fi
21041       # Try to locate tool using the code snippet
21042       for ac_prog in greadelf readelf
21043 do
21044   # Extract the first word of "$ac_prog", so it can be a program name with args.
21045 set dummy $ac_prog; ac_word=$2
21046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21047 $as_echo_n "checking for $ac_word... " >&6; }
21048 if ${ac_cv_path_READELF+:} false; then :
21049   $as_echo_n "(cached) " >&6
21050 else
21051   case $READELF in
21052   [\\/]* | ?:[\\/]*)
21053   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21054   ;;
21055   *)
21056   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21057 for as_dir in $PATH
21058 do
21059   IFS=$as_save_IFS
21060   test -z "$as_dir" && as_dir=.
21061     for ac_exec_ext in '' $ac_executable_extensions; do
21062   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21063     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21064     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21065     break 2
21066   fi
21067 done
21068   done
21069 IFS=$as_save_IFS
21070 
21071   ;;
21072 esac
21073 fi
21074 READELF=$ac_cv_path_READELF
21075 if test -n "$READELF"; then
21076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21077 $as_echo "$READELF" >&6; }
21078 else
21079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21080 $as_echo "no" >&6; }
21081 fi
21082 
21083 
21084   test -n "$READELF" && break
21085 done
21086 
21087     else
21088       # If it succeeded, then it was overridden by the user. We will use it
21089       # for the tool.
21090 
21091       # First remove it from the list of overridden variables, so we can test
21092       # for unknown variables in the end.
21093       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21094 
21095       # Check if we try to supply an empty value
21096       if test "x$READELF" = x; then
21097         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21098 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21099         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21100 $as_echo_n "checking for READELF... " >&6; }
21101         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21102 $as_echo "disabled" >&6; }
21103       else
21104         # Check if the provided tool contains a complete path.
21105         tool_specified="$READELF"
21106         tool_basename="${tool_specified##*/}"
21107         if test "x$tool_basename" = "x$tool_specified"; then
21108           # A command without a complete path is provided, search $PATH.
21109           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21110 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21111           # Extract the first word of "$tool_basename", so it can be a program name with args.
21112 set dummy $tool_basename; ac_word=$2
21113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21114 $as_echo_n "checking for $ac_word... " >&6; }
21115 if ${ac_cv_path_READELF+:} false; then :
21116   $as_echo_n "(cached) " >&6
21117 else
21118   case $READELF in
21119   [\\/]* | ?:[\\/]*)
21120   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21121   ;;
21122   *)
21123   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21124 for as_dir in $PATH
21125 do
21126   IFS=$as_save_IFS
21127   test -z "$as_dir" && as_dir=.
21128     for ac_exec_ext in '' $ac_executable_extensions; do
21129   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21130     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21131     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21132     break 2
21133   fi
21134 done
21135   done
21136 IFS=$as_save_IFS
21137 
21138   ;;
21139 esac
21140 fi
21141 READELF=$ac_cv_path_READELF
21142 if test -n "$READELF"; then
21143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21144 $as_echo "$READELF" >&6; }
21145 else
21146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21147 $as_echo "no" >&6; }
21148 fi
21149 
21150 
21151           if test "x$READELF" = x; then
21152             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21153           fi
21154         else
21155           # Otherwise we believe it is a complete path. Use it as it is.
21156           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21157 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21158           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21159 $as_echo_n "checking for READELF... " >&6; }
21160           if test ! -x "$tool_specified"; then
21161             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21162 $as_echo "not found" >&6; }
21163             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21164           fi
21165           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21166 $as_echo "$tool_specified" >&6; }
21167         fi
21168       fi
21169     fi
21170 
21171   fi
21172 
21173 
21174 
21175 
21176   # Publish this variable in the help.
21177 
21178 
21179   if [ -z "${HG+x}" ]; then
21180     # The variable is not set by user, try to locate tool using the code snippet
21181     for ac_prog in hg
21182 do
21183   # Extract the first word of "$ac_prog", so it can be a program name with args.
21184 set dummy $ac_prog; ac_word=$2
21185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21186 $as_echo_n "checking for $ac_word... " >&6; }
21187 if ${ac_cv_path_HG+:} false; then :
21188   $as_echo_n "(cached) " >&6
21189 else
21190   case $HG in
21191   [\\/]* | ?:[\\/]*)
21192   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21193   ;;
21194   *)
21195   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21196 for as_dir in $PATH
21197 do
21198   IFS=$as_save_IFS
21199   test -z "$as_dir" && as_dir=.
21200     for ac_exec_ext in '' $ac_executable_extensions; do
21201   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21202     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21203     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21204     break 2
21205   fi
21206 done
21207   done
21208 IFS=$as_save_IFS
21209 
21210   ;;
21211 esac
21212 fi
21213 HG=$ac_cv_path_HG
21214 if test -n "$HG"; then
21215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21216 $as_echo "$HG" >&6; }
21217 else
21218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21219 $as_echo "no" >&6; }
21220 fi
21221 
21222 
21223   test -n "$HG" && break
21224 done
21225 
21226   else
21227     # The variable is set, but is it from the command line or the environment?
21228 
21229     # Try to remove the string !HG! from our list.
21230     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21231     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21232       # If it failed, the variable was not from the command line. Ignore it,
21233       # but warn the user (except for BASH, which is always set by the calling BASH).
21234       if test "xHG" != xBASH; then
21235         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21236 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21237       fi
21238       # Try to locate tool using the code snippet
21239       for ac_prog in hg
21240 do
21241   # Extract the first word of "$ac_prog", so it can be a program name with args.
21242 set dummy $ac_prog; ac_word=$2
21243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21244 $as_echo_n "checking for $ac_word... " >&6; }
21245 if ${ac_cv_path_HG+:} false; then :
21246   $as_echo_n "(cached) " >&6
21247 else
21248   case $HG in
21249   [\\/]* | ?:[\\/]*)
21250   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21251   ;;
21252   *)
21253   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21254 for as_dir in $PATH
21255 do
21256   IFS=$as_save_IFS
21257   test -z "$as_dir" && as_dir=.
21258     for ac_exec_ext in '' $ac_executable_extensions; do
21259   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21260     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21261     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21262     break 2
21263   fi
21264 done
21265   done
21266 IFS=$as_save_IFS
21267 
21268   ;;
21269 esac
21270 fi
21271 HG=$ac_cv_path_HG
21272 if test -n "$HG"; then
21273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21274 $as_echo "$HG" >&6; }
21275 else
21276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21277 $as_echo "no" >&6; }
21278 fi
21279 
21280 
21281   test -n "$HG" && break
21282 done
21283 
21284     else
21285       # If it succeeded, then it was overridden by the user. We will use it
21286       # for the tool.
21287 
21288       # First remove it from the list of overridden variables, so we can test
21289       # for unknown variables in the end.
21290       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21291 
21292       # Check if we try to supply an empty value
21293       if test "x$HG" = x; then
21294         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21295 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21296         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21297 $as_echo_n "checking for HG... " >&6; }
21298         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21299 $as_echo "disabled" >&6; }
21300       else
21301         # Check if the provided tool contains a complete path.
21302         tool_specified="$HG"
21303         tool_basename="${tool_specified##*/}"
21304         if test "x$tool_basename" = "x$tool_specified"; then
21305           # A command without a complete path is provided, search $PATH.
21306           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21307 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21308           # Extract the first word of "$tool_basename", so it can be a program name with args.
21309 set dummy $tool_basename; ac_word=$2
21310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21311 $as_echo_n "checking for $ac_word... " >&6; }
21312 if ${ac_cv_path_HG+:} false; then :
21313   $as_echo_n "(cached) " >&6
21314 else
21315   case $HG in
21316   [\\/]* | ?:[\\/]*)
21317   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21318   ;;
21319   *)
21320   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21321 for as_dir in $PATH
21322 do
21323   IFS=$as_save_IFS
21324   test -z "$as_dir" && as_dir=.
21325     for ac_exec_ext in '' $ac_executable_extensions; do
21326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21327     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21329     break 2
21330   fi
21331 done
21332   done
21333 IFS=$as_save_IFS
21334 
21335   ;;
21336 esac
21337 fi
21338 HG=$ac_cv_path_HG
21339 if test -n "$HG"; then
21340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21341 $as_echo "$HG" >&6; }
21342 else
21343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21344 $as_echo "no" >&6; }
21345 fi
21346 
21347 
21348           if test "x$HG" = x; then
21349             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21350           fi
21351         else
21352           # Otherwise we believe it is a complete path. Use it as it is.
21353           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21354 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21355           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21356 $as_echo_n "checking for HG... " >&6; }
21357           if test ! -x "$tool_specified"; then
21358             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21359 $as_echo "not found" >&6; }
21360             as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21361           fi
21362           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21363 $as_echo "$tool_specified" >&6; }
21364         fi
21365       fi
21366     fi
21367 
21368   fi
21369 
21370 
21371 
21372 
21373   # Publish this variable in the help.
21374 
21375 
21376   if [ -z "${STAT+x}" ]; then
21377     # The variable is not set by user, try to locate tool using the code snippet
21378     for ac_prog in stat
21379 do
21380   # Extract the first word of "$ac_prog", so it can be a program name with args.
21381 set dummy $ac_prog; ac_word=$2
21382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21383 $as_echo_n "checking for $ac_word... " >&6; }
21384 if ${ac_cv_path_STAT+:} false; then :
21385   $as_echo_n "(cached) " >&6
21386 else
21387   case $STAT in
21388   [\\/]* | ?:[\\/]*)
21389   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21390   ;;
21391   *)
21392   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21393 for as_dir in $PATH
21394 do
21395   IFS=$as_save_IFS
21396   test -z "$as_dir" && as_dir=.
21397     for ac_exec_ext in '' $ac_executable_extensions; do
21398   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21399     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21400     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21401     break 2
21402   fi
21403 done
21404   done
21405 IFS=$as_save_IFS
21406 
21407   ;;
21408 esac
21409 fi
21410 STAT=$ac_cv_path_STAT
21411 if test -n "$STAT"; then
21412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21413 $as_echo "$STAT" >&6; }
21414 else
21415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21416 $as_echo "no" >&6; }
21417 fi
21418 
21419 
21420   test -n "$STAT" && break
21421 done
21422 
21423   else
21424     # The variable is set, but is it from the command line or the environment?
21425 
21426     # Try to remove the string !STAT! from our list.
21427     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21428     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21429       # If it failed, the variable was not from the command line. Ignore it,
21430       # but warn the user (except for BASH, which is always set by the calling BASH).
21431       if test "xSTAT" != xBASH; then
21432         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21433 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21434       fi
21435       # Try to locate tool using the code snippet
21436       for ac_prog in stat
21437 do
21438   # Extract the first word of "$ac_prog", so it can be a program name with args.
21439 set dummy $ac_prog; ac_word=$2
21440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21441 $as_echo_n "checking for $ac_word... " >&6; }
21442 if ${ac_cv_path_STAT+:} false; then :
21443   $as_echo_n "(cached) " >&6
21444 else
21445   case $STAT in
21446   [\\/]* | ?:[\\/]*)
21447   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21448   ;;
21449   *)
21450   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21451 for as_dir in $PATH
21452 do
21453   IFS=$as_save_IFS
21454   test -z "$as_dir" && as_dir=.
21455     for ac_exec_ext in '' $ac_executable_extensions; do
21456   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21457     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21458     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21459     break 2
21460   fi
21461 done
21462   done
21463 IFS=$as_save_IFS
21464 
21465   ;;
21466 esac
21467 fi
21468 STAT=$ac_cv_path_STAT
21469 if test -n "$STAT"; then
21470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21471 $as_echo "$STAT" >&6; }
21472 else
21473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21474 $as_echo "no" >&6; }
21475 fi
21476 
21477 
21478   test -n "$STAT" && break
21479 done
21480 
21481     else
21482       # If it succeeded, then it was overridden by the user. We will use it
21483       # for the tool.
21484 
21485       # First remove it from the list of overridden variables, so we can test
21486       # for unknown variables in the end.
21487       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21488 
21489       # Check if we try to supply an empty value
21490       if test "x$STAT" = x; then
21491         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21492 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21493         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21494 $as_echo_n "checking for STAT... " >&6; }
21495         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21496 $as_echo "disabled" >&6; }
21497       else
21498         # Check if the provided tool contains a complete path.
21499         tool_specified="$STAT"
21500         tool_basename="${tool_specified##*/}"
21501         if test "x$tool_basename" = "x$tool_specified"; then
21502           # A command without a complete path is provided, search $PATH.
21503           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21504 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21505           # Extract the first word of "$tool_basename", so it can be a program name with args.
21506 set dummy $tool_basename; ac_word=$2
21507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21508 $as_echo_n "checking for $ac_word... " >&6; }
21509 if ${ac_cv_path_STAT+:} false; then :
21510   $as_echo_n "(cached) " >&6
21511 else
21512   case $STAT in
21513   [\\/]* | ?:[\\/]*)
21514   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21515   ;;
21516   *)
21517   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21518 for as_dir in $PATH
21519 do
21520   IFS=$as_save_IFS
21521   test -z "$as_dir" && as_dir=.
21522     for ac_exec_ext in '' $ac_executable_extensions; do
21523   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21524     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21525     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21526     break 2
21527   fi
21528 done
21529   done
21530 IFS=$as_save_IFS
21531 
21532   ;;
21533 esac
21534 fi
21535 STAT=$ac_cv_path_STAT
21536 if test -n "$STAT"; then
21537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21538 $as_echo "$STAT" >&6; }
21539 else
21540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21541 $as_echo "no" >&6; }
21542 fi
21543 
21544 
21545           if test "x$STAT" = x; then
21546             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21547           fi
21548         else
21549           # Otherwise we believe it is a complete path. Use it as it is.
21550           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21551 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21552           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21553 $as_echo_n "checking for STAT... " >&6; }
21554           if test ! -x "$tool_specified"; then
21555             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21556 $as_echo "not found" >&6; }
21557             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21558           fi
21559           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21560 $as_echo "$tool_specified" >&6; }
21561         fi
21562       fi
21563     fi
21564 
21565   fi
21566 
21567 
21568 
21569 
21570   # Publish this variable in the help.
21571 
21572 
21573   if [ -z "${TIME+x}" ]; then
21574     # The variable is not set by user, try to locate tool using the code snippet
21575     for ac_prog in time
21576 do
21577   # Extract the first word of "$ac_prog", so it can be a program name with args.
21578 set dummy $ac_prog; ac_word=$2
21579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21580 $as_echo_n "checking for $ac_word... " >&6; }
21581 if ${ac_cv_path_TIME+:} false; then :
21582   $as_echo_n "(cached) " >&6
21583 else
21584   case $TIME in
21585   [\\/]* | ?:[\\/]*)
21586   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21587   ;;
21588   *)
21589   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21590 for as_dir in $PATH
21591 do
21592   IFS=$as_save_IFS
21593   test -z "$as_dir" && as_dir=.
21594     for ac_exec_ext in '' $ac_executable_extensions; do
21595   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21596     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21597     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21598     break 2
21599   fi
21600 done
21601   done
21602 IFS=$as_save_IFS
21603 
21604   ;;
21605 esac
21606 fi
21607 TIME=$ac_cv_path_TIME
21608 if test -n "$TIME"; then
21609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21610 $as_echo "$TIME" >&6; }
21611 else
21612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21613 $as_echo "no" >&6; }
21614 fi
21615 
21616 
21617   test -n "$TIME" && break
21618 done
21619 
21620   else
21621     # The variable is set, but is it from the command line or the environment?
21622 
21623     # Try to remove the string !TIME! from our list.
21624     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21625     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21626       # If it failed, the variable was not from the command line. Ignore it,
21627       # but warn the user (except for BASH, which is always set by the calling BASH).
21628       if test "xTIME" != xBASH; then
21629         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21630 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21631       fi
21632       # Try to locate tool using the code snippet
21633       for ac_prog in time
21634 do
21635   # Extract the first word of "$ac_prog", so it can be a program name with args.
21636 set dummy $ac_prog; ac_word=$2
21637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21638 $as_echo_n "checking for $ac_word... " >&6; }
21639 if ${ac_cv_path_TIME+:} false; then :
21640   $as_echo_n "(cached) " >&6
21641 else
21642   case $TIME in
21643   [\\/]* | ?:[\\/]*)
21644   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21645   ;;
21646   *)
21647   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21648 for as_dir in $PATH
21649 do
21650   IFS=$as_save_IFS
21651   test -z "$as_dir" && as_dir=.
21652     for ac_exec_ext in '' $ac_executable_extensions; do
21653   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21654     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21655     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21656     break 2
21657   fi
21658 done
21659   done
21660 IFS=$as_save_IFS
21661 
21662   ;;
21663 esac
21664 fi
21665 TIME=$ac_cv_path_TIME
21666 if test -n "$TIME"; then
21667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21668 $as_echo "$TIME" >&6; }
21669 else
21670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21671 $as_echo "no" >&6; }
21672 fi
21673 
21674 
21675   test -n "$TIME" && break
21676 done
21677 
21678     else
21679       # If it succeeded, then it was overridden by the user. We will use it
21680       # for the tool.
21681 
21682       # First remove it from the list of overridden variables, so we can test
21683       # for unknown variables in the end.
21684       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21685 
21686       # Check if we try to supply an empty value
21687       if test "x$TIME" = x; then
21688         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21689 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21690         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21691 $as_echo_n "checking for TIME... " >&6; }
21692         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21693 $as_echo "disabled" >&6; }
21694       else
21695         # Check if the provided tool contains a complete path.
21696         tool_specified="$TIME"
21697         tool_basename="${tool_specified##*/}"
21698         if test "x$tool_basename" = "x$tool_specified"; then
21699           # A command without a complete path is provided, search $PATH.
21700           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21701 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21702           # Extract the first word of "$tool_basename", so it can be a program name with args.
21703 set dummy $tool_basename; ac_word=$2
21704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21705 $as_echo_n "checking for $ac_word... " >&6; }
21706 if ${ac_cv_path_TIME+:} false; then :
21707   $as_echo_n "(cached) " >&6
21708 else
21709   case $TIME in
21710   [\\/]* | ?:[\\/]*)
21711   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21712   ;;
21713   *)
21714   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21715 for as_dir in $PATH
21716 do
21717   IFS=$as_save_IFS
21718   test -z "$as_dir" && as_dir=.
21719     for ac_exec_ext in '' $ac_executable_extensions; do
21720   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21721     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21723     break 2
21724   fi
21725 done
21726   done
21727 IFS=$as_save_IFS
21728 
21729   ;;
21730 esac
21731 fi
21732 TIME=$ac_cv_path_TIME
21733 if test -n "$TIME"; then
21734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21735 $as_echo "$TIME" >&6; }
21736 else
21737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21738 $as_echo "no" >&6; }
21739 fi
21740 
21741 
21742           if test "x$TIME" = x; then
21743             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21744           fi
21745         else
21746           # Otherwise we believe it is a complete path. Use it as it is.
21747           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21748 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21749           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21750 $as_echo_n "checking for TIME... " >&6; }
21751           if test ! -x "$tool_specified"; then
21752             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21753 $as_echo "not found" >&6; }
21754             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21755           fi
21756           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21757 $as_echo "$tool_specified" >&6; }
21758         fi
21759       fi
21760     fi
21761 
21762   fi
21763 
21764 
21765 
21766 
21767   # Publish this variable in the help.
21768 
21769 
21770   if [ -z "${PATCH+x}" ]; then
21771     # The variable is not set by user, try to locate tool using the code snippet
21772     for ac_prog in gpatch patch
21773 do
21774   # Extract the first word of "$ac_prog", so it can be a program name with args.
21775 set dummy $ac_prog; ac_word=$2
21776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21777 $as_echo_n "checking for $ac_word... " >&6; }
21778 if ${ac_cv_path_PATCH+:} false; then :
21779   $as_echo_n "(cached) " >&6
21780 else
21781   case $PATCH in
21782   [\\/]* | ?:[\\/]*)
21783   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21784   ;;
21785   *)
21786   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21787 for as_dir in $PATH
21788 do
21789   IFS=$as_save_IFS
21790   test -z "$as_dir" && as_dir=.
21791     for ac_exec_ext in '' $ac_executable_extensions; do
21792   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21793     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21794     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21795     break 2
21796   fi
21797 done
21798   done
21799 IFS=$as_save_IFS
21800 
21801   ;;
21802 esac
21803 fi
21804 PATCH=$ac_cv_path_PATCH
21805 if test -n "$PATCH"; then
21806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21807 $as_echo "$PATCH" >&6; }
21808 else
21809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21810 $as_echo "no" >&6; }
21811 fi
21812 
21813 
21814   test -n "$PATCH" && break
21815 done
21816 
21817   else
21818     # The variable is set, but is it from the command line or the environment?
21819 
21820     # Try to remove the string !PATCH! from our list.
21821     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
21822     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21823       # If it failed, the variable was not from the command line. Ignore it,
21824       # but warn the user (except for BASH, which is always set by the calling BASH).
21825       if test "xPATCH" != xBASH; then
21826         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
21827 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
21828       fi
21829       # Try to locate tool using the code snippet
21830       for ac_prog in gpatch patch
21831 do
21832   # Extract the first word of "$ac_prog", so it can be a program name with args.
21833 set dummy $ac_prog; ac_word=$2
21834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21835 $as_echo_n "checking for $ac_word... " >&6; }
21836 if ${ac_cv_path_PATCH+:} false; then :
21837   $as_echo_n "(cached) " >&6
21838 else
21839   case $PATCH in
21840   [\\/]* | ?:[\\/]*)
21841   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21842   ;;
21843   *)
21844   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21845 for as_dir in $PATH
21846 do
21847   IFS=$as_save_IFS
21848   test -z "$as_dir" && as_dir=.
21849     for ac_exec_ext in '' $ac_executable_extensions; do
21850   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21851     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21852     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21853     break 2
21854   fi
21855 done
21856   done
21857 IFS=$as_save_IFS
21858 
21859   ;;
21860 esac
21861 fi
21862 PATCH=$ac_cv_path_PATCH
21863 if test -n "$PATCH"; then
21864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21865 $as_echo "$PATCH" >&6; }
21866 else
21867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21868 $as_echo "no" >&6; }
21869 fi
21870 
21871 
21872   test -n "$PATCH" && break
21873 done
21874 
21875     else
21876       # If it succeeded, then it was overridden by the user. We will use it
21877       # for the tool.
21878 
21879       # First remove it from the list of overridden variables, so we can test
21880       # for unknown variables in the end.
21881       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21882 
21883       # Check if we try to supply an empty value
21884       if test "x$PATCH" = x; then
21885         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
21886 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
21887         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21888 $as_echo_n "checking for PATCH... " >&6; }
21889         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21890 $as_echo "disabled" >&6; }
21891       else
21892         # Check if the provided tool contains a complete path.
21893         tool_specified="$PATCH"
21894         tool_basename="${tool_specified##*/}"
21895         if test "x$tool_basename" = "x$tool_specified"; then
21896           # A command without a complete path is provided, search $PATH.
21897           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
21898 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
21899           # Extract the first word of "$tool_basename", so it can be a program name with args.
21900 set dummy $tool_basename; ac_word=$2
21901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21902 $as_echo_n "checking for $ac_word... " >&6; }
21903 if ${ac_cv_path_PATCH+:} false; then :
21904   $as_echo_n "(cached) " >&6
21905 else
21906   case $PATCH in
21907   [\\/]* | ?:[\\/]*)
21908   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21909   ;;
21910   *)
21911   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21912 for as_dir in $PATH
21913 do
21914   IFS=$as_save_IFS
21915   test -z "$as_dir" && as_dir=.
21916     for ac_exec_ext in '' $ac_executable_extensions; do
21917   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21918     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21919     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21920     break 2
21921   fi
21922 done
21923   done
21924 IFS=$as_save_IFS
21925 
21926   ;;
21927 esac
21928 fi
21929 PATCH=$ac_cv_path_PATCH
21930 if test -n "$PATCH"; then
21931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21932 $as_echo "$PATCH" >&6; }
21933 else
21934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21935 $as_echo "no" >&6; }
21936 fi
21937 
21938 
21939           if test "x$PATCH" = x; then
21940             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21941           fi
21942         else
21943           # Otherwise we believe it is a complete path. Use it as it is.
21944           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
21945 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
21946           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21947 $as_echo_n "checking for PATCH... " >&6; }
21948           if test ! -x "$tool_specified"; then
21949             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21950 $as_echo "not found" >&6; }
21951             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
21952           fi
21953           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21954 $as_echo "$tool_specified" >&6; }
21955         fi
21956       fi
21957     fi
21958 
21959   fi
21960 
21961 
21962   # Check if it's GNU time
21963   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
21964   if test "x$IS_GNU_TIME" != x; then
21965     IS_GNU_TIME=yes
21966   else
21967     IS_GNU_TIME=no
21968   fi
21969 
21970 
21971   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
21972 
21973 
21974 
21975   # Publish this variable in the help.
21976 
21977 
21978   if [ -z "${DSYMUTIL+x}" ]; then
21979     # The variable is not set by user, try to locate tool using the code snippet
21980     for ac_prog in dsymutil
21981 do
21982   # Extract the first word of "$ac_prog", so it can be a program name with args.
21983 set dummy $ac_prog; ac_word=$2
21984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21985 $as_echo_n "checking for $ac_word... " >&6; }
21986 if ${ac_cv_path_DSYMUTIL+:} false; then :
21987   $as_echo_n "(cached) " >&6
21988 else
21989   case $DSYMUTIL in
21990   [\\/]* | ?:[\\/]*)
21991   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
21992   ;;
21993   *)
21994   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21995 for as_dir in $PATH
21996 do
21997   IFS=$as_save_IFS
21998   test -z "$as_dir" && as_dir=.
21999     for ac_exec_ext in '' $ac_executable_extensions; do
22000   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22001     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22002     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22003     break 2
22004   fi
22005 done
22006   done
22007 IFS=$as_save_IFS
22008 
22009   ;;
22010 esac
22011 fi
22012 DSYMUTIL=$ac_cv_path_DSYMUTIL
22013 if test -n "$DSYMUTIL"; then
22014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22015 $as_echo "$DSYMUTIL" >&6; }
22016 else
22017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22018 $as_echo "no" >&6; }
22019 fi
22020 
22021 
22022   test -n "$DSYMUTIL" && break
22023 done
22024 
22025   else
22026     # The variable is set, but is it from the command line or the environment?
22027 
22028     # Try to remove the string !DSYMUTIL! from our list.
22029     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22030     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22031       # If it failed, the variable was not from the command line. Ignore it,
22032       # but warn the user (except for BASH, which is always set by the calling BASH).
22033       if test "xDSYMUTIL" != xBASH; then
22034         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22035 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22036       fi
22037       # Try to locate tool using the code snippet
22038       for ac_prog in dsymutil
22039 do
22040   # Extract the first word of "$ac_prog", so it can be a program name with args.
22041 set dummy $ac_prog; ac_word=$2
22042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22043 $as_echo_n "checking for $ac_word... " >&6; }
22044 if ${ac_cv_path_DSYMUTIL+:} false; then :
22045   $as_echo_n "(cached) " >&6
22046 else
22047   case $DSYMUTIL in
22048   [\\/]* | ?:[\\/]*)
22049   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22050   ;;
22051   *)
22052   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22053 for as_dir in $PATH
22054 do
22055   IFS=$as_save_IFS
22056   test -z "$as_dir" && as_dir=.
22057     for ac_exec_ext in '' $ac_executable_extensions; do
22058   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22059     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22060     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22061     break 2
22062   fi
22063 done
22064   done
22065 IFS=$as_save_IFS
22066 
22067   ;;
22068 esac
22069 fi
22070 DSYMUTIL=$ac_cv_path_DSYMUTIL
22071 if test -n "$DSYMUTIL"; then
22072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22073 $as_echo "$DSYMUTIL" >&6; }
22074 else
22075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22076 $as_echo "no" >&6; }
22077 fi
22078 
22079 
22080   test -n "$DSYMUTIL" && break
22081 done
22082 
22083     else
22084       # If it succeeded, then it was overridden by the user. We will use it
22085       # for the tool.
22086 
22087       # First remove it from the list of overridden variables, so we can test
22088       # for unknown variables in the end.
22089       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22090 
22091       # Check if we try to supply an empty value
22092       if test "x$DSYMUTIL" = x; then
22093         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22094 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22095         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22096 $as_echo_n "checking for DSYMUTIL... " >&6; }
22097         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22098 $as_echo "disabled" >&6; }
22099       else
22100         # Check if the provided tool contains a complete path.
22101         tool_specified="$DSYMUTIL"
22102         tool_basename="${tool_specified##*/}"
22103         if test "x$tool_basename" = "x$tool_specified"; then
22104           # A command without a complete path is provided, search $PATH.
22105           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22106 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22107           # Extract the first word of "$tool_basename", so it can be a program name with args.
22108 set dummy $tool_basename; ac_word=$2
22109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22110 $as_echo_n "checking for $ac_word... " >&6; }
22111 if ${ac_cv_path_DSYMUTIL+:} false; then :
22112   $as_echo_n "(cached) " >&6
22113 else
22114   case $DSYMUTIL in
22115   [\\/]* | ?:[\\/]*)
22116   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22117   ;;
22118   *)
22119   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22120 for as_dir in $PATH
22121 do
22122   IFS=$as_save_IFS
22123   test -z "$as_dir" && as_dir=.
22124     for ac_exec_ext in '' $ac_executable_extensions; do
22125   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22126     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22127     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22128     break 2
22129   fi
22130 done
22131   done
22132 IFS=$as_save_IFS
22133 
22134   ;;
22135 esac
22136 fi
22137 DSYMUTIL=$ac_cv_path_DSYMUTIL
22138 if test -n "$DSYMUTIL"; then
22139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22140 $as_echo "$DSYMUTIL" >&6; }
22141 else
22142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22143 $as_echo "no" >&6; }
22144 fi
22145 
22146 
22147           if test "x$DSYMUTIL" = x; then
22148             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22149           fi
22150         else
22151           # Otherwise we believe it is a complete path. Use it as it is.
22152           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22153 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22154           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22155 $as_echo_n "checking for DSYMUTIL... " >&6; }
22156           if test ! -x "$tool_specified"; then
22157             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22158 $as_echo "not found" >&6; }
22159             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22160           fi
22161           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22162 $as_echo "$tool_specified" >&6; }
22163         fi
22164       fi
22165     fi
22166 
22167   fi
22168 
22169 
22170 
22171   if test "x$DSYMUTIL" = x; then
22172     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22173   fi
22174 
22175 
22176 
22177 
22178 
22179   # Publish this variable in the help.
22180 
22181 
22182   if [ -z "${XATTR+x}" ]; then
22183     # The variable is not set by user, try to locate tool using the code snippet
22184     for ac_prog in xattr
22185 do
22186   # Extract the first word of "$ac_prog", so it can be a program name with args.
22187 set dummy $ac_prog; ac_word=$2
22188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22189 $as_echo_n "checking for $ac_word... " >&6; }
22190 if ${ac_cv_path_XATTR+:} false; then :
22191   $as_echo_n "(cached) " >&6
22192 else
22193   case $XATTR in
22194   [\\/]* | ?:[\\/]*)
22195   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22196   ;;
22197   *)
22198   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22199 for as_dir in $PATH
22200 do
22201   IFS=$as_save_IFS
22202   test -z "$as_dir" && as_dir=.
22203     for ac_exec_ext in '' $ac_executable_extensions; do
22204   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22205     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22206     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22207     break 2
22208   fi
22209 done
22210   done
22211 IFS=$as_save_IFS
22212 
22213   ;;
22214 esac
22215 fi
22216 XATTR=$ac_cv_path_XATTR
22217 if test -n "$XATTR"; then
22218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22219 $as_echo "$XATTR" >&6; }
22220 else
22221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22222 $as_echo "no" >&6; }
22223 fi
22224 
22225 
22226   test -n "$XATTR" && break
22227 done
22228 
22229   else
22230     # The variable is set, but is it from the command line or the environment?
22231 
22232     # Try to remove the string !XATTR! from our list.
22233     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22234     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22235       # If it failed, the variable was not from the command line. Ignore it,
22236       # but warn the user (except for BASH, which is always set by the calling BASH).
22237       if test "xXATTR" != xBASH; then
22238         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22239 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22240       fi
22241       # Try to locate tool using the code snippet
22242       for ac_prog in xattr
22243 do
22244   # Extract the first word of "$ac_prog", so it can be a program name with args.
22245 set dummy $ac_prog; ac_word=$2
22246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22247 $as_echo_n "checking for $ac_word... " >&6; }
22248 if ${ac_cv_path_XATTR+:} false; then :
22249   $as_echo_n "(cached) " >&6
22250 else
22251   case $XATTR in
22252   [\\/]* | ?:[\\/]*)
22253   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22254   ;;
22255   *)
22256   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22257 for as_dir in $PATH
22258 do
22259   IFS=$as_save_IFS
22260   test -z "$as_dir" && as_dir=.
22261     for ac_exec_ext in '' $ac_executable_extensions; do
22262   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22263     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22264     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22265     break 2
22266   fi
22267 done
22268   done
22269 IFS=$as_save_IFS
22270 
22271   ;;
22272 esac
22273 fi
22274 XATTR=$ac_cv_path_XATTR
22275 if test -n "$XATTR"; then
22276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22277 $as_echo "$XATTR" >&6; }
22278 else
22279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22280 $as_echo "no" >&6; }
22281 fi
22282 
22283 
22284   test -n "$XATTR" && break
22285 done
22286 
22287     else
22288       # If it succeeded, then it was overridden by the user. We will use it
22289       # for the tool.
22290 
22291       # First remove it from the list of overridden variables, so we can test
22292       # for unknown variables in the end.
22293       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22294 
22295       # Check if we try to supply an empty value
22296       if test "x$XATTR" = x; then
22297         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22298 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22299         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22300 $as_echo_n "checking for XATTR... " >&6; }
22301         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22302 $as_echo "disabled" >&6; }
22303       else
22304         # Check if the provided tool contains a complete path.
22305         tool_specified="$XATTR"
22306         tool_basename="${tool_specified##*/}"
22307         if test "x$tool_basename" = "x$tool_specified"; then
22308           # A command without a complete path is provided, search $PATH.
22309           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22310 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22311           # Extract the first word of "$tool_basename", so it can be a program name with args.
22312 set dummy $tool_basename; ac_word=$2
22313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22314 $as_echo_n "checking for $ac_word... " >&6; }
22315 if ${ac_cv_path_XATTR+:} false; then :
22316   $as_echo_n "(cached) " >&6
22317 else
22318   case $XATTR in
22319   [\\/]* | ?:[\\/]*)
22320   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22321   ;;
22322   *)
22323   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22324 for as_dir in $PATH
22325 do
22326   IFS=$as_save_IFS
22327   test -z "$as_dir" && as_dir=.
22328     for ac_exec_ext in '' $ac_executable_extensions; do
22329   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22330     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22331     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22332     break 2
22333   fi
22334 done
22335   done
22336 IFS=$as_save_IFS
22337 
22338   ;;
22339 esac
22340 fi
22341 XATTR=$ac_cv_path_XATTR
22342 if test -n "$XATTR"; then
22343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22344 $as_echo "$XATTR" >&6; }
22345 else
22346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22347 $as_echo "no" >&6; }
22348 fi
22349 
22350 
22351           if test "x$XATTR" = x; then
22352             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22353           fi
22354         else
22355           # Otherwise we believe it is a complete path. Use it as it is.
22356           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22357 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22358           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22359 $as_echo_n "checking for XATTR... " >&6; }
22360           if test ! -x "$tool_specified"; then
22361             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22362 $as_echo "not found" >&6; }
22363             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22364           fi
22365           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22366 $as_echo "$tool_specified" >&6; }
22367         fi
22368       fi
22369     fi
22370 
22371   fi
22372 
22373 
22374 
22375   if test "x$XATTR" = x; then
22376     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22377   fi
22378 
22379 
22380 
22381 
22382   # Publish this variable in the help.
22383 
22384 
22385   if [ -z "${CODESIGN+x}" ]; then
22386     # The variable is not set by user, try to locate tool using the code snippet
22387     for ac_prog in codesign
22388 do
22389   # Extract the first word of "$ac_prog", so it can be a program name with args.
22390 set dummy $ac_prog; ac_word=$2
22391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22392 $as_echo_n "checking for $ac_word... " >&6; }
22393 if ${ac_cv_path_CODESIGN+:} false; then :
22394   $as_echo_n "(cached) " >&6
22395 else
22396   case $CODESIGN in
22397   [\\/]* | ?:[\\/]*)
22398   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22399   ;;
22400   *)
22401   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22402 for as_dir in $PATH
22403 do
22404   IFS=$as_save_IFS
22405   test -z "$as_dir" && as_dir=.
22406     for ac_exec_ext in '' $ac_executable_extensions; do
22407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22408     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22410     break 2
22411   fi
22412 done
22413   done
22414 IFS=$as_save_IFS
22415 
22416   ;;
22417 esac
22418 fi
22419 CODESIGN=$ac_cv_path_CODESIGN
22420 if test -n "$CODESIGN"; then
22421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22422 $as_echo "$CODESIGN" >&6; }
22423 else
22424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22425 $as_echo "no" >&6; }
22426 fi
22427 
22428 
22429   test -n "$CODESIGN" && break
22430 done
22431 
22432   else
22433     # The variable is set, but is it from the command line or the environment?
22434 
22435     # Try to remove the string !CODESIGN! from our list.
22436     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22437     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22438       # If it failed, the variable was not from the command line. Ignore it,
22439       # but warn the user (except for BASH, which is always set by the calling BASH).
22440       if test "xCODESIGN" != xBASH; then
22441         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22442 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22443       fi
22444       # Try to locate tool using the code snippet
22445       for ac_prog in codesign
22446 do
22447   # Extract the first word of "$ac_prog", so it can be a program name with args.
22448 set dummy $ac_prog; ac_word=$2
22449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22450 $as_echo_n "checking for $ac_word... " >&6; }
22451 if ${ac_cv_path_CODESIGN+:} false; then :
22452   $as_echo_n "(cached) " >&6
22453 else
22454   case $CODESIGN in
22455   [\\/]* | ?:[\\/]*)
22456   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22457   ;;
22458   *)
22459   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22460 for as_dir in $PATH
22461 do
22462   IFS=$as_save_IFS
22463   test -z "$as_dir" && as_dir=.
22464     for ac_exec_ext in '' $ac_executable_extensions; do
22465   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22466     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22467     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22468     break 2
22469   fi
22470 done
22471   done
22472 IFS=$as_save_IFS
22473 
22474   ;;
22475 esac
22476 fi
22477 CODESIGN=$ac_cv_path_CODESIGN
22478 if test -n "$CODESIGN"; then
22479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22480 $as_echo "$CODESIGN" >&6; }
22481 else
22482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22483 $as_echo "no" >&6; }
22484 fi
22485 
22486 
22487   test -n "$CODESIGN" && break
22488 done
22489 
22490     else
22491       # If it succeeded, then it was overridden by the user. We will use it
22492       # for the tool.
22493 
22494       # First remove it from the list of overridden variables, so we can test
22495       # for unknown variables in the end.
22496       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22497 
22498       # Check if we try to supply an empty value
22499       if test "x$CODESIGN" = x; then
22500         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22501 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22502         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22503 $as_echo_n "checking for CODESIGN... " >&6; }
22504         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22505 $as_echo "disabled" >&6; }
22506       else
22507         # Check if the provided tool contains a complete path.
22508         tool_specified="$CODESIGN"
22509         tool_basename="${tool_specified##*/}"
22510         if test "x$tool_basename" = "x$tool_specified"; then
22511           # A command without a complete path is provided, search $PATH.
22512           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22513 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22514           # Extract the first word of "$tool_basename", so it can be a program name with args.
22515 set dummy $tool_basename; ac_word=$2
22516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22517 $as_echo_n "checking for $ac_word... " >&6; }
22518 if ${ac_cv_path_CODESIGN+:} false; then :
22519   $as_echo_n "(cached) " >&6
22520 else
22521   case $CODESIGN in
22522   [\\/]* | ?:[\\/]*)
22523   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22524   ;;
22525   *)
22526   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22527 for as_dir in $PATH
22528 do
22529   IFS=$as_save_IFS
22530   test -z "$as_dir" && as_dir=.
22531     for ac_exec_ext in '' $ac_executable_extensions; do
22532   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22533     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22534     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22535     break 2
22536   fi
22537 done
22538   done
22539 IFS=$as_save_IFS
22540 
22541   ;;
22542 esac
22543 fi
22544 CODESIGN=$ac_cv_path_CODESIGN
22545 if test -n "$CODESIGN"; then
22546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22547 $as_echo "$CODESIGN" >&6; }
22548 else
22549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22550 $as_echo "no" >&6; }
22551 fi
22552 
22553 
22554           if test "x$CODESIGN" = x; then
22555             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22556           fi
22557         else
22558           # Otherwise we believe it is a complete path. Use it as it is.
22559           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22560 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22561           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22562 $as_echo_n "checking for CODESIGN... " >&6; }
22563           if test ! -x "$tool_specified"; then
22564             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22565 $as_echo "not found" >&6; }
22566             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22567           fi
22568           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22569 $as_echo "$tool_specified" >&6; }
22570         fi
22571       fi
22572     fi
22573 
22574   fi
22575 
22576 
22577     if test "x$CODESIGN" != "x"; then
22578       # Verify that the openjdk_codesign certificate is present
22579       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22580 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22581       rm -f codesign-testfile
22582       touch codesign-testfile
22583       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22584       rm -f codesign-testfile
22585       if test "x$CODESIGN" = x; then
22586         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22587 $as_echo "no" >&6; }
22588       else
22589         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22590 $as_echo "yes" >&6; }
22591       fi
22592     fi
22593 
22594 
22595 
22596   # Publish this variable in the help.
22597 
22598 
22599   if [ -z "${SETFILE+x}" ]; then
22600     # The variable is not set by user, try to locate tool using the code snippet
22601     for ac_prog in SetFile
22602 do
22603   # Extract the first word of "$ac_prog", so it can be a program name with args.
22604 set dummy $ac_prog; ac_word=$2
22605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22606 $as_echo_n "checking for $ac_word... " >&6; }
22607 if ${ac_cv_path_SETFILE+:} false; then :
22608   $as_echo_n "(cached) " >&6
22609 else
22610   case $SETFILE in
22611   [\\/]* | ?:[\\/]*)
22612   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22613   ;;
22614   *)
22615   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22616 for as_dir in $PATH
22617 do
22618   IFS=$as_save_IFS
22619   test -z "$as_dir" && as_dir=.
22620     for ac_exec_ext in '' $ac_executable_extensions; do
22621   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22622     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22623     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22624     break 2
22625   fi
22626 done
22627   done
22628 IFS=$as_save_IFS
22629 
22630   ;;
22631 esac
22632 fi
22633 SETFILE=$ac_cv_path_SETFILE
22634 if test -n "$SETFILE"; then
22635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22636 $as_echo "$SETFILE" >&6; }
22637 else
22638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22639 $as_echo "no" >&6; }
22640 fi
22641 
22642 
22643   test -n "$SETFILE" && break
22644 done
22645 
22646   else
22647     # The variable is set, but is it from the command line or the environment?
22648 
22649     # Try to remove the string !SETFILE! from our list.
22650     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22651     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22652       # If it failed, the variable was not from the command line. Ignore it,
22653       # but warn the user (except for BASH, which is always set by the calling BASH).
22654       if test "xSETFILE" != xBASH; then
22655         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22656 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22657       fi
22658       # Try to locate tool using the code snippet
22659       for ac_prog in SetFile
22660 do
22661   # Extract the first word of "$ac_prog", so it can be a program name with args.
22662 set dummy $ac_prog; ac_word=$2
22663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22664 $as_echo_n "checking for $ac_word... " >&6; }
22665 if ${ac_cv_path_SETFILE+:} false; then :
22666   $as_echo_n "(cached) " >&6
22667 else
22668   case $SETFILE in
22669   [\\/]* | ?:[\\/]*)
22670   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22671   ;;
22672   *)
22673   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22674 for as_dir in $PATH
22675 do
22676   IFS=$as_save_IFS
22677   test -z "$as_dir" && as_dir=.
22678     for ac_exec_ext in '' $ac_executable_extensions; do
22679   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22680     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22681     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22682     break 2
22683   fi
22684 done
22685   done
22686 IFS=$as_save_IFS
22687 
22688   ;;
22689 esac
22690 fi
22691 SETFILE=$ac_cv_path_SETFILE
22692 if test -n "$SETFILE"; then
22693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22694 $as_echo "$SETFILE" >&6; }
22695 else
22696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22697 $as_echo "no" >&6; }
22698 fi
22699 
22700 
22701   test -n "$SETFILE" && break
22702 done
22703 
22704     else
22705       # If it succeeded, then it was overridden by the user. We will use it
22706       # for the tool.
22707 
22708       # First remove it from the list of overridden variables, so we can test
22709       # for unknown variables in the end.
22710       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22711 
22712       # Check if we try to supply an empty value
22713       if test "x$SETFILE" = x; then
22714         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22715 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22716         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22717 $as_echo_n "checking for SETFILE... " >&6; }
22718         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22719 $as_echo "disabled" >&6; }
22720       else
22721         # Check if the provided tool contains a complete path.
22722         tool_specified="$SETFILE"
22723         tool_basename="${tool_specified##*/}"
22724         if test "x$tool_basename" = "x$tool_specified"; then
22725           # A command without a complete path is provided, search $PATH.
22726           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22727 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22728           # Extract the first word of "$tool_basename", so it can be a program name with args.
22729 set dummy $tool_basename; ac_word=$2
22730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22731 $as_echo_n "checking for $ac_word... " >&6; }
22732 if ${ac_cv_path_SETFILE+:} false; then :
22733   $as_echo_n "(cached) " >&6
22734 else
22735   case $SETFILE in
22736   [\\/]* | ?:[\\/]*)
22737   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22738   ;;
22739   *)
22740   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22741 for as_dir in $PATH
22742 do
22743   IFS=$as_save_IFS
22744   test -z "$as_dir" && as_dir=.
22745     for ac_exec_ext in '' $ac_executable_extensions; do
22746   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22747     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22748     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22749     break 2
22750   fi
22751 done
22752   done
22753 IFS=$as_save_IFS
22754 
22755   ;;
22756 esac
22757 fi
22758 SETFILE=$ac_cv_path_SETFILE
22759 if test -n "$SETFILE"; then
22760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22761 $as_echo "$SETFILE" >&6; }
22762 else
22763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22764 $as_echo "no" >&6; }
22765 fi
22766 
22767 
22768           if test "x$SETFILE" = x; then
22769             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22770           fi
22771         else
22772           # Otherwise we believe it is a complete path. Use it as it is.
22773           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22774 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22775           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22776 $as_echo_n "checking for SETFILE... " >&6; }
22777           if test ! -x "$tool_specified"; then
22778             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22779 $as_echo "not found" >&6; }
22780             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22781           fi
22782           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22783 $as_echo "$tool_specified" >&6; }
22784         fi
22785       fi
22786     fi
22787 
22788   fi
22789 
22790 
22791 
22792   if test "x$SETFILE" = x; then
22793     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22794   fi
22795 
22796 
22797   fi
22798 
22799 
22800   # Test if bash supports pipefail.
22801   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
22802 $as_echo_n "checking if bash supports pipefail... " >&6; }
22803   if ${BASH} -c 'set -o pipefail'; then
22804     BASH_ARGS="$BASH_ARGS -o pipefail"
22805     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22806 $as_echo "yes" >&6; }
22807   else
22808     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22809 $as_echo "no" >&6; }
22810   fi
22811 
22812   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
22813 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
22814   if ${BASH} -e -c 'true'; then
22815     BASH_ARGS="$BASH_ARGS -e"
22816     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22817 $as_echo "yes" >&6; }
22818   else
22819     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22820 $as_echo "no" >&6; }
22821   fi
22822 
22823 
22824 
22825 
22826 # Check if pkg-config is available.
22827 
22828 
22829 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
22830         if test -n "$ac_tool_prefix"; then
22831   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22832 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
22833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22834 $as_echo_n "checking for $ac_word... " >&6; }
22835 if ${ac_cv_path_PKG_CONFIG+:} false; then :
22836   $as_echo_n "(cached) " >&6
22837 else
22838   case $PKG_CONFIG in
22839   [\\/]* | ?:[\\/]*)
22840   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
22841   ;;
22842   *)
22843   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22844 for as_dir in $PATH
22845 do
22846   IFS=$as_save_IFS
22847   test -z "$as_dir" && as_dir=.
22848     for ac_exec_ext in '' $ac_executable_extensions; do
22849   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22850     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22851     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22852     break 2
22853   fi
22854 done
22855   done
22856 IFS=$as_save_IFS
22857 
22858   ;;
22859 esac
22860 fi
22861 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
22862 if test -n "$PKG_CONFIG"; then
22863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
22864 $as_echo "$PKG_CONFIG" >&6; }
22865 else
22866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22867 $as_echo "no" >&6; }
22868 fi
22869 
22870 
22871 fi
22872 if test -z "$ac_cv_path_PKG_CONFIG"; then
22873   ac_pt_PKG_CONFIG=$PKG_CONFIG
22874   # Extract the first word of "pkg-config", so it can be a program name with args.
22875 set dummy pkg-config; ac_word=$2
22876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22877 $as_echo_n "checking for $ac_word... " >&6; }
22878 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
22879   $as_echo_n "(cached) " >&6
22880 else
22881   case $ac_pt_PKG_CONFIG in
22882   [\\/]* | ?:[\\/]*)
22883   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
22884   ;;
22885   *)
22886   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22887 for as_dir in $PATH
22888 do
22889   IFS=$as_save_IFS
22890   test -z "$as_dir" && as_dir=.
22891     for ac_exec_ext in '' $ac_executable_extensions; do
22892   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22893     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22894     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22895     break 2
22896   fi
22897 done
22898   done
22899 IFS=$as_save_IFS
22900 
22901   ;;
22902 esac
22903 fi
22904 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
22905 if test -n "$ac_pt_PKG_CONFIG"; then
22906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
22907 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
22908 else
22909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22910 $as_echo "no" >&6; }
22911 fi
22912 
22913   if test "x$ac_pt_PKG_CONFIG" = x; then
22914     PKG_CONFIG=""
22915   else
22916     case $cross_compiling:$ac_tool_warned in
22917 yes:)
22918 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22919 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22920 ac_tool_warned=yes ;;
22921 esac
22922     PKG_CONFIG=$ac_pt_PKG_CONFIG
22923   fi
22924 else
22925   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
22926 fi
22927 
22928 fi
22929 if test -n "$PKG_CONFIG"; then
22930         _pkg_min_version=0.9.0
22931         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
22932 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
22933         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
22934                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22935 $as_echo "yes" >&6; }
22936         else
22937                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22938 $as_echo "no" >&6; }
22939                 PKG_CONFIG=""
22940         fi
22941 
22942 fi
22943 
22944 # After basic tools have been setup, we can check build os specific details.
22945 
22946   ###############################################################################
22947 
22948   # Note that this is the build platform OS version!
22949 
22950   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
22951   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
22952   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
22953   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
22954 
22955 
22956 
22957 
22958 
22959 ###############################################################################
22960 #
22961 # Determine OpenJDK variants, options and version numbers.
22962 #
22963 ###############################################################################
22964 
22965 # We need build & target for this.
22966 
22967 
22968   ###############################################################################
22969   #
22970   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
22971   # We always build headless support.
22972   #
22973   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
22974 $as_echo_n "checking headful support... " >&6; }
22975   # Check whether --enable-headful was given.
22976 if test "${enable_headful+set}" = set; then :
22977   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
22978 else
22979   SUPPORT_HEADFUL=yes
22980 fi
22981 
22982 
22983   SUPPORT_HEADLESS=yes
22984   BUILD_HEADLESS="BUILD_HEADLESS:=true"
22985 
22986   if test "x$SUPPORT_HEADFUL" = xyes; then
22987     # We are building both headful and headless.
22988     headful_msg="include support for both headful and headless"
22989   fi
22990 
22991   if test "x$SUPPORT_HEADFUL" = xno; then
22992     # Thus we are building headless only.
22993     BUILD_HEADLESS="BUILD_HEADLESS:=true"
22994     headful_msg="headless only"
22995   fi
22996 
22997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
22998 $as_echo "$headful_msg" >&6; }
22999 
23000 
23001 
23002 
23003 
23004   # Control wether Hotspot runs Queens test after build.
23005   # Check whether --enable-hotspot-test-in-build was given.
23006 if test "${enable_hotspot_test_in_build+set}" = set; then :
23007   enableval=$enable_hotspot_test_in_build;
23008 else
23009   enable_hotspot_test_in_build=no
23010 fi
23011 
23012   if test "x$enable_hotspot_test_in_build" = "xyes"; then
23013     TEST_IN_BUILD=true
23014   else
23015     TEST_IN_BUILD=false
23016   fi
23017 
23018 
23019   ###############################################################################
23020   #
23021   # Choose cacerts source file
23022   #
23023 
23024 # Check whether --with-cacerts-file was given.
23025 if test "${with_cacerts_file+set}" = set; then :
23026   withval=$with_cacerts_file;
23027 fi
23028 
23029   if test "x$with_cacerts_file" != x; then
23030     CACERTS_FILE=$with_cacerts_file
23031   fi
23032 
23033 
23034   ###############################################################################
23035   #
23036   # Enable or disable unlimited crypto
23037   #
23038   # Check whether --enable-unlimited-crypto was given.
23039 if test "${enable_unlimited_crypto+set}" = set; then :
23040   enableval=$enable_unlimited_crypto;
23041 else
23042   enable_unlimited_crypto=no
23043 fi
23044 
23045   if test "x$enable_unlimited_crypto" = "xyes"; then
23046     UNLIMITED_CRYPTO=true
23047   else
23048     UNLIMITED_CRYPTO=false
23049   fi
23050 
23051 
23052   ###############################################################################
23053   #
23054   # Enable or disable the elliptic curve crypto implementation
23055   #
23056 
23057 
23058   ###############################################################################
23059   #
23060   # Compress jars
23061   #
23062   COMPRESS_JARS=false
23063 
23064 
23065 
23066 
23067   # Source the version numbers
23068   . $AUTOCONF_DIR/version-numbers
23069 
23070   # Get the settings from parameters
23071 
23072 # Check whether --with-milestone was given.
23073 if test "${with_milestone+set}" = set; then :
23074   withval=$with_milestone;
23075 fi
23076 
23077   if test "x$with_milestone" = xyes; then
23078     as_fn_error $? "Milestone must have a value" "$LINENO" 5
23079   elif test "x$with_milestone" != x; then
23080     MILESTONE="$with_milestone"
23081   fi
23082   if test "x$MILESTONE" = x; then
23083     MILESTONE=internal
23084   fi
23085 
23086 
23087 # Check whether --with-update-version was given.
23088 if test "${with_update_version+set}" = set; then :
23089   withval=$with_update_version;
23090 fi
23091 
23092   if test "x$with_update_version" = xyes; then
23093     as_fn_error $? "Update version must have a value" "$LINENO" 5
23094   elif test "x$with_update_version" != x; then
23095     JDK_UPDATE_VERSION="$with_update_version"
23096     # On macosx 10.7, it's not possible to set --with-update-version=0X due
23097     # to a bug in expr (which reduces it to just X). To work around this, we
23098     # always add a 0 to one digit update versions.
23099     if test "${#JDK_UPDATE_VERSION}" = "1"; then
23100       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
23101     fi
23102   fi
23103 
23104 
23105 # Check whether --with-user-release-suffix was given.
23106 if test "${with_user_release_suffix+set}" = set; then :
23107   withval=$with_user_release_suffix;
23108 fi
23109 
23110   if test "x$with_user_release_suffix" = xyes; then
23111     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
23112   elif test "x$with_user_release_suffix" != x; then
23113     USER_RELEASE_SUFFIX="$with_user_release_suffix"
23114   fi
23115 
23116 
23117 # Check whether --with-build-number was given.
23118 if test "${with_build_number+set}" = set; then :
23119   withval=$with_build_number;
23120 fi
23121 
23122   if test "x$with_build_number" = xyes; then
23123     as_fn_error $? "Build number must have a value" "$LINENO" 5
23124   elif test "x$with_build_number" != x; then
23125     JDK_BUILD_NUMBER="$with_build_number"
23126   fi
23127   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
23128   if test "x$JDK_BUILD_NUMBER" = x; then
23129     JDK_BUILD_NUMBER=b00
23130     if test "x$USER_RELEASE_SUFFIX" = x; then
23131       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
23132       # Avoid [:alnum:] since it depends on the locale.
23133       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
23134       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23135     fi
23136   fi
23137 
23138   # Now set the JDK version, milestone, build number etc.
23139 
23140 
23141 
23142 
23143 
23144 
23145 
23146 
23147 
23148 
23149 
23150 
23151 
23152 
23153 
23154 
23155 # Check whether --with-copyright-year was given.
23156 if test "${with_copyright_year+set}" = set; then :
23157   withval=$with_copyright_year;
23158 fi
23159 
23160   if test "x$with_copyright_year" = xyes; then
23161     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23162   elif test "x$with_copyright_year" != x; then
23163     COPYRIGHT_YEAR="$with_copyright_year"
23164   else
23165     COPYRIGHT_YEAR=`date +'%Y'`
23166   fi
23167 
23168 
23169   if test "x$JDK_UPDATE_VERSION" != x; then
23170     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
23171   else
23172     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
23173   fi
23174 
23175 
23176   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
23177 
23178 
23179 
23180 ###############################################################################
23181 #
23182 # Setup BootJDK, used to bootstrap the build.
23183 #
23184 ###############################################################################
23185 
23186 
23187   BOOT_JDK_FOUND=no
23188 
23189 # Check whether --with-boot-jdk was given.
23190 if test "${with_boot_jdk+set}" = set; then :
23191   withval=$with_boot_jdk;
23192 fi
23193 
23194 
23195   # We look for the Boot JDK through various means, going from more certain to
23196   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23197   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23198   # must check if this is indeed valid; otherwise we'll continue looking.
23199 
23200   # Test: Is bootjdk explicitely set by command line arguments?
23201 
23202   if test "x$BOOT_JDK_FOUND" = xno; then
23203     # Now execute the test
23204 
23205   if test "x$with_boot_jdk" != x; then
23206     BOOT_JDK=$with_boot_jdk
23207     BOOT_JDK_FOUND=maybe
23208     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23209 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23210   fi
23211 
23212 
23213     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23214     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23215       # Do we have a bin/java?
23216       if test ! -x "$BOOT_JDK/bin/java"; then
23217         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23218 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23219         BOOT_JDK_FOUND=no
23220       else
23221         # Do we have a bin/javac?
23222         if test ! -x "$BOOT_JDK/bin/javac"; then
23223           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23224 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23225           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23226 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23227           BOOT_JDK_FOUND=no
23228         else
23229           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23230           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23231 
23232           # Extra M4 quote needed to protect [] in grep expression.
23233           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23234           if test "x$FOUND_CORRECT_VERSION" = x; then
23235             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23236 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23237             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23238 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23239             BOOT_JDK_FOUND=no
23240           else
23241             # We're done! :-)
23242             BOOT_JDK_FOUND=yes
23243 
23244   # Only process if variable expands to non-empty
23245 
23246   if test "x$BOOT_JDK" != x; then
23247     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23248 
23249   # Input might be given as Windows format, start by converting to
23250   # unix format.
23251   path="$BOOT_JDK"
23252   new_path=`$CYGPATH -u "$path"`
23253 
23254   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23255   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23256   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23257   # "foo.exe" is OK but "foo" is an error.
23258   #
23259   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23260   # It is also a way to make sure we got the proper file name for the real test later on.
23261   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23262   if test "x$test_shortpath" = x; then
23263     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23264 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23265     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23266   fi
23267 
23268   # Call helper function which possibly converts this using DOS-style short mode.
23269   # If so, the updated path is stored in $new_path.
23270 
23271   input_path="$new_path"
23272   # Check if we need to convert this using DOS-style short mode. If the path
23273   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23274   # take no chances and rewrite it.
23275   # Note: m4 eats our [], so we need to use [ and ] instead.
23276   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23277   if test "x$has_forbidden_chars" != x; then
23278     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23279     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23280     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23281     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23282       # Going to short mode and back again did indeed matter. Since short mode is
23283       # case insensitive, let's make it lowercase to improve readability.
23284       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23285       # Now convert it back to Unix-style (cygpath)
23286       input_path=`$CYGPATH -u "$shortmode_path"`
23287       new_path="$input_path"
23288     fi
23289   fi
23290 
23291   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23292   if test "x$test_cygdrive_prefix" = x; then
23293     # As a simple fix, exclude /usr/bin since it's not a real path.
23294     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23295       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23296       # a path prefixed by /cygdrive for fixpath to work.
23297       new_path="$CYGWIN_ROOT_PATH$input_path"
23298     fi
23299   fi
23300 
23301 
23302   if test "x$path" != "x$new_path"; then
23303     BOOT_JDK="$new_path"
23304     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23305 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23306   fi
23307 
23308     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23309 
23310   path="$BOOT_JDK"
23311   has_colon=`$ECHO $path | $GREP ^.:`
23312   new_path="$path"
23313   if test "x$has_colon" = x; then
23314     # Not in mixed or Windows style, start by that.
23315     new_path=`cmd //c echo $path`
23316   fi
23317 
23318 
23319   input_path="$new_path"
23320   # Check if we need to convert this using DOS-style short mode. If the path
23321   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23322   # take no chances and rewrite it.
23323   # Note: m4 eats our [], so we need to use [ and ] instead.
23324   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23325   if test "x$has_forbidden_chars" != x; then
23326     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23327     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23328   fi
23329 
23330 
23331   windows_path="$new_path"
23332   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23333     unix_path=`$CYGPATH -u "$windows_path"`
23334     new_path="$unix_path"
23335   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23336     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23337     new_path="$unix_path"
23338   fi
23339 
23340   if test "x$path" != "x$new_path"; then
23341     BOOT_JDK="$new_path"
23342     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23343 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23344   fi
23345 
23346   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23347   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23348 
23349     else
23350       # We're on a unix platform. Hooray! :)
23351       path="$BOOT_JDK"
23352       has_space=`$ECHO "$path" | $GREP " "`
23353       if test "x$has_space" != x; then
23354         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23355 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23356         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23357       fi
23358 
23359       # Use eval to expand a potential ~
23360       eval path="$path"
23361       if test ! -f "$path" && test ! -d "$path"; then
23362         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23363       fi
23364 
23365       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23366     fi
23367   fi
23368 
23369             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23370 $as_echo_n "checking for Boot JDK... " >&6; }
23371             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23372 $as_echo "$BOOT_JDK" >&6; }
23373             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23374 $as_echo_n "checking Boot JDK version... " >&6; }
23375             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23376             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23377 $as_echo "$BOOT_JDK_VERSION" >&6; }
23378           fi # end check jdk version
23379         fi # end check javac
23380       fi # end check java
23381     fi # end check boot jdk found
23382   fi
23383 
23384   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23385     # Having specified an argument which is incorrect will produce an instant failure;
23386     # we should not go on looking
23387     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23388   fi
23389 
23390   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23391 
23392   if test "x$BOOT_JDK_FOUND" = xno; then
23393     # Now execute the test
23394 
23395   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23396     # First check at user selected default
23397 
23398   if test "x$BOOT_JDK_FOUND" = xno; then
23399     # Now execute the test
23400 
23401   if test -x /usr/libexec/java_home; then
23402     BOOT_JDK=`/usr/libexec/java_home `
23403     BOOT_JDK_FOUND=maybe
23404     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23405 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23406   fi
23407 
23408 
23409     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23410     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23411       # Do we have a bin/java?
23412       if test ! -x "$BOOT_JDK/bin/java"; then
23413         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23414 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23415         BOOT_JDK_FOUND=no
23416       else
23417         # Do we have a bin/javac?
23418         if test ! -x "$BOOT_JDK/bin/javac"; then
23419           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23420 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23421           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23422 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23423           BOOT_JDK_FOUND=no
23424         else
23425           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23426           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23427 
23428           # Extra M4 quote needed to protect [] in grep expression.
23429           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23430           if test "x$FOUND_CORRECT_VERSION" = x; then
23431             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23432 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23433             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23434 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23435             BOOT_JDK_FOUND=no
23436           else
23437             # We're done! :-)
23438             BOOT_JDK_FOUND=yes
23439 
23440   # Only process if variable expands to non-empty
23441 
23442   if test "x$BOOT_JDK" != x; then
23443     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23444 
23445   # Input might be given as Windows format, start by converting to
23446   # unix format.
23447   path="$BOOT_JDK"
23448   new_path=`$CYGPATH -u "$path"`
23449 
23450   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23451   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23452   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23453   # "foo.exe" is OK but "foo" is an error.
23454   #
23455   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23456   # It is also a way to make sure we got the proper file name for the real test later on.
23457   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23458   if test "x$test_shortpath" = x; then
23459     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23460 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23461     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23462   fi
23463 
23464   # Call helper function which possibly converts this using DOS-style short mode.
23465   # If so, the updated path is stored in $new_path.
23466 
23467   input_path="$new_path"
23468   # Check if we need to convert this using DOS-style short mode. If the path
23469   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23470   # take no chances and rewrite it.
23471   # Note: m4 eats our [], so we need to use [ and ] instead.
23472   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23473   if test "x$has_forbidden_chars" != x; then
23474     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23475     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23476     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23477     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23478       # Going to short mode and back again did indeed matter. Since short mode is
23479       # case insensitive, let's make it lowercase to improve readability.
23480       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23481       # Now convert it back to Unix-style (cygpath)
23482       input_path=`$CYGPATH -u "$shortmode_path"`
23483       new_path="$input_path"
23484     fi
23485   fi
23486 
23487   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23488   if test "x$test_cygdrive_prefix" = x; then
23489     # As a simple fix, exclude /usr/bin since it's not a real path.
23490     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23491       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23492       # a path prefixed by /cygdrive for fixpath to work.
23493       new_path="$CYGWIN_ROOT_PATH$input_path"
23494     fi
23495   fi
23496 
23497 
23498   if test "x$path" != "x$new_path"; then
23499     BOOT_JDK="$new_path"
23500     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23501 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23502   fi
23503 
23504     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23505 
23506   path="$BOOT_JDK"
23507   has_colon=`$ECHO $path | $GREP ^.:`
23508   new_path="$path"
23509   if test "x$has_colon" = x; then
23510     # Not in mixed or Windows style, start by that.
23511     new_path=`cmd //c echo $path`
23512   fi
23513 
23514 
23515   input_path="$new_path"
23516   # Check if we need to convert this using DOS-style short mode. If the path
23517   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23518   # take no chances and rewrite it.
23519   # Note: m4 eats our [], so we need to use [ and ] instead.
23520   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23521   if test "x$has_forbidden_chars" != x; then
23522     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23523     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23524   fi
23525 
23526 
23527   windows_path="$new_path"
23528   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23529     unix_path=`$CYGPATH -u "$windows_path"`
23530     new_path="$unix_path"
23531   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23532     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23533     new_path="$unix_path"
23534   fi
23535 
23536   if test "x$path" != "x$new_path"; then
23537     BOOT_JDK="$new_path"
23538     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23539 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23540   fi
23541 
23542   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23543   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23544 
23545     else
23546       # We're on a unix platform. Hooray! :)
23547       path="$BOOT_JDK"
23548       has_space=`$ECHO "$path" | $GREP " "`
23549       if test "x$has_space" != x; then
23550         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23551 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23552         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23553       fi
23554 
23555       # Use eval to expand a potential ~
23556       eval path="$path"
23557       if test ! -f "$path" && test ! -d "$path"; then
23558         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23559       fi
23560 
23561       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23562     fi
23563   fi
23564 
23565             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23566 $as_echo_n "checking for Boot JDK... " >&6; }
23567             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23568 $as_echo "$BOOT_JDK" >&6; }
23569             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23570 $as_echo_n "checking Boot JDK version... " >&6; }
23571             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23572             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23573 $as_echo "$BOOT_JDK_VERSION" >&6; }
23574           fi # end check jdk version
23575         fi # end check javac
23576       fi # end check java
23577     fi # end check boot jdk found
23578   fi
23579 
23580     # If that did not work out (e.g. too old), try explicit versions instead
23581 
23582   if test "x$BOOT_JDK_FOUND" = xno; then
23583     # Now execute the test
23584 
23585   if test -x /usr/libexec/java_home; then
23586     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
23587     BOOT_JDK_FOUND=maybe
23588     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
23589 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
23590   fi
23591 
23592 
23593     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23594     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23595       # Do we have a bin/java?
23596       if test ! -x "$BOOT_JDK/bin/java"; then
23597         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23598 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23599         BOOT_JDK_FOUND=no
23600       else
23601         # Do we have a bin/javac?
23602         if test ! -x "$BOOT_JDK/bin/javac"; then
23603           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23604 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23605           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23606 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23607           BOOT_JDK_FOUND=no
23608         else
23609           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23610           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23611 
23612           # Extra M4 quote needed to protect [] in grep expression.
23613           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23614           if test "x$FOUND_CORRECT_VERSION" = x; then
23615             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23616 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23617             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23618 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23619             BOOT_JDK_FOUND=no
23620           else
23621             # We're done! :-)
23622             BOOT_JDK_FOUND=yes
23623 
23624   # Only process if variable expands to non-empty
23625 
23626   if test "x$BOOT_JDK" != x; then
23627     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23628 
23629   # Input might be given as Windows format, start by converting to
23630   # unix format.
23631   path="$BOOT_JDK"
23632   new_path=`$CYGPATH -u "$path"`
23633 
23634   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23635   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23636   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23637   # "foo.exe" is OK but "foo" is an error.
23638   #
23639   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23640   # It is also a way to make sure we got the proper file name for the real test later on.
23641   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23642   if test "x$test_shortpath" = x; then
23643     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23644 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23645     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23646   fi
23647 
23648   # Call helper function which possibly converts this using DOS-style short mode.
23649   # If so, the updated path is stored in $new_path.
23650 
23651   input_path="$new_path"
23652   # Check if we need to convert this using DOS-style short mode. If the path
23653   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23654   # take no chances and rewrite it.
23655   # Note: m4 eats our [], so we need to use [ and ] instead.
23656   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23657   if test "x$has_forbidden_chars" != x; then
23658     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23659     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23660     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23661     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23662       # Going to short mode and back again did indeed matter. Since short mode is
23663       # case insensitive, let's make it lowercase to improve readability.
23664       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23665       # Now convert it back to Unix-style (cygpath)
23666       input_path=`$CYGPATH -u "$shortmode_path"`
23667       new_path="$input_path"
23668     fi
23669   fi
23670 
23671   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23672   if test "x$test_cygdrive_prefix" = x; then
23673     # As a simple fix, exclude /usr/bin since it's not a real path.
23674     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23675       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23676       # a path prefixed by /cygdrive for fixpath to work.
23677       new_path="$CYGWIN_ROOT_PATH$input_path"
23678     fi
23679   fi
23680 
23681 
23682   if test "x$path" != "x$new_path"; then
23683     BOOT_JDK="$new_path"
23684     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23685 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23686   fi
23687 
23688     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23689 
23690   path="$BOOT_JDK"
23691   has_colon=`$ECHO $path | $GREP ^.:`
23692   new_path="$path"
23693   if test "x$has_colon" = x; then
23694     # Not in mixed or Windows style, start by that.
23695     new_path=`cmd //c echo $path`
23696   fi
23697 
23698 
23699   input_path="$new_path"
23700   # Check if we need to convert this using DOS-style short mode. If the path
23701   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23702   # take no chances and rewrite it.
23703   # Note: m4 eats our [], so we need to use [ and ] instead.
23704   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23705   if test "x$has_forbidden_chars" != x; then
23706     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23707     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23708   fi
23709 
23710 
23711   windows_path="$new_path"
23712   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23713     unix_path=`$CYGPATH -u "$windows_path"`
23714     new_path="$unix_path"
23715   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23716     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23717     new_path="$unix_path"
23718   fi
23719 
23720   if test "x$path" != "x$new_path"; then
23721     BOOT_JDK="$new_path"
23722     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23723 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23724   fi
23725 
23726   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23727   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23728 
23729     else
23730       # We're on a unix platform. Hooray! :)
23731       path="$BOOT_JDK"
23732       has_space=`$ECHO "$path" | $GREP " "`
23733       if test "x$has_space" != x; then
23734         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23735 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23736         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23737       fi
23738 
23739       # Use eval to expand a potential ~
23740       eval path="$path"
23741       if test ! -f "$path" && test ! -d "$path"; then
23742         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23743       fi
23744 
23745       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23746     fi
23747   fi
23748 
23749             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23750 $as_echo_n "checking for Boot JDK... " >&6; }
23751             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23752 $as_echo "$BOOT_JDK" >&6; }
23753             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23754 $as_echo_n "checking Boot JDK version... " >&6; }
23755             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23756             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23757 $as_echo "$BOOT_JDK_VERSION" >&6; }
23758           fi # end check jdk version
23759         fi # end check javac
23760       fi # end check java
23761     fi # end check boot jdk found
23762   fi
23763 
23764 
23765   if test "x$BOOT_JDK_FOUND" = xno; then
23766     # Now execute the test
23767 
23768   if test -x /usr/libexec/java_home; then
23769     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
23770     BOOT_JDK_FOUND=maybe
23771     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
23772 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
23773   fi
23774 
23775 
23776     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23777     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23778       # Do we have a bin/java?
23779       if test ! -x "$BOOT_JDK/bin/java"; then
23780         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23781 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23782         BOOT_JDK_FOUND=no
23783       else
23784         # Do we have a bin/javac?
23785         if test ! -x "$BOOT_JDK/bin/javac"; then
23786           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23787 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23788           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23789 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23790           BOOT_JDK_FOUND=no
23791         else
23792           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23793           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23794 
23795           # Extra M4 quote needed to protect [] in grep expression.
23796           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23797           if test "x$FOUND_CORRECT_VERSION" = x; then
23798             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23799 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23800             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23801 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23802             BOOT_JDK_FOUND=no
23803           else
23804             # We're done! :-)
23805             BOOT_JDK_FOUND=yes
23806 
23807   # Only process if variable expands to non-empty
23808 
23809   if test "x$BOOT_JDK" != x; then
23810     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23811 
23812   # Input might be given as Windows format, start by converting to
23813   # unix format.
23814   path="$BOOT_JDK"
23815   new_path=`$CYGPATH -u "$path"`
23816 
23817   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23818   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23819   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23820   # "foo.exe" is OK but "foo" is an error.
23821   #
23822   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23823   # It is also a way to make sure we got the proper file name for the real test later on.
23824   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23825   if test "x$test_shortpath" = x; then
23826     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23827 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23828     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23829   fi
23830 
23831   # Call helper function which possibly converts this using DOS-style short mode.
23832   # If so, the updated path is stored in $new_path.
23833 
23834   input_path="$new_path"
23835   # Check if we need to convert this using DOS-style short mode. If the path
23836   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23837   # take no chances and rewrite it.
23838   # Note: m4 eats our [], so we need to use [ and ] instead.
23839   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23840   if test "x$has_forbidden_chars" != x; then
23841     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23842     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23843     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23844     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23845       # Going to short mode and back again did indeed matter. Since short mode is
23846       # case insensitive, let's make it lowercase to improve readability.
23847       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23848       # Now convert it back to Unix-style (cygpath)
23849       input_path=`$CYGPATH -u "$shortmode_path"`
23850       new_path="$input_path"
23851     fi
23852   fi
23853 
23854   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23855   if test "x$test_cygdrive_prefix" = x; then
23856     # As a simple fix, exclude /usr/bin since it's not a real path.
23857     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23858       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23859       # a path prefixed by /cygdrive for fixpath to work.
23860       new_path="$CYGWIN_ROOT_PATH$input_path"
23861     fi
23862   fi
23863 
23864 
23865   if test "x$path" != "x$new_path"; then
23866     BOOT_JDK="$new_path"
23867     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23868 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23869   fi
23870 
23871     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23872 
23873   path="$BOOT_JDK"
23874   has_colon=`$ECHO $path | $GREP ^.:`
23875   new_path="$path"
23876   if test "x$has_colon" = x; then
23877     # Not in mixed or Windows style, start by that.
23878     new_path=`cmd //c echo $path`
23879   fi
23880 
23881 
23882   input_path="$new_path"
23883   # Check if we need to convert this using DOS-style short mode. If the path
23884   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23885   # take no chances and rewrite it.
23886   # Note: m4 eats our [], so we need to use [ and ] instead.
23887   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23888   if test "x$has_forbidden_chars" != x; then
23889     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23890     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23891   fi
23892 
23893 
23894   windows_path="$new_path"
23895   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23896     unix_path=`$CYGPATH -u "$windows_path"`
23897     new_path="$unix_path"
23898   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23899     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23900     new_path="$unix_path"
23901   fi
23902 
23903   if test "x$path" != "x$new_path"; then
23904     BOOT_JDK="$new_path"
23905     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23906 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23907   fi
23908 
23909   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23910   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23911 
23912     else
23913       # We're on a unix platform. Hooray! :)
23914       path="$BOOT_JDK"
23915       has_space=`$ECHO "$path" | $GREP " "`
23916       if test "x$has_space" != x; then
23917         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23918 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23919         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23920       fi
23921 
23922       # Use eval to expand a potential ~
23923       eval path="$path"
23924       if test ! -f "$path" && test ! -d "$path"; then
23925         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23926       fi
23927 
23928       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23929     fi
23930   fi
23931 
23932             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23933 $as_echo_n "checking for Boot JDK... " >&6; }
23934             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23935 $as_echo "$BOOT_JDK" >&6; }
23936             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23937 $as_echo_n "checking Boot JDK version... " >&6; }
23938             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23939             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23940 $as_echo "$BOOT_JDK_VERSION" >&6; }
23941           fi # end check jdk version
23942         fi # end check javac
23943       fi # end check java
23944     fi # end check boot jdk found
23945   fi
23946 
23947 
23948   if test "x$BOOT_JDK_FOUND" = xno; then
23949     # Now execute the test
23950 
23951   if test -x /usr/libexec/java_home; then
23952     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
23953     BOOT_JDK_FOUND=maybe
23954     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
23955 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
23956   fi
23957 
23958 
23959     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23960     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23961       # Do we have a bin/java?
23962       if test ! -x "$BOOT_JDK/bin/java"; then
23963         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23964 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23965         BOOT_JDK_FOUND=no
23966       else
23967         # Do we have a bin/javac?
23968         if test ! -x "$BOOT_JDK/bin/javac"; then
23969           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23970 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23971           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23972 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23973           BOOT_JDK_FOUND=no
23974         else
23975           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23976           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23977 
23978           # Extra M4 quote needed to protect [] in grep expression.
23979           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23980           if test "x$FOUND_CORRECT_VERSION" = x; then
23981             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23982 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23983             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23984 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23985             BOOT_JDK_FOUND=no
23986           else
23987             # We're done! :-)
23988             BOOT_JDK_FOUND=yes
23989 
23990   # Only process if variable expands to non-empty
23991 
23992   if test "x$BOOT_JDK" != x; then
23993     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23994 
23995   # Input might be given as Windows format, start by converting to
23996   # unix format.
23997   path="$BOOT_JDK"
23998   new_path=`$CYGPATH -u "$path"`
23999 
24000   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24001   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24002   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24003   # "foo.exe" is OK but "foo" is an error.
24004   #
24005   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24006   # It is also a way to make sure we got the proper file name for the real test later on.
24007   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24008   if test "x$test_shortpath" = x; then
24009     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24010 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24011     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24012   fi
24013 
24014   # Call helper function which possibly converts this using DOS-style short mode.
24015   # If so, the updated path is stored in $new_path.
24016 
24017   input_path="$new_path"
24018   # Check if we need to convert this using DOS-style short mode. If the path
24019   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24020   # take no chances and rewrite it.
24021   # Note: m4 eats our [], so we need to use [ and ] instead.
24022   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24023   if test "x$has_forbidden_chars" != x; then
24024     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24025     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24026     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24027     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24028       # Going to short mode and back again did indeed matter. Since short mode is
24029       # case insensitive, let's make it lowercase to improve readability.
24030       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24031       # Now convert it back to Unix-style (cygpath)
24032       input_path=`$CYGPATH -u "$shortmode_path"`
24033       new_path="$input_path"
24034     fi
24035   fi
24036 
24037   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24038   if test "x$test_cygdrive_prefix" = x; then
24039     # As a simple fix, exclude /usr/bin since it's not a real path.
24040     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24041       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24042       # a path prefixed by /cygdrive for fixpath to work.
24043       new_path="$CYGWIN_ROOT_PATH$input_path"
24044     fi
24045   fi
24046 
24047 
24048   if test "x$path" != "x$new_path"; then
24049     BOOT_JDK="$new_path"
24050     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24051 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24052   fi
24053 
24054     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24055 
24056   path="$BOOT_JDK"
24057   has_colon=`$ECHO $path | $GREP ^.:`
24058   new_path="$path"
24059   if test "x$has_colon" = x; then
24060     # Not in mixed or Windows style, start by that.
24061     new_path=`cmd //c echo $path`
24062   fi
24063 
24064 
24065   input_path="$new_path"
24066   # Check if we need to convert this using DOS-style short mode. If the path
24067   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24068   # take no chances and rewrite it.
24069   # Note: m4 eats our [], so we need to use [ and ] instead.
24070   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24071   if test "x$has_forbidden_chars" != x; then
24072     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24073     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24074   fi
24075 
24076 
24077   windows_path="$new_path"
24078   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24079     unix_path=`$CYGPATH -u "$windows_path"`
24080     new_path="$unix_path"
24081   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24082     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24083     new_path="$unix_path"
24084   fi
24085 
24086   if test "x$path" != "x$new_path"; then
24087     BOOT_JDK="$new_path"
24088     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24089 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24090   fi
24091 
24092   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24093   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24094 
24095     else
24096       # We're on a unix platform. Hooray! :)
24097       path="$BOOT_JDK"
24098       has_space=`$ECHO "$path" | $GREP " "`
24099       if test "x$has_space" != x; then
24100         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24101 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24102         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24103       fi
24104 
24105       # Use eval to expand a potential ~
24106       eval path="$path"
24107       if test ! -f "$path" && test ! -d "$path"; then
24108         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24109       fi
24110 
24111       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24112     fi
24113   fi
24114 
24115             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24116 $as_echo_n "checking for Boot JDK... " >&6; }
24117             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24118 $as_echo "$BOOT_JDK" >&6; }
24119             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24120 $as_echo_n "checking Boot JDK version... " >&6; }
24121             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24122             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24123 $as_echo "$BOOT_JDK_VERSION" >&6; }
24124           fi # end check jdk version
24125         fi # end check javac
24126       fi # end check java
24127     fi # end check boot jdk found
24128   fi
24129 
24130   fi
24131 
24132 
24133     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24134     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24135       # Do we have a bin/java?
24136       if test ! -x "$BOOT_JDK/bin/java"; then
24137         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24138 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24139         BOOT_JDK_FOUND=no
24140       else
24141         # Do we have a bin/javac?
24142         if test ! -x "$BOOT_JDK/bin/javac"; then
24143           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24144 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24145           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24146 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24147           BOOT_JDK_FOUND=no
24148         else
24149           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24150           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24151 
24152           # Extra M4 quote needed to protect [] in grep expression.
24153           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24154           if test "x$FOUND_CORRECT_VERSION" = x; then
24155             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24156 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24157             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24158 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24159             BOOT_JDK_FOUND=no
24160           else
24161             # We're done! :-)
24162             BOOT_JDK_FOUND=yes
24163 
24164   # Only process if variable expands to non-empty
24165 
24166   if test "x$BOOT_JDK" != x; then
24167     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24168 
24169   # Input might be given as Windows format, start by converting to
24170   # unix format.
24171   path="$BOOT_JDK"
24172   new_path=`$CYGPATH -u "$path"`
24173 
24174   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24175   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24176   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24177   # "foo.exe" is OK but "foo" is an error.
24178   #
24179   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24180   # It is also a way to make sure we got the proper file name for the real test later on.
24181   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24182   if test "x$test_shortpath" = x; then
24183     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24184 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24185     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24186   fi
24187 
24188   # Call helper function which possibly converts this using DOS-style short mode.
24189   # If so, the updated path is stored in $new_path.
24190 
24191   input_path="$new_path"
24192   # Check if we need to convert this using DOS-style short mode. If the path
24193   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24194   # take no chances and rewrite it.
24195   # Note: m4 eats our [], so we need to use [ and ] instead.
24196   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24197   if test "x$has_forbidden_chars" != x; then
24198     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24199     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24200     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24201     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24202       # Going to short mode and back again did indeed matter. Since short mode is
24203       # case insensitive, let's make it lowercase to improve readability.
24204       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24205       # Now convert it back to Unix-style (cygpath)
24206       input_path=`$CYGPATH -u "$shortmode_path"`
24207       new_path="$input_path"
24208     fi
24209   fi
24210 
24211   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24212   if test "x$test_cygdrive_prefix" = x; then
24213     # As a simple fix, exclude /usr/bin since it's not a real path.
24214     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24215       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24216       # a path prefixed by /cygdrive for fixpath to work.
24217       new_path="$CYGWIN_ROOT_PATH$input_path"
24218     fi
24219   fi
24220 
24221 
24222   if test "x$path" != "x$new_path"; then
24223     BOOT_JDK="$new_path"
24224     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24225 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24226   fi
24227 
24228     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24229 
24230   path="$BOOT_JDK"
24231   has_colon=`$ECHO $path | $GREP ^.:`
24232   new_path="$path"
24233   if test "x$has_colon" = x; then
24234     # Not in mixed or Windows style, start by that.
24235     new_path=`cmd //c echo $path`
24236   fi
24237 
24238 
24239   input_path="$new_path"
24240   # Check if we need to convert this using DOS-style short mode. If the path
24241   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24242   # take no chances and rewrite it.
24243   # Note: m4 eats our [], so we need to use [ and ] instead.
24244   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24245   if test "x$has_forbidden_chars" != x; then
24246     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24247     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24248   fi
24249 
24250 
24251   windows_path="$new_path"
24252   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24253     unix_path=`$CYGPATH -u "$windows_path"`
24254     new_path="$unix_path"
24255   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24256     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24257     new_path="$unix_path"
24258   fi
24259 
24260   if test "x$path" != "x$new_path"; then
24261     BOOT_JDK="$new_path"
24262     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24263 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24264   fi
24265 
24266   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24267   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24268 
24269     else
24270       # We're on a unix platform. Hooray! :)
24271       path="$BOOT_JDK"
24272       has_space=`$ECHO "$path" | $GREP " "`
24273       if test "x$has_space" != x; then
24274         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24275 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24276         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24277       fi
24278 
24279       # Use eval to expand a potential ~
24280       eval path="$path"
24281       if test ! -f "$path" && test ! -d "$path"; then
24282         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24283       fi
24284 
24285       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24286     fi
24287   fi
24288 
24289             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24290 $as_echo_n "checking for Boot JDK... " >&6; }
24291             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24292 $as_echo "$BOOT_JDK" >&6; }
24293             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24294 $as_echo_n "checking Boot JDK version... " >&6; }
24295             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24296             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24297 $as_echo "$BOOT_JDK_VERSION" >&6; }
24298           fi # end check jdk version
24299         fi # end check javac
24300       fi # end check java
24301     fi # end check boot jdk found
24302   fi
24303 
24304 
24305   # Test: Is $JAVA_HOME set?
24306 
24307   if test "x$BOOT_JDK_FOUND" = xno; then
24308     # Now execute the test
24309 
24310   if test "x$JAVA_HOME" != x; then
24311     JAVA_HOME_PROCESSED="$JAVA_HOME"
24312 
24313   # Only process if variable expands to non-empty
24314 
24315   if test "x$JAVA_HOME_PROCESSED" != x; then
24316     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24317 
24318   # Input might be given as Windows format, start by converting to
24319   # unix format.
24320   path="$JAVA_HOME_PROCESSED"
24321   new_path=`$CYGPATH -u "$path"`
24322 
24323   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24324   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24325   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24326   # "foo.exe" is OK but "foo" is an error.
24327   #
24328   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24329   # It is also a way to make sure we got the proper file name for the real test later on.
24330   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24331   if test "x$test_shortpath" = x; then
24332     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24333 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24334     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24335   fi
24336 
24337   # Call helper function which possibly converts this using DOS-style short mode.
24338   # If so, the updated path is stored in $new_path.
24339 
24340   input_path="$new_path"
24341   # Check if we need to convert this using DOS-style short mode. If the path
24342   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24343   # take no chances and rewrite it.
24344   # Note: m4 eats our [], so we need to use [ and ] instead.
24345   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24346   if test "x$has_forbidden_chars" != x; then
24347     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24348     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24349     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24350     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24351       # Going to short mode and back again did indeed matter. Since short mode is
24352       # case insensitive, let's make it lowercase to improve readability.
24353       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24354       # Now convert it back to Unix-style (cygpath)
24355       input_path=`$CYGPATH -u "$shortmode_path"`
24356       new_path="$input_path"
24357     fi
24358   fi
24359 
24360   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24361   if test "x$test_cygdrive_prefix" = x; then
24362     # As a simple fix, exclude /usr/bin since it's not a real path.
24363     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24364       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24365       # a path prefixed by /cygdrive for fixpath to work.
24366       new_path="$CYGWIN_ROOT_PATH$input_path"
24367     fi
24368   fi
24369 
24370 
24371   if test "x$path" != "x$new_path"; then
24372     JAVA_HOME_PROCESSED="$new_path"
24373     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24374 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24375   fi
24376 
24377     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24378 
24379   path="$JAVA_HOME_PROCESSED"
24380   has_colon=`$ECHO $path | $GREP ^.:`
24381   new_path="$path"
24382   if test "x$has_colon" = x; then
24383     # Not in mixed or Windows style, start by that.
24384     new_path=`cmd //c echo $path`
24385   fi
24386 
24387 
24388   input_path="$new_path"
24389   # Check if we need to convert this using DOS-style short mode. If the path
24390   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24391   # take no chances and rewrite it.
24392   # Note: m4 eats our [], so we need to use [ and ] instead.
24393   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24394   if test "x$has_forbidden_chars" != x; then
24395     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24396     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24397   fi
24398 
24399 
24400   windows_path="$new_path"
24401   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24402     unix_path=`$CYGPATH -u "$windows_path"`
24403     new_path="$unix_path"
24404   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24405     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24406     new_path="$unix_path"
24407   fi
24408 
24409   if test "x$path" != "x$new_path"; then
24410     JAVA_HOME_PROCESSED="$new_path"
24411     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24412 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24413   fi
24414 
24415   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24416   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24417 
24418     else
24419       # We're on a unix platform. Hooray! :)
24420       path="$JAVA_HOME_PROCESSED"
24421       has_space=`$ECHO "$path" | $GREP " "`
24422       if test "x$has_space" != x; then
24423         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24424 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24425         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24426       fi
24427 
24428       # Use eval to expand a potential ~
24429       eval path="$path"
24430       if test ! -f "$path" && test ! -d "$path"; then
24431         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
24432       fi
24433 
24434       JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
24435     fi
24436   fi
24437 
24438     if test ! -d "$JAVA_HOME_PROCESSED"; then
24439       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
24440 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
24441     else
24442       # Aha, the user has set a JAVA_HOME
24443       # let us use that as the Boot JDK.
24444       BOOT_JDK="$JAVA_HOME_PROCESSED"
24445       BOOT_JDK_FOUND=maybe
24446       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
24447 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
24448     fi
24449   fi
24450 
24451 
24452     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24453     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24454       # Do we have a bin/java?
24455       if test ! -x "$BOOT_JDK/bin/java"; then
24456         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24457 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24458         BOOT_JDK_FOUND=no
24459       else
24460         # Do we have a bin/javac?
24461         if test ! -x "$BOOT_JDK/bin/javac"; then
24462           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24463 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24464           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24465 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24466           BOOT_JDK_FOUND=no
24467         else
24468           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24469           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24470 
24471           # Extra M4 quote needed to protect [] in grep expression.
24472           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24473           if test "x$FOUND_CORRECT_VERSION" = x; then
24474             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24475 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24476             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24477 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24478             BOOT_JDK_FOUND=no
24479           else
24480             # We're done! :-)
24481             BOOT_JDK_FOUND=yes
24482 
24483   # Only process if variable expands to non-empty
24484 
24485   if test "x$BOOT_JDK" != x; then
24486     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24487 
24488   # Input might be given as Windows format, start by converting to
24489   # unix format.
24490   path="$BOOT_JDK"
24491   new_path=`$CYGPATH -u "$path"`
24492 
24493   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24494   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24495   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24496   # "foo.exe" is OK but "foo" is an error.
24497   #
24498   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24499   # It is also a way to make sure we got the proper file name for the real test later on.
24500   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24501   if test "x$test_shortpath" = x; then
24502     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24503 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24504     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24505   fi
24506 
24507   # Call helper function which possibly converts this using DOS-style short mode.
24508   # If so, the updated path is stored in $new_path.
24509 
24510   input_path="$new_path"
24511   # Check if we need to convert this using DOS-style short mode. If the path
24512   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24513   # take no chances and rewrite it.
24514   # Note: m4 eats our [], so we need to use [ and ] instead.
24515   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24516   if test "x$has_forbidden_chars" != x; then
24517     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24518     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24519     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24520     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24521       # Going to short mode and back again did indeed matter. Since short mode is
24522       # case insensitive, let's make it lowercase to improve readability.
24523       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24524       # Now convert it back to Unix-style (cygpath)
24525       input_path=`$CYGPATH -u "$shortmode_path"`
24526       new_path="$input_path"
24527     fi
24528   fi
24529 
24530   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24531   if test "x$test_cygdrive_prefix" = x; then
24532     # As a simple fix, exclude /usr/bin since it's not a real path.
24533     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24534       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24535       # a path prefixed by /cygdrive for fixpath to work.
24536       new_path="$CYGWIN_ROOT_PATH$input_path"
24537     fi
24538   fi
24539 
24540 
24541   if test "x$path" != "x$new_path"; then
24542     BOOT_JDK="$new_path"
24543     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24544 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24545   fi
24546 
24547     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24548 
24549   path="$BOOT_JDK"
24550   has_colon=`$ECHO $path | $GREP ^.:`
24551   new_path="$path"
24552   if test "x$has_colon" = x; then
24553     # Not in mixed or Windows style, start by that.
24554     new_path=`cmd //c echo $path`
24555   fi
24556 
24557 
24558   input_path="$new_path"
24559   # Check if we need to convert this using DOS-style short mode. If the path
24560   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24561   # take no chances and rewrite it.
24562   # Note: m4 eats our [], so we need to use [ and ] instead.
24563   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24564   if test "x$has_forbidden_chars" != x; then
24565     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24566     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24567   fi
24568 
24569 
24570   windows_path="$new_path"
24571   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24572     unix_path=`$CYGPATH -u "$windows_path"`
24573     new_path="$unix_path"
24574   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24575     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24576     new_path="$unix_path"
24577   fi
24578 
24579   if test "x$path" != "x$new_path"; then
24580     BOOT_JDK="$new_path"
24581     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24582 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24583   fi
24584 
24585   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24586   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24587 
24588     else
24589       # We're on a unix platform. Hooray! :)
24590       path="$BOOT_JDK"
24591       has_space=`$ECHO "$path" | $GREP " "`
24592       if test "x$has_space" != x; then
24593         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24594 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24595         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24596       fi
24597 
24598       # Use eval to expand a potential ~
24599       eval path="$path"
24600       if test ! -f "$path" && test ! -d "$path"; then
24601         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24602       fi
24603 
24604       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24605     fi
24606   fi
24607 
24608             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24609 $as_echo_n "checking for Boot JDK... " >&6; }
24610             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24611 $as_echo "$BOOT_JDK" >&6; }
24612             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24613 $as_echo_n "checking Boot JDK version... " >&6; }
24614             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24615             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24616 $as_echo "$BOOT_JDK_VERSION" >&6; }
24617           fi # end check jdk version
24618         fi # end check javac
24619       fi # end check java
24620     fi # end check boot jdk found
24621   fi
24622 
24623 
24624   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
24625 
24626   if test "x$BOOT_JDK_FOUND" = xno; then
24627     # Now execute the test
24628 
24629   # Extract the first word of "javac", so it can be a program name with args.
24630 set dummy javac; ac_word=$2
24631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24632 $as_echo_n "checking for $ac_word... " >&6; }
24633 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
24634   $as_echo_n "(cached) " >&6
24635 else
24636   case $JAVAC_CHECK in
24637   [\\/]* | ?:[\\/]*)
24638   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
24639   ;;
24640   *)
24641   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24642 for as_dir in $PATH
24643 do
24644   IFS=$as_save_IFS
24645   test -z "$as_dir" && as_dir=.
24646     for ac_exec_ext in '' $ac_executable_extensions; do
24647   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24648     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
24649     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24650     break 2
24651   fi
24652 done
24653   done
24654 IFS=$as_save_IFS
24655 
24656   ;;
24657 esac
24658 fi
24659 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
24660 if test -n "$JAVAC_CHECK"; then
24661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
24662 $as_echo "$JAVAC_CHECK" >&6; }
24663 else
24664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24665 $as_echo "no" >&6; }
24666 fi
24667 
24668 
24669   # Extract the first word of "java", so it can be a program name with args.
24670 set dummy java; ac_word=$2
24671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24672 $as_echo_n "checking for $ac_word... " >&6; }
24673 if ${ac_cv_path_JAVA_CHECK+:} false; then :
24674   $as_echo_n "(cached) " >&6
24675 else
24676   case $JAVA_CHECK in
24677   [\\/]* | ?:[\\/]*)
24678   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
24679   ;;
24680   *)
24681   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24682 for as_dir in $PATH
24683 do
24684   IFS=$as_save_IFS
24685   test -z "$as_dir" && as_dir=.
24686     for ac_exec_ext in '' $ac_executable_extensions; do
24687   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24688     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
24689     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24690     break 2
24691   fi
24692 done
24693   done
24694 IFS=$as_save_IFS
24695 
24696   ;;
24697 esac
24698 fi
24699 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
24700 if test -n "$JAVA_CHECK"; then
24701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
24702 $as_echo "$JAVA_CHECK" >&6; }
24703 else
24704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24705 $as_echo "no" >&6; }
24706 fi
24707 
24708 
24709   BINARY="$JAVAC_CHECK"
24710   if test "x$JAVAC_CHECK" = x; then
24711     BINARY="$JAVA_CHECK"
24712   fi
24713   if test "x$BINARY" != x; then
24714     # So there is a java(c) binary, it might be part of a JDK.
24715     # Lets find the JDK/JRE directory by following symbolic links.
24716     # Linux/GNU systems often have links from /usr/bin/java to
24717     # /etc/alternatives/java to the real JDK binary.
24718 
24719   if test "x$OPENJDK_BUILD_OS" != xwindows; then
24720     # Follow a chain of symbolic links. Use readlink
24721     # where it exists, else fall back to horribly
24722     # complicated shell code.
24723     if test "x$READLINK_TESTED" != yes; then
24724       # On MacOSX there is a readlink tool with a different
24725       # purpose than the GNU readlink tool. Check the found readlink.
24726       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
24727       if test "x$ISGNU" = x; then
24728         # A readlink that we do not know how to use.
24729         # Are there other non-GNU readlinks out there?
24730         READLINK_TESTED=yes
24731         READLINK=
24732       fi
24733     fi
24734 
24735     if test "x$READLINK" != x; then
24736       BINARY=`$READLINK -f $BINARY`
24737     else
24738       # Save the current directory for restoring afterwards
24739       STARTDIR=$PWD
24740       COUNTER=0
24741       sym_link_dir=`$DIRNAME $BINARY`
24742       sym_link_file=`$BASENAME $BINARY`
24743       cd $sym_link_dir
24744       # Use -P flag to resolve symlinks in directories.
24745       cd `$THEPWDCMD -P`
24746       sym_link_dir=`$THEPWDCMD -P`
24747       # Resolve file symlinks
24748       while test $COUNTER -lt 20; do
24749         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
24750         if test "x$ISLINK" == x; then
24751           # This is not a symbolic link! We are done!
24752           break
24753         fi
24754         # Again resolve directory symlinks since the target of the just found
24755         # link could be in a different directory
24756         cd `$DIRNAME $ISLINK`
24757         sym_link_dir=`$THEPWDCMD -P`
24758         sym_link_file=`$BASENAME $ISLINK`
24759         let COUNTER=COUNTER+1
24760       done
24761       cd $STARTDIR
24762       BINARY=$sym_link_dir/$sym_link_file
24763     fi
24764   fi
24765 
24766     BOOT_JDK=`dirname "$BINARY"`
24767     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
24768     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
24769       # Looks like we found ourselves an JDK
24770       BOOT_JDK_FOUND=maybe
24771       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
24772 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
24773     fi
24774   fi
24775 
24776 
24777     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24778     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24779       # Do we have a bin/java?
24780       if test ! -x "$BOOT_JDK/bin/java"; then
24781         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24782 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24783         BOOT_JDK_FOUND=no
24784       else
24785         # Do we have a bin/javac?
24786         if test ! -x "$BOOT_JDK/bin/javac"; then
24787           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24788 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24789           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24790 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24791           BOOT_JDK_FOUND=no
24792         else
24793           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24794           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24795 
24796           # Extra M4 quote needed to protect [] in grep expression.
24797           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24798           if test "x$FOUND_CORRECT_VERSION" = x; then
24799             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24800 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24801             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24802 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24803             BOOT_JDK_FOUND=no
24804           else
24805             # We're done! :-)
24806             BOOT_JDK_FOUND=yes
24807 
24808   # Only process if variable expands to non-empty
24809 
24810   if test "x$BOOT_JDK" != x; then
24811     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24812 
24813   # Input might be given as Windows format, start by converting to
24814   # unix format.
24815   path="$BOOT_JDK"
24816   new_path=`$CYGPATH -u "$path"`
24817 
24818   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24819   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24820   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24821   # "foo.exe" is OK but "foo" is an error.
24822   #
24823   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24824   # It is also a way to make sure we got the proper file name for the real test later on.
24825   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24826   if test "x$test_shortpath" = x; then
24827     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24828 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24829     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24830   fi
24831 
24832   # Call helper function which possibly converts this using DOS-style short mode.
24833   # If so, the updated path is stored in $new_path.
24834 
24835   input_path="$new_path"
24836   # Check if we need to convert this using DOS-style short mode. If the path
24837   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24838   # take no chances and rewrite it.
24839   # Note: m4 eats our [], so we need to use [ and ] instead.
24840   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24841   if test "x$has_forbidden_chars" != x; then
24842     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24843     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24844     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24845     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24846       # Going to short mode and back again did indeed matter. Since short mode is
24847       # case insensitive, let's make it lowercase to improve readability.
24848       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24849       # Now convert it back to Unix-style (cygpath)
24850       input_path=`$CYGPATH -u "$shortmode_path"`
24851       new_path="$input_path"
24852     fi
24853   fi
24854 
24855   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24856   if test "x$test_cygdrive_prefix" = x; then
24857     # As a simple fix, exclude /usr/bin since it's not a real path.
24858     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24859       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24860       # a path prefixed by /cygdrive for fixpath to work.
24861       new_path="$CYGWIN_ROOT_PATH$input_path"
24862     fi
24863   fi
24864 
24865 
24866   if test "x$path" != "x$new_path"; then
24867     BOOT_JDK="$new_path"
24868     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24869 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24870   fi
24871 
24872     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24873 
24874   path="$BOOT_JDK"
24875   has_colon=`$ECHO $path | $GREP ^.:`
24876   new_path="$path"
24877   if test "x$has_colon" = x; then
24878     # Not in mixed or Windows style, start by that.
24879     new_path=`cmd //c echo $path`
24880   fi
24881 
24882 
24883   input_path="$new_path"
24884   # Check if we need to convert this using DOS-style short mode. If the path
24885   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24886   # take no chances and rewrite it.
24887   # Note: m4 eats our [], so we need to use [ and ] instead.
24888   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24889   if test "x$has_forbidden_chars" != x; then
24890     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24891     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24892   fi
24893 
24894 
24895   windows_path="$new_path"
24896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24897     unix_path=`$CYGPATH -u "$windows_path"`
24898     new_path="$unix_path"
24899   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24900     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24901     new_path="$unix_path"
24902   fi
24903 
24904   if test "x$path" != "x$new_path"; then
24905     BOOT_JDK="$new_path"
24906     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24907 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24908   fi
24909 
24910   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24911   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24912 
24913     else
24914       # We're on a unix platform. Hooray! :)
24915       path="$BOOT_JDK"
24916       has_space=`$ECHO "$path" | $GREP " "`
24917       if test "x$has_space" != x; then
24918         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24919 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24920         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24921       fi
24922 
24923       # Use eval to expand a potential ~
24924       eval path="$path"
24925       if test ! -f "$path" && test ! -d "$path"; then
24926         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24927       fi
24928 
24929       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24930     fi
24931   fi
24932 
24933             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24934 $as_echo_n "checking for Boot JDK... " >&6; }
24935             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24936 $as_echo "$BOOT_JDK" >&6; }
24937             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24938 $as_echo_n "checking Boot JDK version... " >&6; }
24939             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24940             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24941 $as_echo "$BOOT_JDK_VERSION" >&6; }
24942           fi # end check jdk version
24943         fi # end check javac
24944       fi # end check java
24945     fi # end check boot jdk found
24946   fi
24947 
24948 
24949   # Test: Is there a JDK installed in default, well-known locations?
24950 
24951   if test "x$BOOT_JDK_FOUND" = xno; then
24952     # Now execute the test
24953 
24954   if test "x$OPENJDK_TARGET_OS" = xwindows; then
24955 
24956   if test "x$BOOT_JDK_FOUND" = xno; then
24957     # Now execute the test
24958 
24959   if test "x$ProgramW6432" != x; then
24960     VIRTUAL_DIR="$ProgramW6432/Java"
24961 
24962   windows_path="$VIRTUAL_DIR"
24963   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24964     unix_path=`$CYGPATH -u "$windows_path"`
24965     VIRTUAL_DIR="$unix_path"
24966   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24967     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24968     VIRTUAL_DIR="$unix_path"
24969   fi
24970 
24971 
24972   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
24973   BOOT_JDK_SUFFIX=""
24974   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24975   if test "x$ALL_JDKS_FOUND" != x; then
24976     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24977 
24978   if test "x$BOOT_JDK_FOUND" = xno; then
24979     # Now execute the test
24980 
24981         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24982         if test -d "$BOOT_JDK"; then
24983           BOOT_JDK_FOUND=maybe
24984           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24985 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24986         fi
24987 
24988 
24989     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24990     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24991       # Do we have a bin/java?
24992       if test ! -x "$BOOT_JDK/bin/java"; then
24993         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24994 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24995         BOOT_JDK_FOUND=no
24996       else
24997         # Do we have a bin/javac?
24998         if test ! -x "$BOOT_JDK/bin/javac"; then
24999           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25000 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25001           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25002 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25003           BOOT_JDK_FOUND=no
25004         else
25005           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25006           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25007 
25008           # Extra M4 quote needed to protect [] in grep expression.
25009           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25010           if test "x$FOUND_CORRECT_VERSION" = x; then
25011             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25012 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25013             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25014 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25015             BOOT_JDK_FOUND=no
25016           else
25017             # We're done! :-)
25018             BOOT_JDK_FOUND=yes
25019 
25020   # Only process if variable expands to non-empty
25021 
25022   if test "x$BOOT_JDK" != x; then
25023     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25024 
25025   # Input might be given as Windows format, start by converting to
25026   # unix format.
25027   path="$BOOT_JDK"
25028   new_path=`$CYGPATH -u "$path"`
25029 
25030   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25031   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25032   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25033   # "foo.exe" is OK but "foo" is an error.
25034   #
25035   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25036   # It is also a way to make sure we got the proper file name for the real test later on.
25037   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25038   if test "x$test_shortpath" = x; then
25039     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25040 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25041     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25042   fi
25043 
25044   # Call helper function which possibly converts this using DOS-style short mode.
25045   # If so, the updated path is stored in $new_path.
25046 
25047   input_path="$new_path"
25048   # Check if we need to convert this using DOS-style short mode. If the path
25049   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25050   # take no chances and rewrite it.
25051   # Note: m4 eats our [], so we need to use [ and ] instead.
25052   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25053   if test "x$has_forbidden_chars" != x; then
25054     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25055     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25056     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25057     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25058       # Going to short mode and back again did indeed matter. Since short mode is
25059       # case insensitive, let's make it lowercase to improve readability.
25060       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25061       # Now convert it back to Unix-style (cygpath)
25062       input_path=`$CYGPATH -u "$shortmode_path"`
25063       new_path="$input_path"
25064     fi
25065   fi
25066 
25067   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25068   if test "x$test_cygdrive_prefix" = x; then
25069     # As a simple fix, exclude /usr/bin since it's not a real path.
25070     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25071       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25072       # a path prefixed by /cygdrive for fixpath to work.
25073       new_path="$CYGWIN_ROOT_PATH$input_path"
25074     fi
25075   fi
25076 
25077 
25078   if test "x$path" != "x$new_path"; then
25079     BOOT_JDK="$new_path"
25080     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25081 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25082   fi
25083 
25084     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25085 
25086   path="$BOOT_JDK"
25087   has_colon=`$ECHO $path | $GREP ^.:`
25088   new_path="$path"
25089   if test "x$has_colon" = x; then
25090     # Not in mixed or Windows style, start by that.
25091     new_path=`cmd //c echo $path`
25092   fi
25093 
25094 
25095   input_path="$new_path"
25096   # Check if we need to convert this using DOS-style short mode. If the path
25097   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25098   # take no chances and rewrite it.
25099   # Note: m4 eats our [], so we need to use [ and ] instead.
25100   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25101   if test "x$has_forbidden_chars" != x; then
25102     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25103     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25104   fi
25105 
25106 
25107   windows_path="$new_path"
25108   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25109     unix_path=`$CYGPATH -u "$windows_path"`
25110     new_path="$unix_path"
25111   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25112     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25113     new_path="$unix_path"
25114   fi
25115 
25116   if test "x$path" != "x$new_path"; then
25117     BOOT_JDK="$new_path"
25118     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25119 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25120   fi
25121 
25122   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25123   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25124 
25125     else
25126       # We're on a unix platform. Hooray! :)
25127       path="$BOOT_JDK"
25128       has_space=`$ECHO "$path" | $GREP " "`
25129       if test "x$has_space" != x; then
25130         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25131 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25132         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25133       fi
25134 
25135       # Use eval to expand a potential ~
25136       eval path="$path"
25137       if test ! -f "$path" && test ! -d "$path"; then
25138         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25139       fi
25140 
25141       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25142     fi
25143   fi
25144 
25145             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25146 $as_echo_n "checking for Boot JDK... " >&6; }
25147             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25148 $as_echo "$BOOT_JDK" >&6; }
25149             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25150 $as_echo_n "checking Boot JDK version... " >&6; }
25151             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25152             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25153 $as_echo "$BOOT_JDK_VERSION" >&6; }
25154           fi # end check jdk version
25155         fi # end check javac
25156       fi # end check java
25157     fi # end check boot jdk found
25158   fi
25159 
25160     done
25161   fi
25162 
25163   fi
25164 
25165 
25166     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25167     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25168       # Do we have a bin/java?
25169       if test ! -x "$BOOT_JDK/bin/java"; then
25170         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25171 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25172         BOOT_JDK_FOUND=no
25173       else
25174         # Do we have a bin/javac?
25175         if test ! -x "$BOOT_JDK/bin/javac"; then
25176           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25177 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25178           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25179 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25180           BOOT_JDK_FOUND=no
25181         else
25182           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25183           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25184 
25185           # Extra M4 quote needed to protect [] in grep expression.
25186           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25187           if test "x$FOUND_CORRECT_VERSION" = x; then
25188             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25189 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25190             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25191 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25192             BOOT_JDK_FOUND=no
25193           else
25194             # We're done! :-)
25195             BOOT_JDK_FOUND=yes
25196 
25197   # Only process if variable expands to non-empty
25198 
25199   if test "x$BOOT_JDK" != x; then
25200     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25201 
25202   # Input might be given as Windows format, start by converting to
25203   # unix format.
25204   path="$BOOT_JDK"
25205   new_path=`$CYGPATH -u "$path"`
25206 
25207   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25208   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25209   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25210   # "foo.exe" is OK but "foo" is an error.
25211   #
25212   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25213   # It is also a way to make sure we got the proper file name for the real test later on.
25214   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25215   if test "x$test_shortpath" = x; then
25216     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25217 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25218     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25219   fi
25220 
25221   # Call helper function which possibly converts this using DOS-style short mode.
25222   # If so, the updated path is stored in $new_path.
25223 
25224   input_path="$new_path"
25225   # Check if we need to convert this using DOS-style short mode. If the path
25226   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25227   # take no chances and rewrite it.
25228   # Note: m4 eats our [], so we need to use [ and ] instead.
25229   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25230   if test "x$has_forbidden_chars" != x; then
25231     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25232     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25233     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25234     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25235       # Going to short mode and back again did indeed matter. Since short mode is
25236       # case insensitive, let's make it lowercase to improve readability.
25237       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25238       # Now convert it back to Unix-style (cygpath)
25239       input_path=`$CYGPATH -u "$shortmode_path"`
25240       new_path="$input_path"
25241     fi
25242   fi
25243 
25244   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25245   if test "x$test_cygdrive_prefix" = x; then
25246     # As a simple fix, exclude /usr/bin since it's not a real path.
25247     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25248       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25249       # a path prefixed by /cygdrive for fixpath to work.
25250       new_path="$CYGWIN_ROOT_PATH$input_path"
25251     fi
25252   fi
25253 
25254 
25255   if test "x$path" != "x$new_path"; then
25256     BOOT_JDK="$new_path"
25257     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25258 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25259   fi
25260 
25261     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25262 
25263   path="$BOOT_JDK"
25264   has_colon=`$ECHO $path | $GREP ^.:`
25265   new_path="$path"
25266   if test "x$has_colon" = x; then
25267     # Not in mixed or Windows style, start by that.
25268     new_path=`cmd //c echo $path`
25269   fi
25270 
25271 
25272   input_path="$new_path"
25273   # Check if we need to convert this using DOS-style short mode. If the path
25274   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25275   # take no chances and rewrite it.
25276   # Note: m4 eats our [], so we need to use [ and ] instead.
25277   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25278   if test "x$has_forbidden_chars" != x; then
25279     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25280     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25281   fi
25282 
25283 
25284   windows_path="$new_path"
25285   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25286     unix_path=`$CYGPATH -u "$windows_path"`
25287     new_path="$unix_path"
25288   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25289     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25290     new_path="$unix_path"
25291   fi
25292 
25293   if test "x$path" != "x$new_path"; then
25294     BOOT_JDK="$new_path"
25295     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25296 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25297   fi
25298 
25299   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25300   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25301 
25302     else
25303       # We're on a unix platform. Hooray! :)
25304       path="$BOOT_JDK"
25305       has_space=`$ECHO "$path" | $GREP " "`
25306       if test "x$has_space" != x; then
25307         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25308 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25309         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25310       fi
25311 
25312       # Use eval to expand a potential ~
25313       eval path="$path"
25314       if test ! -f "$path" && test ! -d "$path"; then
25315         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25316       fi
25317 
25318       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25319     fi
25320   fi
25321 
25322             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25323 $as_echo_n "checking for Boot JDK... " >&6; }
25324             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25325 $as_echo "$BOOT_JDK" >&6; }
25326             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25327 $as_echo_n "checking Boot JDK version... " >&6; }
25328             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25329             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25330 $as_echo "$BOOT_JDK_VERSION" >&6; }
25331           fi # end check jdk version
25332         fi # end check javac
25333       fi # end check java
25334     fi # end check boot jdk found
25335   fi
25336 
25337 
25338   if test "x$BOOT_JDK_FOUND" = xno; then
25339     # Now execute the test
25340 
25341   if test "x$PROGRAMW6432" != x; then
25342     VIRTUAL_DIR="$PROGRAMW6432/Java"
25343 
25344   windows_path="$VIRTUAL_DIR"
25345   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25346     unix_path=`$CYGPATH -u "$windows_path"`
25347     VIRTUAL_DIR="$unix_path"
25348   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25349     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25350     VIRTUAL_DIR="$unix_path"
25351   fi
25352 
25353 
25354   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25355   BOOT_JDK_SUFFIX=""
25356   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25357   if test "x$ALL_JDKS_FOUND" != x; then
25358     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25359 
25360   if test "x$BOOT_JDK_FOUND" = xno; then
25361     # Now execute the test
25362 
25363         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25364         if test -d "$BOOT_JDK"; then
25365           BOOT_JDK_FOUND=maybe
25366           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25367 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25368         fi
25369 
25370 
25371     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25372     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25373       # Do we have a bin/java?
25374       if test ! -x "$BOOT_JDK/bin/java"; then
25375         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25376 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25377         BOOT_JDK_FOUND=no
25378       else
25379         # Do we have a bin/javac?
25380         if test ! -x "$BOOT_JDK/bin/javac"; then
25381           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25382 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25383           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25384 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25385           BOOT_JDK_FOUND=no
25386         else
25387           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25388           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25389 
25390           # Extra M4 quote needed to protect [] in grep expression.
25391           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25392           if test "x$FOUND_CORRECT_VERSION" = x; then
25393             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25394 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25395             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25396 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25397             BOOT_JDK_FOUND=no
25398           else
25399             # We're done! :-)
25400             BOOT_JDK_FOUND=yes
25401 
25402   # Only process if variable expands to non-empty
25403 
25404   if test "x$BOOT_JDK" != x; then
25405     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25406 
25407   # Input might be given as Windows format, start by converting to
25408   # unix format.
25409   path="$BOOT_JDK"
25410   new_path=`$CYGPATH -u "$path"`
25411 
25412   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25413   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25414   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25415   # "foo.exe" is OK but "foo" is an error.
25416   #
25417   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25418   # It is also a way to make sure we got the proper file name for the real test later on.
25419   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25420   if test "x$test_shortpath" = x; then
25421     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25422 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25423     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25424   fi
25425 
25426   # Call helper function which possibly converts this using DOS-style short mode.
25427   # If so, the updated path is stored in $new_path.
25428 
25429   input_path="$new_path"
25430   # Check if we need to convert this using DOS-style short mode. If the path
25431   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25432   # take no chances and rewrite it.
25433   # Note: m4 eats our [], so we need to use [ and ] instead.
25434   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25435   if test "x$has_forbidden_chars" != x; then
25436     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25437     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25438     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25439     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25440       # Going to short mode and back again did indeed matter. Since short mode is
25441       # case insensitive, let's make it lowercase to improve readability.
25442       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25443       # Now convert it back to Unix-style (cygpath)
25444       input_path=`$CYGPATH -u "$shortmode_path"`
25445       new_path="$input_path"
25446     fi
25447   fi
25448 
25449   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25450   if test "x$test_cygdrive_prefix" = x; then
25451     # As a simple fix, exclude /usr/bin since it's not a real path.
25452     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25453       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25454       # a path prefixed by /cygdrive for fixpath to work.
25455       new_path="$CYGWIN_ROOT_PATH$input_path"
25456     fi
25457   fi
25458 
25459 
25460   if test "x$path" != "x$new_path"; then
25461     BOOT_JDK="$new_path"
25462     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25463 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25464   fi
25465 
25466     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25467 
25468   path="$BOOT_JDK"
25469   has_colon=`$ECHO $path | $GREP ^.:`
25470   new_path="$path"
25471   if test "x$has_colon" = x; then
25472     # Not in mixed or Windows style, start by that.
25473     new_path=`cmd //c echo $path`
25474   fi
25475 
25476 
25477   input_path="$new_path"
25478   # Check if we need to convert this using DOS-style short mode. If the path
25479   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25480   # take no chances and rewrite it.
25481   # Note: m4 eats our [], so we need to use [ and ] instead.
25482   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25483   if test "x$has_forbidden_chars" != x; then
25484     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25485     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25486   fi
25487 
25488 
25489   windows_path="$new_path"
25490   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25491     unix_path=`$CYGPATH -u "$windows_path"`
25492     new_path="$unix_path"
25493   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25494     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25495     new_path="$unix_path"
25496   fi
25497 
25498   if test "x$path" != "x$new_path"; then
25499     BOOT_JDK="$new_path"
25500     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25501 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25502   fi
25503 
25504   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25505   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25506 
25507     else
25508       # We're on a unix platform. Hooray! :)
25509       path="$BOOT_JDK"
25510       has_space=`$ECHO "$path" | $GREP " "`
25511       if test "x$has_space" != x; then
25512         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25513 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25514         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25515       fi
25516 
25517       # Use eval to expand a potential ~
25518       eval path="$path"
25519       if test ! -f "$path" && test ! -d "$path"; then
25520         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25521       fi
25522 
25523       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25524     fi
25525   fi
25526 
25527             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25528 $as_echo_n "checking for Boot JDK... " >&6; }
25529             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25530 $as_echo "$BOOT_JDK" >&6; }
25531             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25532 $as_echo_n "checking Boot JDK version... " >&6; }
25533             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25534             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25535 $as_echo "$BOOT_JDK_VERSION" >&6; }
25536           fi # end check jdk version
25537         fi # end check javac
25538       fi # end check java
25539     fi # end check boot jdk found
25540   fi
25541 
25542     done
25543   fi
25544 
25545   fi
25546 
25547 
25548     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25549     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25550       # Do we have a bin/java?
25551       if test ! -x "$BOOT_JDK/bin/java"; then
25552         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25553 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25554         BOOT_JDK_FOUND=no
25555       else
25556         # Do we have a bin/javac?
25557         if test ! -x "$BOOT_JDK/bin/javac"; then
25558           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25559 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25560           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25561 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25562           BOOT_JDK_FOUND=no
25563         else
25564           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25565           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25566 
25567           # Extra M4 quote needed to protect [] in grep expression.
25568           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25569           if test "x$FOUND_CORRECT_VERSION" = x; then
25570             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25571 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25572             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25573 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25574             BOOT_JDK_FOUND=no
25575           else
25576             # We're done! :-)
25577             BOOT_JDK_FOUND=yes
25578 
25579   # Only process if variable expands to non-empty
25580 
25581   if test "x$BOOT_JDK" != x; then
25582     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25583 
25584   # Input might be given as Windows format, start by converting to
25585   # unix format.
25586   path="$BOOT_JDK"
25587   new_path=`$CYGPATH -u "$path"`
25588 
25589   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25590   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25591   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25592   # "foo.exe" is OK but "foo" is an error.
25593   #
25594   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25595   # It is also a way to make sure we got the proper file name for the real test later on.
25596   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25597   if test "x$test_shortpath" = x; then
25598     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25599 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25600     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25601   fi
25602 
25603   # Call helper function which possibly converts this using DOS-style short mode.
25604   # If so, the updated path is stored in $new_path.
25605 
25606   input_path="$new_path"
25607   # Check if we need to convert this using DOS-style short mode. If the path
25608   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25609   # take no chances and rewrite it.
25610   # Note: m4 eats our [], so we need to use [ and ] instead.
25611   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25612   if test "x$has_forbidden_chars" != x; then
25613     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25614     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25615     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25616     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25617       # Going to short mode and back again did indeed matter. Since short mode is
25618       # case insensitive, let's make it lowercase to improve readability.
25619       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25620       # Now convert it back to Unix-style (cygpath)
25621       input_path=`$CYGPATH -u "$shortmode_path"`
25622       new_path="$input_path"
25623     fi
25624   fi
25625 
25626   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25627   if test "x$test_cygdrive_prefix" = x; then
25628     # As a simple fix, exclude /usr/bin since it's not a real path.
25629     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25630       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25631       # a path prefixed by /cygdrive for fixpath to work.
25632       new_path="$CYGWIN_ROOT_PATH$input_path"
25633     fi
25634   fi
25635 
25636 
25637   if test "x$path" != "x$new_path"; then
25638     BOOT_JDK="$new_path"
25639     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25640 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25641   fi
25642 
25643     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25644 
25645   path="$BOOT_JDK"
25646   has_colon=`$ECHO $path | $GREP ^.:`
25647   new_path="$path"
25648   if test "x$has_colon" = x; then
25649     # Not in mixed or Windows style, start by that.
25650     new_path=`cmd //c echo $path`
25651   fi
25652 
25653 
25654   input_path="$new_path"
25655   # Check if we need to convert this using DOS-style short mode. If the path
25656   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25657   # take no chances and rewrite it.
25658   # Note: m4 eats our [], so we need to use [ and ] instead.
25659   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25660   if test "x$has_forbidden_chars" != x; then
25661     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25662     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25663   fi
25664 
25665 
25666   windows_path="$new_path"
25667   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25668     unix_path=`$CYGPATH -u "$windows_path"`
25669     new_path="$unix_path"
25670   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25671     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25672     new_path="$unix_path"
25673   fi
25674 
25675   if test "x$path" != "x$new_path"; then
25676     BOOT_JDK="$new_path"
25677     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25678 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25679   fi
25680 
25681   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25682   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25683 
25684     else
25685       # We're on a unix platform. Hooray! :)
25686       path="$BOOT_JDK"
25687       has_space=`$ECHO "$path" | $GREP " "`
25688       if test "x$has_space" != x; then
25689         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25690 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25691         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25692       fi
25693 
25694       # Use eval to expand a potential ~
25695       eval path="$path"
25696       if test ! -f "$path" && test ! -d "$path"; then
25697         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25698       fi
25699 
25700       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25701     fi
25702   fi
25703 
25704             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25705 $as_echo_n "checking for Boot JDK... " >&6; }
25706             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25707 $as_echo "$BOOT_JDK" >&6; }
25708             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25709 $as_echo_n "checking Boot JDK version... " >&6; }
25710             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25711             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25712 $as_echo "$BOOT_JDK_VERSION" >&6; }
25713           fi # end check jdk version
25714         fi # end check javac
25715       fi # end check java
25716     fi # end check boot jdk found
25717   fi
25718 
25719 
25720   if test "x$BOOT_JDK_FOUND" = xno; then
25721     # Now execute the test
25722 
25723   if test "x$PROGRAMFILES" != x; then
25724     VIRTUAL_DIR="$PROGRAMFILES/Java"
25725 
25726   windows_path="$VIRTUAL_DIR"
25727   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25728     unix_path=`$CYGPATH -u "$windows_path"`
25729     VIRTUAL_DIR="$unix_path"
25730   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25731     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25732     VIRTUAL_DIR="$unix_path"
25733   fi
25734 
25735 
25736   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25737   BOOT_JDK_SUFFIX=""
25738   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25739   if test "x$ALL_JDKS_FOUND" != x; then
25740     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25741 
25742   if test "x$BOOT_JDK_FOUND" = xno; then
25743     # Now execute the test
25744 
25745         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25746         if test -d "$BOOT_JDK"; then
25747           BOOT_JDK_FOUND=maybe
25748           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25749 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25750         fi
25751 
25752 
25753     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25754     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25755       # Do we have a bin/java?
25756       if test ! -x "$BOOT_JDK/bin/java"; then
25757         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25758 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25759         BOOT_JDK_FOUND=no
25760       else
25761         # Do we have a bin/javac?
25762         if test ! -x "$BOOT_JDK/bin/javac"; then
25763           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25764 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25765           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25766 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25767           BOOT_JDK_FOUND=no
25768         else
25769           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25770           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25771 
25772           # Extra M4 quote needed to protect [] in grep expression.
25773           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25774           if test "x$FOUND_CORRECT_VERSION" = x; then
25775             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25776 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25777             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25778 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25779             BOOT_JDK_FOUND=no
25780           else
25781             # We're done! :-)
25782             BOOT_JDK_FOUND=yes
25783 
25784   # Only process if variable expands to non-empty
25785 
25786   if test "x$BOOT_JDK" != x; then
25787     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25788 
25789   # Input might be given as Windows format, start by converting to
25790   # unix format.
25791   path="$BOOT_JDK"
25792   new_path=`$CYGPATH -u "$path"`
25793 
25794   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25795   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25796   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25797   # "foo.exe" is OK but "foo" is an error.
25798   #
25799   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25800   # It is also a way to make sure we got the proper file name for the real test later on.
25801   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25802   if test "x$test_shortpath" = x; then
25803     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25804 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25805     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25806   fi
25807 
25808   # Call helper function which possibly converts this using DOS-style short mode.
25809   # If so, the updated path is stored in $new_path.
25810 
25811   input_path="$new_path"
25812   # Check if we need to convert this using DOS-style short mode. If the path
25813   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25814   # take no chances and rewrite it.
25815   # Note: m4 eats our [], so we need to use [ and ] instead.
25816   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25817   if test "x$has_forbidden_chars" != x; then
25818     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25819     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25820     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25821     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25822       # Going to short mode and back again did indeed matter. Since short mode is
25823       # case insensitive, let's make it lowercase to improve readability.
25824       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25825       # Now convert it back to Unix-style (cygpath)
25826       input_path=`$CYGPATH -u "$shortmode_path"`
25827       new_path="$input_path"
25828     fi
25829   fi
25830 
25831   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25832   if test "x$test_cygdrive_prefix" = x; then
25833     # As a simple fix, exclude /usr/bin since it's not a real path.
25834     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25835       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25836       # a path prefixed by /cygdrive for fixpath to work.
25837       new_path="$CYGWIN_ROOT_PATH$input_path"
25838     fi
25839   fi
25840 
25841 
25842   if test "x$path" != "x$new_path"; then
25843     BOOT_JDK="$new_path"
25844     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25845 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25846   fi
25847 
25848     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25849 
25850   path="$BOOT_JDK"
25851   has_colon=`$ECHO $path | $GREP ^.:`
25852   new_path="$path"
25853   if test "x$has_colon" = x; then
25854     # Not in mixed or Windows style, start by that.
25855     new_path=`cmd //c echo $path`
25856   fi
25857 
25858 
25859   input_path="$new_path"
25860   # Check if we need to convert this using DOS-style short mode. If the path
25861   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25862   # take no chances and rewrite it.
25863   # Note: m4 eats our [], so we need to use [ and ] instead.
25864   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25865   if test "x$has_forbidden_chars" != x; then
25866     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25867     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25868   fi
25869 
25870 
25871   windows_path="$new_path"
25872   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25873     unix_path=`$CYGPATH -u "$windows_path"`
25874     new_path="$unix_path"
25875   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25876     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25877     new_path="$unix_path"
25878   fi
25879 
25880   if test "x$path" != "x$new_path"; then
25881     BOOT_JDK="$new_path"
25882     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25883 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25884   fi
25885 
25886   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25887   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25888 
25889     else
25890       # We're on a unix platform. Hooray! :)
25891       path="$BOOT_JDK"
25892       has_space=`$ECHO "$path" | $GREP " "`
25893       if test "x$has_space" != x; then
25894         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25895 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25896         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25897       fi
25898 
25899       # Use eval to expand a potential ~
25900       eval path="$path"
25901       if test ! -f "$path" && test ! -d "$path"; then
25902         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25903       fi
25904 
25905       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25906     fi
25907   fi
25908 
25909             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25910 $as_echo_n "checking for Boot JDK... " >&6; }
25911             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25912 $as_echo "$BOOT_JDK" >&6; }
25913             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25914 $as_echo_n "checking Boot JDK version... " >&6; }
25915             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25916             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25917 $as_echo "$BOOT_JDK_VERSION" >&6; }
25918           fi # end check jdk version
25919         fi # end check javac
25920       fi # end check java
25921     fi # end check boot jdk found
25922   fi
25923 
25924     done
25925   fi
25926 
25927   fi
25928 
25929 
25930     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25931     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25932       # Do we have a bin/java?
25933       if test ! -x "$BOOT_JDK/bin/java"; then
25934         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25935 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25936         BOOT_JDK_FOUND=no
25937       else
25938         # Do we have a bin/javac?
25939         if test ! -x "$BOOT_JDK/bin/javac"; then
25940           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25941 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25942           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25943 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25944           BOOT_JDK_FOUND=no
25945         else
25946           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25947           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25948 
25949           # Extra M4 quote needed to protect [] in grep expression.
25950           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25951           if test "x$FOUND_CORRECT_VERSION" = x; then
25952             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25953 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25954             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25955 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25956             BOOT_JDK_FOUND=no
25957           else
25958             # We're done! :-)
25959             BOOT_JDK_FOUND=yes
25960 
25961   # Only process if variable expands to non-empty
25962 
25963   if test "x$BOOT_JDK" != x; then
25964     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25965 
25966   # Input might be given as Windows format, start by converting to
25967   # unix format.
25968   path="$BOOT_JDK"
25969   new_path=`$CYGPATH -u "$path"`
25970 
25971   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25972   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25973   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25974   # "foo.exe" is OK but "foo" is an error.
25975   #
25976   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25977   # It is also a way to make sure we got the proper file name for the real test later on.
25978   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25979   if test "x$test_shortpath" = x; then
25980     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25981 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25982     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25983   fi
25984 
25985   # Call helper function which possibly converts this using DOS-style short mode.
25986   # If so, the updated path is stored in $new_path.
25987 
25988   input_path="$new_path"
25989   # Check if we need to convert this using DOS-style short mode. If the path
25990   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25991   # take no chances and rewrite it.
25992   # Note: m4 eats our [], so we need to use [ and ] instead.
25993   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25994   if test "x$has_forbidden_chars" != x; then
25995     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25996     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25997     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25998     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25999       # Going to short mode and back again did indeed matter. Since short mode is
26000       # case insensitive, let's make it lowercase to improve readability.
26001       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26002       # Now convert it back to Unix-style (cygpath)
26003       input_path=`$CYGPATH -u "$shortmode_path"`
26004       new_path="$input_path"
26005     fi
26006   fi
26007 
26008   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26009   if test "x$test_cygdrive_prefix" = x; then
26010     # As a simple fix, exclude /usr/bin since it's not a real path.
26011     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26012       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26013       # a path prefixed by /cygdrive for fixpath to work.
26014       new_path="$CYGWIN_ROOT_PATH$input_path"
26015     fi
26016   fi
26017 
26018 
26019   if test "x$path" != "x$new_path"; then
26020     BOOT_JDK="$new_path"
26021     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26022 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26023   fi
26024 
26025     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26026 
26027   path="$BOOT_JDK"
26028   has_colon=`$ECHO $path | $GREP ^.:`
26029   new_path="$path"
26030   if test "x$has_colon" = x; then
26031     # Not in mixed or Windows style, start by that.
26032     new_path=`cmd //c echo $path`
26033   fi
26034 
26035 
26036   input_path="$new_path"
26037   # Check if we need to convert this using DOS-style short mode. If the path
26038   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26039   # take no chances and rewrite it.
26040   # Note: m4 eats our [], so we need to use [ and ] instead.
26041   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26042   if test "x$has_forbidden_chars" != x; then
26043     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26044     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26045   fi
26046 
26047 
26048   windows_path="$new_path"
26049   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26050     unix_path=`$CYGPATH -u "$windows_path"`
26051     new_path="$unix_path"
26052   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26053     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26054     new_path="$unix_path"
26055   fi
26056 
26057   if test "x$path" != "x$new_path"; then
26058     BOOT_JDK="$new_path"
26059     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26060 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26061   fi
26062 
26063   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26064   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26065 
26066     else
26067       # We're on a unix platform. Hooray! :)
26068       path="$BOOT_JDK"
26069       has_space=`$ECHO "$path" | $GREP " "`
26070       if test "x$has_space" != x; then
26071         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26072 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26073         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26074       fi
26075 
26076       # Use eval to expand a potential ~
26077       eval path="$path"
26078       if test ! -f "$path" && test ! -d "$path"; then
26079         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26080       fi
26081 
26082       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26083     fi
26084   fi
26085 
26086             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26087 $as_echo_n "checking for Boot JDK... " >&6; }
26088             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26089 $as_echo "$BOOT_JDK" >&6; }
26090             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26091 $as_echo_n "checking Boot JDK version... " >&6; }
26092             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26093             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26094 $as_echo "$BOOT_JDK_VERSION" >&6; }
26095           fi # end check jdk version
26096         fi # end check javac
26097       fi # end check java
26098     fi # end check boot jdk found
26099   fi
26100 
26101 
26102   if test "x$BOOT_JDK_FOUND" = xno; then
26103     # Now execute the test
26104 
26105   if test "x$ProgramFiles" != x; then
26106     VIRTUAL_DIR="$ProgramFiles/Java"
26107 
26108   windows_path="$VIRTUAL_DIR"
26109   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26110     unix_path=`$CYGPATH -u "$windows_path"`
26111     VIRTUAL_DIR="$unix_path"
26112   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26113     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26114     VIRTUAL_DIR="$unix_path"
26115   fi
26116 
26117 
26118   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26119   BOOT_JDK_SUFFIX=""
26120   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26121   if test "x$ALL_JDKS_FOUND" != x; then
26122     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26123 
26124   if test "x$BOOT_JDK_FOUND" = xno; then
26125     # Now execute the test
26126 
26127         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26128         if test -d "$BOOT_JDK"; then
26129           BOOT_JDK_FOUND=maybe
26130           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26131 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26132         fi
26133 
26134 
26135     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26136     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26137       # Do we have a bin/java?
26138       if test ! -x "$BOOT_JDK/bin/java"; then
26139         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26140 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26141         BOOT_JDK_FOUND=no
26142       else
26143         # Do we have a bin/javac?
26144         if test ! -x "$BOOT_JDK/bin/javac"; then
26145           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26146 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26147           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26148 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26149           BOOT_JDK_FOUND=no
26150         else
26151           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26152           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26153 
26154           # Extra M4 quote needed to protect [] in grep expression.
26155           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26156           if test "x$FOUND_CORRECT_VERSION" = x; then
26157             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26158 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26159             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26160 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26161             BOOT_JDK_FOUND=no
26162           else
26163             # We're done! :-)
26164             BOOT_JDK_FOUND=yes
26165 
26166   # Only process if variable expands to non-empty
26167 
26168   if test "x$BOOT_JDK" != x; then
26169     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26170 
26171   # Input might be given as Windows format, start by converting to
26172   # unix format.
26173   path="$BOOT_JDK"
26174   new_path=`$CYGPATH -u "$path"`
26175 
26176   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26177   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26178   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26179   # "foo.exe" is OK but "foo" is an error.
26180   #
26181   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26182   # It is also a way to make sure we got the proper file name for the real test later on.
26183   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26184   if test "x$test_shortpath" = x; then
26185     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26186 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26187     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26188   fi
26189 
26190   # Call helper function which possibly converts this using DOS-style short mode.
26191   # If so, the updated path is stored in $new_path.
26192 
26193   input_path="$new_path"
26194   # Check if we need to convert this using DOS-style short mode. If the path
26195   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26196   # take no chances and rewrite it.
26197   # Note: m4 eats our [], so we need to use [ and ] instead.
26198   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26199   if test "x$has_forbidden_chars" != x; then
26200     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26201     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26202     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26203     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26204       # Going to short mode and back again did indeed matter. Since short mode is
26205       # case insensitive, let's make it lowercase to improve readability.
26206       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26207       # Now convert it back to Unix-style (cygpath)
26208       input_path=`$CYGPATH -u "$shortmode_path"`
26209       new_path="$input_path"
26210     fi
26211   fi
26212 
26213   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26214   if test "x$test_cygdrive_prefix" = x; then
26215     # As a simple fix, exclude /usr/bin since it's not a real path.
26216     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26217       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26218       # a path prefixed by /cygdrive for fixpath to work.
26219       new_path="$CYGWIN_ROOT_PATH$input_path"
26220     fi
26221   fi
26222 
26223 
26224   if test "x$path" != "x$new_path"; then
26225     BOOT_JDK="$new_path"
26226     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26227 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26228   fi
26229 
26230     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26231 
26232   path="$BOOT_JDK"
26233   has_colon=`$ECHO $path | $GREP ^.:`
26234   new_path="$path"
26235   if test "x$has_colon" = x; then
26236     # Not in mixed or Windows style, start by that.
26237     new_path=`cmd //c echo $path`
26238   fi
26239 
26240 
26241   input_path="$new_path"
26242   # Check if we need to convert this using DOS-style short mode. If the path
26243   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26244   # take no chances and rewrite it.
26245   # Note: m4 eats our [], so we need to use [ and ] instead.
26246   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26247   if test "x$has_forbidden_chars" != x; then
26248     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26249     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26250   fi
26251 
26252 
26253   windows_path="$new_path"
26254   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26255     unix_path=`$CYGPATH -u "$windows_path"`
26256     new_path="$unix_path"
26257   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26258     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26259     new_path="$unix_path"
26260   fi
26261 
26262   if test "x$path" != "x$new_path"; then
26263     BOOT_JDK="$new_path"
26264     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26265 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26266   fi
26267 
26268   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26269   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26270 
26271     else
26272       # We're on a unix platform. Hooray! :)
26273       path="$BOOT_JDK"
26274       has_space=`$ECHO "$path" | $GREP " "`
26275       if test "x$has_space" != x; then
26276         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26277 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26278         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26279       fi
26280 
26281       # Use eval to expand a potential ~
26282       eval path="$path"
26283       if test ! -f "$path" && test ! -d "$path"; then
26284         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26285       fi
26286 
26287       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26288     fi
26289   fi
26290 
26291             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26292 $as_echo_n "checking for Boot JDK... " >&6; }
26293             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26294 $as_echo "$BOOT_JDK" >&6; }
26295             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26296 $as_echo_n "checking Boot JDK version... " >&6; }
26297             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26298             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26299 $as_echo "$BOOT_JDK_VERSION" >&6; }
26300           fi # end check jdk version
26301         fi # end check javac
26302       fi # end check java
26303     fi # end check boot jdk found
26304   fi
26305 
26306     done
26307   fi
26308 
26309   fi
26310 
26311 
26312     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26313     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26314       # Do we have a bin/java?
26315       if test ! -x "$BOOT_JDK/bin/java"; then
26316         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26317 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26318         BOOT_JDK_FOUND=no
26319       else
26320         # Do we have a bin/javac?
26321         if test ! -x "$BOOT_JDK/bin/javac"; then
26322           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26323 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26324           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26325 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26326           BOOT_JDK_FOUND=no
26327         else
26328           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26329           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26330 
26331           # Extra M4 quote needed to protect [] in grep expression.
26332           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26333           if test "x$FOUND_CORRECT_VERSION" = x; then
26334             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26335 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26336             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26337 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26338             BOOT_JDK_FOUND=no
26339           else
26340             # We're done! :-)
26341             BOOT_JDK_FOUND=yes
26342 
26343   # Only process if variable expands to non-empty
26344 
26345   if test "x$BOOT_JDK" != x; then
26346     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26347 
26348   # Input might be given as Windows format, start by converting to
26349   # unix format.
26350   path="$BOOT_JDK"
26351   new_path=`$CYGPATH -u "$path"`
26352 
26353   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26354   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26355   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26356   # "foo.exe" is OK but "foo" is an error.
26357   #
26358   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26359   # It is also a way to make sure we got the proper file name for the real test later on.
26360   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26361   if test "x$test_shortpath" = x; then
26362     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26363 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26364     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26365   fi
26366 
26367   # Call helper function which possibly converts this using DOS-style short mode.
26368   # If so, the updated path is stored in $new_path.
26369 
26370   input_path="$new_path"
26371   # Check if we need to convert this using DOS-style short mode. If the path
26372   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26373   # take no chances and rewrite it.
26374   # Note: m4 eats our [], so we need to use [ and ] instead.
26375   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26376   if test "x$has_forbidden_chars" != x; then
26377     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26378     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26379     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26380     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26381       # Going to short mode and back again did indeed matter. Since short mode is
26382       # case insensitive, let's make it lowercase to improve readability.
26383       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26384       # Now convert it back to Unix-style (cygpath)
26385       input_path=`$CYGPATH -u "$shortmode_path"`
26386       new_path="$input_path"
26387     fi
26388   fi
26389 
26390   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26391   if test "x$test_cygdrive_prefix" = x; then
26392     # As a simple fix, exclude /usr/bin since it's not a real path.
26393     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26394       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26395       # a path prefixed by /cygdrive for fixpath to work.
26396       new_path="$CYGWIN_ROOT_PATH$input_path"
26397     fi
26398   fi
26399 
26400 
26401   if test "x$path" != "x$new_path"; then
26402     BOOT_JDK="$new_path"
26403     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26404 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26405   fi
26406 
26407     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26408 
26409   path="$BOOT_JDK"
26410   has_colon=`$ECHO $path | $GREP ^.:`
26411   new_path="$path"
26412   if test "x$has_colon" = x; then
26413     # Not in mixed or Windows style, start by that.
26414     new_path=`cmd //c echo $path`
26415   fi
26416 
26417 
26418   input_path="$new_path"
26419   # Check if we need to convert this using DOS-style short mode. If the path
26420   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26421   # take no chances and rewrite it.
26422   # Note: m4 eats our [], so we need to use [ and ] instead.
26423   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26424   if test "x$has_forbidden_chars" != x; then
26425     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26426     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26427   fi
26428 
26429 
26430   windows_path="$new_path"
26431   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26432     unix_path=`$CYGPATH -u "$windows_path"`
26433     new_path="$unix_path"
26434   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26435     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26436     new_path="$unix_path"
26437   fi
26438 
26439   if test "x$path" != "x$new_path"; then
26440     BOOT_JDK="$new_path"
26441     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26442 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26443   fi
26444 
26445   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26446   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26447 
26448     else
26449       # We're on a unix platform. Hooray! :)
26450       path="$BOOT_JDK"
26451       has_space=`$ECHO "$path" | $GREP " "`
26452       if test "x$has_space" != x; then
26453         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26454 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26455         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26456       fi
26457 
26458       # Use eval to expand a potential ~
26459       eval path="$path"
26460       if test ! -f "$path" && test ! -d "$path"; then
26461         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26462       fi
26463 
26464       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26465     fi
26466   fi
26467 
26468             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26469 $as_echo_n "checking for Boot JDK... " >&6; }
26470             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26471 $as_echo "$BOOT_JDK" >&6; }
26472             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26473 $as_echo_n "checking Boot JDK version... " >&6; }
26474             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26475             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26476 $as_echo "$BOOT_JDK_VERSION" >&6; }
26477           fi # end check jdk version
26478         fi # end check javac
26479       fi # end check java
26480     fi # end check boot jdk found
26481   fi
26482 
26483 
26484   if test "x$BOOT_JDK_FOUND" = xno; then
26485     # Now execute the test
26486 
26487   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
26488   BOOT_JDK_SUFFIX=""
26489   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26490   if test "x$ALL_JDKS_FOUND" != x; then
26491     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26492 
26493   if test "x$BOOT_JDK_FOUND" = xno; then
26494     # Now execute the test
26495 
26496         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26497         if test -d "$BOOT_JDK"; then
26498           BOOT_JDK_FOUND=maybe
26499           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26500 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26501         fi
26502 
26503 
26504     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26505     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26506       # Do we have a bin/java?
26507       if test ! -x "$BOOT_JDK/bin/java"; then
26508         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26509 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26510         BOOT_JDK_FOUND=no
26511       else
26512         # Do we have a bin/javac?
26513         if test ! -x "$BOOT_JDK/bin/javac"; then
26514           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26515 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26516           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26517 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26518           BOOT_JDK_FOUND=no
26519         else
26520           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26521           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26522 
26523           # Extra M4 quote needed to protect [] in grep expression.
26524           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26525           if test "x$FOUND_CORRECT_VERSION" = x; then
26526             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26527 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26528             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26529 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26530             BOOT_JDK_FOUND=no
26531           else
26532             # We're done! :-)
26533             BOOT_JDK_FOUND=yes
26534 
26535   # Only process if variable expands to non-empty
26536 
26537   if test "x$BOOT_JDK" != x; then
26538     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26539 
26540   # Input might be given as Windows format, start by converting to
26541   # unix format.
26542   path="$BOOT_JDK"
26543   new_path=`$CYGPATH -u "$path"`
26544 
26545   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26546   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26547   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26548   # "foo.exe" is OK but "foo" is an error.
26549   #
26550   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26551   # It is also a way to make sure we got the proper file name for the real test later on.
26552   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26553   if test "x$test_shortpath" = x; then
26554     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26555 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26556     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26557   fi
26558 
26559   # Call helper function which possibly converts this using DOS-style short mode.
26560   # If so, the updated path is stored in $new_path.
26561 
26562   input_path="$new_path"
26563   # Check if we need to convert this using DOS-style short mode. If the path
26564   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26565   # take no chances and rewrite it.
26566   # Note: m4 eats our [], so we need to use [ and ] instead.
26567   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26568   if test "x$has_forbidden_chars" != x; then
26569     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26570     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26571     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26572     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26573       # Going to short mode and back again did indeed matter. Since short mode is
26574       # case insensitive, let's make it lowercase to improve readability.
26575       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26576       # Now convert it back to Unix-style (cygpath)
26577       input_path=`$CYGPATH -u "$shortmode_path"`
26578       new_path="$input_path"
26579     fi
26580   fi
26581 
26582   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26583   if test "x$test_cygdrive_prefix" = x; then
26584     # As a simple fix, exclude /usr/bin since it's not a real path.
26585     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26586       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26587       # a path prefixed by /cygdrive for fixpath to work.
26588       new_path="$CYGWIN_ROOT_PATH$input_path"
26589     fi
26590   fi
26591 
26592 
26593   if test "x$path" != "x$new_path"; then
26594     BOOT_JDK="$new_path"
26595     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26596 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26597   fi
26598 
26599     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26600 
26601   path="$BOOT_JDK"
26602   has_colon=`$ECHO $path | $GREP ^.:`
26603   new_path="$path"
26604   if test "x$has_colon" = x; then
26605     # Not in mixed or Windows style, start by that.
26606     new_path=`cmd //c echo $path`
26607   fi
26608 
26609 
26610   input_path="$new_path"
26611   # Check if we need to convert this using DOS-style short mode. If the path
26612   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26613   # take no chances and rewrite it.
26614   # Note: m4 eats our [], so we need to use [ and ] instead.
26615   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26616   if test "x$has_forbidden_chars" != x; then
26617     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26618     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26619   fi
26620 
26621 
26622   windows_path="$new_path"
26623   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26624     unix_path=`$CYGPATH -u "$windows_path"`
26625     new_path="$unix_path"
26626   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26627     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26628     new_path="$unix_path"
26629   fi
26630 
26631   if test "x$path" != "x$new_path"; then
26632     BOOT_JDK="$new_path"
26633     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26634 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26635   fi
26636 
26637   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26638   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26639 
26640     else
26641       # We're on a unix platform. Hooray! :)
26642       path="$BOOT_JDK"
26643       has_space=`$ECHO "$path" | $GREP " "`
26644       if test "x$has_space" != x; then
26645         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26646 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26647         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26648       fi
26649 
26650       # Use eval to expand a potential ~
26651       eval path="$path"
26652       if test ! -f "$path" && test ! -d "$path"; then
26653         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26654       fi
26655 
26656       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26657     fi
26658   fi
26659 
26660             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26661 $as_echo_n "checking for Boot JDK... " >&6; }
26662             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26663 $as_echo "$BOOT_JDK" >&6; }
26664             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26665 $as_echo_n "checking Boot JDK version... " >&6; }
26666             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26667             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26668 $as_echo "$BOOT_JDK_VERSION" >&6; }
26669           fi # end check jdk version
26670         fi # end check javac
26671       fi # end check java
26672     fi # end check boot jdk found
26673   fi
26674 
26675     done
26676   fi
26677 
26678 
26679     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26680     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26681       # Do we have a bin/java?
26682       if test ! -x "$BOOT_JDK/bin/java"; then
26683         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26684 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26685         BOOT_JDK_FOUND=no
26686       else
26687         # Do we have a bin/javac?
26688         if test ! -x "$BOOT_JDK/bin/javac"; then
26689           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26690 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26691           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26692 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26693           BOOT_JDK_FOUND=no
26694         else
26695           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26696           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26697 
26698           # Extra M4 quote needed to protect [] in grep expression.
26699           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26700           if test "x$FOUND_CORRECT_VERSION" = x; then
26701             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26702 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26703             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26704 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26705             BOOT_JDK_FOUND=no
26706           else
26707             # We're done! :-)
26708             BOOT_JDK_FOUND=yes
26709 
26710   # Only process if variable expands to non-empty
26711 
26712   if test "x$BOOT_JDK" != x; then
26713     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26714 
26715   # Input might be given as Windows format, start by converting to
26716   # unix format.
26717   path="$BOOT_JDK"
26718   new_path=`$CYGPATH -u "$path"`
26719 
26720   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26721   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26722   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26723   # "foo.exe" is OK but "foo" is an error.
26724   #
26725   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26726   # It is also a way to make sure we got the proper file name for the real test later on.
26727   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26728   if test "x$test_shortpath" = x; then
26729     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26730 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26731     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26732   fi
26733 
26734   # Call helper function which possibly converts this using DOS-style short mode.
26735   # If so, the updated path is stored in $new_path.
26736 
26737   input_path="$new_path"
26738   # Check if we need to convert this using DOS-style short mode. If the path
26739   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26740   # take no chances and rewrite it.
26741   # Note: m4 eats our [], so we need to use [ and ] instead.
26742   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26743   if test "x$has_forbidden_chars" != x; then
26744     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26745     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26746     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26747     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26748       # Going to short mode and back again did indeed matter. Since short mode is
26749       # case insensitive, let's make it lowercase to improve readability.
26750       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26751       # Now convert it back to Unix-style (cygpath)
26752       input_path=`$CYGPATH -u "$shortmode_path"`
26753       new_path="$input_path"
26754     fi
26755   fi
26756 
26757   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26758   if test "x$test_cygdrive_prefix" = x; then
26759     # As a simple fix, exclude /usr/bin since it's not a real path.
26760     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26761       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26762       # a path prefixed by /cygdrive for fixpath to work.
26763       new_path="$CYGWIN_ROOT_PATH$input_path"
26764     fi
26765   fi
26766 
26767 
26768   if test "x$path" != "x$new_path"; then
26769     BOOT_JDK="$new_path"
26770     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26771 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26772   fi
26773 
26774     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26775 
26776   path="$BOOT_JDK"
26777   has_colon=`$ECHO $path | $GREP ^.:`
26778   new_path="$path"
26779   if test "x$has_colon" = x; then
26780     # Not in mixed or Windows style, start by that.
26781     new_path=`cmd //c echo $path`
26782   fi
26783 
26784 
26785   input_path="$new_path"
26786   # Check if we need to convert this using DOS-style short mode. If the path
26787   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26788   # take no chances and rewrite it.
26789   # Note: m4 eats our [], so we need to use [ and ] instead.
26790   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26791   if test "x$has_forbidden_chars" != x; then
26792     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26793     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26794   fi
26795 
26796 
26797   windows_path="$new_path"
26798   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26799     unix_path=`$CYGPATH -u "$windows_path"`
26800     new_path="$unix_path"
26801   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26802     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26803     new_path="$unix_path"
26804   fi
26805 
26806   if test "x$path" != "x$new_path"; then
26807     BOOT_JDK="$new_path"
26808     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26809 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26810   fi
26811 
26812   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26813   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26814 
26815     else
26816       # We're on a unix platform. Hooray! :)
26817       path="$BOOT_JDK"
26818       has_space=`$ECHO "$path" | $GREP " "`
26819       if test "x$has_space" != x; then
26820         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26821 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26822         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26823       fi
26824 
26825       # Use eval to expand a potential ~
26826       eval path="$path"
26827       if test ! -f "$path" && test ! -d "$path"; then
26828         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26829       fi
26830 
26831       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26832     fi
26833   fi
26834 
26835             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26836 $as_echo_n "checking for Boot JDK... " >&6; }
26837             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26838 $as_echo "$BOOT_JDK" >&6; }
26839             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26840 $as_echo_n "checking Boot JDK version... " >&6; }
26841             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26842             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26843 $as_echo "$BOOT_JDK_VERSION" >&6; }
26844           fi # end check jdk version
26845         fi # end check javac
26846       fi # end check java
26847     fi # end check boot jdk found
26848   fi
26849 
26850   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
26851 
26852   if test "x$BOOT_JDK_FOUND" = xno; then
26853     # Now execute the test
26854 
26855   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
26856   BOOT_JDK_SUFFIX="/Contents/Home"
26857   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26858   if test "x$ALL_JDKS_FOUND" != x; then
26859     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26860 
26861   if test "x$BOOT_JDK_FOUND" = xno; then
26862     # Now execute the test
26863 
26864         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26865         if test -d "$BOOT_JDK"; then
26866           BOOT_JDK_FOUND=maybe
26867           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26868 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26869         fi
26870 
26871 
26872     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26873     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26874       # Do we have a bin/java?
26875       if test ! -x "$BOOT_JDK/bin/java"; then
26876         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26877 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26878         BOOT_JDK_FOUND=no
26879       else
26880         # Do we have a bin/javac?
26881         if test ! -x "$BOOT_JDK/bin/javac"; then
26882           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26883 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26884           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26885 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26886           BOOT_JDK_FOUND=no
26887         else
26888           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26889           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26890 
26891           # Extra M4 quote needed to protect [] in grep expression.
26892           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26893           if test "x$FOUND_CORRECT_VERSION" = x; then
26894             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26895 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26896             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26897 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26898             BOOT_JDK_FOUND=no
26899           else
26900             # We're done! :-)
26901             BOOT_JDK_FOUND=yes
26902 
26903   # Only process if variable expands to non-empty
26904 
26905   if test "x$BOOT_JDK" != x; then
26906     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26907 
26908   # Input might be given as Windows format, start by converting to
26909   # unix format.
26910   path="$BOOT_JDK"
26911   new_path=`$CYGPATH -u "$path"`
26912 
26913   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26914   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26915   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26916   # "foo.exe" is OK but "foo" is an error.
26917   #
26918   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26919   # It is also a way to make sure we got the proper file name for the real test later on.
26920   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26921   if test "x$test_shortpath" = x; then
26922     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26923 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26924     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26925   fi
26926 
26927   # Call helper function which possibly converts this using DOS-style short mode.
26928   # If so, the updated path is stored in $new_path.
26929 
26930   input_path="$new_path"
26931   # Check if we need to convert this using DOS-style short mode. If the path
26932   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26933   # take no chances and rewrite it.
26934   # Note: m4 eats our [], so we need to use [ and ] instead.
26935   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26936   if test "x$has_forbidden_chars" != x; then
26937     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26938     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26939     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26940     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26941       # Going to short mode and back again did indeed matter. Since short mode is
26942       # case insensitive, let's make it lowercase to improve readability.
26943       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26944       # Now convert it back to Unix-style (cygpath)
26945       input_path=`$CYGPATH -u "$shortmode_path"`
26946       new_path="$input_path"
26947     fi
26948   fi
26949 
26950   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26951   if test "x$test_cygdrive_prefix" = x; then
26952     # As a simple fix, exclude /usr/bin since it's not a real path.
26953     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26954       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26955       # a path prefixed by /cygdrive for fixpath to work.
26956       new_path="$CYGWIN_ROOT_PATH$input_path"
26957     fi
26958   fi
26959 
26960 
26961   if test "x$path" != "x$new_path"; then
26962     BOOT_JDK="$new_path"
26963     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26964 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26965   fi
26966 
26967     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26968 
26969   path="$BOOT_JDK"
26970   has_colon=`$ECHO $path | $GREP ^.:`
26971   new_path="$path"
26972   if test "x$has_colon" = x; then
26973     # Not in mixed or Windows style, start by that.
26974     new_path=`cmd //c echo $path`
26975   fi
26976 
26977 
26978   input_path="$new_path"
26979   # Check if we need to convert this using DOS-style short mode. If the path
26980   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26981   # take no chances and rewrite it.
26982   # Note: m4 eats our [], so we need to use [ and ] instead.
26983   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26984   if test "x$has_forbidden_chars" != x; then
26985     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26986     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26987   fi
26988 
26989 
26990   windows_path="$new_path"
26991   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26992     unix_path=`$CYGPATH -u "$windows_path"`
26993     new_path="$unix_path"
26994   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26995     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26996     new_path="$unix_path"
26997   fi
26998 
26999   if test "x$path" != "x$new_path"; then
27000     BOOT_JDK="$new_path"
27001     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27002 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27003   fi
27004 
27005   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27006   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27007 
27008     else
27009       # We're on a unix platform. Hooray! :)
27010       path="$BOOT_JDK"
27011       has_space=`$ECHO "$path" | $GREP " "`
27012       if test "x$has_space" != x; then
27013         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27014 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27015         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27016       fi
27017 
27018       # Use eval to expand a potential ~
27019       eval path="$path"
27020       if test ! -f "$path" && test ! -d "$path"; then
27021         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27022       fi
27023 
27024       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27025     fi
27026   fi
27027 
27028             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27029 $as_echo_n "checking for Boot JDK... " >&6; }
27030             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27031 $as_echo "$BOOT_JDK" >&6; }
27032             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27033 $as_echo_n "checking Boot JDK version... " >&6; }
27034             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27035             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27036 $as_echo "$BOOT_JDK_VERSION" >&6; }
27037           fi # end check jdk version
27038         fi # end check javac
27039       fi # end check java
27040     fi # end check boot jdk found
27041   fi
27042 
27043     done
27044   fi
27045 
27046 
27047     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27048     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27049       # Do we have a bin/java?
27050       if test ! -x "$BOOT_JDK/bin/java"; then
27051         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27052 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27053         BOOT_JDK_FOUND=no
27054       else
27055         # Do we have a bin/javac?
27056         if test ! -x "$BOOT_JDK/bin/javac"; then
27057           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27058 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27059           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27060 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27061           BOOT_JDK_FOUND=no
27062         else
27063           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27064           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27065 
27066           # Extra M4 quote needed to protect [] in grep expression.
27067           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27068           if test "x$FOUND_CORRECT_VERSION" = x; then
27069             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27070 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27071             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27072 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27073             BOOT_JDK_FOUND=no
27074           else
27075             # We're done! :-)
27076             BOOT_JDK_FOUND=yes
27077 
27078   # Only process if variable expands to non-empty
27079 
27080   if test "x$BOOT_JDK" != x; then
27081     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27082 
27083   # Input might be given as Windows format, start by converting to
27084   # unix format.
27085   path="$BOOT_JDK"
27086   new_path=`$CYGPATH -u "$path"`
27087 
27088   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27089   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27090   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27091   # "foo.exe" is OK but "foo" is an error.
27092   #
27093   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27094   # It is also a way to make sure we got the proper file name for the real test later on.
27095   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27096   if test "x$test_shortpath" = x; then
27097     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27098 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27099     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27100   fi
27101 
27102   # Call helper function which possibly converts this using DOS-style short mode.
27103   # If so, the updated path is stored in $new_path.
27104 
27105   input_path="$new_path"
27106   # Check if we need to convert this using DOS-style short mode. If the path
27107   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27108   # take no chances and rewrite it.
27109   # Note: m4 eats our [], so we need to use [ and ] instead.
27110   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27111   if test "x$has_forbidden_chars" != x; then
27112     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27113     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27114     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27115     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27116       # Going to short mode and back again did indeed matter. Since short mode is
27117       # case insensitive, let's make it lowercase to improve readability.
27118       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27119       # Now convert it back to Unix-style (cygpath)
27120       input_path=`$CYGPATH -u "$shortmode_path"`
27121       new_path="$input_path"
27122     fi
27123   fi
27124 
27125   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27126   if test "x$test_cygdrive_prefix" = x; then
27127     # As a simple fix, exclude /usr/bin since it's not a real path.
27128     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27129       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27130       # a path prefixed by /cygdrive for fixpath to work.
27131       new_path="$CYGWIN_ROOT_PATH$input_path"
27132     fi
27133   fi
27134 
27135 
27136   if test "x$path" != "x$new_path"; then
27137     BOOT_JDK="$new_path"
27138     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27139 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27140   fi
27141 
27142     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27143 
27144   path="$BOOT_JDK"
27145   has_colon=`$ECHO $path | $GREP ^.:`
27146   new_path="$path"
27147   if test "x$has_colon" = x; then
27148     # Not in mixed or Windows style, start by that.
27149     new_path=`cmd //c echo $path`
27150   fi
27151 
27152 
27153   input_path="$new_path"
27154   # Check if we need to convert this using DOS-style short mode. If the path
27155   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27156   # take no chances and rewrite it.
27157   # Note: m4 eats our [], so we need to use [ and ] instead.
27158   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27159   if test "x$has_forbidden_chars" != x; then
27160     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27161     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27162   fi
27163 
27164 
27165   windows_path="$new_path"
27166   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27167     unix_path=`$CYGPATH -u "$windows_path"`
27168     new_path="$unix_path"
27169   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27170     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27171     new_path="$unix_path"
27172   fi
27173 
27174   if test "x$path" != "x$new_path"; then
27175     BOOT_JDK="$new_path"
27176     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27177 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27178   fi
27179 
27180   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27181   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27182 
27183     else
27184       # We're on a unix platform. Hooray! :)
27185       path="$BOOT_JDK"
27186       has_space=`$ECHO "$path" | $GREP " "`
27187       if test "x$has_space" != x; then
27188         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27189 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27190         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27191       fi
27192 
27193       # Use eval to expand a potential ~
27194       eval path="$path"
27195       if test ! -f "$path" && test ! -d "$path"; then
27196         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27197       fi
27198 
27199       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27200     fi
27201   fi
27202 
27203             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27204 $as_echo_n "checking for Boot JDK... " >&6; }
27205             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27206 $as_echo "$BOOT_JDK" >&6; }
27207             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27208 $as_echo_n "checking Boot JDK version... " >&6; }
27209             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27210             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27211 $as_echo "$BOOT_JDK_VERSION" >&6; }
27212           fi # end check jdk version
27213         fi # end check javac
27214       fi # end check java
27215     fi # end check boot jdk found
27216   fi
27217 
27218 
27219   if test "x$BOOT_JDK_FOUND" = xno; then
27220     # Now execute the test
27221 
27222   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27223   BOOT_JDK_SUFFIX="/Contents/Home"
27224   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27225   if test "x$ALL_JDKS_FOUND" != x; then
27226     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27227 
27228   if test "x$BOOT_JDK_FOUND" = xno; then
27229     # Now execute the test
27230 
27231         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27232         if test -d "$BOOT_JDK"; then
27233           BOOT_JDK_FOUND=maybe
27234           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27235 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27236         fi
27237 
27238 
27239     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27240     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27241       # Do we have a bin/java?
27242       if test ! -x "$BOOT_JDK/bin/java"; then
27243         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27244 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27245         BOOT_JDK_FOUND=no
27246       else
27247         # Do we have a bin/javac?
27248         if test ! -x "$BOOT_JDK/bin/javac"; then
27249           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27250 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27251           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27252 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27253           BOOT_JDK_FOUND=no
27254         else
27255           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27256           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27257 
27258           # Extra M4 quote needed to protect [] in grep expression.
27259           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27260           if test "x$FOUND_CORRECT_VERSION" = x; then
27261             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27262 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27263             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27264 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27265             BOOT_JDK_FOUND=no
27266           else
27267             # We're done! :-)
27268             BOOT_JDK_FOUND=yes
27269 
27270   # Only process if variable expands to non-empty
27271 
27272   if test "x$BOOT_JDK" != x; then
27273     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27274 
27275   # Input might be given as Windows format, start by converting to
27276   # unix format.
27277   path="$BOOT_JDK"
27278   new_path=`$CYGPATH -u "$path"`
27279 
27280   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27281   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27282   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27283   # "foo.exe" is OK but "foo" is an error.
27284   #
27285   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27286   # It is also a way to make sure we got the proper file name for the real test later on.
27287   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27288   if test "x$test_shortpath" = x; then
27289     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27290 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27291     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27292   fi
27293 
27294   # Call helper function which possibly converts this using DOS-style short mode.
27295   # If so, the updated path is stored in $new_path.
27296 
27297   input_path="$new_path"
27298   # Check if we need to convert this using DOS-style short mode. If the path
27299   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27300   # take no chances and rewrite it.
27301   # Note: m4 eats our [], so we need to use [ and ] instead.
27302   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27303   if test "x$has_forbidden_chars" != x; then
27304     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27305     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27306     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27307     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27308       # Going to short mode and back again did indeed matter. Since short mode is
27309       # case insensitive, let's make it lowercase to improve readability.
27310       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27311       # Now convert it back to Unix-style (cygpath)
27312       input_path=`$CYGPATH -u "$shortmode_path"`
27313       new_path="$input_path"
27314     fi
27315   fi
27316 
27317   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27318   if test "x$test_cygdrive_prefix" = x; then
27319     # As a simple fix, exclude /usr/bin since it's not a real path.
27320     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27321       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27322       # a path prefixed by /cygdrive for fixpath to work.
27323       new_path="$CYGWIN_ROOT_PATH$input_path"
27324     fi
27325   fi
27326 
27327 
27328   if test "x$path" != "x$new_path"; then
27329     BOOT_JDK="$new_path"
27330     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27331 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27332   fi
27333 
27334     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27335 
27336   path="$BOOT_JDK"
27337   has_colon=`$ECHO $path | $GREP ^.:`
27338   new_path="$path"
27339   if test "x$has_colon" = x; then
27340     # Not in mixed or Windows style, start by that.
27341     new_path=`cmd //c echo $path`
27342   fi
27343 
27344 
27345   input_path="$new_path"
27346   # Check if we need to convert this using DOS-style short mode. If the path
27347   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27348   # take no chances and rewrite it.
27349   # Note: m4 eats our [], so we need to use [ and ] instead.
27350   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27351   if test "x$has_forbidden_chars" != x; then
27352     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27353     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27354   fi
27355 
27356 
27357   windows_path="$new_path"
27358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27359     unix_path=`$CYGPATH -u "$windows_path"`
27360     new_path="$unix_path"
27361   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27362     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27363     new_path="$unix_path"
27364   fi
27365 
27366   if test "x$path" != "x$new_path"; then
27367     BOOT_JDK="$new_path"
27368     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27369 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27370   fi
27371 
27372   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27373   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27374 
27375     else
27376       # We're on a unix platform. Hooray! :)
27377       path="$BOOT_JDK"
27378       has_space=`$ECHO "$path" | $GREP " "`
27379       if test "x$has_space" != x; then
27380         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27381 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27382         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27383       fi
27384 
27385       # Use eval to expand a potential ~
27386       eval path="$path"
27387       if test ! -f "$path" && test ! -d "$path"; then
27388         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27389       fi
27390 
27391       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27392     fi
27393   fi
27394 
27395             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27396 $as_echo_n "checking for Boot JDK... " >&6; }
27397             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27398 $as_echo "$BOOT_JDK" >&6; }
27399             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27400 $as_echo_n "checking Boot JDK version... " >&6; }
27401             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27402             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27403 $as_echo "$BOOT_JDK_VERSION" >&6; }
27404           fi # end check jdk version
27405         fi # end check javac
27406       fi # end check java
27407     fi # end check boot jdk found
27408   fi
27409 
27410     done
27411   fi
27412 
27413 
27414     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27415     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27416       # Do we have a bin/java?
27417       if test ! -x "$BOOT_JDK/bin/java"; then
27418         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27419 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27420         BOOT_JDK_FOUND=no
27421       else
27422         # Do we have a bin/javac?
27423         if test ! -x "$BOOT_JDK/bin/javac"; then
27424           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27425 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27426           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27427 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27428           BOOT_JDK_FOUND=no
27429         else
27430           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27431           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27432 
27433           # Extra M4 quote needed to protect [] in grep expression.
27434           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27435           if test "x$FOUND_CORRECT_VERSION" = x; then
27436             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27437 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27438             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27439 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27440             BOOT_JDK_FOUND=no
27441           else
27442             # We're done! :-)
27443             BOOT_JDK_FOUND=yes
27444 
27445   # Only process if variable expands to non-empty
27446 
27447   if test "x$BOOT_JDK" != x; then
27448     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27449 
27450   # Input might be given as Windows format, start by converting to
27451   # unix format.
27452   path="$BOOT_JDK"
27453   new_path=`$CYGPATH -u "$path"`
27454 
27455   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27456   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27457   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27458   # "foo.exe" is OK but "foo" is an error.
27459   #
27460   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27461   # It is also a way to make sure we got the proper file name for the real test later on.
27462   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27463   if test "x$test_shortpath" = x; then
27464     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27465 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27466     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27467   fi
27468 
27469   # Call helper function which possibly converts this using DOS-style short mode.
27470   # If so, the updated path is stored in $new_path.
27471 
27472   input_path="$new_path"
27473   # Check if we need to convert this using DOS-style short mode. If the path
27474   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27475   # take no chances and rewrite it.
27476   # Note: m4 eats our [], so we need to use [ and ] instead.
27477   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27478   if test "x$has_forbidden_chars" != x; then
27479     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27480     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27481     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27482     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27483       # Going to short mode and back again did indeed matter. Since short mode is
27484       # case insensitive, let's make it lowercase to improve readability.
27485       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27486       # Now convert it back to Unix-style (cygpath)
27487       input_path=`$CYGPATH -u "$shortmode_path"`
27488       new_path="$input_path"
27489     fi
27490   fi
27491 
27492   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27493   if test "x$test_cygdrive_prefix" = x; then
27494     # As a simple fix, exclude /usr/bin since it's not a real path.
27495     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27496       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27497       # a path prefixed by /cygdrive for fixpath to work.
27498       new_path="$CYGWIN_ROOT_PATH$input_path"
27499     fi
27500   fi
27501 
27502 
27503   if test "x$path" != "x$new_path"; then
27504     BOOT_JDK="$new_path"
27505     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27506 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27507   fi
27508 
27509     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27510 
27511   path="$BOOT_JDK"
27512   has_colon=`$ECHO $path | $GREP ^.:`
27513   new_path="$path"
27514   if test "x$has_colon" = x; then
27515     # Not in mixed or Windows style, start by that.
27516     new_path=`cmd //c echo $path`
27517   fi
27518 
27519 
27520   input_path="$new_path"
27521   # Check if we need to convert this using DOS-style short mode. If the path
27522   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27523   # take no chances and rewrite it.
27524   # Note: m4 eats our [], so we need to use [ and ] instead.
27525   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27526   if test "x$has_forbidden_chars" != x; then
27527     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27528     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27529   fi
27530 
27531 
27532   windows_path="$new_path"
27533   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27534     unix_path=`$CYGPATH -u "$windows_path"`
27535     new_path="$unix_path"
27536   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27537     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27538     new_path="$unix_path"
27539   fi
27540 
27541   if test "x$path" != "x$new_path"; then
27542     BOOT_JDK="$new_path"
27543     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27544 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27545   fi
27546 
27547   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27548   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27549 
27550     else
27551       # We're on a unix platform. Hooray! :)
27552       path="$BOOT_JDK"
27553       has_space=`$ECHO "$path" | $GREP " "`
27554       if test "x$has_space" != x; then
27555         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27556 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27557         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27558       fi
27559 
27560       # Use eval to expand a potential ~
27561       eval path="$path"
27562       if test ! -f "$path" && test ! -d "$path"; then
27563         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27564       fi
27565 
27566       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27567     fi
27568   fi
27569 
27570             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27571 $as_echo_n "checking for Boot JDK... " >&6; }
27572             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27573 $as_echo "$BOOT_JDK" >&6; }
27574             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27575 $as_echo_n "checking Boot JDK version... " >&6; }
27576             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27577             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27578 $as_echo "$BOOT_JDK_VERSION" >&6; }
27579           fi # end check jdk version
27580         fi # end check javac
27581       fi # end check java
27582     fi # end check boot jdk found
27583   fi
27584 
27585   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
27586 
27587   if test "x$BOOT_JDK_FOUND" = xno; then
27588     # Now execute the test
27589 
27590   BOOT_JDK_PREFIX="/usr/lib/jvm"
27591   BOOT_JDK_SUFFIX=""
27592   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27593   if test "x$ALL_JDKS_FOUND" != x; then
27594     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27595 
27596   if test "x$BOOT_JDK_FOUND" = xno; then
27597     # Now execute the test
27598 
27599         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27600         if test -d "$BOOT_JDK"; then
27601           BOOT_JDK_FOUND=maybe
27602           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27603 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27604         fi
27605 
27606 
27607     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27608     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27609       # Do we have a bin/java?
27610       if test ! -x "$BOOT_JDK/bin/java"; then
27611         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27612 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27613         BOOT_JDK_FOUND=no
27614       else
27615         # Do we have a bin/javac?
27616         if test ! -x "$BOOT_JDK/bin/javac"; then
27617           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27618 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27619           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27620 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27621           BOOT_JDK_FOUND=no
27622         else
27623           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27624           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27625 
27626           # Extra M4 quote needed to protect [] in grep expression.
27627           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27628           if test "x$FOUND_CORRECT_VERSION" = x; then
27629             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27630 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27631             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27632 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27633             BOOT_JDK_FOUND=no
27634           else
27635             # We're done! :-)
27636             BOOT_JDK_FOUND=yes
27637 
27638   # Only process if variable expands to non-empty
27639 
27640   if test "x$BOOT_JDK" != x; then
27641     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27642 
27643   # Input might be given as Windows format, start by converting to
27644   # unix format.
27645   path="$BOOT_JDK"
27646   new_path=`$CYGPATH -u "$path"`
27647 
27648   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27649   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27650   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27651   # "foo.exe" is OK but "foo" is an error.
27652   #
27653   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27654   # It is also a way to make sure we got the proper file name for the real test later on.
27655   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27656   if test "x$test_shortpath" = x; then
27657     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27658 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27659     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27660   fi
27661 
27662   # Call helper function which possibly converts this using DOS-style short mode.
27663   # If so, the updated path is stored in $new_path.
27664 
27665   input_path="$new_path"
27666   # Check if we need to convert this using DOS-style short mode. If the path
27667   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27668   # take no chances and rewrite it.
27669   # Note: m4 eats our [], so we need to use [ and ] instead.
27670   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27671   if test "x$has_forbidden_chars" != x; then
27672     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27673     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27674     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27675     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27676       # Going to short mode and back again did indeed matter. Since short mode is
27677       # case insensitive, let's make it lowercase to improve readability.
27678       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27679       # Now convert it back to Unix-style (cygpath)
27680       input_path=`$CYGPATH -u "$shortmode_path"`
27681       new_path="$input_path"
27682     fi
27683   fi
27684 
27685   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27686   if test "x$test_cygdrive_prefix" = x; then
27687     # As a simple fix, exclude /usr/bin since it's not a real path.
27688     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27689       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27690       # a path prefixed by /cygdrive for fixpath to work.
27691       new_path="$CYGWIN_ROOT_PATH$input_path"
27692     fi
27693   fi
27694 
27695 
27696   if test "x$path" != "x$new_path"; then
27697     BOOT_JDK="$new_path"
27698     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27699 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27700   fi
27701 
27702     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27703 
27704   path="$BOOT_JDK"
27705   has_colon=`$ECHO $path | $GREP ^.:`
27706   new_path="$path"
27707   if test "x$has_colon" = x; then
27708     # Not in mixed or Windows style, start by that.
27709     new_path=`cmd //c echo $path`
27710   fi
27711 
27712 
27713   input_path="$new_path"
27714   # Check if we need to convert this using DOS-style short mode. If the path
27715   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27716   # take no chances and rewrite it.
27717   # Note: m4 eats our [], so we need to use [ and ] instead.
27718   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27719   if test "x$has_forbidden_chars" != x; then
27720     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27721     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27722   fi
27723 
27724 
27725   windows_path="$new_path"
27726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27727     unix_path=`$CYGPATH -u "$windows_path"`
27728     new_path="$unix_path"
27729   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27730     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27731     new_path="$unix_path"
27732   fi
27733 
27734   if test "x$path" != "x$new_path"; then
27735     BOOT_JDK="$new_path"
27736     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27737 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27738   fi
27739 
27740   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27741   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27742 
27743     else
27744       # We're on a unix platform. Hooray! :)
27745       path="$BOOT_JDK"
27746       has_space=`$ECHO "$path" | $GREP " "`
27747       if test "x$has_space" != x; then
27748         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27749 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27750         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27751       fi
27752 
27753       # Use eval to expand a potential ~
27754       eval path="$path"
27755       if test ! -f "$path" && test ! -d "$path"; then
27756         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27757       fi
27758 
27759       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27760     fi
27761   fi
27762 
27763             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27764 $as_echo_n "checking for Boot JDK... " >&6; }
27765             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27766 $as_echo "$BOOT_JDK" >&6; }
27767             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27768 $as_echo_n "checking Boot JDK version... " >&6; }
27769             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27770             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27771 $as_echo "$BOOT_JDK_VERSION" >&6; }
27772           fi # end check jdk version
27773         fi # end check javac
27774       fi # end check java
27775     fi # end check boot jdk found
27776   fi
27777 
27778     done
27779   fi
27780 
27781 
27782     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27783     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27784       # Do we have a bin/java?
27785       if test ! -x "$BOOT_JDK/bin/java"; then
27786         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27787 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27788         BOOT_JDK_FOUND=no
27789       else
27790         # Do we have a bin/javac?
27791         if test ! -x "$BOOT_JDK/bin/javac"; then
27792           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27793 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27794           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27795 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27796           BOOT_JDK_FOUND=no
27797         else
27798           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27799           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27800 
27801           # Extra M4 quote needed to protect [] in grep expression.
27802           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27803           if test "x$FOUND_CORRECT_VERSION" = x; then
27804             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27805 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27806             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27807 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27808             BOOT_JDK_FOUND=no
27809           else
27810             # We're done! :-)
27811             BOOT_JDK_FOUND=yes
27812 
27813   # Only process if variable expands to non-empty
27814 
27815   if test "x$BOOT_JDK" != x; then
27816     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27817 
27818   # Input might be given as Windows format, start by converting to
27819   # unix format.
27820   path="$BOOT_JDK"
27821   new_path=`$CYGPATH -u "$path"`
27822 
27823   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27824   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27825   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27826   # "foo.exe" is OK but "foo" is an error.
27827   #
27828   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27829   # It is also a way to make sure we got the proper file name for the real test later on.
27830   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27831   if test "x$test_shortpath" = x; then
27832     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27833 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27834     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27835   fi
27836 
27837   # Call helper function which possibly converts this using DOS-style short mode.
27838   # If so, the updated path is stored in $new_path.
27839 
27840   input_path="$new_path"
27841   # Check if we need to convert this using DOS-style short mode. If the path
27842   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27843   # take no chances and rewrite it.
27844   # Note: m4 eats our [], so we need to use [ and ] instead.
27845   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27846   if test "x$has_forbidden_chars" != x; then
27847     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27848     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27849     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27850     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27851       # Going to short mode and back again did indeed matter. Since short mode is
27852       # case insensitive, let's make it lowercase to improve readability.
27853       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27854       # Now convert it back to Unix-style (cygpath)
27855       input_path=`$CYGPATH -u "$shortmode_path"`
27856       new_path="$input_path"
27857     fi
27858   fi
27859 
27860   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27861   if test "x$test_cygdrive_prefix" = x; then
27862     # As a simple fix, exclude /usr/bin since it's not a real path.
27863     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27864       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27865       # a path prefixed by /cygdrive for fixpath to work.
27866       new_path="$CYGWIN_ROOT_PATH$input_path"
27867     fi
27868   fi
27869 
27870 
27871   if test "x$path" != "x$new_path"; then
27872     BOOT_JDK="$new_path"
27873     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27874 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27875   fi
27876 
27877     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27878 
27879   path="$BOOT_JDK"
27880   has_colon=`$ECHO $path | $GREP ^.:`
27881   new_path="$path"
27882   if test "x$has_colon" = x; then
27883     # Not in mixed or Windows style, start by that.
27884     new_path=`cmd //c echo $path`
27885   fi
27886 
27887 
27888   input_path="$new_path"
27889   # Check if we need to convert this using DOS-style short mode. If the path
27890   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27891   # take no chances and rewrite it.
27892   # Note: m4 eats our [], so we need to use [ and ] instead.
27893   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27894   if test "x$has_forbidden_chars" != x; then
27895     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27896     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27897   fi
27898 
27899 
27900   windows_path="$new_path"
27901   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27902     unix_path=`$CYGPATH -u "$windows_path"`
27903     new_path="$unix_path"
27904   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27905     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27906     new_path="$unix_path"
27907   fi
27908 
27909   if test "x$path" != "x$new_path"; then
27910     BOOT_JDK="$new_path"
27911     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27912 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27913   fi
27914 
27915   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27916   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27917 
27918     else
27919       # We're on a unix platform. Hooray! :)
27920       path="$BOOT_JDK"
27921       has_space=`$ECHO "$path" | $GREP " "`
27922       if test "x$has_space" != x; then
27923         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27924 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27925         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27926       fi
27927 
27928       # Use eval to expand a potential ~
27929       eval path="$path"
27930       if test ! -f "$path" && test ! -d "$path"; then
27931         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27932       fi
27933 
27934       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27935     fi
27936   fi
27937 
27938             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27939 $as_echo_n "checking for Boot JDK... " >&6; }
27940             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27941 $as_echo "$BOOT_JDK" >&6; }
27942             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27943 $as_echo_n "checking Boot JDK version... " >&6; }
27944             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27945             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27946 $as_echo "$BOOT_JDK_VERSION" >&6; }
27947           fi # end check jdk version
27948         fi # end check javac
27949       fi # end check java
27950     fi # end check boot jdk found
27951   fi
27952 
27953   fi
27954 
27955 
27956     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27957     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27958       # Do we have a bin/java?
27959       if test ! -x "$BOOT_JDK/bin/java"; then
27960         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27961 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27962         BOOT_JDK_FOUND=no
27963       else
27964         # Do we have a bin/javac?
27965         if test ! -x "$BOOT_JDK/bin/javac"; then
27966           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27967 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27968           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27969 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27970           BOOT_JDK_FOUND=no
27971         else
27972           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27973           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27974 
27975           # Extra M4 quote needed to protect [] in grep expression.
27976           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27977           if test "x$FOUND_CORRECT_VERSION" = x; then
27978             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27979 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27980             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27981 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27982             BOOT_JDK_FOUND=no
27983           else
27984             # We're done! :-)
27985             BOOT_JDK_FOUND=yes
27986 
27987   # Only process if variable expands to non-empty
27988 
27989   if test "x$BOOT_JDK" != x; then
27990     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27991 
27992   # Input might be given as Windows format, start by converting to
27993   # unix format.
27994   path="$BOOT_JDK"
27995   new_path=`$CYGPATH -u "$path"`
27996 
27997   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27998   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27999   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28000   # "foo.exe" is OK but "foo" is an error.
28001   #
28002   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28003   # It is also a way to make sure we got the proper file name for the real test later on.
28004   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28005   if test "x$test_shortpath" = x; then
28006     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28007 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28008     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28009   fi
28010 
28011   # Call helper function which possibly converts this using DOS-style short mode.
28012   # If so, the updated path is stored in $new_path.
28013 
28014   input_path="$new_path"
28015   # Check if we need to convert this using DOS-style short mode. If the path
28016   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28017   # take no chances and rewrite it.
28018   # Note: m4 eats our [], so we need to use [ and ] instead.
28019   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28020   if test "x$has_forbidden_chars" != x; then
28021     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28022     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28023     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28024     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28025       # Going to short mode and back again did indeed matter. Since short mode is
28026       # case insensitive, let's make it lowercase to improve readability.
28027       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28028       # Now convert it back to Unix-style (cygpath)
28029       input_path=`$CYGPATH -u "$shortmode_path"`
28030       new_path="$input_path"
28031     fi
28032   fi
28033 
28034   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28035   if test "x$test_cygdrive_prefix" = x; then
28036     # As a simple fix, exclude /usr/bin since it's not a real path.
28037     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28038       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28039       # a path prefixed by /cygdrive for fixpath to work.
28040       new_path="$CYGWIN_ROOT_PATH$input_path"
28041     fi
28042   fi
28043 
28044 
28045   if test "x$path" != "x$new_path"; then
28046     BOOT_JDK="$new_path"
28047     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28048 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28049   fi
28050 
28051     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28052 
28053   path="$BOOT_JDK"
28054   has_colon=`$ECHO $path | $GREP ^.:`
28055   new_path="$path"
28056   if test "x$has_colon" = x; then
28057     # Not in mixed or Windows style, start by that.
28058     new_path=`cmd //c echo $path`
28059   fi
28060 
28061 
28062   input_path="$new_path"
28063   # Check if we need to convert this using DOS-style short mode. If the path
28064   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28065   # take no chances and rewrite it.
28066   # Note: m4 eats our [], so we need to use [ and ] instead.
28067   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28068   if test "x$has_forbidden_chars" != x; then
28069     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28070     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28071   fi
28072 
28073 
28074   windows_path="$new_path"
28075   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28076     unix_path=`$CYGPATH -u "$windows_path"`
28077     new_path="$unix_path"
28078   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28079     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28080     new_path="$unix_path"
28081   fi
28082 
28083   if test "x$path" != "x$new_path"; then
28084     BOOT_JDK="$new_path"
28085     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28086 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28087   fi
28088 
28089   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28090   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28091 
28092     else
28093       # We're on a unix platform. Hooray! :)
28094       path="$BOOT_JDK"
28095       has_space=`$ECHO "$path" | $GREP " "`
28096       if test "x$has_space" != x; then
28097         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28098 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28099         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28100       fi
28101 
28102       # Use eval to expand a potential ~
28103       eval path="$path"
28104       if test ! -f "$path" && test ! -d "$path"; then
28105         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28106       fi
28107 
28108       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28109     fi
28110   fi
28111 
28112             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28113 $as_echo_n "checking for Boot JDK... " >&6; }
28114             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28115 $as_echo "$BOOT_JDK" >&6; }
28116             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28117 $as_echo_n "checking Boot JDK version... " >&6; }
28118             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28119             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28120 $as_echo "$BOOT_JDK_VERSION" >&6; }
28121           fi # end check jdk version
28122         fi # end check javac
28123       fi # end check java
28124     fi # end check boot jdk found
28125   fi
28126 
28127 
28128   # If we haven't found anything yet, we've truly lost. Give up.
28129   if test "x$BOOT_JDK_FOUND" = xno; then
28130 
28131   # Print a helpful message on how to acquire the necessary build dependency.
28132   # openjdk is the help tag: freetype, cups, alsa etc
28133   MISSING_DEPENDENCY=openjdk
28134 
28135   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28136     cygwin_help $MISSING_DEPENDENCY
28137   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28138     msys_help $MISSING_DEPENDENCY
28139   else
28140     PKGHANDLER_COMMAND=
28141 
28142     case $PKGHANDLER in
28143       apt-get)
28144         apt_help     $MISSING_DEPENDENCY ;;
28145       yum)
28146         yum_help     $MISSING_DEPENDENCY ;;
28147       port)
28148         port_help    $MISSING_DEPENDENCY ;;
28149       pkgutil)
28150         pkgutil_help $MISSING_DEPENDENCY ;;
28151       pkgadd)
28152         pkgadd_help  $MISSING_DEPENDENCY ;;
28153     esac
28154 
28155     if test "x$PKGHANDLER_COMMAND" != x; then
28156       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28157     fi
28158   fi
28159 
28160     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28161 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28162     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28163 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28164     as_fn_error $? "Cannot continue" "$LINENO" 5
28165   fi
28166 
28167 
28168 
28169   # Setup tools from the Boot JDK.
28170 
28171   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28172 
28173   # Publish this variable in the help.
28174 
28175 
28176   if [ -z "${JAVA+x}" ]; then
28177     # The variable is not set by user, try to locate tool using the code snippet
28178 
28179       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28180 $as_echo_n "checking for java in Boot JDK... " >&6; }
28181       JAVA=$BOOT_JDK/bin/java
28182       if test ! -x $JAVA; then
28183         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28184 $as_echo "not found" >&6; }
28185         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28186 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28187         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28188       fi
28189       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28190 $as_echo "ok" >&6; }
28191 
28192 
28193   else
28194     # The variable is set, but is it from the command line or the environment?
28195 
28196     # Try to remove the string !JAVA! from our list.
28197     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28198     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28199       # If it failed, the variable was not from the command line. Ignore it,
28200       # but warn the user (except for BASH, which is always set by the calling BASH).
28201       if test "xJAVA" != xBASH; then
28202         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28203 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28204       fi
28205       # Try to locate tool using the code snippet
28206 
28207       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28208 $as_echo_n "checking for java in Boot JDK... " >&6; }
28209       JAVA=$BOOT_JDK/bin/java
28210       if test ! -x $JAVA; then
28211         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28212 $as_echo "not found" >&6; }
28213         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28214 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28215         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28216       fi
28217       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28218 $as_echo "ok" >&6; }
28219 
28220 
28221     else
28222       # If it succeeded, then it was overridden by the user. We will use it
28223       # for the tool.
28224 
28225       # First remove it from the list of overridden variables, so we can test
28226       # for unknown variables in the end.
28227       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28228 
28229       # Check if we try to supply an empty value
28230       if test "x$JAVA" = x; then
28231         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28232 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28233         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28234 $as_echo_n "checking for JAVA... " >&6; }
28235         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28236 $as_echo "disabled" >&6; }
28237       else
28238         # Check if the provided tool contains a complete path.
28239         tool_specified="$JAVA"
28240         tool_basename="${tool_specified##*/}"
28241         if test "x$tool_basename" = "x$tool_specified"; then
28242           # A command without a complete path is provided, search $PATH.
28243           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28244 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28245           # Extract the first word of "$tool_basename", so it can be a program name with args.
28246 set dummy $tool_basename; ac_word=$2
28247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28248 $as_echo_n "checking for $ac_word... " >&6; }
28249 if ${ac_cv_path_JAVA+:} false; then :
28250   $as_echo_n "(cached) " >&6
28251 else
28252   case $JAVA in
28253   [\\/]* | ?:[\\/]*)
28254   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28255   ;;
28256   *)
28257   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28258 for as_dir in $PATH
28259 do
28260   IFS=$as_save_IFS
28261   test -z "$as_dir" && as_dir=.
28262     for ac_exec_ext in '' $ac_executable_extensions; do
28263   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28264     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28265     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28266     break 2
28267   fi
28268 done
28269   done
28270 IFS=$as_save_IFS
28271 
28272   ;;
28273 esac
28274 fi
28275 JAVA=$ac_cv_path_JAVA
28276 if test -n "$JAVA"; then
28277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28278 $as_echo "$JAVA" >&6; }
28279 else
28280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28281 $as_echo "no" >&6; }
28282 fi
28283 
28284 
28285           if test "x$JAVA" = x; then
28286             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28287           fi
28288         else
28289           # Otherwise we believe it is a complete path. Use it as it is.
28290           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28291 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28292           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28293 $as_echo_n "checking for JAVA... " >&6; }
28294           if test ! -x "$tool_specified"; then
28295             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28296 $as_echo "not found" >&6; }
28297             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28298           fi
28299           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28300 $as_echo "$tool_specified" >&6; }
28301         fi
28302       fi
28303     fi
28304 
28305   fi
28306 
28307 
28308 
28309   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28310 
28311   # Publish this variable in the help.
28312 
28313 
28314   if [ -z "${JAVAC+x}" ]; then
28315     # The variable is not set by user, try to locate tool using the code snippet
28316 
28317       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28318 $as_echo_n "checking for javac in Boot JDK... " >&6; }
28319       JAVAC=$BOOT_JDK/bin/javac
28320       if test ! -x $JAVAC; then
28321         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28322 $as_echo "not found" >&6; }
28323         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28324 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28325         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28326       fi
28327       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28328 $as_echo "ok" >&6; }
28329 
28330 
28331   else
28332     # The variable is set, but is it from the command line or the environment?
28333 
28334     # Try to remove the string !JAVAC! from our list.
28335     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
28336     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28337       # If it failed, the variable was not from the command line. Ignore it,
28338       # but warn the user (except for BASH, which is always set by the calling BASH).
28339       if test "xJAVAC" != xBASH; then
28340         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
28341 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
28342       fi
28343       # Try to locate tool using the code snippet
28344 
28345       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28346 $as_echo_n "checking for javac in Boot JDK... " >&6; }
28347       JAVAC=$BOOT_JDK/bin/javac
28348       if test ! -x $JAVAC; then
28349         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28350 $as_echo "not found" >&6; }
28351         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28352 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28353         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28354       fi
28355       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28356 $as_echo "ok" >&6; }
28357 
28358 
28359     else
28360       # If it succeeded, then it was overridden by the user. We will use it
28361       # for the tool.
28362 
28363       # First remove it from the list of overridden variables, so we can test
28364       # for unknown variables in the end.
28365       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28366 
28367       # Check if we try to supply an empty value
28368       if test "x$JAVAC" = x; then
28369         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
28370 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
28371         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28372 $as_echo_n "checking for JAVAC... " >&6; }
28373         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28374 $as_echo "disabled" >&6; }
28375       else
28376         # Check if the provided tool contains a complete path.
28377         tool_specified="$JAVAC"
28378         tool_basename="${tool_specified##*/}"
28379         if test "x$tool_basename" = "x$tool_specified"; then
28380           # A command without a complete path is provided, search $PATH.
28381           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
28382 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
28383           # Extract the first word of "$tool_basename", so it can be a program name with args.
28384 set dummy $tool_basename; ac_word=$2
28385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28386 $as_echo_n "checking for $ac_word... " >&6; }
28387 if ${ac_cv_path_JAVAC+:} false; then :
28388   $as_echo_n "(cached) " >&6
28389 else
28390   case $JAVAC in
28391   [\\/]* | ?:[\\/]*)
28392   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
28393   ;;
28394   *)
28395   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28396 for as_dir in $PATH
28397 do
28398   IFS=$as_save_IFS
28399   test -z "$as_dir" && as_dir=.
28400     for ac_exec_ext in '' $ac_executable_extensions; do
28401   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28402     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
28403     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28404     break 2
28405   fi
28406 done
28407   done
28408 IFS=$as_save_IFS
28409 
28410   ;;
28411 esac
28412 fi
28413 JAVAC=$ac_cv_path_JAVAC
28414 if test -n "$JAVAC"; then
28415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
28416 $as_echo "$JAVAC" >&6; }
28417 else
28418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28419 $as_echo "no" >&6; }
28420 fi
28421 
28422 
28423           if test "x$JAVAC" = x; then
28424             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28425           fi
28426         else
28427           # Otherwise we believe it is a complete path. Use it as it is.
28428           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
28429 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
28430           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28431 $as_echo_n "checking for JAVAC... " >&6; }
28432           if test ! -x "$tool_specified"; then
28433             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28434 $as_echo "not found" >&6; }
28435             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
28436           fi
28437           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28438 $as_echo "$tool_specified" >&6; }
28439         fi
28440       fi
28441     fi
28442 
28443   fi
28444 
28445 
28446 
28447   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28448 
28449   # Publish this variable in the help.
28450 
28451 
28452   if [ -z "${JAVAH+x}" ]; then
28453     # The variable is not set by user, try to locate tool using the code snippet
28454 
28455       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28456 $as_echo_n "checking for javah in Boot JDK... " >&6; }
28457       JAVAH=$BOOT_JDK/bin/javah
28458       if test ! -x $JAVAH; then
28459         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28460 $as_echo "not found" >&6; }
28461         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28462 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28463         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28464       fi
28465       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28466 $as_echo "ok" >&6; }
28467 
28468 
28469   else
28470     # The variable is set, but is it from the command line or the environment?
28471 
28472     # Try to remove the string !JAVAH! from our list.
28473     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
28474     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28475       # If it failed, the variable was not from the command line. Ignore it,
28476       # but warn the user (except for BASH, which is always set by the calling BASH).
28477       if test "xJAVAH" != xBASH; then
28478         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
28479 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
28480       fi
28481       # Try to locate tool using the code snippet
28482 
28483       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28484 $as_echo_n "checking for javah in Boot JDK... " >&6; }
28485       JAVAH=$BOOT_JDK/bin/javah
28486       if test ! -x $JAVAH; then
28487         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28488 $as_echo "not found" >&6; }
28489         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28490 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28491         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28492       fi
28493       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28494 $as_echo "ok" >&6; }
28495 
28496 
28497     else
28498       # If it succeeded, then it was overridden by the user. We will use it
28499       # for the tool.
28500 
28501       # First remove it from the list of overridden variables, so we can test
28502       # for unknown variables in the end.
28503       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28504 
28505       # Check if we try to supply an empty value
28506       if test "x$JAVAH" = x; then
28507         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
28508 $as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
28509         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28510 $as_echo_n "checking for JAVAH... " >&6; }
28511         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28512 $as_echo "disabled" >&6; }
28513       else
28514         # Check if the provided tool contains a complete path.
28515         tool_specified="$JAVAH"
28516         tool_basename="${tool_specified##*/}"
28517         if test "x$tool_basename" = "x$tool_specified"; then
28518           # A command without a complete path is provided, search $PATH.
28519           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
28520 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
28521           # Extract the first word of "$tool_basename", so it can be a program name with args.
28522 set dummy $tool_basename; ac_word=$2
28523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28524 $as_echo_n "checking for $ac_word... " >&6; }
28525 if ${ac_cv_path_JAVAH+:} false; then :
28526   $as_echo_n "(cached) " >&6
28527 else
28528   case $JAVAH in
28529   [\\/]* | ?:[\\/]*)
28530   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
28531   ;;
28532   *)
28533   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28534 for as_dir in $PATH
28535 do
28536   IFS=$as_save_IFS
28537   test -z "$as_dir" && as_dir=.
28538     for ac_exec_ext in '' $ac_executable_extensions; do
28539   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28540     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
28541     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28542     break 2
28543   fi
28544 done
28545   done
28546 IFS=$as_save_IFS
28547 
28548   ;;
28549 esac
28550 fi
28551 JAVAH=$ac_cv_path_JAVAH
28552 if test -n "$JAVAH"; then
28553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
28554 $as_echo "$JAVAH" >&6; }
28555 else
28556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28557 $as_echo "no" >&6; }
28558 fi
28559 
28560 
28561           if test "x$JAVAH" = x; then
28562             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28563           fi
28564         else
28565           # Otherwise we believe it is a complete path. Use it as it is.
28566           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
28567 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
28568           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28569 $as_echo_n "checking for JAVAH... " >&6; }
28570           if test ! -x "$tool_specified"; then
28571             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28572 $as_echo "not found" >&6; }
28573             as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
28574           fi
28575           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28576 $as_echo "$tool_specified" >&6; }
28577         fi
28578       fi
28579     fi
28580 
28581   fi
28582 
28583 
28584 
28585   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28586 
28587   # Publish this variable in the help.
28588 
28589 
28590   if [ -z "${JAR+x}" ]; then
28591     # The variable is not set by user, try to locate tool using the code snippet
28592 
28593       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28594 $as_echo_n "checking for jar in Boot JDK... " >&6; }
28595       JAR=$BOOT_JDK/bin/jar
28596       if test ! -x $JAR; then
28597         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28598 $as_echo "not found" >&6; }
28599         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28600 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28601         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
28602       fi
28603       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28604 $as_echo "ok" >&6; }
28605 
28606 
28607   else
28608     # The variable is set, but is it from the command line or the environment?
28609 
28610     # Try to remove the string !JAR! from our list.
28611     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
28612     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28613       # If it failed, the variable was not from the command line. Ignore it,
28614       # but warn the user (except for BASH, which is always set by the calling BASH).
28615       if test "xJAR" != xBASH; then
28616         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
28617 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
28618       fi
28619       # Try to locate tool using the code snippet
28620 
28621       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28622 $as_echo_n "checking for jar in Boot JDK... " >&6; }
28623       JAR=$BOOT_JDK/bin/jar
28624       if test ! -x $JAR; then
28625         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28626 $as_echo "not found" >&6; }
28627         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28628 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28629         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
28630       fi
28631       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28632 $as_echo "ok" >&6; }
28633 
28634 
28635     else
28636       # If it succeeded, then it was overridden by the user. We will use it
28637       # for the tool.
28638 
28639       # First remove it from the list of overridden variables, so we can test
28640       # for unknown variables in the end.
28641       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28642 
28643       # Check if we try to supply an empty value
28644       if test "x$JAR" = x; then
28645         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
28646 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
28647         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
28648 $as_echo_n "checking for JAR... " >&6; }
28649         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28650 $as_echo "disabled" >&6; }
28651       else
28652         # Check if the provided tool contains a complete path.
28653         tool_specified="$JAR"
28654         tool_basename="${tool_specified##*/}"
28655         if test "x$tool_basename" = "x$tool_specified"; then
28656           # A command without a complete path is provided, search $PATH.
28657           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
28658 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
28659           # Extract the first word of "$tool_basename", so it can be a program name with args.
28660 set dummy $tool_basename; ac_word=$2
28661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28662 $as_echo_n "checking for $ac_word... " >&6; }
28663 if ${ac_cv_path_JAR+:} false; then :
28664   $as_echo_n "(cached) " >&6
28665 else
28666   case $JAR in
28667   [\\/]* | ?:[\\/]*)
28668   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
28669   ;;
28670   *)
28671   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28672 for as_dir in $PATH
28673 do
28674   IFS=$as_save_IFS
28675   test -z "$as_dir" && as_dir=.
28676     for ac_exec_ext in '' $ac_executable_extensions; do
28677   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28678     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
28679     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28680     break 2
28681   fi
28682 done
28683   done
28684 IFS=$as_save_IFS
28685 
28686   ;;
28687 esac
28688 fi
28689 JAR=$ac_cv_path_JAR
28690 if test -n "$JAR"; then
28691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
28692 $as_echo "$JAR" >&6; }
28693 else
28694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28695 $as_echo "no" >&6; }
28696 fi
28697 
28698 
28699           if test "x$JAR" = x; then
28700             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28701           fi
28702         else
28703           # Otherwise we believe it is a complete path. Use it as it is.
28704           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
28705 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
28706           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
28707 $as_echo_n "checking for JAR... " >&6; }
28708           if test ! -x "$tool_specified"; then
28709             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28710 $as_echo "not found" >&6; }
28711             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
28712           fi
28713           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28714 $as_echo "$tool_specified" >&6; }
28715         fi
28716       fi
28717     fi
28718 
28719   fi
28720 
28721 
28722 
28723   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28724 
28725   # Publish this variable in the help.
28726 
28727 
28728   if [ -z "${JARSIGNER+x}" ]; then
28729     # The variable is not set by user, try to locate tool using the code snippet
28730 
28731       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
28732 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
28733       JARSIGNER=$BOOT_JDK/bin/jarsigner
28734       if test ! -x $JARSIGNER; then
28735         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28736 $as_echo "not found" >&6; }
28737         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28738 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28739         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
28740       fi
28741       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28742 $as_echo "ok" >&6; }
28743 
28744 
28745   else
28746     # The variable is set, but is it from the command line or the environment?
28747 
28748     # Try to remove the string !JARSIGNER! from our list.
28749     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
28750     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28751       # If it failed, the variable was not from the command line. Ignore it,
28752       # but warn the user (except for BASH, which is always set by the calling BASH).
28753       if test "xJARSIGNER" != xBASH; then
28754         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
28755 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
28756       fi
28757       # Try to locate tool using the code snippet
28758 
28759       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
28760 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
28761       JARSIGNER=$BOOT_JDK/bin/jarsigner
28762       if test ! -x $JARSIGNER; then
28763         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28764 $as_echo "not found" >&6; }
28765         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28766 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28767         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
28768       fi
28769       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28770 $as_echo "ok" >&6; }
28771 
28772 
28773     else
28774       # If it succeeded, then it was overridden by the user. We will use it
28775       # for the tool.
28776 
28777       # First remove it from the list of overridden variables, so we can test
28778       # for unknown variables in the end.
28779       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28780 
28781       # Check if we try to supply an empty value
28782       if test "x$JARSIGNER" = x; then
28783         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
28784 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
28785         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
28786 $as_echo_n "checking for JARSIGNER... " >&6; }
28787         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28788 $as_echo "disabled" >&6; }
28789       else
28790         # Check if the provided tool contains a complete path.
28791         tool_specified="$JARSIGNER"
28792         tool_basename="${tool_specified##*/}"
28793         if test "x$tool_basename" = "x$tool_specified"; then
28794           # A command without a complete path is provided, search $PATH.
28795           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
28796 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
28797           # Extract the first word of "$tool_basename", so it can be a program name with args.
28798 set dummy $tool_basename; ac_word=$2
28799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28800 $as_echo_n "checking for $ac_word... " >&6; }
28801 if ${ac_cv_path_JARSIGNER+:} false; then :
28802   $as_echo_n "(cached) " >&6
28803 else
28804   case $JARSIGNER in
28805   [\\/]* | ?:[\\/]*)
28806   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
28807   ;;
28808   *)
28809   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28810 for as_dir in $PATH
28811 do
28812   IFS=$as_save_IFS
28813   test -z "$as_dir" && as_dir=.
28814     for ac_exec_ext in '' $ac_executable_extensions; do
28815   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28816     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
28817     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28818     break 2
28819   fi
28820 done
28821   done
28822 IFS=$as_save_IFS
28823 
28824   ;;
28825 esac
28826 fi
28827 JARSIGNER=$ac_cv_path_JARSIGNER
28828 if test -n "$JARSIGNER"; then
28829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
28830 $as_echo "$JARSIGNER" >&6; }
28831 else
28832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28833 $as_echo "no" >&6; }
28834 fi
28835 
28836 
28837           if test "x$JARSIGNER" = x; then
28838             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28839           fi
28840         else
28841           # Otherwise we believe it is a complete path. Use it as it is.
28842           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
28843 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
28844           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
28845 $as_echo_n "checking for JARSIGNER... " >&6; }
28846           if test ! -x "$tool_specified"; then
28847             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28848 $as_echo "not found" >&6; }
28849             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
28850           fi
28851           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28852 $as_echo "$tool_specified" >&6; }
28853         fi
28854       fi
28855     fi
28856 
28857   fi
28858 
28859 
28860 
28861   # Finally, set some other options...
28862 
28863   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
28864   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
28865 
28866 
28867 
28868   # Check if the boot jdk is 32 or 64 bit
28869   if "$JAVA" -d64 -version > /dev/null 2>&1; then
28870     BOOT_JDK_BITS="64"
28871   else
28872     BOOT_JDK_BITS="32"
28873   fi
28874   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
28875 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
28876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
28877 $as_echo "$BOOT_JDK_BITS" >&6; }
28878 
28879 
28880 
28881 ###############################################################################
28882 #
28883 # Configure the sources to use. We can add or override individual directories.
28884 #
28885 ###############################################################################
28886 
28887 
28888   # Where are the sources.
28889   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
28890   CORBA_TOPDIR="$SRC_ROOT/corba"
28891   JAXP_TOPDIR="$SRC_ROOT/jaxp"
28892   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
28893   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
28894   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
28895   JDK_TOPDIR="$SRC_ROOT/jdk"
28896 
28897 
28898 
28899 
28900 
28901 
28902 
28903 
28904 
28905   # This feature is no longer supported.
28906 
28907 
28908 
28909 # Check whether --with-add-source-root was given.
28910 if test "${with_add_source_root+set}" = set; then :
28911   withval=$with_add_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&5
28912 $as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
28913 fi
28914 
28915 
28916 
28917 
28918 # Check whether --with-override-source-root was given.
28919 if test "${with_override_source_root+set}" = set; then :
28920   withval=$with_override_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&5
28921 $as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
28922 fi
28923 
28924 
28925 
28926 
28927 # Check whether --with-adds-and-overrides was given.
28928 if test "${with_adds_and_overrides+set}" = set; then :
28929   withval=$with_adds_and_overrides; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&5
28930 $as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
28931 fi
28932 
28933 
28934 
28935 
28936 # Check whether --with-override-langtools was given.
28937 if test "${with_override_langtools+set}" = set; then :
28938   withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
28939 $as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
28940 fi
28941 
28942 
28943 
28944 
28945 # Check whether --with-override-corba was given.
28946 if test "${with_override_corba+set}" = set; then :
28947   withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
28948 $as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
28949 fi
28950 
28951 
28952 
28953 
28954 # Check whether --with-override-jaxp was given.
28955 if test "${with_override_jaxp+set}" = set; then :
28956   withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
28957 $as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
28958 fi
28959 
28960 
28961 
28962 
28963 # Check whether --with-override-jaxws was given.
28964 if test "${with_override_jaxws+set}" = set; then :
28965   withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
28966 $as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
28967 fi
28968 
28969 
28970 
28971 
28972 # Check whether --with-override-hotspot was given.
28973 if test "${with_override_hotspot+set}" = set; then :
28974   withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
28975 $as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
28976 fi
28977 
28978 
28979 
28980 
28981 # Check whether --with-override-nashorn was given.
28982 if test "${with_override_nashorn+set}" = set; then :
28983   withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
28984 $as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
28985 fi
28986 
28987 
28988 
28989 
28990 # Check whether --with-override-jdk was given.
28991 if test "${with_override_jdk+set}" = set; then :
28992   withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
28993 $as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
28994 fi
28995 
28996 
28997 
28998 
28999   BUILD_OUTPUT="$OUTPUT_ROOT"
29000 
29001 
29002   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29003   BUILD_HOTSPOT=true
29004 
29005 
29006 
29007 # Check whether --with-import-hotspot was given.
29008 if test "${with_import_hotspot+set}" = set; then :
29009   withval=$with_import_hotspot;
29010 fi
29011 
29012   if test "x$with_import_hotspot" != x; then
29013     CURDIR="$PWD"
29014     cd "$with_import_hotspot"
29015     HOTSPOT_DIST="`pwd`"
29016     cd "$CURDIR"
29017     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29018       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29019     fi
29020     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29021 $as_echo_n "checking if hotspot should be imported... " >&6; }
29022     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29023 $as_echo "yes from $HOTSPOT_DIST" >&6; }
29024     BUILD_HOTSPOT=false
29025   fi
29026 
29027   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29028 
29029 
29030 ###############################################################################
29031 #
29032 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
29033 # native code.
29034 #
29035 ###############################################################################
29036 
29037 # See if we are doing a complete static build or not
29038 
29039   # Check whether --enable-static-build was given.
29040 if test "${enable_static_build+set}" = set; then :
29041   enableval=$enable_static_build;
29042 fi
29043 
29044   STATIC_BUILD=false
29045   if test "x$enable_static_build" = "xyes"; then
29046     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29047 $as_echo_n "checking if static build is enabled... " >&6; }
29048     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29049 $as_echo "yes" >&6; }
29050     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29051       as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29052     fi
29053     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29054     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29055     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29056     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29057     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29058     STATIC_BUILD=true
29059   elif test "x$enable_static_build" = "xno"; then
29060     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29061 $as_echo_n "checking if static build is enabled... " >&6; }
29062     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29063 $as_echo "no" >&6; }
29064   elif test "x$enable_static_build" != "x"; then
29065     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29066   fi
29067 
29068 
29069 
29070 
29071 # First determine the toolchain type (compiler family)
29072 
29073 
29074 # Check whether --with-toolchain-type was given.
29075 if test "${with_toolchain_type+set}" = set; then :
29076   withval=$with_toolchain_type;
29077 fi
29078 
29079 
29080   # Use indirect variable referencing
29081   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29082   VALID_TOOLCHAINS=${!toolchain_var_name}
29083 
29084   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29085     if test -n "$XCODEBUILD"; then
29086       # On Mac OS X, default toolchain to clang after Xcode 5
29087       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29088       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29089       if test $? -ne 0; then
29090         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29091       fi
29092       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29093           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29094           $CUT -f 1 -d .`
29095       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29096 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29097       if test $XCODE_MAJOR_VERSION -ge 5; then
29098           DEFAULT_TOOLCHAIN="clang"
29099       else
29100           DEFAULT_TOOLCHAIN="gcc"
29101       fi
29102     else
29103       # If Xcode is not installed, but the command line tools are
29104       # then we can't run xcodebuild. On these systems we should
29105       # default to clang
29106       DEFAULT_TOOLCHAIN="clang"
29107     fi
29108   else
29109     # First toolchain type in the list is the default
29110     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29111   fi
29112 
29113   if test "x$with_toolchain_type" = xlist; then
29114     # List all toolchains
29115     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29116 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29117     for toolchain in $VALID_TOOLCHAINS; do
29118       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29119       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29120       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29121     done
29122 
29123     exit 0
29124   elif test "x$with_toolchain_type" != x; then
29125     # User override; check that it is valid
29126     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29127       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29128 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29129       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29130 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29131       as_fn_error $? "Cannot continue." "$LINENO" 5
29132     fi
29133     TOOLCHAIN_TYPE=$with_toolchain_type
29134   else
29135     # No flag given, use default
29136     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29137   fi
29138 
29139 
29140   TOOLCHAIN_CC_BINARY_clang="clang"
29141   TOOLCHAIN_CC_BINARY_gcc="gcc"
29142   TOOLCHAIN_CC_BINARY_microsoft="cl"
29143   TOOLCHAIN_CC_BINARY_solstudio="cc"
29144   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29145 
29146   TOOLCHAIN_CXX_BINARY_clang="clang++"
29147   TOOLCHAIN_CXX_BINARY_gcc="g++"
29148   TOOLCHAIN_CXX_BINARY_microsoft="cl"
29149   TOOLCHAIN_CXX_BINARY_solstudio="CC"
29150   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29151 
29152   # Use indirect variable referencing
29153   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29154   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29155   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29156   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29157   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29158   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29159 
29160 
29161   # Define filename patterns
29162   if test "x$OPENJDK_TARGET_OS" = xwindows; then
29163     LIBRARY_PREFIX=
29164     SHARED_LIBRARY_SUFFIX='.dll'
29165     STATIC_LIBRARY_SUFFIX='.lib'
29166     SHARED_LIBRARY='$1.dll'
29167     STATIC_LIBRARY='$1.lib'
29168     OBJ_SUFFIX='.obj'
29169     EXE_SUFFIX='.exe'
29170   else
29171     LIBRARY_PREFIX=lib
29172     SHARED_LIBRARY_SUFFIX='.so'
29173     STATIC_LIBRARY_SUFFIX='.a'
29174     SHARED_LIBRARY='lib$1.so'
29175     STATIC_LIBRARY='lib$1.a'
29176     OBJ_SUFFIX='.o'
29177     EXE_SUFFIX=''
29178     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29179       # For full static builds, we're overloading the SHARED_LIBRARY
29180       # variables in order to limit the amount of changes required.
29181       # It would be better to remove SHARED and just use LIBRARY and
29182       # LIBRARY_SUFFIX for libraries that can be built either
29183       # shared or static and use STATIC_* for libraries that are
29184       # always built statically.
29185       if test "x$STATIC_BUILD" = xtrue; then
29186         SHARED_LIBRARY='lib$1.a'
29187         SHARED_LIBRARY_SUFFIX='.a'
29188       else
29189         SHARED_LIBRARY='lib$1.dylib'
29190         SHARED_LIBRARY_SUFFIX='.dylib'
29191       fi
29192     fi
29193   fi
29194 
29195 
29196 
29197 
29198 
29199 
29200 
29201 
29202 
29203 
29204   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29205     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29206 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29207   else
29208     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29209 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29210   fi
29211 
29212 
29213 # User supplied flags should be used when configure detects compilers
29214 
29215   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29216     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29217 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29218   fi
29219 
29220   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29221     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29222 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29223   fi
29224 
29225   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29226     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29227 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29228   fi
29229 
29230 
29231 # Check whether --with-extra-cflags was given.
29232 if test "${with_extra_cflags+set}" = set; then :
29233   withval=$with_extra_cflags;
29234 fi
29235 
29236 
29237 
29238 # Check whether --with-extra-cxxflags was given.
29239 if test "${with_extra_cxxflags+set}" = set; then :
29240   withval=$with_extra_cxxflags;
29241 fi
29242 
29243 
29244 
29245 # Check whether --with-extra-ldflags was given.
29246 if test "${with_extra_ldflags+set}" = set; then :
29247   withval=$with_extra_ldflags;
29248 fi
29249 
29250 
29251   EXTRA_CFLAGS="$with_extra_cflags"
29252   EXTRA_CXXFLAGS="$with_extra_cxxflags"
29253   EXTRA_LDFLAGS="$with_extra_ldflags"
29254 
29255   # Hotspot needs these set in their legacy form
29256   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29257   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29258   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29259 
29260 
29261 
29262 
29263 
29264   # The global CFLAGS and LDLAGS variables are used by configure tests and
29265   # should include the extra parameters
29266   CFLAGS="$EXTRA_CFLAGS"
29267   CXXFLAGS="$EXTRA_CXXFLAGS"
29268   LDFLAGS="$EXTRA_LDFLAGS"
29269   CPPFLAGS=""
29270 
29271 # The sysroot cflags are needed for configure to be able to run the compilers
29272 
29273   if test "x$SYSROOT" != "x"; then
29274     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29275       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29276         # Solaris Studio does not have a concept of sysroot. Instead we must
29277         # make sure the default include and lib dirs are appended to each
29278         # compile and link command line.
29279         SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29280         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29281             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29282             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29283       fi
29284     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29285       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29286       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29287     elif test "x$TOOLCHAIN_TYPE" = xclang; then
29288       SYSROOT_CFLAGS="-isysroot $SYSROOT"
29289       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29290     fi
29291     # Propagate the sysroot args to hotspot
29292     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29293     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29294     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29295     # The global CFLAGS and LDFLAGS variables need these for configure to function
29296     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29297     CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29298     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29299     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29300   fi
29301 
29302   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29303     # We also need -iframework<path>/System/Library/Frameworks
29304     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29305     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29306     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
29307     # set this here so it doesn't have to be peppered throughout the forest
29308     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29309     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29310   fi
29311 
29312 
29313 
29314 
29315 
29316 # Then detect the actual binaries needed
29317 
29318   # FIXME: Is this needed?
29319   ac_ext=cpp
29320 ac_cpp='$CXXCPP $CPPFLAGS'
29321 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29322 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29323 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29324 
29325 
29326   # Store the CFLAGS etc passed to the configure script.
29327   ORG_CFLAGS="$CFLAGS"
29328   ORG_CXXFLAGS="$CXXFLAGS"
29329 
29330   # autoconf magic only relies on PATH, so update it if tools dir is specified
29331   OLD_PATH="$PATH"
29332 
29333   # On Windows, we need to detect the visual studio installation first.
29334   # This will change the PATH, but we need to keep that new PATH even
29335   # after toolchain detection is done, since the compiler (on x86) uses
29336   # it for DLL resolution in runtime.
29337   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
29338       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
29339 
29340   # Store path to cygwin link.exe to help excluding it when searching for
29341   # VS linker. This must be done before changing the PATH when looking for VS.
29342   # Extract the first word of "link", so it can be a program name with args.
29343 set dummy link; ac_word=$2
29344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29345 $as_echo_n "checking for $ac_word... " >&6; }
29346 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
29347   $as_echo_n "(cached) " >&6
29348 else
29349   case $CYGWIN_LINK in
29350   [\\/]* | ?:[\\/]*)
29351   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
29352   ;;
29353   *)
29354   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29355 for as_dir in $PATH
29356 do
29357   IFS=$as_save_IFS
29358   test -z "$as_dir" && as_dir=.
29359     for ac_exec_ext in '' $ac_executable_extensions; do
29360   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29361     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
29362     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29363     break 2
29364   fi
29365 done
29366   done
29367 IFS=$as_save_IFS
29368 
29369   ;;
29370 esac
29371 fi
29372 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
29373 if test -n "$CYGWIN_LINK"; then
29374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
29375 $as_echo "$CYGWIN_LINK" >&6; }
29376 else
29377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29378 $as_echo "no" >&6; }
29379 fi
29380 
29381 
29382   if test "x$CYGWIN_LINK" != x; then
29383     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
29384 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
29385     "$CYGWIN_LINK" --version > /dev/null
29386     if test $? -eq 0 ; then
29387       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29388 $as_echo "yes" >&6; }
29389     else
29390       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29391 $as_echo "no" >&6; }
29392       # This might be the VS linker. Don't exclude it later on.
29393       CYGWIN_LINK=""
29394     fi
29395   fi
29396 
29397   # First-hand choice is to locate and run the vsvars bat file.
29398 
29399 
29400 # Check whether --with-toolchain-version was given.
29401 if test "${with_toolchain_version+set}" = set; then :
29402   withval=$with_toolchain_version;
29403 fi
29404 
29405 
29406   if test "x$with_toolchain_version" = xlist; then
29407     # List all toolchains
29408     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
29409 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
29410     for version in $VALID_VS_VERSIONS; do
29411       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
29412       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
29413     done
29414 
29415     exit 0
29416   elif test "x$DEVKIT_VS_VERSION" != x; then
29417     VS_VERSION=$DEVKIT_VS_VERSION
29418     TOOLCHAIN_VERSION=$VS_VERSION
29419     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
29420     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
29421     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
29422     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
29423     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29424     VS_PATH="$TOOLCHAIN_PATH:$PATH"
29425 
29426     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
29427     # can still be exported as INCLUDE for compiler invocations without
29428     # SYSROOT_CFLAGS
29429     OLDIFS="$IFS"
29430     IFS=";"
29431     for i in $DEVKIT_VS_INCLUDE; do
29432       ipath=$i
29433 
29434   unix_path="$ipath"
29435   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29436     windows_path=`$CYGPATH -m "$unix_path"`
29437     ipath="$windows_path"
29438   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29439     windows_path=`cmd //c echo $unix_path`
29440     ipath="$windows_path"
29441   fi
29442 
29443       VS_INCLUDE="$VS_INCLUDE;$ipath"
29444     done
29445     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
29446     # as LIB for compiler invocations without SYSROOT_LDFLAGS
29447     for i in $DEVKIT_VS_LIB; do
29448       libpath=$i
29449 
29450   unix_path="$libpath"
29451   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29452     windows_path=`$CYGPATH -m "$unix_path"`
29453     libpath="$windows_path"
29454   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29455     windows_path=`cmd //c echo $unix_path`
29456     libpath="$windows_path"
29457   fi
29458 
29459       VS_LIB="$VS_LIB;$libpath"
29460     done
29461     IFS="$OLDIFS"
29462 
29463     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
29464 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
29465 
29466   elif test "x$with_toolchain_version" != x; then
29467     # User override; check that it is valid
29468     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
29469       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
29470 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
29471       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
29472 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
29473       as_fn_error $? "Cannot continue." "$LINENO" 5
29474     fi
29475     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
29476   else
29477     # No flag given, use default
29478     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
29479   fi
29480 
29481   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
29482 
29483   VS_VERSION="$VS_VERSION"
29484   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
29485   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
29486   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
29487   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
29488 
29489   # When using --with-tools-dir, assume it points to the correct and default
29490   # version of Visual Studio or that --with-toolchain-version was also set.
29491   if test "x$with_tools_dir" != x; then
29492 
29493   if test "x$VS_ENV_CMD" = x; then
29494     VS_VERSION="${VS_VERSION}"
29495     VS_BASE="$with_tools_dir/../.."
29496     METHOD="--with-tools-dir"
29497 
29498     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29499       VCVARSFILE="vc/bin/vcvars32.bat"
29500     else
29501       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29502     fi
29503 
29504 
29505   windows_path="$VS_BASE"
29506   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29507     unix_path=`$CYGPATH -u "$windows_path"`
29508     VS_BASE="$unix_path"
29509   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29510     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29511     VS_BASE="$unix_path"
29512   fi
29513 
29514     if test -d "$VS_BASE"; then
29515       if test -f "$VS_BASE/$VCVARSFILE"; then
29516         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29517 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29518         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29519         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29520         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29521         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29522       else
29523         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29524 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29525         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29526 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29527       fi
29528     fi
29529   fi
29530 
29531 
29532   if test "x$VS_ENV_CMD" = x; then
29533     VS_VERSION="${VS_VERSION}"
29534     VS_BASE="$with_tools_dir/../../.."
29535     METHOD="--with-tools-dir"
29536 
29537     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29538       VCVARSFILE="vc/bin/vcvars32.bat"
29539     else
29540       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29541     fi
29542 
29543 
29544   windows_path="$VS_BASE"
29545   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29546     unix_path=`$CYGPATH -u "$windows_path"`
29547     VS_BASE="$unix_path"
29548   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29549     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29550     VS_BASE="$unix_path"
29551   fi
29552 
29553     if test -d "$VS_BASE"; then
29554       if test -f "$VS_BASE/$VCVARSFILE"; then
29555         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29556 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29557         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29558         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29559         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29560         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29561       else
29562         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29563 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29564         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29565 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29566       fi
29567     fi
29568   fi
29569 
29570     if test "x$VS_ENV_CMD" = x; then
29571       # Having specified an argument which is incorrect will produce an instant failure;
29572       # we should not go on looking
29573       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
29574 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
29575       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
29576 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
29577       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
29578 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
29579       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
29580     fi
29581   fi
29582 
29583   VS_ENV_CMD=""
29584   VS_ENV_ARGS=""
29585 
29586   if test "x$VS_COMNTOOLS" != x; then
29587 
29588   if test "x$VS_ENV_CMD" = x; then
29589     VS_VERSION="${VS_VERSION}"
29590     VS_BASE="$VS_COMNTOOLS/../.."
29591     METHOD="$VS_COMNTOOLS_VAR variable"
29592 
29593     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29594       VCVARSFILE="vc/bin/vcvars32.bat"
29595     else
29596       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29597     fi
29598 
29599 
29600   windows_path="$VS_BASE"
29601   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29602     unix_path=`$CYGPATH -u "$windows_path"`
29603     VS_BASE="$unix_path"
29604   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29605     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29606     VS_BASE="$unix_path"
29607   fi
29608 
29609     if test -d "$VS_BASE"; then
29610       if test -f "$VS_BASE/$VCVARSFILE"; then
29611         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29612 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29613         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29614         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29615         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29616         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29617       else
29618         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29619 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29620         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29621 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29622       fi
29623     fi
29624   fi
29625 
29626   fi
29627   if test "x$PROGRAMFILES" != x; then
29628 
29629   if test "x$VS_ENV_CMD" = x; then
29630     VS_VERSION="${VS_VERSION}"
29631     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
29632     METHOD="well-known name"
29633 
29634     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29635       VCVARSFILE="vc/bin/vcvars32.bat"
29636     else
29637       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29638     fi
29639 
29640 
29641   windows_path="$VS_BASE"
29642   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29643     unix_path=`$CYGPATH -u "$windows_path"`
29644     VS_BASE="$unix_path"
29645   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29646     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29647     VS_BASE="$unix_path"
29648   fi
29649 
29650     if test -d "$VS_BASE"; then
29651       if test -f "$VS_BASE/$VCVARSFILE"; then
29652         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29653 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29654         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29655         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29656         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29657         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29658       else
29659         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29660 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29661         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29662 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29663       fi
29664     fi
29665   fi
29666 
29667   fi
29668   # Work around the insanely named ProgramFiles(x86) env variable
29669   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
29670   if test "x$PROGRAMFILES_X86" != x; then
29671 
29672   if test "x$VS_ENV_CMD" = x; then
29673     VS_VERSION="${VS_VERSION}"
29674     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
29675     METHOD="well-known name"
29676 
29677     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29678       VCVARSFILE="vc/bin/vcvars32.bat"
29679     else
29680       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29681     fi
29682 
29683 
29684   windows_path="$VS_BASE"
29685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29686     unix_path=`$CYGPATH -u "$windows_path"`
29687     VS_BASE="$unix_path"
29688   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29689     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29690     VS_BASE="$unix_path"
29691   fi
29692 
29693     if test -d "$VS_BASE"; then
29694       if test -f "$VS_BASE/$VCVARSFILE"; then
29695         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29696 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29697         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29698         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29699         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29700         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29701       else
29702         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29703 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29704         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29705 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29706       fi
29707     fi
29708   fi
29709 
29710   fi
29711 
29712   if test "x$VS_ENV_CMD" = x; then
29713     VS_VERSION="${VS_VERSION}"
29714     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
29715     METHOD="well-known name"
29716 
29717     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29718       VCVARSFILE="vc/bin/vcvars32.bat"
29719     else
29720       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29721     fi
29722 
29723 
29724   windows_path="$VS_BASE"
29725   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29726     unix_path=`$CYGPATH -u "$windows_path"`
29727     VS_BASE="$unix_path"
29728   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29729     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29730     VS_BASE="$unix_path"
29731   fi
29732 
29733     if test -d "$VS_BASE"; then
29734       if test -f "$VS_BASE/$VCVARSFILE"; then
29735         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29736 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29737         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29738         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29739         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29740         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29741       else
29742         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29743 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29744         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29745 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29746       fi
29747     fi
29748   fi
29749 
29750 
29751   if test "x$VS_ENV_CMD" = x; then
29752     VS_VERSION="${VS_VERSION}"
29753     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
29754     METHOD="well-known name"
29755 
29756     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29757       VCVARSFILE="vc/bin/vcvars32.bat"
29758     else
29759       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29760     fi
29761 
29762 
29763   windows_path="$VS_BASE"
29764   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29765     unix_path=`$CYGPATH -u "$windows_path"`
29766     VS_BASE="$unix_path"
29767   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29768     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29769     VS_BASE="$unix_path"
29770   fi
29771 
29772     if test -d "$VS_BASE"; then
29773       if test -f "$VS_BASE/$VCVARSFILE"; then
29774         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29775 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29776         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29777         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29778         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29779         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29780       else
29781         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29782 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29783         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29784 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29785       fi
29786     fi
29787   fi
29788 
29789 
29790   if test "x$SDK_INSTALL_DIR" != x; then
29791     if test "x$ProgramW6432" != x; then
29792 
29793   if test "x$VS_ENV_CMD" = x; then
29794     VS_VERSION="${VS_VERSION}"
29795     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
29796     METHOD="well-known name"
29797 
29798   windows_path="$WIN_SDK_BASE"
29799   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29800     unix_path=`$CYGPATH -u "$windows_path"`
29801     WIN_SDK_BASE="$unix_path"
29802   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29803     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29804     WIN_SDK_BASE="$unix_path"
29805   fi
29806 
29807     if test -d "$WIN_SDK_BASE"; then
29808       # There have been cases of partial or broken SDK installations. A missing
29809       # lib dir is not going to work.
29810       if test ! -d "$WIN_SDK_BASE/lib"; then
29811         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29812 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29813         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29814 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29815       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29816         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29817 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29818         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29819         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29820           VS_ENV_ARGS="/x86"
29821         else
29822           VS_ENV_ARGS="/x64"
29823         fi
29824         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29825         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29826         # TODO: improve detection for other versions of SDK
29827         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29828       else
29829         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29830 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29831         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29832 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29833       fi
29834     fi
29835   fi
29836 
29837     fi
29838     if test "x$PROGRAMW6432" != x; then
29839 
29840   if test "x$VS_ENV_CMD" = x; then
29841     VS_VERSION="${VS_VERSION}"
29842     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
29843     METHOD="well-known name"
29844 
29845   windows_path="$WIN_SDK_BASE"
29846   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29847     unix_path=`$CYGPATH -u "$windows_path"`
29848     WIN_SDK_BASE="$unix_path"
29849   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29850     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29851     WIN_SDK_BASE="$unix_path"
29852   fi
29853 
29854     if test -d "$WIN_SDK_BASE"; then
29855       # There have been cases of partial or broken SDK installations. A missing
29856       # lib dir is not going to work.
29857       if test ! -d "$WIN_SDK_BASE/lib"; then
29858         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29859 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29860         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29861 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29862       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29863         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29864 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29865         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29866         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29867           VS_ENV_ARGS="/x86"
29868         else
29869           VS_ENV_ARGS="/x64"
29870         fi
29871         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29872         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29873         # TODO: improve detection for other versions of SDK
29874         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29875       else
29876         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29877 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29878         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29879 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29880       fi
29881     fi
29882   fi
29883 
29884     fi
29885     if test "x$PROGRAMFILES" != x; then
29886 
29887   if test "x$VS_ENV_CMD" = x; then
29888     VS_VERSION="${VS_VERSION}"
29889     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
29890     METHOD="well-known name"
29891 
29892   windows_path="$WIN_SDK_BASE"
29893   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29894     unix_path=`$CYGPATH -u "$windows_path"`
29895     WIN_SDK_BASE="$unix_path"
29896   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29897     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29898     WIN_SDK_BASE="$unix_path"
29899   fi
29900 
29901     if test -d "$WIN_SDK_BASE"; then
29902       # There have been cases of partial or broken SDK installations. A missing
29903       # lib dir is not going to work.
29904       if test ! -d "$WIN_SDK_BASE/lib"; then
29905         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29906 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29907         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29908 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29909       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29910         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29911 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29912         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29913         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29914           VS_ENV_ARGS="/x86"
29915         else
29916           VS_ENV_ARGS="/x64"
29917         fi
29918         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29919         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29920         # TODO: improve detection for other versions of SDK
29921         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29922       else
29923         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29924 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29925         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29926 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29927       fi
29928     fi
29929   fi
29930 
29931     fi
29932 
29933   if test "x$VS_ENV_CMD" = x; then
29934     VS_VERSION="${VS_VERSION}"
29935     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
29936     METHOD="well-known name"
29937 
29938   windows_path="$WIN_SDK_BASE"
29939   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29940     unix_path=`$CYGPATH -u "$windows_path"`
29941     WIN_SDK_BASE="$unix_path"
29942   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29943     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29944     WIN_SDK_BASE="$unix_path"
29945   fi
29946 
29947     if test -d "$WIN_SDK_BASE"; then
29948       # There have been cases of partial or broken SDK installations. A missing
29949       # lib dir is not going to work.
29950       if test ! -d "$WIN_SDK_BASE/lib"; then
29951         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29952 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29953         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29954 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29955       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29956         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29957 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29958         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29959         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29960           VS_ENV_ARGS="/x86"
29961         else
29962           VS_ENV_ARGS="/x64"
29963         fi
29964         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29965         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29966         # TODO: improve detection for other versions of SDK
29967         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29968       else
29969         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29970 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29971         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29972 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29973       fi
29974     fi
29975   fi
29976 
29977 
29978   if test "x$VS_ENV_CMD" = x; then
29979     VS_VERSION="${VS_VERSION}"
29980     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
29981     METHOD="well-known name"
29982 
29983   windows_path="$WIN_SDK_BASE"
29984   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29985     unix_path=`$CYGPATH -u "$windows_path"`
29986     WIN_SDK_BASE="$unix_path"
29987   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29988     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29989     WIN_SDK_BASE="$unix_path"
29990   fi
29991 
29992     if test -d "$WIN_SDK_BASE"; then
29993       # There have been cases of partial or broken SDK installations. A missing
29994       # lib dir is not going to work.
29995       if test ! -d "$WIN_SDK_BASE/lib"; then
29996         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29997 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29998         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29999 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30000       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30001         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30002 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30003         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30004         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30005           VS_ENV_ARGS="/x86"
30006         else
30007           VS_ENV_ARGS="/x64"
30008         fi
30009         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30010         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30011         # TODO: improve detection for other versions of SDK
30012         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30013       else
30014         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30015 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30016         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30017 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30018       fi
30019     fi
30020   fi
30021 
30022   fi
30023 
30024     if test "x$VS_ENV_CMD" != x; then
30025       TOOLCHAIN_VERSION=$VS_VERSION
30026       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30027       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30028       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30029       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30030       # The rest of the variables are already evaled while probing
30031       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30032 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30033       break
30034     fi
30035   done
30036 
30037 
30038   # If we have a devkit, skip all of the below.
30039   if test "x$DEVKIT_VS_VERSION" = x; then
30040     if test "x$VS_ENV_CMD" != x; then
30041       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30042 
30043   # Only process if variable expands to non-empty
30044 
30045   if test "x$VS_ENV_CMD" != x; then
30046     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30047 
30048   # First separate the path from the arguments. This will split at the first
30049   # space.
30050   complete="$VS_ENV_CMD"
30051   path="${complete%% *}"
30052   tmp="$complete EOL"
30053   arguments="${tmp#* }"
30054 
30055   # Input might be given as Windows format, start by converting to
30056   # unix format.
30057   new_path=`$CYGPATH -u "$path"`
30058 
30059   # Now try to locate executable using which
30060   new_path=`$WHICH "$new_path" 2> /dev/null`
30061   # bat and cmd files are not always considered executable in cygwin causing which
30062   # to not find them
30063   if test "x$new_path" = x \
30064       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30065       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30066     new_path=`$CYGPATH -u "$path"`
30067   fi
30068   if test "x$new_path" = x; then
30069     # Oops. Which didn't find the executable.
30070     # The splitting of arguments from the executable at a space might have been incorrect,
30071     # since paths with space are more likely in Windows. Give it another try with the whole
30072     # argument.
30073     path="$complete"
30074     arguments="EOL"
30075     new_path=`$CYGPATH -u "$path"`
30076     new_path=`$WHICH "$new_path" 2> /dev/null`
30077     # bat and cmd files are not always considered executable in cygwin causing which
30078     # to not find them
30079     if test "x$new_path" = x \
30080         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30081         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30082       new_path=`$CYGPATH -u "$path"`
30083     fi
30084     if test "x$new_path" = x; then
30085       # It's still not found. Now this is an unrecoverable error.
30086       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30087 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30088       has_space=`$ECHO "$complete" | $GREP " "`
30089       if test "x$has_space" != x; then
30090         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30091 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30092       fi
30093       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30094     fi
30095   fi
30096 
30097   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30098   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30099   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30100   # "foo.exe" is OK but "foo" is an error.
30101   #
30102   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30103   # It is also a way to make sure we got the proper file name for the real test later on.
30104   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30105   if test "x$test_shortpath" = x; then
30106     # Short path failed, file does not exist as specified.
30107     # Try adding .exe or .cmd
30108     if test -f "${new_path}.exe"; then
30109       input_to_shortpath="${new_path}.exe"
30110     elif test -f "${new_path}.cmd"; then
30111       input_to_shortpath="${new_path}.cmd"
30112     else
30113       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30114 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30115       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30116 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30117       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30118     fi
30119   else
30120     input_to_shortpath="$new_path"
30121   fi
30122 
30123   # Call helper function which possibly converts this using DOS-style short mode.
30124   # If so, the updated path is stored in $new_path.
30125   new_path="$input_to_shortpath"
30126 
30127   input_path="$input_to_shortpath"
30128   # Check if we need to convert this using DOS-style short mode. If the path
30129   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30130   # take no chances and rewrite it.
30131   # Note: m4 eats our [], so we need to use [ and ] instead.
30132   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30133   if test "x$has_forbidden_chars" != x; then
30134     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30135     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30136     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30137     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30138       # Going to short mode and back again did indeed matter. Since short mode is
30139       # case insensitive, let's make it lowercase to improve readability.
30140       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30141       # Now convert it back to Unix-style (cygpath)
30142       input_path=`$CYGPATH -u "$shortmode_path"`
30143       new_path="$input_path"
30144     fi
30145   fi
30146 
30147   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30148   if test "x$test_cygdrive_prefix" = x; then
30149     # As a simple fix, exclude /usr/bin since it's not a real path.
30150     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30151       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30152       # a path prefixed by /cygdrive for fixpath to work.
30153       new_path="$CYGWIN_ROOT_PATH$input_path"
30154     fi
30155   fi
30156 
30157   # remove trailing .exe if any
30158   new_path="${new_path/%.exe/}"
30159 
30160     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30161 
30162   # First separate the path from the arguments. This will split at the first
30163   # space.
30164   complete="$VS_ENV_CMD"
30165   path="${complete%% *}"
30166   tmp="$complete EOL"
30167   arguments="${tmp#* }"
30168 
30169   # Input might be given as Windows format, start by converting to
30170   # unix format.
30171   new_path="$path"
30172 
30173   windows_path="$new_path"
30174   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30175     unix_path=`$CYGPATH -u "$windows_path"`
30176     new_path="$unix_path"
30177   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30178     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30179     new_path="$unix_path"
30180   fi
30181 
30182 
30183   # Now try to locate executable using which
30184   new_path=`$WHICH "$new_path" 2> /dev/null`
30185 
30186   if test "x$new_path" = x; then
30187     # Oops. Which didn't find the executable.
30188     # The splitting of arguments from the executable at a space might have been incorrect,
30189     # since paths with space are more likely in Windows. Give it another try with the whole
30190     # argument.
30191     path="$complete"
30192     arguments="EOL"
30193     new_path="$path"
30194 
30195   windows_path="$new_path"
30196   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30197     unix_path=`$CYGPATH -u "$windows_path"`
30198     new_path="$unix_path"
30199   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30200     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30201     new_path="$unix_path"
30202   fi
30203 
30204 
30205     new_path=`$WHICH "$new_path" 2> /dev/null`
30206     # bat and cmd files are not always considered executable in MSYS causing which
30207     # to not find them
30208     if test "x$new_path" = x \
30209         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30210         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30211       new_path="$path"
30212 
30213   windows_path="$new_path"
30214   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30215     unix_path=`$CYGPATH -u "$windows_path"`
30216     new_path="$unix_path"
30217   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30218     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30219     new_path="$unix_path"
30220   fi
30221 
30222     fi
30223 
30224     if test "x$new_path" = x; then
30225       # It's still not found. Now this is an unrecoverable error.
30226       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30227 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30228       has_space=`$ECHO "$complete" | $GREP " "`
30229       if test "x$has_space" != x; then
30230         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30231 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30232       fi
30233       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30234     fi
30235   fi
30236 
30237   # Now new_path has a complete unix path to the binary
30238   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30239     # Keep paths in /bin as-is, but remove trailing .exe if any
30240     new_path="${new_path/%.exe/}"
30241     # Do not save /bin paths to all_fixpath_prefixes!
30242   else
30243     # Not in mixed or Windows style, start by that.
30244     new_path=`cmd //c echo $new_path`
30245 
30246   input_path="$new_path"
30247   # Check if we need to convert this using DOS-style short mode. If the path
30248   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30249   # take no chances and rewrite it.
30250   # Note: m4 eats our [], so we need to use [ and ] instead.
30251   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30252   if test "x$has_forbidden_chars" != x; then
30253     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30254     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30255   fi
30256 
30257     # Output is in $new_path
30258 
30259   windows_path="$new_path"
30260   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30261     unix_path=`$CYGPATH -u "$windows_path"`
30262     new_path="$unix_path"
30263   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30264     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30265     new_path="$unix_path"
30266   fi
30267 
30268     # remove trailing .exe if any
30269     new_path="${new_path/%.exe/}"
30270 
30271     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30272     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30273   fi
30274 
30275     else
30276       # We're on a unix platform. Hooray! :)
30277       # First separate the path from the arguments. This will split at the first
30278       # space.
30279       complete="$VS_ENV_CMD"
30280       path="${complete%% *}"
30281       tmp="$complete EOL"
30282       arguments="${tmp#* }"
30283 
30284       # Cannot rely on the command "which" here since it doesn't always work.
30285       is_absolute_path=`$ECHO "$path" | $GREP ^/`
30286       if test -z "$is_absolute_path"; then
30287         # Path to executable is not absolute. Find it.
30288         IFS_save="$IFS"
30289         IFS=:
30290         for p in $PATH; do
30291           if test -f "$p/$path" && test -x "$p/$path"; then
30292             new_path="$p/$path"
30293             break
30294           fi
30295         done
30296         IFS="$IFS_save"
30297       else
30298         # This is an absolute path, we can use it without further modifications.
30299         new_path="$path"
30300       fi
30301 
30302       if test "x$new_path" = x; then
30303         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30304 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30305         has_space=`$ECHO "$complete" | $GREP " "`
30306         if test "x$has_space" != x; then
30307           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30308 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30309         fi
30310         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30311       fi
30312     fi
30313 
30314     # Now join together the path and the arguments once again
30315     if test "x$arguments" != xEOL; then
30316       new_complete="$new_path ${arguments% *}"
30317     else
30318       new_complete="$new_path"
30319     fi
30320 
30321     if test "x$complete" != "x$new_complete"; then
30322       VS_ENV_CMD="$new_complete"
30323       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
30324 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
30325     fi
30326   fi
30327 
30328 
30329       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
30330       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
30331 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
30332 
30333       # We need to create a couple of temporary files.
30334       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
30335       $MKDIR -p $VS_ENV_TMP_DIR
30336 
30337       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
30338       # Instead create a shell script which will set the relevant variables when run.
30339       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
30340 
30341   unix_path="$WINPATH_VS_ENV_CMD"
30342   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30343     windows_path=`$CYGPATH -m "$unix_path"`
30344     WINPATH_VS_ENV_CMD="$windows_path"
30345   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30346     windows_path=`cmd //c echo $unix_path`
30347     WINPATH_VS_ENV_CMD="$windows_path"
30348   fi
30349 
30350       WINPATH_BASH="$BASH"
30351 
30352   unix_path="$WINPATH_BASH"
30353   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30354     windows_path=`$CYGPATH -m "$unix_path"`
30355     WINPATH_BASH="$windows_path"
30356   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30357     windows_path=`cmd //c echo $unix_path`
30358     WINPATH_BASH="$windows_path"
30359   fi
30360 
30361 
30362       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
30363       # script (executable by bash) that will setup the important variables.
30364       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
30365       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
30366       # This will end up something like:
30367       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
30368       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
30369       # These will end up something like:
30370       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
30371       # The trailing space for everyone except PATH is no typo, but is needed due
30372       # to trailing \ in the Windows paths. These will be stripped later.
30373       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
30374           >> $EXTRACT_VC_ENV_BAT_FILE
30375       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
30376           >> $EXTRACT_VC_ENV_BAT_FILE
30377       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
30378           >> $EXTRACT_VC_ENV_BAT_FILE
30379       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
30380           >> $EXTRACT_VC_ENV_BAT_FILE
30381       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
30382           >> $EXTRACT_VC_ENV_BAT_FILE
30383       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
30384           >> $EXTRACT_VC_ENV_BAT_FILE
30385 
30386       # Now execute the newly created bat file.
30387       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
30388       # Change directory so we don't need to mess with Windows paths in redirects.
30389       cd $VS_ENV_TMP_DIR
30390       cmd /c extract-vs-env.bat | $CAT
30391       cd $CURDIR
30392 
30393       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
30394         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
30395 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
30396         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30397 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30398         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30399 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30400         as_fn_error $? "Cannot continue" "$LINENO" 5
30401       fi
30402 
30403       # Now set all paths and other env variables. This will allow the rest of
30404       # the configure script to find and run the compiler in the proper way.
30405       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
30406 $as_echo "$as_me: Setting extracted environment variables" >&6;}
30407       . $VS_ENV_TMP_DIR/set-vs-env.sh
30408       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
30409       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
30410     else
30411       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
30412       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
30413 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
30414     fi
30415   fi
30416 
30417   # At this point, we should have correct variables in the environment, or we can't continue.
30418   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
30419 $as_echo_n "checking for Visual Studio variables... " >&6; }
30420 
30421   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
30422       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
30423     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
30424       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
30425 $as_echo "present but broken" >&6; }
30426       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
30427     else
30428       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30429 $as_echo "ok" >&6; }
30430       # Remove any trailing "\" ";" and " " from the variables.
30431       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
30432       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
30433       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
30434       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
30435       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
30436       # Remove any paths containing # (typically F#) as that messes up make. This
30437       # is needed if visual studio was installed with F# support.
30438       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
30439 
30440 
30441 
30442 
30443 
30444       # Convert VS_INCLUDE into SYSROOT_CFLAGS
30445       OLDIFS="$IFS"
30446       IFS=";"
30447       for i in $VS_INCLUDE; do
30448         ipath=$i
30449         # Only process non-empty elements
30450         if test "x$ipath" != x; then
30451           IFS="$OLDIFS"
30452           # Check that directory exists before calling fixup_path
30453           testpath=$ipath
30454 
30455   windows_path="$testpath"
30456   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30457     unix_path=`$CYGPATH -u "$windows_path"`
30458     testpath="$unix_path"
30459   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30460     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30461     testpath="$unix_path"
30462   fi
30463 
30464           if test -d "$testpath"; then
30465 
30466   # Only process if variable expands to non-empty
30467 
30468   if test "x$ipath" != x; then
30469     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30470 
30471   # Input might be given as Windows format, start by converting to
30472   # unix format.
30473   path="$ipath"
30474   new_path=`$CYGPATH -u "$path"`
30475 
30476   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30477   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30478   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30479   # "foo.exe" is OK but "foo" is an error.
30480   #
30481   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30482   # It is also a way to make sure we got the proper file name for the real test later on.
30483   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30484   if test "x$test_shortpath" = x; then
30485     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30486 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30487     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
30488   fi
30489 
30490   # Call helper function which possibly converts this using DOS-style short mode.
30491   # If so, the updated path is stored in $new_path.
30492 
30493   input_path="$new_path"
30494   # Check if we need to convert this using DOS-style short mode. If the path
30495   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30496   # take no chances and rewrite it.
30497   # Note: m4 eats our [], so we need to use [ and ] instead.
30498   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30499   if test "x$has_forbidden_chars" != x; then
30500     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30501     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30502     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30503     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30504       # Going to short mode and back again did indeed matter. Since short mode is
30505       # case insensitive, let's make it lowercase to improve readability.
30506       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30507       # Now convert it back to Unix-style (cygpath)
30508       input_path=`$CYGPATH -u "$shortmode_path"`
30509       new_path="$input_path"
30510     fi
30511   fi
30512 
30513   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30514   if test "x$test_cygdrive_prefix" = x; then
30515     # As a simple fix, exclude /usr/bin since it's not a real path.
30516     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30517       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30518       # a path prefixed by /cygdrive for fixpath to work.
30519       new_path="$CYGWIN_ROOT_PATH$input_path"
30520     fi
30521   fi
30522 
30523 
30524   if test "x$path" != "x$new_path"; then
30525     ipath="$new_path"
30526     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30527 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30528   fi
30529 
30530     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30531 
30532   path="$ipath"
30533   has_colon=`$ECHO $path | $GREP ^.:`
30534   new_path="$path"
30535   if test "x$has_colon" = x; then
30536     # Not in mixed or Windows style, start by that.
30537     new_path=`cmd //c echo $path`
30538   fi
30539 
30540 
30541   input_path="$new_path"
30542   # Check if we need to convert this using DOS-style short mode. If the path
30543   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30544   # take no chances and rewrite it.
30545   # Note: m4 eats our [], so we need to use [ and ] instead.
30546   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30547   if test "x$has_forbidden_chars" != x; then
30548     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30549     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30550   fi
30551 
30552 
30553   windows_path="$new_path"
30554   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30555     unix_path=`$CYGPATH -u "$windows_path"`
30556     new_path="$unix_path"
30557   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30558     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30559     new_path="$unix_path"
30560   fi
30561 
30562   if test "x$path" != "x$new_path"; then
30563     ipath="$new_path"
30564     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30565 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30566   fi
30567 
30568   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30569   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30570 
30571     else
30572       # We're on a unix platform. Hooray! :)
30573       path="$ipath"
30574       has_space=`$ECHO "$path" | $GREP " "`
30575       if test "x$has_space" != x; then
30576         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30577 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30578         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30579       fi
30580 
30581       # Use eval to expand a potential ~
30582       eval path="$path"
30583       if test ! -f "$path" && test ! -d "$path"; then
30584         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
30585       fi
30586 
30587       ipath="`cd "$path"; $THEPWDCMD -L`"
30588     fi
30589   fi
30590 
30591             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
30592           fi
30593           IFS=";"
30594         fi
30595       done
30596       # Convert VS_LIB into SYSROOT_LDFLAGS
30597       for i in $VS_LIB; do
30598         libpath=$i
30599         # Only process non-empty elements
30600         if test "x$libpath" != x; then
30601           IFS="$OLDIFS"
30602           # Check that directory exists before calling fixup_path
30603           testpath=$libpath
30604 
30605   windows_path="$testpath"
30606   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30607     unix_path=`$CYGPATH -u "$windows_path"`
30608     testpath="$unix_path"
30609   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30610     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30611     testpath="$unix_path"
30612   fi
30613 
30614           if test -d "$testpath"; then
30615 
30616   # Only process if variable expands to non-empty
30617 
30618   if test "x$libpath" != x; then
30619     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30620 
30621   # Input might be given as Windows format, start by converting to
30622   # unix format.
30623   path="$libpath"
30624   new_path=`$CYGPATH -u "$path"`
30625 
30626   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30627   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30628   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30629   # "foo.exe" is OK but "foo" is an error.
30630   #
30631   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30632   # It is also a way to make sure we got the proper file name for the real test later on.
30633   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30634   if test "x$test_shortpath" = x; then
30635     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
30636 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
30637     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
30638   fi
30639 
30640   # Call helper function which possibly converts this using DOS-style short mode.
30641   # If so, the updated path is stored in $new_path.
30642 
30643   input_path="$new_path"
30644   # Check if we need to convert this using DOS-style short mode. If the path
30645   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30646   # take no chances and rewrite it.
30647   # Note: m4 eats our [], so we need to use [ and ] instead.
30648   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30649   if test "x$has_forbidden_chars" != x; then
30650     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30651     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30652     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30653     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30654       # Going to short mode and back again did indeed matter. Since short mode is
30655       # case insensitive, let's make it lowercase to improve readability.
30656       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30657       # Now convert it back to Unix-style (cygpath)
30658       input_path=`$CYGPATH -u "$shortmode_path"`
30659       new_path="$input_path"
30660     fi
30661   fi
30662 
30663   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30664   if test "x$test_cygdrive_prefix" = x; then
30665     # As a simple fix, exclude /usr/bin since it's not a real path.
30666     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30667       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30668       # a path prefixed by /cygdrive for fixpath to work.
30669       new_path="$CYGWIN_ROOT_PATH$input_path"
30670     fi
30671   fi
30672 
30673 
30674   if test "x$path" != "x$new_path"; then
30675     libpath="$new_path"
30676     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
30677 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
30678   fi
30679 
30680     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30681 
30682   path="$libpath"
30683   has_colon=`$ECHO $path | $GREP ^.:`
30684   new_path="$path"
30685   if test "x$has_colon" = x; then
30686     # Not in mixed or Windows style, start by that.
30687     new_path=`cmd //c echo $path`
30688   fi
30689 
30690 
30691   input_path="$new_path"
30692   # Check if we need to convert this using DOS-style short mode. If the path
30693   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30694   # take no chances and rewrite it.
30695   # Note: m4 eats our [], so we need to use [ and ] instead.
30696   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30697   if test "x$has_forbidden_chars" != x; then
30698     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30699     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30700   fi
30701 
30702 
30703   windows_path="$new_path"
30704   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30705     unix_path=`$CYGPATH -u "$windows_path"`
30706     new_path="$unix_path"
30707   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30708     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30709     new_path="$unix_path"
30710   fi
30711 
30712   if test "x$path" != "x$new_path"; then
30713     libpath="$new_path"
30714     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
30715 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
30716   fi
30717 
30718   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30719   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30720 
30721     else
30722       # We're on a unix platform. Hooray! :)
30723       path="$libpath"
30724       has_space=`$ECHO "$path" | $GREP " "`
30725       if test "x$has_space" != x; then
30726         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
30727 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
30728         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30729       fi
30730 
30731       # Use eval to expand a potential ~
30732       eval path="$path"
30733       if test ! -f "$path" && test ! -d "$path"; then
30734         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
30735       fi
30736 
30737       libpath="`cd "$path"; $THEPWDCMD -L`"
30738     fi
30739   fi
30740 
30741             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
30742           fi
30743           IFS=";"
30744         fi
30745       done
30746       IFS="$OLDIFS"
30747     fi
30748   else
30749     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30750 $as_echo "not found" >&6; }
30751 
30752     if test "x$VS_ENV_CMD" = x; then
30753       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
30754 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
30755       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
30756 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
30757     else
30758       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
30759 $as_echo "$as_me: Running the extraction script failed." >&6;}
30760     fi
30761     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30762 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30763     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30764 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30765     as_fn_error $? "Cannot continue" "$LINENO" 5
30766   fi
30767 
30768     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
30769     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
30770     PATH="$VS_PATH"
30771     # The microsoft toolchain also requires INCLUDE and LIB to be set.
30772     export INCLUDE="$VS_INCLUDE"
30773     export LIB="$VS_LIB"
30774   fi
30775 
30776   # For solaris we really need solaris tools, and not the GNU equivalent.
30777   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
30778   # so add that to path before starting to probe.
30779   # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
30780   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
30781     PATH="/usr/ccs/bin:$PATH"
30782   fi
30783 
30784   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
30785   # override all other locations.
30786   if test "x$TOOLCHAIN_PATH" != x; then
30787     PATH=$TOOLCHAIN_PATH:$PATH
30788   fi
30789 
30790 
30791   #
30792   # Setup the compilers (CC and CXX)
30793   #
30794 
30795   COMPILER_NAME=C
30796   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
30797 
30798   if test "x$CC" != x; then
30799     # User has supplied compiler name already, always let that override.
30800     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
30801 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
30802     if test "x`basename $CC`" = "x$CC"; then
30803       # A command without a complete path is provided, search $PATH.
30804 
30805       for ac_prog in $CC
30806 do
30807   # Extract the first word of "$ac_prog", so it can be a program name with args.
30808 set dummy $ac_prog; ac_word=$2
30809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30810 $as_echo_n "checking for $ac_word... " >&6; }
30811 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
30812   $as_echo_n "(cached) " >&6
30813 else
30814   case $POTENTIAL_CC in
30815   [\\/]* | ?:[\\/]*)
30816   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
30817   ;;
30818   *)
30819   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30820 for as_dir in $PATH
30821 do
30822   IFS=$as_save_IFS
30823   test -z "$as_dir" && as_dir=.
30824     for ac_exec_ext in '' $ac_executable_extensions; do
30825   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30826     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
30827     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30828     break 2
30829   fi
30830 done
30831   done
30832 IFS=$as_save_IFS
30833 
30834   ;;
30835 esac
30836 fi
30837 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
30838 if test -n "$POTENTIAL_CC"; then
30839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
30840 $as_echo "$POTENTIAL_CC" >&6; }
30841 else
30842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30843 $as_echo "no" >&6; }
30844 fi
30845 
30846 
30847   test -n "$POTENTIAL_CC" && break
30848 done
30849 
30850       if test "x$POTENTIAL_CC" != x; then
30851         CC=$POTENTIAL_CC
30852       else
30853         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
30854       fi
30855     else
30856       # Otherwise it might already be a complete path
30857       if test ! -x "$CC"; then
30858         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
30859       fi
30860     fi
30861   else
30862     # No user supplied value. Locate compiler ourselves.
30863 
30864     # If we are cross compiling, assume cross compilation tools follows the
30865     # cross compilation standard where they are prefixed with the autoconf
30866     # standard name for the target. For example the binary
30867     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30868     # If we are not cross compiling, then the default compiler name will be
30869     # used.
30870 
30871     CC=
30872     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30873     # before checking the rest of the PATH.
30874     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30875     # step, this should not be necessary.
30876     if test -n "$TOOLCHAIN_PATH"; then
30877       PATH_save="$PATH"
30878       PATH="$TOOLCHAIN_PATH"
30879       for ac_prog in $SEARCH_LIST
30880 do
30881   # Extract the first word of "$ac_prog", so it can be a program name with args.
30882 set dummy $ac_prog; ac_word=$2
30883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30884 $as_echo_n "checking for $ac_word... " >&6; }
30885 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
30886   $as_echo_n "(cached) " >&6
30887 else
30888   case $TOOLCHAIN_PATH_CC in
30889   [\\/]* | ?:[\\/]*)
30890   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
30891   ;;
30892   *)
30893   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30894 for as_dir in $PATH
30895 do
30896   IFS=$as_save_IFS
30897   test -z "$as_dir" && as_dir=.
30898     for ac_exec_ext in '' $ac_executable_extensions; do
30899   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30900     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
30901     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30902     break 2
30903   fi
30904 done
30905   done
30906 IFS=$as_save_IFS
30907 
30908   ;;
30909 esac
30910 fi
30911 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
30912 if test -n "$TOOLCHAIN_PATH_CC"; then
30913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
30914 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
30915 else
30916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30917 $as_echo "no" >&6; }
30918 fi
30919 
30920 
30921   test -n "$TOOLCHAIN_PATH_CC" && break
30922 done
30923 
30924       CC=$TOOLCHAIN_PATH_CC
30925       PATH="$PATH_save"
30926     fi
30927 
30928     # AC_PATH_PROGS can't be run multiple times with the same variable,
30929     # so create a new name for this run.
30930     if test "x$CC" = x; then
30931       for ac_prog in $SEARCH_LIST
30932 do
30933   # Extract the first word of "$ac_prog", so it can be a program name with args.
30934 set dummy $ac_prog; ac_word=$2
30935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30936 $as_echo_n "checking for $ac_word... " >&6; }
30937 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
30938   $as_echo_n "(cached) " >&6
30939 else
30940   case $POTENTIAL_CC in
30941   [\\/]* | ?:[\\/]*)
30942   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
30943   ;;
30944   *)
30945   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30946 for as_dir in $PATH
30947 do
30948   IFS=$as_save_IFS
30949   test -z "$as_dir" && as_dir=.
30950     for ac_exec_ext in '' $ac_executable_extensions; do
30951   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30952     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
30953     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30954     break 2
30955   fi
30956 done
30957   done
30958 IFS=$as_save_IFS
30959 
30960   ;;
30961 esac
30962 fi
30963 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
30964 if test -n "$POTENTIAL_CC"; then
30965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
30966 $as_echo "$POTENTIAL_CC" >&6; }
30967 else
30968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30969 $as_echo "no" >&6; }
30970 fi
30971 
30972 
30973   test -n "$POTENTIAL_CC" && break
30974 done
30975 
30976       CC=$POTENTIAL_CC
30977     fi
30978 
30979     if test "x$CC" = x; then
30980 
30981   # Print a helpful message on how to acquire the necessary build dependency.
30982   # devkit is the help tag: freetype, cups, alsa etc
30983   MISSING_DEPENDENCY=devkit
30984 
30985   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30986     cygwin_help $MISSING_DEPENDENCY
30987   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30988     msys_help $MISSING_DEPENDENCY
30989   else
30990     PKGHANDLER_COMMAND=
30991 
30992     case $PKGHANDLER in
30993       apt-get)
30994         apt_help     $MISSING_DEPENDENCY ;;
30995       yum)
30996         yum_help     $MISSING_DEPENDENCY ;;
30997       port)
30998         port_help    $MISSING_DEPENDENCY ;;
30999       pkgutil)
31000         pkgutil_help $MISSING_DEPENDENCY ;;
31001       pkgadd)
31002         pkgadd_help  $MISSING_DEPENDENCY ;;
31003     esac
31004 
31005     if test "x$PKGHANDLER_COMMAND" != x; then
31006       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31007     fi
31008   fi
31009 
31010       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31011     fi
31012   fi
31013 
31014   # Now we have a compiler binary in CC. Make sure it's okay.
31015 
31016   # Only process if variable expands to non-empty
31017 
31018   if test "x$CC" != x; then
31019     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31020 
31021   # First separate the path from the arguments. This will split at the first
31022   # space.
31023   complete="$CC"
31024   path="${complete%% *}"
31025   tmp="$complete EOL"
31026   arguments="${tmp#* }"
31027 
31028   # Input might be given as Windows format, start by converting to
31029   # unix format.
31030   new_path=`$CYGPATH -u "$path"`
31031 
31032   # Now try to locate executable using which
31033   new_path=`$WHICH "$new_path" 2> /dev/null`
31034   # bat and cmd files are not always considered executable in cygwin causing which
31035   # to not find them
31036   if test "x$new_path" = x \
31037       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31038       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31039     new_path=`$CYGPATH -u "$path"`
31040   fi
31041   if test "x$new_path" = x; then
31042     # Oops. Which didn't find the executable.
31043     # The splitting of arguments from the executable at a space might have been incorrect,
31044     # since paths with space are more likely in Windows. Give it another try with the whole
31045     # argument.
31046     path="$complete"
31047     arguments="EOL"
31048     new_path=`$CYGPATH -u "$path"`
31049     new_path=`$WHICH "$new_path" 2> /dev/null`
31050     # bat and cmd files are not always considered executable in cygwin causing which
31051     # to not find them
31052     if test "x$new_path" = x \
31053         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31054         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31055       new_path=`$CYGPATH -u "$path"`
31056     fi
31057     if test "x$new_path" = x; then
31058       # It's still not found. Now this is an unrecoverable error.
31059       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31060 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31061       has_space=`$ECHO "$complete" | $GREP " "`
31062       if test "x$has_space" != x; then
31063         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31064 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31065       fi
31066       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31067     fi
31068   fi
31069 
31070   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31071   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31072   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31073   # "foo.exe" is OK but "foo" is an error.
31074   #
31075   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31076   # It is also a way to make sure we got the proper file name for the real test later on.
31077   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31078   if test "x$test_shortpath" = x; then
31079     # Short path failed, file does not exist as specified.
31080     # Try adding .exe or .cmd
31081     if test -f "${new_path}.exe"; then
31082       input_to_shortpath="${new_path}.exe"
31083     elif test -f "${new_path}.cmd"; then
31084       input_to_shortpath="${new_path}.cmd"
31085     else
31086       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31087 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31088       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31089 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31090       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31091     fi
31092   else
31093     input_to_shortpath="$new_path"
31094   fi
31095 
31096   # Call helper function which possibly converts this using DOS-style short mode.
31097   # If so, the updated path is stored in $new_path.
31098   new_path="$input_to_shortpath"
31099 
31100   input_path="$input_to_shortpath"
31101   # Check if we need to convert this using DOS-style short mode. If the path
31102   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31103   # take no chances and rewrite it.
31104   # Note: m4 eats our [], so we need to use [ and ] instead.
31105   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31106   if test "x$has_forbidden_chars" != x; then
31107     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31108     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31109     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31110     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31111       # Going to short mode and back again did indeed matter. Since short mode is
31112       # case insensitive, let's make it lowercase to improve readability.
31113       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31114       # Now convert it back to Unix-style (cygpath)
31115       input_path=`$CYGPATH -u "$shortmode_path"`
31116       new_path="$input_path"
31117     fi
31118   fi
31119 
31120   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31121   if test "x$test_cygdrive_prefix" = x; then
31122     # As a simple fix, exclude /usr/bin since it's not a real path.
31123     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31124       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31125       # a path prefixed by /cygdrive for fixpath to work.
31126       new_path="$CYGWIN_ROOT_PATH$input_path"
31127     fi
31128   fi
31129 
31130   # remove trailing .exe if any
31131   new_path="${new_path/%.exe/}"
31132 
31133     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31134 
31135   # First separate the path from the arguments. This will split at the first
31136   # space.
31137   complete="$CC"
31138   path="${complete%% *}"
31139   tmp="$complete EOL"
31140   arguments="${tmp#* }"
31141 
31142   # Input might be given as Windows format, start by converting to
31143   # unix format.
31144   new_path="$path"
31145 
31146   windows_path="$new_path"
31147   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31148     unix_path=`$CYGPATH -u "$windows_path"`
31149     new_path="$unix_path"
31150   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31151     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31152     new_path="$unix_path"
31153   fi
31154 
31155 
31156   # Now try to locate executable using which
31157   new_path=`$WHICH "$new_path" 2> /dev/null`
31158 
31159   if test "x$new_path" = x; then
31160     # Oops. Which didn't find the executable.
31161     # The splitting of arguments from the executable at a space might have been incorrect,
31162     # since paths with space are more likely in Windows. Give it another try with the whole
31163     # argument.
31164     path="$complete"
31165     arguments="EOL"
31166     new_path="$path"
31167 
31168   windows_path="$new_path"
31169   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31170     unix_path=`$CYGPATH -u "$windows_path"`
31171     new_path="$unix_path"
31172   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31173     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31174     new_path="$unix_path"
31175   fi
31176 
31177 
31178     new_path=`$WHICH "$new_path" 2> /dev/null`
31179     # bat and cmd files are not always considered executable in MSYS causing which
31180     # to not find them
31181     if test "x$new_path" = x \
31182         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31183         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31184       new_path="$path"
31185 
31186   windows_path="$new_path"
31187   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31188     unix_path=`$CYGPATH -u "$windows_path"`
31189     new_path="$unix_path"
31190   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31191     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31192     new_path="$unix_path"
31193   fi
31194 
31195     fi
31196 
31197     if test "x$new_path" = x; then
31198       # It's still not found. Now this is an unrecoverable error.
31199       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31200 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31201       has_space=`$ECHO "$complete" | $GREP " "`
31202       if test "x$has_space" != x; then
31203         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31204 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31205       fi
31206       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31207     fi
31208   fi
31209 
31210   # Now new_path has a complete unix path to the binary
31211   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31212     # Keep paths in /bin as-is, but remove trailing .exe if any
31213     new_path="${new_path/%.exe/}"
31214     # Do not save /bin paths to all_fixpath_prefixes!
31215   else
31216     # Not in mixed or Windows style, start by that.
31217     new_path=`cmd //c echo $new_path`
31218 
31219   input_path="$new_path"
31220   # Check if we need to convert this using DOS-style short mode. If the path
31221   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31222   # take no chances and rewrite it.
31223   # Note: m4 eats our [], so we need to use [ and ] instead.
31224   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31225   if test "x$has_forbidden_chars" != x; then
31226     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31227     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31228   fi
31229 
31230     # Output is in $new_path
31231 
31232   windows_path="$new_path"
31233   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31234     unix_path=`$CYGPATH -u "$windows_path"`
31235     new_path="$unix_path"
31236   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31237     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31238     new_path="$unix_path"
31239   fi
31240 
31241     # remove trailing .exe if any
31242     new_path="${new_path/%.exe/}"
31243 
31244     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31245     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31246   fi
31247 
31248     else
31249       # We're on a unix platform. Hooray! :)
31250       # First separate the path from the arguments. This will split at the first
31251       # space.
31252       complete="$CC"
31253       path="${complete%% *}"
31254       tmp="$complete EOL"
31255       arguments="${tmp#* }"
31256 
31257       # Cannot rely on the command "which" here since it doesn't always work.
31258       is_absolute_path=`$ECHO "$path" | $GREP ^/`
31259       if test -z "$is_absolute_path"; then
31260         # Path to executable is not absolute. Find it.
31261         IFS_save="$IFS"
31262         IFS=:
31263         for p in $PATH; do
31264           if test -f "$p/$path" && test -x "$p/$path"; then
31265             new_path="$p/$path"
31266             break
31267           fi
31268         done
31269         IFS="$IFS_save"
31270       else
31271         # This is an absolute path, we can use it without further modifications.
31272         new_path="$path"
31273       fi
31274 
31275       if test "x$new_path" = x; then
31276         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31277 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31278         has_space=`$ECHO "$complete" | $GREP " "`
31279         if test "x$has_space" != x; then
31280           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31281 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31282         fi
31283         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31284       fi
31285     fi
31286 
31287     # Now join together the path and the arguments once again
31288     if test "x$arguments" != xEOL; then
31289       new_complete="$new_path ${arguments% *}"
31290     else
31291       new_complete="$new_path"
31292     fi
31293 
31294     if test "x$complete" != "x$new_complete"; then
31295       CC="$new_complete"
31296       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
31297 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
31298     fi
31299   fi
31300 
31301   TEST_COMPILER="$CC"
31302   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31303   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31304   if test "x$OPENJDK_BUILD_OS" != xaix; then
31305     # FIXME: This test should not be needed anymore; we don't do that for any platform.
31306     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
31307 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
31308 
31309   if test "x$OPENJDK_BUILD_OS" != xwindows; then
31310     # Follow a chain of symbolic links. Use readlink
31311     # where it exists, else fall back to horribly
31312     # complicated shell code.
31313     if test "x$READLINK_TESTED" != yes; then
31314       # On MacOSX there is a readlink tool with a different
31315       # purpose than the GNU readlink tool. Check the found readlink.
31316       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31317       if test "x$ISGNU" = x; then
31318         # A readlink that we do not know how to use.
31319         # Are there other non-GNU readlinks out there?
31320         READLINK_TESTED=yes
31321         READLINK=
31322       fi
31323     fi
31324 
31325     if test "x$READLINK" != x; then
31326       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31327     else
31328       # Save the current directory for restoring afterwards
31329       STARTDIR=$PWD
31330       COUNTER=0
31331       sym_link_dir=`$DIRNAME $TEST_COMPILER`
31332       sym_link_file=`$BASENAME $TEST_COMPILER`
31333       cd $sym_link_dir
31334       # Use -P flag to resolve symlinks in directories.
31335       cd `$THEPWDCMD -P`
31336       sym_link_dir=`$THEPWDCMD -P`
31337       # Resolve file symlinks
31338       while test $COUNTER -lt 20; do
31339         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31340         if test "x$ISLINK" == x; then
31341           # This is not a symbolic link! We are done!
31342           break
31343         fi
31344         # Again resolve directory symlinks since the target of the just found
31345         # link could be in a different directory
31346         cd `$DIRNAME $ISLINK`
31347         sym_link_dir=`$THEPWDCMD -P`
31348         sym_link_file=`$BASENAME $ISLINK`
31349         let COUNTER=COUNTER+1
31350       done
31351       cd $STARTDIR
31352       TEST_COMPILER=$sym_link_dir/$sym_link_file
31353     fi
31354   fi
31355 
31356     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31357 $as_echo "$TEST_COMPILER" >&6; }
31358   fi
31359   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
31360 $as_echo_n "checking if CC is disguised ccache... " >&6; }
31361 
31362   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31363   if test "x$COMPILER_BASENAME" = "xccache"; then
31364     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31365 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31366     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31367     # We want to control ccache invocation ourselves, so ignore this cc and try
31368     # searching again.
31369 
31370     # Remove the path to the fake ccache cc from the PATH
31371     RETRY_COMPILER_SAVED_PATH="$PATH"
31372     COMPILER_DIRNAME=`$DIRNAME $CC`
31373     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31374 
31375     # Try again looking for our compiler
31376     if test -n "$ac_tool_prefix"; then
31377   for ac_prog in $TOOLCHAIN_CC_BINARY
31378   do
31379     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31380 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31382 $as_echo_n "checking for $ac_word... " >&6; }
31383 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
31384   $as_echo_n "(cached) " >&6
31385 else
31386   if test -n "$PROPER_COMPILER_CC"; then
31387   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
31388 else
31389 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31390 for as_dir in $PATH
31391 do
31392   IFS=$as_save_IFS
31393   test -z "$as_dir" && as_dir=.
31394     for ac_exec_ext in '' $ac_executable_extensions; do
31395   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31396     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
31397     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31398     break 2
31399   fi
31400 done
31401   done
31402 IFS=$as_save_IFS
31403 
31404 fi
31405 fi
31406 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
31407 if test -n "$PROPER_COMPILER_CC"; then
31408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31409 $as_echo "$PROPER_COMPILER_CC" >&6; }
31410 else
31411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31412 $as_echo "no" >&6; }
31413 fi
31414 
31415 
31416     test -n "$PROPER_COMPILER_CC" && break
31417   done
31418 fi
31419 if test -z "$PROPER_COMPILER_CC"; then
31420   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
31421   for ac_prog in $TOOLCHAIN_CC_BINARY
31422 do
31423   # Extract the first word of "$ac_prog", so it can be a program name with args.
31424 set dummy $ac_prog; ac_word=$2
31425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31426 $as_echo_n "checking for $ac_word... " >&6; }
31427 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
31428   $as_echo_n "(cached) " >&6
31429 else
31430   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31431   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
31432 else
31433 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31434 for as_dir in $PATH
31435 do
31436   IFS=$as_save_IFS
31437   test -z "$as_dir" && as_dir=.
31438     for ac_exec_ext in '' $ac_executable_extensions; do
31439   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31440     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
31441     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31442     break 2
31443   fi
31444 done
31445   done
31446 IFS=$as_save_IFS
31447 
31448 fi
31449 fi
31450 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
31451 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
31453 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
31454 else
31455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31456 $as_echo "no" >&6; }
31457 fi
31458 
31459 
31460   test -n "$ac_ct_PROPER_COMPILER_CC" && break
31461 done
31462 
31463   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
31464     PROPER_COMPILER_CC=""
31465   else
31466     case $cross_compiling:$ac_tool_warned in
31467 yes:)
31468 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31469 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31470 ac_tool_warned=yes ;;
31471 esac
31472     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
31473   fi
31474 fi
31475 
31476 
31477   # Only process if variable expands to non-empty
31478 
31479   if test "x$PROPER_COMPILER_CC" != x; then
31480     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31481 
31482   # First separate the path from the arguments. This will split at the first
31483   # space.
31484   complete="$PROPER_COMPILER_CC"
31485   path="${complete%% *}"
31486   tmp="$complete EOL"
31487   arguments="${tmp#* }"
31488 
31489   # Input might be given as Windows format, start by converting to
31490   # unix format.
31491   new_path=`$CYGPATH -u "$path"`
31492 
31493   # Now try to locate executable using which
31494   new_path=`$WHICH "$new_path" 2> /dev/null`
31495   # bat and cmd files are not always considered executable in cygwin causing which
31496   # to not find them
31497   if test "x$new_path" = x \
31498       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31499       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31500     new_path=`$CYGPATH -u "$path"`
31501   fi
31502   if test "x$new_path" = x; then
31503     # Oops. Which didn't find the executable.
31504     # The splitting of arguments from the executable at a space might have been incorrect,
31505     # since paths with space are more likely in Windows. Give it another try with the whole
31506     # argument.
31507     path="$complete"
31508     arguments="EOL"
31509     new_path=`$CYGPATH -u "$path"`
31510     new_path=`$WHICH "$new_path" 2> /dev/null`
31511     # bat and cmd files are not always considered executable in cygwin causing which
31512     # to not find them
31513     if test "x$new_path" = x \
31514         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31515         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31516       new_path=`$CYGPATH -u "$path"`
31517     fi
31518     if test "x$new_path" = x; then
31519       # It's still not found. Now this is an unrecoverable error.
31520       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31521 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31522       has_space=`$ECHO "$complete" | $GREP " "`
31523       if test "x$has_space" != x; then
31524         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31525 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31526       fi
31527       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31528     fi
31529   fi
31530 
31531   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31532   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31533   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31534   # "foo.exe" is OK but "foo" is an error.
31535   #
31536   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31537   # It is also a way to make sure we got the proper file name for the real test later on.
31538   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31539   if test "x$test_shortpath" = x; then
31540     # Short path failed, file does not exist as specified.
31541     # Try adding .exe or .cmd
31542     if test -f "${new_path}.exe"; then
31543       input_to_shortpath="${new_path}.exe"
31544     elif test -f "${new_path}.cmd"; then
31545       input_to_shortpath="${new_path}.cmd"
31546     else
31547       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
31548 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
31549       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31550 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31551       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31552     fi
31553   else
31554     input_to_shortpath="$new_path"
31555   fi
31556 
31557   # Call helper function which possibly converts this using DOS-style short mode.
31558   # If so, the updated path is stored in $new_path.
31559   new_path="$input_to_shortpath"
31560 
31561   input_path="$input_to_shortpath"
31562   # Check if we need to convert this using DOS-style short mode. If the path
31563   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31564   # take no chances and rewrite it.
31565   # Note: m4 eats our [], so we need to use [ and ] instead.
31566   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31567   if test "x$has_forbidden_chars" != x; then
31568     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31569     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31570     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31571     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31572       # Going to short mode and back again did indeed matter. Since short mode is
31573       # case insensitive, let's make it lowercase to improve readability.
31574       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31575       # Now convert it back to Unix-style (cygpath)
31576       input_path=`$CYGPATH -u "$shortmode_path"`
31577       new_path="$input_path"
31578     fi
31579   fi
31580 
31581   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31582   if test "x$test_cygdrive_prefix" = x; then
31583     # As a simple fix, exclude /usr/bin since it's not a real path.
31584     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31585       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31586       # a path prefixed by /cygdrive for fixpath to work.
31587       new_path="$CYGWIN_ROOT_PATH$input_path"
31588     fi
31589   fi
31590 
31591   # remove trailing .exe if any
31592   new_path="${new_path/%.exe/}"
31593 
31594     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31595 
31596   # First separate the path from the arguments. This will split at the first
31597   # space.
31598   complete="$PROPER_COMPILER_CC"
31599   path="${complete%% *}"
31600   tmp="$complete EOL"
31601   arguments="${tmp#* }"
31602 
31603   # Input might be given as Windows format, start by converting to
31604   # unix format.
31605   new_path="$path"
31606 
31607   windows_path="$new_path"
31608   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31609     unix_path=`$CYGPATH -u "$windows_path"`
31610     new_path="$unix_path"
31611   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31612     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31613     new_path="$unix_path"
31614   fi
31615 
31616 
31617   # Now try to locate executable using which
31618   new_path=`$WHICH "$new_path" 2> /dev/null`
31619 
31620   if test "x$new_path" = x; then
31621     # Oops. Which didn't find the executable.
31622     # The splitting of arguments from the executable at a space might have been incorrect,
31623     # since paths with space are more likely in Windows. Give it another try with the whole
31624     # argument.
31625     path="$complete"
31626     arguments="EOL"
31627     new_path="$path"
31628 
31629   windows_path="$new_path"
31630   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31631     unix_path=`$CYGPATH -u "$windows_path"`
31632     new_path="$unix_path"
31633   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31634     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31635     new_path="$unix_path"
31636   fi
31637 
31638 
31639     new_path=`$WHICH "$new_path" 2> /dev/null`
31640     # bat and cmd files are not always considered executable in MSYS causing which
31641     # to not find them
31642     if test "x$new_path" = x \
31643         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31644         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31645       new_path="$path"
31646 
31647   windows_path="$new_path"
31648   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31649     unix_path=`$CYGPATH -u "$windows_path"`
31650     new_path="$unix_path"
31651   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31652     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31653     new_path="$unix_path"
31654   fi
31655 
31656     fi
31657 
31658     if test "x$new_path" = x; then
31659       # It's still not found. Now this is an unrecoverable error.
31660       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31661 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31662       has_space=`$ECHO "$complete" | $GREP " "`
31663       if test "x$has_space" != x; then
31664         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31665 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31666       fi
31667       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31668     fi
31669   fi
31670 
31671   # Now new_path has a complete unix path to the binary
31672   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31673     # Keep paths in /bin as-is, but remove trailing .exe if any
31674     new_path="${new_path/%.exe/}"
31675     # Do not save /bin paths to all_fixpath_prefixes!
31676   else
31677     # Not in mixed or Windows style, start by that.
31678     new_path=`cmd //c echo $new_path`
31679 
31680   input_path="$new_path"
31681   # Check if we need to convert this using DOS-style short mode. If the path
31682   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31683   # take no chances and rewrite it.
31684   # Note: m4 eats our [], so we need to use [ and ] instead.
31685   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31686   if test "x$has_forbidden_chars" != x; then
31687     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31688     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31689   fi
31690 
31691     # Output is in $new_path
31692 
31693   windows_path="$new_path"
31694   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31695     unix_path=`$CYGPATH -u "$windows_path"`
31696     new_path="$unix_path"
31697   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31698     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31699     new_path="$unix_path"
31700   fi
31701 
31702     # remove trailing .exe if any
31703     new_path="${new_path/%.exe/}"
31704 
31705     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31706     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31707   fi
31708 
31709     else
31710       # We're on a unix platform. Hooray! :)
31711       # First separate the path from the arguments. This will split at the first
31712       # space.
31713       complete="$PROPER_COMPILER_CC"
31714       path="${complete%% *}"
31715       tmp="$complete EOL"
31716       arguments="${tmp#* }"
31717 
31718       # Cannot rely on the command "which" here since it doesn't always work.
31719       is_absolute_path=`$ECHO "$path" | $GREP ^/`
31720       if test -z "$is_absolute_path"; then
31721         # Path to executable is not absolute. Find it.
31722         IFS_save="$IFS"
31723         IFS=:
31724         for p in $PATH; do
31725           if test -f "$p/$path" && test -x "$p/$path"; then
31726             new_path="$p/$path"
31727             break
31728           fi
31729         done
31730         IFS="$IFS_save"
31731       else
31732         # This is an absolute path, we can use it without further modifications.
31733         new_path="$path"
31734       fi
31735 
31736       if test "x$new_path" = x; then
31737         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31738 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31739         has_space=`$ECHO "$complete" | $GREP " "`
31740         if test "x$has_space" != x; then
31741           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31742 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31743         fi
31744         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31745       fi
31746     fi
31747 
31748     # Now join together the path and the arguments once again
31749     if test "x$arguments" != xEOL; then
31750       new_complete="$new_path ${arguments% *}"
31751     else
31752       new_complete="$new_path"
31753     fi
31754 
31755     if test "x$complete" != "x$new_complete"; then
31756       PROPER_COMPILER_CC="$new_complete"
31757       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
31758 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
31759     fi
31760   fi
31761 
31762     PATH="$RETRY_COMPILER_SAVED_PATH"
31763 
31764     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
31765 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
31766 
31767   if test "x$OPENJDK_BUILD_OS" != xwindows; then
31768     # Follow a chain of symbolic links. Use readlink
31769     # where it exists, else fall back to horribly
31770     # complicated shell code.
31771     if test "x$READLINK_TESTED" != yes; then
31772       # On MacOSX there is a readlink tool with a different
31773       # purpose than the GNU readlink tool. Check the found readlink.
31774       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31775       if test "x$ISGNU" = x; then
31776         # A readlink that we do not know how to use.
31777         # Are there other non-GNU readlinks out there?
31778         READLINK_TESTED=yes
31779         READLINK=
31780       fi
31781     fi
31782 
31783     if test "x$READLINK" != x; then
31784       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
31785     else
31786       # Save the current directory for restoring afterwards
31787       STARTDIR=$PWD
31788       COUNTER=0
31789       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
31790       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
31791       cd $sym_link_dir
31792       # Use -P flag to resolve symlinks in directories.
31793       cd `$THEPWDCMD -P`
31794       sym_link_dir=`$THEPWDCMD -P`
31795       # Resolve file symlinks
31796       while test $COUNTER -lt 20; do
31797         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31798         if test "x$ISLINK" == x; then
31799           # This is not a symbolic link! We are done!
31800           break
31801         fi
31802         # Again resolve directory symlinks since the target of the just found
31803         # link could be in a different directory
31804         cd `$DIRNAME $ISLINK`
31805         sym_link_dir=`$THEPWDCMD -P`
31806         sym_link_file=`$BASENAME $ISLINK`
31807         let COUNTER=COUNTER+1
31808       done
31809       cd $STARTDIR
31810       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
31811     fi
31812   fi
31813 
31814     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31815 $as_echo "$PROPER_COMPILER_CC" >&6; }
31816     CC="$PROPER_COMPILER_CC"
31817   else
31818     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
31819 $as_echo "no, keeping CC" >&6; }
31820   fi
31821 
31822 
31823   COMPILER=$CC
31824   COMPILER_NAME=$COMPILER_NAME
31825 
31826   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31827     # cc -V output typically looks like
31828     #     cc: Sun C 5.12 Linux_i386 2011/11/16
31829     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31830     # Check that this is likely to be the Solaris Studio cc.
31831     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31832     if test $? -ne 0; then
31833       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31834       { $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
31835 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31836       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31837 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31838       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31839 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31840       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31841     fi
31842     # Remove usage instructions (if present), and
31843     # collapse compiler output into a single line
31844     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31845         $SED -e 's/ *[Uu]sage:.*//'`
31846     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31847         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31848   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31849     # xlc -qversion output typically looks like
31850     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31851     #     Version: 11.01.0000.0015
31852     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31853     # Check that this is likely to be the IBM XL C compiler.
31854     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31855     if test $? -ne 0; then
31856       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31857       { $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
31858 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31859       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31860 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31861       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31862 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31863       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31864     fi
31865     # Collapse compiler output into a single line
31866     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31867     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31868         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31869   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31870     # There is no specific version flag, but all output starts with a version string.
31871     # First line typically looks something like:
31872     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31873     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31874     # Check that this is likely to be Microsoft CL.EXE.
31875     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31876     if test $? -ne 0; then
31877       { $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
31878 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31879       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31880 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31881       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31882     fi
31883     # Collapse compiler output into a single line
31884     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31885     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31886         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31887   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31888     # gcc --version output typically looks like
31889     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31890     #     Copyright (C) 2013 Free Software Foundation, Inc.
31891     #     This is free software; see the source for copying conditions.  There is NO
31892     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31893     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31894     # Check that this is likely to be GCC.
31895     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31896     if test $? -ne 0; then
31897       { $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
31898 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31899       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31900 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31901       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31902     fi
31903     # Remove Copyright and legalese from version string, and
31904     # collapse into a single line
31905     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31906         $SED -e 's/ *Copyright .*//'`
31907     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31908         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31909   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
31910     # clang --version output typically looks like
31911     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31912     #    clang version 3.3 (tags/RELEASE_33/final)
31913     # or
31914     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31915     #    Target: x86_64-pc-linux-gnu
31916     #    Thread model: posix
31917     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31918     # Check that this is likely to be clang
31919     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31920     if test $? -ne 0; then
31921       { $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
31922 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31923       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31924 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31925       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31926     fi
31927     # Collapse compiler output into a single line
31928     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31929     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31930         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31931   else
31932       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31933   fi
31934   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31935   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31936   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31937   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
31938 
31939   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31940 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31941 
31942 
31943   # Now that we have resolved CC ourself, let autoconf have its go at it
31944   ac_ext=c
31945 ac_cpp='$CPP $CPPFLAGS'
31946 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31947 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31948 ac_compiler_gnu=$ac_cv_c_compiler_gnu
31949 if test -n "$ac_tool_prefix"; then
31950   for ac_prog in $CC
31951   do
31952     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31953 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31955 $as_echo_n "checking for $ac_word... " >&6; }
31956 if ${ac_cv_prog_CC+:} false; then :
31957   $as_echo_n "(cached) " >&6
31958 else
31959   if test -n "$CC"; then
31960   ac_cv_prog_CC="$CC" # Let the user override the test.
31961 else
31962 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31963 for as_dir in $PATH
31964 do
31965   IFS=$as_save_IFS
31966   test -z "$as_dir" && as_dir=.
31967     for ac_exec_ext in '' $ac_executable_extensions; do
31968   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31969     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
31970     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31971     break 2
31972   fi
31973 done
31974   done
31975 IFS=$as_save_IFS
31976 
31977 fi
31978 fi
31979 CC=$ac_cv_prog_CC
31980 if test -n "$CC"; then
31981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
31982 $as_echo "$CC" >&6; }
31983 else
31984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31985 $as_echo "no" >&6; }
31986 fi
31987 
31988 
31989     test -n "$CC" && break
31990   done
31991 fi
31992 if test -z "$CC"; then
31993   ac_ct_CC=$CC
31994   for ac_prog in $CC
31995 do
31996   # Extract the first word of "$ac_prog", so it can be a program name with args.
31997 set dummy $ac_prog; ac_word=$2
31998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31999 $as_echo_n "checking for $ac_word... " >&6; }
32000 if ${ac_cv_prog_ac_ct_CC+:} false; then :
32001   $as_echo_n "(cached) " >&6
32002 else
32003   if test -n "$ac_ct_CC"; then
32004   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32005 else
32006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32007 for as_dir in $PATH
32008 do
32009   IFS=$as_save_IFS
32010   test -z "$as_dir" && as_dir=.
32011     for ac_exec_ext in '' $ac_executable_extensions; do
32012   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32013     ac_cv_prog_ac_ct_CC="$ac_prog"
32014     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32015     break 2
32016   fi
32017 done
32018   done
32019 IFS=$as_save_IFS
32020 
32021 fi
32022 fi
32023 ac_ct_CC=$ac_cv_prog_ac_ct_CC
32024 if test -n "$ac_ct_CC"; then
32025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32026 $as_echo "$ac_ct_CC" >&6; }
32027 else
32028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32029 $as_echo "no" >&6; }
32030 fi
32031 
32032 
32033   test -n "$ac_ct_CC" && break
32034 done
32035 
32036   if test "x$ac_ct_CC" = x; then
32037     CC=""
32038   else
32039     case $cross_compiling:$ac_tool_warned in
32040 yes:)
32041 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32042 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32043 ac_tool_warned=yes ;;
32044 esac
32045     CC=$ac_ct_CC
32046   fi
32047 fi
32048 
32049 
32050 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32051 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32052 as_fn_error $? "no acceptable C compiler found in \$PATH
32053 See \`config.log' for more details" "$LINENO" 5; }
32054 
32055 # Provide some information about the compiler.
32056 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32057 set X $ac_compile
32058 ac_compiler=$2
32059 for ac_option in --version -v -V -qversion; do
32060   { { ac_try="$ac_compiler $ac_option >&5"
32061 case "(($ac_try" in
32062   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32063   *) ac_try_echo=$ac_try;;
32064 esac
32065 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32066 $as_echo "$ac_try_echo"; } >&5
32067   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32068   ac_status=$?
32069   if test -s conftest.err; then
32070     sed '10a\
32071 ... rest of stderr output deleted ...
32072          10q' conftest.err >conftest.er1
32073     cat conftest.er1 >&5
32074   fi
32075   rm -f conftest.er1 conftest.err
32076   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32077   test $ac_status = 0; }
32078 done
32079 
32080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32081 /* end confdefs.h.  */
32082 
32083 int
32084 main ()
32085 {
32086 
32087   ;
32088   return 0;
32089 }
32090 _ACEOF
32091 ac_clean_files_save=$ac_clean_files
32092 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32093 # Try to create an executable without -o first, disregard a.out.
32094 # It will help us diagnose broken compilers, and finding out an intuition
32095 # of exeext.
32096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32097 $as_echo_n "checking whether the C compiler works... " >&6; }
32098 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32099 
32100 # The possible output files:
32101 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32102 
32103 ac_rmfiles=
32104 for ac_file in $ac_files
32105 do
32106   case $ac_file in
32107     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32108     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32109   esac
32110 done
32111 rm -f $ac_rmfiles
32112 
32113 if { { ac_try="$ac_link_default"
32114 case "(($ac_try" in
32115   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32116   *) ac_try_echo=$ac_try;;
32117 esac
32118 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32119 $as_echo "$ac_try_echo"; } >&5
32120   (eval "$ac_link_default") 2>&5
32121   ac_status=$?
32122   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32123   test $ac_status = 0; }; then :
32124   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32125 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32126 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
32127 # so that the user can short-circuit this test for compilers unknown to
32128 # Autoconf.
32129 for ac_file in $ac_files ''
32130 do
32131   test -f "$ac_file" || continue
32132   case $ac_file in
32133     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32134         ;;
32135     [ab].out )
32136         # We found the default executable, but exeext='' is most
32137         # certainly right.
32138         break;;
32139     *.* )
32140         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32141         then :; else
32142            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32143         fi
32144         # We set ac_cv_exeext here because the later test for it is not
32145         # safe: cross compilers may not add the suffix if given an `-o'
32146         # argument, so we may need to know it at that point already.
32147         # Even if this section looks crufty: it has the advantage of
32148         # actually working.
32149         break;;
32150     * )
32151         break;;
32152   esac
32153 done
32154 test "$ac_cv_exeext" = no && ac_cv_exeext=
32155 
32156 else
32157   ac_file=''
32158 fi
32159 if test -z "$ac_file"; then :
32160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32161 $as_echo "no" >&6; }
32162 $as_echo "$as_me: failed program was:" >&5
32163 sed 's/^/| /' conftest.$ac_ext >&5
32164 
32165 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32166 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32167 as_fn_error 77 "C compiler cannot create executables
32168 See \`config.log' for more details" "$LINENO" 5; }
32169 else
32170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32171 $as_echo "yes" >&6; }
32172 fi
32173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32174 $as_echo_n "checking for C compiler default output file name... " >&6; }
32175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32176 $as_echo "$ac_file" >&6; }
32177 ac_exeext=$ac_cv_exeext
32178 
32179 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32180 ac_clean_files=$ac_clean_files_save
32181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32182 $as_echo_n "checking for suffix of executables... " >&6; }
32183 if { { ac_try="$ac_link"
32184 case "(($ac_try" in
32185   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32186   *) ac_try_echo=$ac_try;;
32187 esac
32188 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32189 $as_echo "$ac_try_echo"; } >&5
32190   (eval "$ac_link") 2>&5
32191   ac_status=$?
32192   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32193   test $ac_status = 0; }; then :
32194   # If both `conftest.exe' and `conftest' are `present' (well, observable)
32195 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32196 # work properly (i.e., refer to `conftest.exe'), while it won't with
32197 # `rm'.
32198 for ac_file in conftest.exe conftest conftest.*; do
32199   test -f "$ac_file" || continue
32200   case $ac_file in
32201     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32202     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32203           break;;
32204     * ) break;;
32205   esac
32206 done
32207 else
32208   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32209 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32210 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32211 See \`config.log' for more details" "$LINENO" 5; }
32212 fi
32213 rm -f conftest conftest$ac_cv_exeext
32214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32215 $as_echo "$ac_cv_exeext" >&6; }
32216 
32217 rm -f conftest.$ac_ext
32218 EXEEXT=$ac_cv_exeext
32219 ac_exeext=$EXEEXT
32220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32221 /* end confdefs.h.  */
32222 #include <stdio.h>
32223 int
32224 main ()
32225 {
32226 FILE *f = fopen ("conftest.out", "w");
32227  return ferror (f) || fclose (f) != 0;
32228 
32229   ;
32230   return 0;
32231 }
32232 _ACEOF
32233 ac_clean_files="$ac_clean_files conftest.out"
32234 # Check that the compiler produces executables we can run.  If not, either
32235 # the compiler is broken, or we cross compile.
32236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32237 $as_echo_n "checking whether we are cross compiling... " >&6; }
32238 if test "$cross_compiling" != yes; then
32239   { { ac_try="$ac_link"
32240 case "(($ac_try" in
32241   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32242   *) ac_try_echo=$ac_try;;
32243 esac
32244 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32245 $as_echo "$ac_try_echo"; } >&5
32246   (eval "$ac_link") 2>&5
32247   ac_status=$?
32248   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32249   test $ac_status = 0; }
32250   if { ac_try='./conftest$ac_cv_exeext'
32251   { { case "(($ac_try" in
32252   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32253   *) ac_try_echo=$ac_try;;
32254 esac
32255 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32256 $as_echo "$ac_try_echo"; } >&5
32257   (eval "$ac_try") 2>&5
32258   ac_status=$?
32259   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32260   test $ac_status = 0; }; }; then
32261     cross_compiling=no
32262   else
32263     if test "$cross_compiling" = maybe; then
32264         cross_compiling=yes
32265     else
32266         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32267 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32268 as_fn_error $? "cannot run C compiled programs.
32269 If you meant to cross compile, use \`--host'.
32270 See \`config.log' for more details" "$LINENO" 5; }
32271     fi
32272   fi
32273 fi
32274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32275 $as_echo "$cross_compiling" >&6; }
32276 
32277 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32278 ac_clean_files=$ac_clean_files_save
32279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32280 $as_echo_n "checking for suffix of object files... " >&6; }
32281 if ${ac_cv_objext+:} false; then :
32282   $as_echo_n "(cached) " >&6
32283 else
32284   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32285 /* end confdefs.h.  */
32286 
32287 int
32288 main ()
32289 {
32290 
32291   ;
32292   return 0;
32293 }
32294 _ACEOF
32295 rm -f conftest.o conftest.obj
32296 if { { ac_try="$ac_compile"
32297 case "(($ac_try" in
32298   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32299   *) ac_try_echo=$ac_try;;
32300 esac
32301 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32302 $as_echo "$ac_try_echo"; } >&5
32303   (eval "$ac_compile") 2>&5
32304   ac_status=$?
32305   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32306   test $ac_status = 0; }; then :
32307   for ac_file in conftest.o conftest.obj conftest.*; do
32308   test -f "$ac_file" || continue;
32309   case $ac_file in
32310     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32311     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32312        break;;
32313   esac
32314 done
32315 else
32316   $as_echo "$as_me: failed program was:" >&5
32317 sed 's/^/| /' conftest.$ac_ext >&5
32318 
32319 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32320 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32321 as_fn_error $? "cannot compute suffix of object files: cannot compile
32322 See \`config.log' for more details" "$LINENO" 5; }
32323 fi
32324 rm -f conftest.$ac_cv_objext conftest.$ac_ext
32325 fi
32326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32327 $as_echo "$ac_cv_objext" >&6; }
32328 OBJEXT=$ac_cv_objext
32329 ac_objext=$OBJEXT
32330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32331 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32332 if ${ac_cv_c_compiler_gnu+:} false; then :
32333   $as_echo_n "(cached) " >&6
32334 else
32335   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32336 /* end confdefs.h.  */
32337 
32338 int
32339 main ()
32340 {
32341 #ifndef __GNUC__
32342        choke me
32343 #endif
32344 
32345   ;
32346   return 0;
32347 }
32348 _ACEOF
32349 if ac_fn_c_try_compile "$LINENO"; then :
32350   ac_compiler_gnu=yes
32351 else
32352   ac_compiler_gnu=no
32353 fi
32354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32355 ac_cv_c_compiler_gnu=$ac_compiler_gnu
32356 
32357 fi
32358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
32359 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
32360 if test $ac_compiler_gnu = yes; then
32361   GCC=yes
32362 else
32363   GCC=
32364 fi
32365 ac_test_CFLAGS=${CFLAGS+set}
32366 ac_save_CFLAGS=$CFLAGS
32367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
32368 $as_echo_n "checking whether $CC accepts -g... " >&6; }
32369 if ${ac_cv_prog_cc_g+:} false; then :
32370   $as_echo_n "(cached) " >&6
32371 else
32372   ac_save_c_werror_flag=$ac_c_werror_flag
32373    ac_c_werror_flag=yes
32374    ac_cv_prog_cc_g=no
32375    CFLAGS="-g"
32376    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32377 /* end confdefs.h.  */
32378 
32379 int
32380 main ()
32381 {
32382 
32383   ;
32384   return 0;
32385 }
32386 _ACEOF
32387 if ac_fn_c_try_compile "$LINENO"; then :
32388   ac_cv_prog_cc_g=yes
32389 else
32390   CFLAGS=""
32391       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32392 /* end confdefs.h.  */
32393 
32394 int
32395 main ()
32396 {
32397 
32398   ;
32399   return 0;
32400 }
32401 _ACEOF
32402 if ac_fn_c_try_compile "$LINENO"; then :
32403 
32404 else
32405   ac_c_werror_flag=$ac_save_c_werror_flag
32406          CFLAGS="-g"
32407          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32408 /* end confdefs.h.  */
32409 
32410 int
32411 main ()
32412 {
32413 
32414   ;
32415   return 0;
32416 }
32417 _ACEOF
32418 if ac_fn_c_try_compile "$LINENO"; then :
32419   ac_cv_prog_cc_g=yes
32420 fi
32421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32422 fi
32423 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32424 fi
32425 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32426    ac_c_werror_flag=$ac_save_c_werror_flag
32427 fi
32428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
32429 $as_echo "$ac_cv_prog_cc_g" >&6; }
32430 if test "$ac_test_CFLAGS" = set; then
32431   CFLAGS=$ac_save_CFLAGS
32432 elif test $ac_cv_prog_cc_g = yes; then
32433   if test "$GCC" = yes; then
32434     CFLAGS="-g -O2"
32435   else
32436     CFLAGS="-g"
32437   fi
32438 else
32439   if test "$GCC" = yes; then
32440     CFLAGS="-O2"
32441   else
32442     CFLAGS=
32443   fi
32444 fi
32445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
32446 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
32447 if ${ac_cv_prog_cc_c89+:} false; then :
32448   $as_echo_n "(cached) " >&6
32449 else
32450   ac_cv_prog_cc_c89=no
32451 ac_save_CC=$CC
32452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32453 /* end confdefs.h.  */
32454 #include <stdarg.h>
32455 #include <stdio.h>
32456 struct stat;
32457 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
32458 struct buf { int x; };
32459 FILE * (*rcsopen) (struct buf *, struct stat *, int);
32460 static char *e (p, i)
32461      char **p;
32462      int i;
32463 {
32464   return p[i];
32465 }
32466 static char *f (char * (*g) (char **, int), char **p, ...)
32467 {
32468   char *s;
32469   va_list v;
32470   va_start (v,p);
32471   s = g (p, va_arg (v,int));
32472   va_end (v);
32473   return s;
32474 }
32475 
32476 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
32477    function prototypes and stuff, but not '\xHH' hex character constants.
32478    These don't provoke an error unfortunately, instead are silently treated
32479    as 'x'.  The following induces an error, until -std is added to get
32480    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
32481    array size at least.  It's necessary to write '\x00'==0 to get something
32482    that's true only with -std.  */
32483 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
32484 
32485 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
32486    inside strings and character constants.  */
32487 #define FOO(x) 'x'
32488 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
32489 
32490 int test (int i, double x);
32491 struct s1 {int (*f) (int a);};
32492 struct s2 {int (*f) (double a);};
32493 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
32494 int argc;
32495 char **argv;
32496 int
32497 main ()
32498 {
32499 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
32500   ;
32501   return 0;
32502 }
32503 _ACEOF
32504 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
32505         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
32506 do
32507   CC="$ac_save_CC $ac_arg"
32508   if ac_fn_c_try_compile "$LINENO"; then :
32509   ac_cv_prog_cc_c89=$ac_arg
32510 fi
32511 rm -f core conftest.err conftest.$ac_objext
32512   test "x$ac_cv_prog_cc_c89" != "xno" && break
32513 done
32514 rm -f conftest.$ac_ext
32515 CC=$ac_save_CC
32516 
32517 fi
32518 # AC_CACHE_VAL
32519 case "x$ac_cv_prog_cc_c89" in
32520   x)
32521     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
32522 $as_echo "none needed" >&6; } ;;
32523   xno)
32524     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
32525 $as_echo "unsupported" >&6; } ;;
32526   *)
32527     CC="$CC $ac_cv_prog_cc_c89"
32528     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
32529 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
32530 esac
32531 if test "x$ac_cv_prog_cc_c89" != xno; then :
32532 
32533 fi
32534 
32535 ac_ext=cpp
32536 ac_cpp='$CXXCPP $CPPFLAGS'
32537 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32538 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32539 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32540 
32541 
32542 
32543   COMPILER_NAME=C++
32544   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
32545 
32546   if test "x$CXX" != x; then
32547     # User has supplied compiler name already, always let that override.
32548     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
32549 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
32550     if test "x`basename $CXX`" = "x$CXX"; then
32551       # A command without a complete path is provided, search $PATH.
32552 
32553       for ac_prog in $CXX
32554 do
32555   # Extract the first word of "$ac_prog", so it can be a program name with args.
32556 set dummy $ac_prog; ac_word=$2
32557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32558 $as_echo_n "checking for $ac_word... " >&6; }
32559 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32560   $as_echo_n "(cached) " >&6
32561 else
32562   case $POTENTIAL_CXX in
32563   [\\/]* | ?:[\\/]*)
32564   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32565   ;;
32566   *)
32567   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32568 for as_dir in $PATH
32569 do
32570   IFS=$as_save_IFS
32571   test -z "$as_dir" && as_dir=.
32572     for ac_exec_ext in '' $ac_executable_extensions; do
32573   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32574     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32575     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32576     break 2
32577   fi
32578 done
32579   done
32580 IFS=$as_save_IFS
32581 
32582   ;;
32583 esac
32584 fi
32585 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32586 if test -n "$POTENTIAL_CXX"; then
32587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32588 $as_echo "$POTENTIAL_CXX" >&6; }
32589 else
32590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32591 $as_echo "no" >&6; }
32592 fi
32593 
32594 
32595   test -n "$POTENTIAL_CXX" && break
32596 done
32597 
32598       if test "x$POTENTIAL_CXX" != x; then
32599         CXX=$POTENTIAL_CXX
32600       else
32601         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
32602       fi
32603     else
32604       # Otherwise it might already be a complete path
32605       if test ! -x "$CXX"; then
32606         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
32607       fi
32608     fi
32609   else
32610     # No user supplied value. Locate compiler ourselves.
32611 
32612     # If we are cross compiling, assume cross compilation tools follows the
32613     # cross compilation standard where they are prefixed with the autoconf
32614     # standard name for the target. For example the binary
32615     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32616     # If we are not cross compiling, then the default compiler name will be
32617     # used.
32618 
32619     CXX=
32620     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32621     # before checking the rest of the PATH.
32622     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32623     # step, this should not be necessary.
32624     if test -n "$TOOLCHAIN_PATH"; then
32625       PATH_save="$PATH"
32626       PATH="$TOOLCHAIN_PATH"
32627       for ac_prog in $SEARCH_LIST
32628 do
32629   # Extract the first word of "$ac_prog", so it can be a program name with args.
32630 set dummy $ac_prog; ac_word=$2
32631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32632 $as_echo_n "checking for $ac_word... " >&6; }
32633 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
32634   $as_echo_n "(cached) " >&6
32635 else
32636   case $TOOLCHAIN_PATH_CXX in
32637   [\\/]* | ?:[\\/]*)
32638   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
32639   ;;
32640   *)
32641   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32642 for as_dir in $PATH
32643 do
32644   IFS=$as_save_IFS
32645   test -z "$as_dir" && as_dir=.
32646     for ac_exec_ext in '' $ac_executable_extensions; do
32647   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32648     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
32649     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32650     break 2
32651   fi
32652 done
32653   done
32654 IFS=$as_save_IFS
32655 
32656   ;;
32657 esac
32658 fi
32659 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
32660 if test -n "$TOOLCHAIN_PATH_CXX"; then
32661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
32662 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
32663 else
32664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32665 $as_echo "no" >&6; }
32666 fi
32667 
32668 
32669   test -n "$TOOLCHAIN_PATH_CXX" && break
32670 done
32671 
32672       CXX=$TOOLCHAIN_PATH_CXX
32673       PATH="$PATH_save"
32674     fi
32675 
32676     # AC_PATH_PROGS can't be run multiple times with the same variable,
32677     # so create a new name for this run.
32678     if test "x$CXX" = x; then
32679       for ac_prog in $SEARCH_LIST
32680 do
32681   # Extract the first word of "$ac_prog", so it can be a program name with args.
32682 set dummy $ac_prog; ac_word=$2
32683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32684 $as_echo_n "checking for $ac_word... " >&6; }
32685 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32686   $as_echo_n "(cached) " >&6
32687 else
32688   case $POTENTIAL_CXX in
32689   [\\/]* | ?:[\\/]*)
32690   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32691   ;;
32692   *)
32693   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32694 for as_dir in $PATH
32695 do
32696   IFS=$as_save_IFS
32697   test -z "$as_dir" && as_dir=.
32698     for ac_exec_ext in '' $ac_executable_extensions; do
32699   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32700     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32701     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32702     break 2
32703   fi
32704 done
32705   done
32706 IFS=$as_save_IFS
32707 
32708   ;;
32709 esac
32710 fi
32711 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32712 if test -n "$POTENTIAL_CXX"; then
32713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32714 $as_echo "$POTENTIAL_CXX" >&6; }
32715 else
32716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32717 $as_echo "no" >&6; }
32718 fi
32719 
32720 
32721   test -n "$POTENTIAL_CXX" && break
32722 done
32723 
32724       CXX=$POTENTIAL_CXX
32725     fi
32726 
32727     if test "x$CXX" = x; then
32728 
32729   # Print a helpful message on how to acquire the necessary build dependency.
32730   # devkit is the help tag: freetype, cups, alsa etc
32731   MISSING_DEPENDENCY=devkit
32732 
32733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32734     cygwin_help $MISSING_DEPENDENCY
32735   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32736     msys_help $MISSING_DEPENDENCY
32737   else
32738     PKGHANDLER_COMMAND=
32739 
32740     case $PKGHANDLER in
32741       apt-get)
32742         apt_help     $MISSING_DEPENDENCY ;;
32743       yum)
32744         yum_help     $MISSING_DEPENDENCY ;;
32745       port)
32746         port_help    $MISSING_DEPENDENCY ;;
32747       pkgutil)
32748         pkgutil_help $MISSING_DEPENDENCY ;;
32749       pkgadd)
32750         pkgadd_help  $MISSING_DEPENDENCY ;;
32751     esac
32752 
32753     if test "x$PKGHANDLER_COMMAND" != x; then
32754       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32755     fi
32756   fi
32757 
32758       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32759     fi
32760   fi
32761 
32762   # Now we have a compiler binary in CXX. Make sure it's okay.
32763 
32764   # Only process if variable expands to non-empty
32765 
32766   if test "x$CXX" != x; then
32767     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32768 
32769   # First separate the path from the arguments. This will split at the first
32770   # space.
32771   complete="$CXX"
32772   path="${complete%% *}"
32773   tmp="$complete EOL"
32774   arguments="${tmp#* }"
32775 
32776   # Input might be given as Windows format, start by converting to
32777   # unix format.
32778   new_path=`$CYGPATH -u "$path"`
32779 
32780   # Now try to locate executable using which
32781   new_path=`$WHICH "$new_path" 2> /dev/null`
32782   # bat and cmd files are not always considered executable in cygwin causing which
32783   # to not find them
32784   if test "x$new_path" = x \
32785       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32786       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32787     new_path=`$CYGPATH -u "$path"`
32788   fi
32789   if test "x$new_path" = x; then
32790     # Oops. Which didn't find the executable.
32791     # The splitting of arguments from the executable at a space might have been incorrect,
32792     # since paths with space are more likely in Windows. Give it another try with the whole
32793     # argument.
32794     path="$complete"
32795     arguments="EOL"
32796     new_path=`$CYGPATH -u "$path"`
32797     new_path=`$WHICH "$new_path" 2> /dev/null`
32798     # bat and cmd files are not always considered executable in cygwin causing which
32799     # to not find them
32800     if test "x$new_path" = x \
32801         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32802         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32803       new_path=`$CYGPATH -u "$path"`
32804     fi
32805     if test "x$new_path" = x; then
32806       # It's still not found. Now this is an unrecoverable error.
32807       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
32808 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
32809       has_space=`$ECHO "$complete" | $GREP " "`
32810       if test "x$has_space" != x; then
32811         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32812 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32813       fi
32814       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32815     fi
32816   fi
32817 
32818   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32819   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32820   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32821   # "foo.exe" is OK but "foo" is an error.
32822   #
32823   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32824   # It is also a way to make sure we got the proper file name for the real test later on.
32825   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32826   if test "x$test_shortpath" = x; then
32827     # Short path failed, file does not exist as specified.
32828     # Try adding .exe or .cmd
32829     if test -f "${new_path}.exe"; then
32830       input_to_shortpath="${new_path}.exe"
32831     elif test -f "${new_path}.cmd"; then
32832       input_to_shortpath="${new_path}.cmd"
32833     else
32834       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
32835 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
32836       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32837 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32838       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32839     fi
32840   else
32841     input_to_shortpath="$new_path"
32842   fi
32843 
32844   # Call helper function which possibly converts this using DOS-style short mode.
32845   # If so, the updated path is stored in $new_path.
32846   new_path="$input_to_shortpath"
32847 
32848   input_path="$input_to_shortpath"
32849   # Check if we need to convert this using DOS-style short mode. If the path
32850   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32851   # take no chances and rewrite it.
32852   # Note: m4 eats our [], so we need to use [ and ] instead.
32853   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32854   if test "x$has_forbidden_chars" != x; then
32855     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32856     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32857     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32858     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32859       # Going to short mode and back again did indeed matter. Since short mode is
32860       # case insensitive, let's make it lowercase to improve readability.
32861       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32862       # Now convert it back to Unix-style (cygpath)
32863       input_path=`$CYGPATH -u "$shortmode_path"`
32864       new_path="$input_path"
32865     fi
32866   fi
32867 
32868   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32869   if test "x$test_cygdrive_prefix" = x; then
32870     # As a simple fix, exclude /usr/bin since it's not a real path.
32871     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32872       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32873       # a path prefixed by /cygdrive for fixpath to work.
32874       new_path="$CYGWIN_ROOT_PATH$input_path"
32875     fi
32876   fi
32877 
32878   # remove trailing .exe if any
32879   new_path="${new_path/%.exe/}"
32880 
32881     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32882 
32883   # First separate the path from the arguments. This will split at the first
32884   # space.
32885   complete="$CXX"
32886   path="${complete%% *}"
32887   tmp="$complete EOL"
32888   arguments="${tmp#* }"
32889 
32890   # Input might be given as Windows format, start by converting to
32891   # unix format.
32892   new_path="$path"
32893 
32894   windows_path="$new_path"
32895   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32896     unix_path=`$CYGPATH -u "$windows_path"`
32897     new_path="$unix_path"
32898   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32899     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32900     new_path="$unix_path"
32901   fi
32902 
32903 
32904   # Now try to locate executable using which
32905   new_path=`$WHICH "$new_path" 2> /dev/null`
32906 
32907   if test "x$new_path" = x; then
32908     # Oops. Which didn't find the executable.
32909     # The splitting of arguments from the executable at a space might have been incorrect,
32910     # since paths with space are more likely in Windows. Give it another try with the whole
32911     # argument.
32912     path="$complete"
32913     arguments="EOL"
32914     new_path="$path"
32915 
32916   windows_path="$new_path"
32917   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32918     unix_path=`$CYGPATH -u "$windows_path"`
32919     new_path="$unix_path"
32920   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32921     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32922     new_path="$unix_path"
32923   fi
32924 
32925 
32926     new_path=`$WHICH "$new_path" 2> /dev/null`
32927     # bat and cmd files are not always considered executable in MSYS causing which
32928     # to not find them
32929     if test "x$new_path" = x \
32930         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32931         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32932       new_path="$path"
32933 
32934   windows_path="$new_path"
32935   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32936     unix_path=`$CYGPATH -u "$windows_path"`
32937     new_path="$unix_path"
32938   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32939     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32940     new_path="$unix_path"
32941   fi
32942 
32943     fi
32944 
32945     if test "x$new_path" = x; then
32946       # It's still not found. Now this is an unrecoverable error.
32947       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
32948 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
32949       has_space=`$ECHO "$complete" | $GREP " "`
32950       if test "x$has_space" != x; then
32951         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32952 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32953       fi
32954       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32955     fi
32956   fi
32957 
32958   # Now new_path has a complete unix path to the binary
32959   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32960     # Keep paths in /bin as-is, but remove trailing .exe if any
32961     new_path="${new_path/%.exe/}"
32962     # Do not save /bin paths to all_fixpath_prefixes!
32963   else
32964     # Not in mixed or Windows style, start by that.
32965     new_path=`cmd //c echo $new_path`
32966 
32967   input_path="$new_path"
32968   # Check if we need to convert this using DOS-style short mode. If the path
32969   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32970   # take no chances and rewrite it.
32971   # Note: m4 eats our [], so we need to use [ and ] instead.
32972   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32973   if test "x$has_forbidden_chars" != x; then
32974     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32975     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32976   fi
32977 
32978     # Output is in $new_path
32979 
32980   windows_path="$new_path"
32981   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32982     unix_path=`$CYGPATH -u "$windows_path"`
32983     new_path="$unix_path"
32984   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32985     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32986     new_path="$unix_path"
32987   fi
32988 
32989     # remove trailing .exe if any
32990     new_path="${new_path/%.exe/}"
32991 
32992     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32993     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32994   fi
32995 
32996     else
32997       # We're on a unix platform. Hooray! :)
32998       # First separate the path from the arguments. This will split at the first
32999       # space.
33000       complete="$CXX"
33001       path="${complete%% *}"
33002       tmp="$complete EOL"
33003       arguments="${tmp#* }"
33004 
33005       # Cannot rely on the command "which" here since it doesn't always work.
33006       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33007       if test -z "$is_absolute_path"; then
33008         # Path to executable is not absolute. Find it.
33009         IFS_save="$IFS"
33010         IFS=:
33011         for p in $PATH; do
33012           if test -f "$p/$path" && test -x "$p/$path"; then
33013             new_path="$p/$path"
33014             break
33015           fi
33016         done
33017         IFS="$IFS_save"
33018       else
33019         # This is an absolute path, we can use it without further modifications.
33020         new_path="$path"
33021       fi
33022 
33023       if test "x$new_path" = x; then
33024         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33025 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33026         has_space=`$ECHO "$complete" | $GREP " "`
33027         if test "x$has_space" != x; then
33028           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33029 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33030         fi
33031         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33032       fi
33033     fi
33034 
33035     # Now join together the path and the arguments once again
33036     if test "x$arguments" != xEOL; then
33037       new_complete="$new_path ${arguments% *}"
33038     else
33039       new_complete="$new_path"
33040     fi
33041 
33042     if test "x$complete" != "x$new_complete"; then
33043       CXX="$new_complete"
33044       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33045 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33046     fi
33047   fi
33048 
33049   TEST_COMPILER="$CXX"
33050   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
33051   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
33052   if test "x$OPENJDK_BUILD_OS" != xaix; then
33053     # FIXME: This test should not be needed anymore; we don't do that for any platform.
33054     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33055 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33056 
33057   if test "x$OPENJDK_BUILD_OS" != xwindows; then
33058     # Follow a chain of symbolic links. Use readlink
33059     # where it exists, else fall back to horribly
33060     # complicated shell code.
33061     if test "x$READLINK_TESTED" != yes; then
33062       # On MacOSX there is a readlink tool with a different
33063       # purpose than the GNU readlink tool. Check the found readlink.
33064       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33065       if test "x$ISGNU" = x; then
33066         # A readlink that we do not know how to use.
33067         # Are there other non-GNU readlinks out there?
33068         READLINK_TESTED=yes
33069         READLINK=
33070       fi
33071     fi
33072 
33073     if test "x$READLINK" != x; then
33074       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
33075     else
33076       # Save the current directory for restoring afterwards
33077       STARTDIR=$PWD
33078       COUNTER=0
33079       sym_link_dir=`$DIRNAME $TEST_COMPILER`
33080       sym_link_file=`$BASENAME $TEST_COMPILER`
33081       cd $sym_link_dir
33082       # Use -P flag to resolve symlinks in directories.
33083       cd `$THEPWDCMD -P`
33084       sym_link_dir=`$THEPWDCMD -P`
33085       # Resolve file symlinks
33086       while test $COUNTER -lt 20; do
33087         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33088         if test "x$ISLINK" == x; then
33089           # This is not a symbolic link! We are done!
33090           break
33091         fi
33092         # Again resolve directory symlinks since the target of the just found
33093         # link could be in a different directory
33094         cd `$DIRNAME $ISLINK`
33095         sym_link_dir=`$THEPWDCMD -P`
33096         sym_link_file=`$BASENAME $ISLINK`
33097         let COUNTER=COUNTER+1
33098       done
33099       cd $STARTDIR
33100       TEST_COMPILER=$sym_link_dir/$sym_link_file
33101     fi
33102   fi
33103 
33104     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
33105 $as_echo "$TEST_COMPILER" >&6; }
33106   fi
33107   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
33108 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
33109 
33110   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
33111   if test "x$COMPILER_BASENAME" = "xccache"; then
33112     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
33113 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
33114     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
33115     # We want to control ccache invocation ourselves, so ignore this cc and try
33116     # searching again.
33117 
33118     # Remove the path to the fake ccache cc from the PATH
33119     RETRY_COMPILER_SAVED_PATH="$PATH"
33120     COMPILER_DIRNAME=`$DIRNAME $CXX`
33121     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
33122 
33123     # Try again looking for our compiler
33124     if test -n "$ac_tool_prefix"; then
33125   for ac_prog in $TOOLCHAIN_CXX_BINARY
33126   do
33127     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33128 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33130 $as_echo_n "checking for $ac_word... " >&6; }
33131 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
33132   $as_echo_n "(cached) " >&6
33133 else
33134   if test -n "$PROPER_COMPILER_CXX"; then
33135   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
33136 else
33137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33138 for as_dir in $PATH
33139 do
33140   IFS=$as_save_IFS
33141   test -z "$as_dir" && as_dir=.
33142     for ac_exec_ext in '' $ac_executable_extensions; do
33143   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33144     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
33145     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33146     break 2
33147   fi
33148 done
33149   done
33150 IFS=$as_save_IFS
33151 
33152 fi
33153 fi
33154 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
33155 if test -n "$PROPER_COMPILER_CXX"; then
33156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33157 $as_echo "$PROPER_COMPILER_CXX" >&6; }
33158 else
33159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33160 $as_echo "no" >&6; }
33161 fi
33162 
33163 
33164     test -n "$PROPER_COMPILER_CXX" && break
33165   done
33166 fi
33167 if test -z "$PROPER_COMPILER_CXX"; then
33168   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
33169   for ac_prog in $TOOLCHAIN_CXX_BINARY
33170 do
33171   # Extract the first word of "$ac_prog", so it can be a program name with args.
33172 set dummy $ac_prog; ac_word=$2
33173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33174 $as_echo_n "checking for $ac_word... " >&6; }
33175 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
33176   $as_echo_n "(cached) " >&6
33177 else
33178   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33179   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
33180 else
33181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33182 for as_dir in $PATH
33183 do
33184   IFS=$as_save_IFS
33185   test -z "$as_dir" && as_dir=.
33186     for ac_exec_ext in '' $ac_executable_extensions; do
33187   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33188     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
33189     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33190     break 2
33191   fi
33192 done
33193   done
33194 IFS=$as_save_IFS
33195 
33196 fi
33197 fi
33198 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
33199 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
33201 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
33202 else
33203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33204 $as_echo "no" >&6; }
33205 fi
33206 
33207 
33208   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
33209 done
33210 
33211   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
33212     PROPER_COMPILER_CXX=""
33213   else
33214     case $cross_compiling:$ac_tool_warned in
33215 yes:)
33216 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33217 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33218 ac_tool_warned=yes ;;
33219 esac
33220     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
33221   fi
33222 fi
33223 
33224 
33225   # Only process if variable expands to non-empty
33226 
33227   if test "x$PROPER_COMPILER_CXX" != x; then
33228     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33229 
33230   # First separate the path from the arguments. This will split at the first
33231   # space.
33232   complete="$PROPER_COMPILER_CXX"
33233   path="${complete%% *}"
33234   tmp="$complete EOL"
33235   arguments="${tmp#* }"
33236 
33237   # Input might be given as Windows format, start by converting to
33238   # unix format.
33239   new_path=`$CYGPATH -u "$path"`
33240 
33241   # Now try to locate executable using which
33242   new_path=`$WHICH "$new_path" 2> /dev/null`
33243   # bat and cmd files are not always considered executable in cygwin causing which
33244   # to not find them
33245   if test "x$new_path" = x \
33246       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33247       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33248     new_path=`$CYGPATH -u "$path"`
33249   fi
33250   if test "x$new_path" = x; then
33251     # Oops. Which didn't find the executable.
33252     # The splitting of arguments from the executable at a space might have been incorrect,
33253     # since paths with space are more likely in Windows. Give it another try with the whole
33254     # argument.
33255     path="$complete"
33256     arguments="EOL"
33257     new_path=`$CYGPATH -u "$path"`
33258     new_path=`$WHICH "$new_path" 2> /dev/null`
33259     # bat and cmd files are not always considered executable in cygwin causing which
33260     # to not find them
33261     if test "x$new_path" = x \
33262         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33263         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33264       new_path=`$CYGPATH -u "$path"`
33265     fi
33266     if test "x$new_path" = x; then
33267       # It's still not found. Now this is an unrecoverable error.
33268       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33269 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33270       has_space=`$ECHO "$complete" | $GREP " "`
33271       if test "x$has_space" != x; then
33272         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33273 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33274       fi
33275       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33276     fi
33277   fi
33278 
33279   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33280   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33281   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33282   # "foo.exe" is OK but "foo" is an error.
33283   #
33284   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33285   # It is also a way to make sure we got the proper file name for the real test later on.
33286   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33287   if test "x$test_shortpath" = x; then
33288     # Short path failed, file does not exist as specified.
33289     # Try adding .exe or .cmd
33290     if test -f "${new_path}.exe"; then
33291       input_to_shortpath="${new_path}.exe"
33292     elif test -f "${new_path}.cmd"; then
33293       input_to_shortpath="${new_path}.cmd"
33294     else
33295       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
33296 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
33297       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33298 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33299       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33300     fi
33301   else
33302     input_to_shortpath="$new_path"
33303   fi
33304 
33305   # Call helper function which possibly converts this using DOS-style short mode.
33306   # If so, the updated path is stored in $new_path.
33307   new_path="$input_to_shortpath"
33308 
33309   input_path="$input_to_shortpath"
33310   # Check if we need to convert this using DOS-style short mode. If the path
33311   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33312   # take no chances and rewrite it.
33313   # Note: m4 eats our [], so we need to use [ and ] instead.
33314   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33315   if test "x$has_forbidden_chars" != x; then
33316     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33317     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33318     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33319     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33320       # Going to short mode and back again did indeed matter. Since short mode is
33321       # case insensitive, let's make it lowercase to improve readability.
33322       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33323       # Now convert it back to Unix-style (cygpath)
33324       input_path=`$CYGPATH -u "$shortmode_path"`
33325       new_path="$input_path"
33326     fi
33327   fi
33328 
33329   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33330   if test "x$test_cygdrive_prefix" = x; then
33331     # As a simple fix, exclude /usr/bin since it's not a real path.
33332     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33333       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33334       # a path prefixed by /cygdrive for fixpath to work.
33335       new_path="$CYGWIN_ROOT_PATH$input_path"
33336     fi
33337   fi
33338 
33339   # remove trailing .exe if any
33340   new_path="${new_path/%.exe/}"
33341 
33342     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33343 
33344   # First separate the path from the arguments. This will split at the first
33345   # space.
33346   complete="$PROPER_COMPILER_CXX"
33347   path="${complete%% *}"
33348   tmp="$complete EOL"
33349   arguments="${tmp#* }"
33350 
33351   # Input might be given as Windows format, start by converting to
33352   # unix format.
33353   new_path="$path"
33354 
33355   windows_path="$new_path"
33356   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33357     unix_path=`$CYGPATH -u "$windows_path"`
33358     new_path="$unix_path"
33359   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33360     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33361     new_path="$unix_path"
33362   fi
33363 
33364 
33365   # Now try to locate executable using which
33366   new_path=`$WHICH "$new_path" 2> /dev/null`
33367 
33368   if test "x$new_path" = x; then
33369     # Oops. Which didn't find the executable.
33370     # The splitting of arguments from the executable at a space might have been incorrect,
33371     # since paths with space are more likely in Windows. Give it another try with the whole
33372     # argument.
33373     path="$complete"
33374     arguments="EOL"
33375     new_path="$path"
33376 
33377   windows_path="$new_path"
33378   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33379     unix_path=`$CYGPATH -u "$windows_path"`
33380     new_path="$unix_path"
33381   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33382     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33383     new_path="$unix_path"
33384   fi
33385 
33386 
33387     new_path=`$WHICH "$new_path" 2> /dev/null`
33388     # bat and cmd files are not always considered executable in MSYS causing which
33389     # to not find them
33390     if test "x$new_path" = x \
33391         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33392         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33393       new_path="$path"
33394 
33395   windows_path="$new_path"
33396   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33397     unix_path=`$CYGPATH -u "$windows_path"`
33398     new_path="$unix_path"
33399   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33400     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33401     new_path="$unix_path"
33402   fi
33403 
33404     fi
33405 
33406     if test "x$new_path" = x; then
33407       # It's still not found. Now this is an unrecoverable error.
33408       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33409 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33410       has_space=`$ECHO "$complete" | $GREP " "`
33411       if test "x$has_space" != x; then
33412         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33413 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33414       fi
33415       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33416     fi
33417   fi
33418 
33419   # Now new_path has a complete unix path to the binary
33420   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33421     # Keep paths in /bin as-is, but remove trailing .exe if any
33422     new_path="${new_path/%.exe/}"
33423     # Do not save /bin paths to all_fixpath_prefixes!
33424   else
33425     # Not in mixed or Windows style, start by that.
33426     new_path=`cmd //c echo $new_path`
33427 
33428   input_path="$new_path"
33429   # Check if we need to convert this using DOS-style short mode. If the path
33430   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33431   # take no chances and rewrite it.
33432   # Note: m4 eats our [], so we need to use [ and ] instead.
33433   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33434   if test "x$has_forbidden_chars" != x; then
33435     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33436     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33437   fi
33438 
33439     # Output is in $new_path
33440 
33441   windows_path="$new_path"
33442   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33443     unix_path=`$CYGPATH -u "$windows_path"`
33444     new_path="$unix_path"
33445   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33446     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33447     new_path="$unix_path"
33448   fi
33449 
33450     # remove trailing .exe if any
33451     new_path="${new_path/%.exe/}"
33452 
33453     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33454     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33455   fi
33456 
33457     else
33458       # We're on a unix platform. Hooray! :)
33459       # First separate the path from the arguments. This will split at the first
33460       # space.
33461       complete="$PROPER_COMPILER_CXX"
33462       path="${complete%% *}"
33463       tmp="$complete EOL"
33464       arguments="${tmp#* }"
33465 
33466       # Cannot rely on the command "which" here since it doesn't always work.
33467       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33468       if test -z "$is_absolute_path"; then
33469         # Path to executable is not absolute. Find it.
33470         IFS_save="$IFS"
33471         IFS=:
33472         for p in $PATH; do
33473           if test -f "$p/$path" && test -x "$p/$path"; then
33474             new_path="$p/$path"
33475             break
33476           fi
33477         done
33478         IFS="$IFS_save"
33479       else
33480         # This is an absolute path, we can use it without further modifications.
33481         new_path="$path"
33482       fi
33483 
33484       if test "x$new_path" = x; then
33485         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33486 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33487         has_space=`$ECHO "$complete" | $GREP " "`
33488         if test "x$has_space" != x; then
33489           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33490 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33491         fi
33492         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33493       fi
33494     fi
33495 
33496     # Now join together the path and the arguments once again
33497     if test "x$arguments" != xEOL; then
33498       new_complete="$new_path ${arguments% *}"
33499     else
33500       new_complete="$new_path"
33501     fi
33502 
33503     if test "x$complete" != "x$new_complete"; then
33504       PROPER_COMPILER_CXX="$new_complete"
33505       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
33506 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
33507     fi
33508   fi
33509 
33510     PATH="$RETRY_COMPILER_SAVED_PATH"
33511 
33512     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
33513 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
33514 
33515   if test "x$OPENJDK_BUILD_OS" != xwindows; then
33516     # Follow a chain of symbolic links. Use readlink
33517     # where it exists, else fall back to horribly
33518     # complicated shell code.
33519     if test "x$READLINK_TESTED" != yes; then
33520       # On MacOSX there is a readlink tool with a different
33521       # purpose than the GNU readlink tool. Check the found readlink.
33522       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33523       if test "x$ISGNU" = x; then
33524         # A readlink that we do not know how to use.
33525         # Are there other non-GNU readlinks out there?
33526         READLINK_TESTED=yes
33527         READLINK=
33528       fi
33529     fi
33530 
33531     if test "x$READLINK" != x; then
33532       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
33533     else
33534       # Save the current directory for restoring afterwards
33535       STARTDIR=$PWD
33536       COUNTER=0
33537       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
33538       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
33539       cd $sym_link_dir
33540       # Use -P flag to resolve symlinks in directories.
33541       cd `$THEPWDCMD -P`
33542       sym_link_dir=`$THEPWDCMD -P`
33543       # Resolve file symlinks
33544       while test $COUNTER -lt 20; do
33545         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33546         if test "x$ISLINK" == x; then
33547           # This is not a symbolic link! We are done!
33548           break
33549         fi
33550         # Again resolve directory symlinks since the target of the just found
33551         # link could be in a different directory
33552         cd `$DIRNAME $ISLINK`
33553         sym_link_dir=`$THEPWDCMD -P`
33554         sym_link_file=`$BASENAME $ISLINK`
33555         let COUNTER=COUNTER+1
33556       done
33557       cd $STARTDIR
33558       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
33559     fi
33560   fi
33561 
33562     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33563 $as_echo "$PROPER_COMPILER_CXX" >&6; }
33564     CXX="$PROPER_COMPILER_CXX"
33565   else
33566     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
33567 $as_echo "no, keeping CXX" >&6; }
33568   fi
33569 
33570 
33571   COMPILER=$CXX
33572   COMPILER_NAME=$COMPILER_NAME
33573 
33574   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33575     # cc -V output typically looks like
33576     #     cc: Sun C 5.12 Linux_i386 2011/11/16
33577     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33578     # Check that this is likely to be the Solaris Studio cc.
33579     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33580     if test $? -ne 0; then
33581       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33582       { $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
33583 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33584       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33585 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33586       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33587 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33588       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33589     fi
33590     # Remove usage instructions (if present), and
33591     # collapse compiler output into a single line
33592     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33593         $SED -e 's/ *[Uu]sage:.*//'`
33594     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33595         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33596   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33597     # xlc -qversion output typically looks like
33598     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33599     #     Version: 11.01.0000.0015
33600     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33601     # Check that this is likely to be the IBM XL C compiler.
33602     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33603     if test $? -ne 0; then
33604       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33605       { $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
33606 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33607       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33608 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33609       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33610 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33611       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33612     fi
33613     # Collapse compiler output into a single line
33614     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33615     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33616         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33617   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33618     # There is no specific version flag, but all output starts with a version string.
33619     # First line typically looks something like:
33620     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33621     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33622     # Check that this is likely to be Microsoft CL.EXE.
33623     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33624     if test $? -ne 0; then
33625       { $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
33626 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33627       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33628 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33629       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33630     fi
33631     # Collapse compiler output into a single line
33632     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33633     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33634         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33635   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33636     # gcc --version output typically looks like
33637     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33638     #     Copyright (C) 2013 Free Software Foundation, Inc.
33639     #     This is free software; see the source for copying conditions.  There is NO
33640     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33641     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33642     # Check that this is likely to be GCC.
33643     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33644     if test $? -ne 0; then
33645       { $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
33646 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33647       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33648 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33649       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33650     fi
33651     # Remove Copyright and legalese from version string, and
33652     # collapse into a single line
33653     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33654         $SED -e 's/ *Copyright .*//'`
33655     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33656         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
33657   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33658     # clang --version output typically looks like
33659     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33660     #    clang version 3.3 (tags/RELEASE_33/final)
33661     # or
33662     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33663     #    Target: x86_64-pc-linux-gnu
33664     #    Thread model: posix
33665     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33666     # Check that this is likely to be clang
33667     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33668     if test $? -ne 0; then
33669       { $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
33670 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33671       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33672 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33673       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33674     fi
33675     # Collapse compiler output into a single line
33676     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33677     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33678         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
33679   else
33680       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33681   fi
33682   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33683   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33684   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33685   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
33686 
33687   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33688 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33689 
33690 
33691   # Now that we have resolved CXX ourself, let autoconf have its go at it
33692   ac_ext=cpp
33693 ac_cpp='$CXXCPP $CPPFLAGS'
33694 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33695 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33696 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33697 if test -z "$CXX"; then
33698   if test -n "$CCC"; then
33699     CXX=$CCC
33700   else
33701     if test -n "$ac_tool_prefix"; then
33702   for ac_prog in $CXX
33703   do
33704     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33705 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33707 $as_echo_n "checking for $ac_word... " >&6; }
33708 if ${ac_cv_prog_CXX+:} false; then :
33709   $as_echo_n "(cached) " >&6
33710 else
33711   if test -n "$CXX"; then
33712   ac_cv_prog_CXX="$CXX" # Let the user override the test.
33713 else
33714 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33715 for as_dir in $PATH
33716 do
33717   IFS=$as_save_IFS
33718   test -z "$as_dir" && as_dir=.
33719     for ac_exec_ext in '' $ac_executable_extensions; do
33720   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33721     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
33722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33723     break 2
33724   fi
33725 done
33726   done
33727 IFS=$as_save_IFS
33728 
33729 fi
33730 fi
33731 CXX=$ac_cv_prog_CXX
33732 if test -n "$CXX"; then
33733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
33734 $as_echo "$CXX" >&6; }
33735 else
33736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33737 $as_echo "no" >&6; }
33738 fi
33739 
33740 
33741     test -n "$CXX" && break
33742   done
33743 fi
33744 if test -z "$CXX"; then
33745   ac_ct_CXX=$CXX
33746   for ac_prog in $CXX
33747 do
33748   # Extract the first word of "$ac_prog", so it can be a program name with args.
33749 set dummy $ac_prog; ac_word=$2
33750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33751 $as_echo_n "checking for $ac_word... " >&6; }
33752 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
33753   $as_echo_n "(cached) " >&6
33754 else
33755   if test -n "$ac_ct_CXX"; then
33756   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
33757 else
33758 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33759 for as_dir in $PATH
33760 do
33761   IFS=$as_save_IFS
33762   test -z "$as_dir" && as_dir=.
33763     for ac_exec_ext in '' $ac_executable_extensions; do
33764   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33765     ac_cv_prog_ac_ct_CXX="$ac_prog"
33766     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33767     break 2
33768   fi
33769 done
33770   done
33771 IFS=$as_save_IFS
33772 
33773 fi
33774 fi
33775 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
33776 if test -n "$ac_ct_CXX"; then
33777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
33778 $as_echo "$ac_ct_CXX" >&6; }
33779 else
33780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33781 $as_echo "no" >&6; }
33782 fi
33783 
33784 
33785   test -n "$ac_ct_CXX" && break
33786 done
33787 
33788   if test "x$ac_ct_CXX" = x; then
33789     CXX="g++"
33790   else
33791     case $cross_compiling:$ac_tool_warned in
33792 yes:)
33793 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33794 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33795 ac_tool_warned=yes ;;
33796 esac
33797     CXX=$ac_ct_CXX
33798   fi
33799 fi
33800 
33801   fi
33802 fi
33803 # Provide some information about the compiler.
33804 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
33805 set X $ac_compile
33806 ac_compiler=$2
33807 for ac_option in --version -v -V -qversion; do
33808   { { ac_try="$ac_compiler $ac_option >&5"
33809 case "(($ac_try" in
33810   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33811   *) ac_try_echo=$ac_try;;
33812 esac
33813 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33814 $as_echo "$ac_try_echo"; } >&5
33815   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33816   ac_status=$?
33817   if test -s conftest.err; then
33818     sed '10a\
33819 ... rest of stderr output deleted ...
33820          10q' conftest.err >conftest.er1
33821     cat conftest.er1 >&5
33822   fi
33823   rm -f conftest.er1 conftest.err
33824   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33825   test $ac_status = 0; }
33826 done
33827 
33828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
33829 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
33830 if ${ac_cv_cxx_compiler_gnu+:} false; then :
33831   $as_echo_n "(cached) " >&6
33832 else
33833   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33834 /* end confdefs.h.  */
33835 
33836 int
33837 main ()
33838 {
33839 #ifndef __GNUC__
33840        choke me
33841 #endif
33842 
33843   ;
33844   return 0;
33845 }
33846 _ACEOF
33847 if ac_fn_cxx_try_compile "$LINENO"; then :
33848   ac_compiler_gnu=yes
33849 else
33850   ac_compiler_gnu=no
33851 fi
33852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33853 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
33854 
33855 fi
33856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
33857 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
33858 if test $ac_compiler_gnu = yes; then
33859   GXX=yes
33860 else
33861   GXX=
33862 fi
33863 ac_test_CXXFLAGS=${CXXFLAGS+set}
33864 ac_save_CXXFLAGS=$CXXFLAGS
33865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
33866 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
33867 if ${ac_cv_prog_cxx_g+:} false; then :
33868   $as_echo_n "(cached) " >&6
33869 else
33870   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
33871    ac_cxx_werror_flag=yes
33872    ac_cv_prog_cxx_g=no
33873    CXXFLAGS="-g"
33874    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33875 /* end confdefs.h.  */
33876 
33877 int
33878 main ()
33879 {
33880 
33881   ;
33882   return 0;
33883 }
33884 _ACEOF
33885 if ac_fn_cxx_try_compile "$LINENO"; then :
33886   ac_cv_prog_cxx_g=yes
33887 else
33888   CXXFLAGS=""
33889       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33890 /* end confdefs.h.  */
33891 
33892 int
33893 main ()
33894 {
33895 
33896   ;
33897   return 0;
33898 }
33899 _ACEOF
33900 if ac_fn_cxx_try_compile "$LINENO"; then :
33901 
33902 else
33903   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33904          CXXFLAGS="-g"
33905          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33906 /* end confdefs.h.  */
33907 
33908 int
33909 main ()
33910 {
33911 
33912   ;
33913   return 0;
33914 }
33915 _ACEOF
33916 if ac_fn_cxx_try_compile "$LINENO"; then :
33917   ac_cv_prog_cxx_g=yes
33918 fi
33919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33920 fi
33921 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33922 fi
33923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33924    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33925 fi
33926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
33927 $as_echo "$ac_cv_prog_cxx_g" >&6; }
33928 if test "$ac_test_CXXFLAGS" = set; then
33929   CXXFLAGS=$ac_save_CXXFLAGS
33930 elif test $ac_cv_prog_cxx_g = yes; then
33931   if test "$GXX" = yes; then
33932     CXXFLAGS="-g -O2"
33933   else
33934     CXXFLAGS="-g"
33935   fi
33936 else
33937   if test "$GXX" = yes; then
33938     CXXFLAGS="-O2"
33939   else
33940     CXXFLAGS=
33941   fi
33942 fi
33943 ac_ext=cpp
33944 ac_cpp='$CXXCPP $CPPFLAGS'
33945 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33946 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33947 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33948 
33949 
33950   #
33951   # Setup the preprocessor (CPP and CXXCPP)
33952   #
33953   ac_ext=c
33954 ac_cpp='$CPP $CPPFLAGS'
33955 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33956 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33957 ac_compiler_gnu=$ac_cv_c_compiler_gnu
33958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
33959 $as_echo_n "checking how to run the C preprocessor... " >&6; }
33960 # On Suns, sometimes $CPP names a directory.
33961 if test -n "$CPP" && test -d "$CPP"; then
33962   CPP=
33963 fi
33964 if test -z "$CPP"; then
33965   if ${ac_cv_prog_CPP+:} false; then :
33966   $as_echo_n "(cached) " >&6
33967 else
33968       # Double quotes because CPP needs to be expanded
33969     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
33970     do
33971       ac_preproc_ok=false
33972 for ac_c_preproc_warn_flag in '' yes
33973 do
33974   # Use a header file that comes with gcc, so configuring glibc
33975   # with a fresh cross-compiler works.
33976   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33977   # <limits.h> exists even on freestanding compilers.
33978   # On the NeXT, cc -E runs the code through the compiler's parser,
33979   # not just through cpp. "Syntax error" is here to catch this case.
33980   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33981 /* end confdefs.h.  */
33982 #ifdef __STDC__
33983 # include <limits.h>
33984 #else
33985 # include <assert.h>
33986 #endif
33987                      Syntax error
33988 _ACEOF
33989 if ac_fn_c_try_cpp "$LINENO"; then :
33990 
33991 else
33992   # Broken: fails on valid input.
33993 continue
33994 fi
33995 rm -f conftest.err conftest.i conftest.$ac_ext
33996 
33997   # OK, works on sane cases.  Now check whether nonexistent headers
33998   # can be detected and how.
33999   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34000 /* end confdefs.h.  */
34001 #include <ac_nonexistent.h>
34002 _ACEOF
34003 if ac_fn_c_try_cpp "$LINENO"; then :
34004   # Broken: success on invalid input.
34005 continue
34006 else
34007   # Passes both tests.
34008 ac_preproc_ok=:
34009 break
34010 fi
34011 rm -f conftest.err conftest.i conftest.$ac_ext
34012 
34013 done
34014 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34015 rm -f conftest.i conftest.err conftest.$ac_ext
34016 if $ac_preproc_ok; then :
34017   break
34018 fi
34019 
34020     done
34021     ac_cv_prog_CPP=$CPP
34022 
34023 fi
34024   CPP=$ac_cv_prog_CPP
34025 else
34026   ac_cv_prog_CPP=$CPP
34027 fi
34028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34029 $as_echo "$CPP" >&6; }
34030 ac_preproc_ok=false
34031 for ac_c_preproc_warn_flag in '' yes
34032 do
34033   # Use a header file that comes with gcc, so configuring glibc
34034   # with a fresh cross-compiler works.
34035   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34036   # <limits.h> exists even on freestanding compilers.
34037   # On the NeXT, cc -E runs the code through the compiler's parser,
34038   # not just through cpp. "Syntax error" is here to catch this case.
34039   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34040 /* end confdefs.h.  */
34041 #ifdef __STDC__
34042 # include <limits.h>
34043 #else
34044 # include <assert.h>
34045 #endif
34046                      Syntax error
34047 _ACEOF
34048 if ac_fn_c_try_cpp "$LINENO"; then :
34049 
34050 else
34051   # Broken: fails on valid input.
34052 continue
34053 fi
34054 rm -f conftest.err conftest.i conftest.$ac_ext
34055 
34056   # OK, works on sane cases.  Now check whether nonexistent headers
34057   # can be detected and how.
34058   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34059 /* end confdefs.h.  */
34060 #include <ac_nonexistent.h>
34061 _ACEOF
34062 if ac_fn_c_try_cpp "$LINENO"; then :
34063   # Broken: success on invalid input.
34064 continue
34065 else
34066   # Passes both tests.
34067 ac_preproc_ok=:
34068 break
34069 fi
34070 rm -f conftest.err conftest.i conftest.$ac_ext
34071 
34072 done
34073 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34074 rm -f conftest.i conftest.err conftest.$ac_ext
34075 if $ac_preproc_ok; then :
34076 
34077 else
34078   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34079 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34080 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34081 See \`config.log' for more details" "$LINENO" 5; }
34082 fi
34083 
34084 ac_ext=cpp
34085 ac_cpp='$CXXCPP $CPPFLAGS'
34086 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34087 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34088 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34089 
34090 
34091   # Only process if variable expands to non-empty
34092 
34093   if test "x$CPP" != x; then
34094     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34095 
34096   # First separate the path from the arguments. This will split at the first
34097   # space.
34098   complete="$CPP"
34099   path="${complete%% *}"
34100   tmp="$complete EOL"
34101   arguments="${tmp#* }"
34102 
34103   # Input might be given as Windows format, start by converting to
34104   # unix format.
34105   new_path=`$CYGPATH -u "$path"`
34106 
34107   # Now try to locate executable using which
34108   new_path=`$WHICH "$new_path" 2> /dev/null`
34109   # bat and cmd files are not always considered executable in cygwin causing which
34110   # to not find them
34111   if test "x$new_path" = x \
34112       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34113       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34114     new_path=`$CYGPATH -u "$path"`
34115   fi
34116   if test "x$new_path" = x; then
34117     # Oops. Which didn't find the executable.
34118     # The splitting of arguments from the executable at a space might have been incorrect,
34119     # since paths with space are more likely in Windows. Give it another try with the whole
34120     # argument.
34121     path="$complete"
34122     arguments="EOL"
34123     new_path=`$CYGPATH -u "$path"`
34124     new_path=`$WHICH "$new_path" 2> /dev/null`
34125     # bat and cmd files are not always considered executable in cygwin causing which
34126     # to not find them
34127     if test "x$new_path" = x \
34128         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34129         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34130       new_path=`$CYGPATH -u "$path"`
34131     fi
34132     if test "x$new_path" = x; then
34133       # It's still not found. Now this is an unrecoverable error.
34134       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34135 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34136       has_space=`$ECHO "$complete" | $GREP " "`
34137       if test "x$has_space" != x; then
34138         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34139 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34140       fi
34141       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34142     fi
34143   fi
34144 
34145   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34146   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34147   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34148   # "foo.exe" is OK but "foo" is an error.
34149   #
34150   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34151   # It is also a way to make sure we got the proper file name for the real test later on.
34152   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34153   if test "x$test_shortpath" = x; then
34154     # Short path failed, file does not exist as specified.
34155     # Try adding .exe or .cmd
34156     if test -f "${new_path}.exe"; then
34157       input_to_shortpath="${new_path}.exe"
34158     elif test -f "${new_path}.cmd"; then
34159       input_to_shortpath="${new_path}.cmd"
34160     else
34161       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34162 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34163       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34164 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34165       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34166     fi
34167   else
34168     input_to_shortpath="$new_path"
34169   fi
34170 
34171   # Call helper function which possibly converts this using DOS-style short mode.
34172   # If so, the updated path is stored in $new_path.
34173   new_path="$input_to_shortpath"
34174 
34175   input_path="$input_to_shortpath"
34176   # Check if we need to convert this using DOS-style short mode. If the path
34177   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34178   # take no chances and rewrite it.
34179   # Note: m4 eats our [], so we need to use [ and ] instead.
34180   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34181   if test "x$has_forbidden_chars" != x; then
34182     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34183     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34184     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34185     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34186       # Going to short mode and back again did indeed matter. Since short mode is
34187       # case insensitive, let's make it lowercase to improve readability.
34188       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34189       # Now convert it back to Unix-style (cygpath)
34190       input_path=`$CYGPATH -u "$shortmode_path"`
34191       new_path="$input_path"
34192     fi
34193   fi
34194 
34195   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34196   if test "x$test_cygdrive_prefix" = x; then
34197     # As a simple fix, exclude /usr/bin since it's not a real path.
34198     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34199       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34200       # a path prefixed by /cygdrive for fixpath to work.
34201       new_path="$CYGWIN_ROOT_PATH$input_path"
34202     fi
34203   fi
34204 
34205   # remove trailing .exe if any
34206   new_path="${new_path/%.exe/}"
34207 
34208     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34209 
34210   # First separate the path from the arguments. This will split at the first
34211   # space.
34212   complete="$CPP"
34213   path="${complete%% *}"
34214   tmp="$complete EOL"
34215   arguments="${tmp#* }"
34216 
34217   # Input might be given as Windows format, start by converting to
34218   # unix format.
34219   new_path="$path"
34220 
34221   windows_path="$new_path"
34222   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34223     unix_path=`$CYGPATH -u "$windows_path"`
34224     new_path="$unix_path"
34225   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34226     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34227     new_path="$unix_path"
34228   fi
34229 
34230 
34231   # Now try to locate executable using which
34232   new_path=`$WHICH "$new_path" 2> /dev/null`
34233 
34234   if test "x$new_path" = x; then
34235     # Oops. Which didn't find the executable.
34236     # The splitting of arguments from the executable at a space might have been incorrect,
34237     # since paths with space are more likely in Windows. Give it another try with the whole
34238     # argument.
34239     path="$complete"
34240     arguments="EOL"
34241     new_path="$path"
34242 
34243   windows_path="$new_path"
34244   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34245     unix_path=`$CYGPATH -u "$windows_path"`
34246     new_path="$unix_path"
34247   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34248     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34249     new_path="$unix_path"
34250   fi
34251 
34252 
34253     new_path=`$WHICH "$new_path" 2> /dev/null`
34254     # bat and cmd files are not always considered executable in MSYS causing which
34255     # to not find them
34256     if test "x$new_path" = x \
34257         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34258         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34259       new_path="$path"
34260 
34261   windows_path="$new_path"
34262   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34263     unix_path=`$CYGPATH -u "$windows_path"`
34264     new_path="$unix_path"
34265   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34266     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34267     new_path="$unix_path"
34268   fi
34269 
34270     fi
34271 
34272     if test "x$new_path" = x; then
34273       # It's still not found. Now this is an unrecoverable error.
34274       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34275 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34276       has_space=`$ECHO "$complete" | $GREP " "`
34277       if test "x$has_space" != x; then
34278         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34279 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34280       fi
34281       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34282     fi
34283   fi
34284 
34285   # Now new_path has a complete unix path to the binary
34286   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34287     # Keep paths in /bin as-is, but remove trailing .exe if any
34288     new_path="${new_path/%.exe/}"
34289     # Do not save /bin paths to all_fixpath_prefixes!
34290   else
34291     # Not in mixed or Windows style, start by that.
34292     new_path=`cmd //c echo $new_path`
34293 
34294   input_path="$new_path"
34295   # Check if we need to convert this using DOS-style short mode. If the path
34296   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34297   # take no chances and rewrite it.
34298   # Note: m4 eats our [], so we need to use [ and ] instead.
34299   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34300   if test "x$has_forbidden_chars" != x; then
34301     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34302     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34303   fi
34304 
34305     # Output is in $new_path
34306 
34307   windows_path="$new_path"
34308   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34309     unix_path=`$CYGPATH -u "$windows_path"`
34310     new_path="$unix_path"
34311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34312     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34313     new_path="$unix_path"
34314   fi
34315 
34316     # remove trailing .exe if any
34317     new_path="${new_path/%.exe/}"
34318 
34319     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34320     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34321   fi
34322 
34323     else
34324       # We're on a unix platform. Hooray! :)
34325       # First separate the path from the arguments. This will split at the first
34326       # space.
34327       complete="$CPP"
34328       path="${complete%% *}"
34329       tmp="$complete EOL"
34330       arguments="${tmp#* }"
34331 
34332       # Cannot rely on the command "which" here since it doesn't always work.
34333       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34334       if test -z "$is_absolute_path"; then
34335         # Path to executable is not absolute. Find it.
34336         IFS_save="$IFS"
34337         IFS=:
34338         for p in $PATH; do
34339           if test -f "$p/$path" && test -x "$p/$path"; then
34340             new_path="$p/$path"
34341             break
34342           fi
34343         done
34344         IFS="$IFS_save"
34345       else
34346         # This is an absolute path, we can use it without further modifications.
34347         new_path="$path"
34348       fi
34349 
34350       if test "x$new_path" = x; then
34351         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34352 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34353         has_space=`$ECHO "$complete" | $GREP " "`
34354         if test "x$has_space" != x; then
34355           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34356 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34357         fi
34358         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34359       fi
34360     fi
34361 
34362     # Now join together the path and the arguments once again
34363     if test "x$arguments" != xEOL; then
34364       new_complete="$new_path ${arguments% *}"
34365     else
34366       new_complete="$new_path"
34367     fi
34368 
34369     if test "x$complete" != "x$new_complete"; then
34370       CPP="$new_complete"
34371       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34372 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34373     fi
34374   fi
34375 
34376   ac_ext=cpp
34377 ac_cpp='$CXXCPP $CPPFLAGS'
34378 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34379 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34380 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34382 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34383 if test -z "$CXXCPP"; then
34384   if ${ac_cv_prog_CXXCPP+:} false; then :
34385   $as_echo_n "(cached) " >&6
34386 else
34387       # Double quotes because CXXCPP needs to be expanded
34388     for CXXCPP in "$CXX -E" "/lib/cpp"
34389     do
34390       ac_preproc_ok=false
34391 for ac_cxx_preproc_warn_flag in '' yes
34392 do
34393   # Use a header file that comes with gcc, so configuring glibc
34394   # with a fresh cross-compiler works.
34395   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34396   # <limits.h> exists even on freestanding compilers.
34397   # On the NeXT, cc -E runs the code through the compiler's parser,
34398   # not just through cpp. "Syntax error" is here to catch this case.
34399   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34400 /* end confdefs.h.  */
34401 #ifdef __STDC__
34402 # include <limits.h>
34403 #else
34404 # include <assert.h>
34405 #endif
34406                      Syntax error
34407 _ACEOF
34408 if ac_fn_cxx_try_cpp "$LINENO"; then :
34409 
34410 else
34411   # Broken: fails on valid input.
34412 continue
34413 fi
34414 rm -f conftest.err conftest.i conftest.$ac_ext
34415 
34416   # OK, works on sane cases.  Now check whether nonexistent headers
34417   # can be detected and how.
34418   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34419 /* end confdefs.h.  */
34420 #include <ac_nonexistent.h>
34421 _ACEOF
34422 if ac_fn_cxx_try_cpp "$LINENO"; then :
34423   # Broken: success on invalid input.
34424 continue
34425 else
34426   # Passes both tests.
34427 ac_preproc_ok=:
34428 break
34429 fi
34430 rm -f conftest.err conftest.i conftest.$ac_ext
34431 
34432 done
34433 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34434 rm -f conftest.i conftest.err conftest.$ac_ext
34435 if $ac_preproc_ok; then :
34436   break
34437 fi
34438 
34439     done
34440     ac_cv_prog_CXXCPP=$CXXCPP
34441 
34442 fi
34443   CXXCPP=$ac_cv_prog_CXXCPP
34444 else
34445   ac_cv_prog_CXXCPP=$CXXCPP
34446 fi
34447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34448 $as_echo "$CXXCPP" >&6; }
34449 ac_preproc_ok=false
34450 for ac_cxx_preproc_warn_flag in '' yes
34451 do
34452   # Use a header file that comes with gcc, so configuring glibc
34453   # with a fresh cross-compiler works.
34454   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34455   # <limits.h> exists even on freestanding compilers.
34456   # On the NeXT, cc -E runs the code through the compiler's parser,
34457   # not just through cpp. "Syntax error" is here to catch this case.
34458   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34459 /* end confdefs.h.  */
34460 #ifdef __STDC__
34461 # include <limits.h>
34462 #else
34463 # include <assert.h>
34464 #endif
34465                      Syntax error
34466 _ACEOF
34467 if ac_fn_cxx_try_cpp "$LINENO"; then :
34468 
34469 else
34470   # Broken: fails on valid input.
34471 continue
34472 fi
34473 rm -f conftest.err conftest.i conftest.$ac_ext
34474 
34475   # OK, works on sane cases.  Now check whether nonexistent headers
34476   # can be detected and how.
34477   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34478 /* end confdefs.h.  */
34479 #include <ac_nonexistent.h>
34480 _ACEOF
34481 if ac_fn_cxx_try_cpp "$LINENO"; then :
34482   # Broken: success on invalid input.
34483 continue
34484 else
34485   # Passes both tests.
34486 ac_preproc_ok=:
34487 break
34488 fi
34489 rm -f conftest.err conftest.i conftest.$ac_ext
34490 
34491 done
34492 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34493 rm -f conftest.i conftest.err conftest.$ac_ext
34494 if $ac_preproc_ok; then :
34495 
34496 else
34497   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34498 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34499 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
34500 See \`config.log' for more details" "$LINENO" 5; }
34501 fi
34502 
34503 ac_ext=cpp
34504 ac_cpp='$CXXCPP $CPPFLAGS'
34505 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34506 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34507 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34508 
34509 
34510   # Only process if variable expands to non-empty
34511 
34512   if test "x$CXXCPP" != x; then
34513     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34514 
34515   # First separate the path from the arguments. This will split at the first
34516   # space.
34517   complete="$CXXCPP"
34518   path="${complete%% *}"
34519   tmp="$complete EOL"
34520   arguments="${tmp#* }"
34521 
34522   # Input might be given as Windows format, start by converting to
34523   # unix format.
34524   new_path=`$CYGPATH -u "$path"`
34525 
34526   # Now try to locate executable using which
34527   new_path=`$WHICH "$new_path" 2> /dev/null`
34528   # bat and cmd files are not always considered executable in cygwin causing which
34529   # to not find them
34530   if test "x$new_path" = x \
34531       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34532       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34533     new_path=`$CYGPATH -u "$path"`
34534   fi
34535   if test "x$new_path" = x; then
34536     # Oops. Which didn't find the executable.
34537     # The splitting of arguments from the executable at a space might have been incorrect,
34538     # since paths with space are more likely in Windows. Give it another try with the whole
34539     # argument.
34540     path="$complete"
34541     arguments="EOL"
34542     new_path=`$CYGPATH -u "$path"`
34543     new_path=`$WHICH "$new_path" 2> /dev/null`
34544     # bat and cmd files are not always considered executable in cygwin causing which
34545     # to not find them
34546     if test "x$new_path" = x \
34547         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34548         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34549       new_path=`$CYGPATH -u "$path"`
34550     fi
34551     if test "x$new_path" = x; then
34552       # It's still not found. Now this is an unrecoverable error.
34553       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34554 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34555       has_space=`$ECHO "$complete" | $GREP " "`
34556       if test "x$has_space" != x; then
34557         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34558 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34559       fi
34560       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34561     fi
34562   fi
34563 
34564   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34565   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34566   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34567   # "foo.exe" is OK but "foo" is an error.
34568   #
34569   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34570   # It is also a way to make sure we got the proper file name for the real test later on.
34571   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34572   if test "x$test_shortpath" = x; then
34573     # Short path failed, file does not exist as specified.
34574     # Try adding .exe or .cmd
34575     if test -f "${new_path}.exe"; then
34576       input_to_shortpath="${new_path}.exe"
34577     elif test -f "${new_path}.cmd"; then
34578       input_to_shortpath="${new_path}.cmd"
34579     else
34580       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
34581 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
34582       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34583 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34584       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34585     fi
34586   else
34587     input_to_shortpath="$new_path"
34588   fi
34589 
34590   # Call helper function which possibly converts this using DOS-style short mode.
34591   # If so, the updated path is stored in $new_path.
34592   new_path="$input_to_shortpath"
34593 
34594   input_path="$input_to_shortpath"
34595   # Check if we need to convert this using DOS-style short mode. If the path
34596   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34597   # take no chances and rewrite it.
34598   # Note: m4 eats our [], so we need to use [ and ] instead.
34599   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34600   if test "x$has_forbidden_chars" != x; then
34601     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34602     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34603     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34604     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34605       # Going to short mode and back again did indeed matter. Since short mode is
34606       # case insensitive, let's make it lowercase to improve readability.
34607       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34608       # Now convert it back to Unix-style (cygpath)
34609       input_path=`$CYGPATH -u "$shortmode_path"`
34610       new_path="$input_path"
34611     fi
34612   fi
34613 
34614   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34615   if test "x$test_cygdrive_prefix" = x; then
34616     # As a simple fix, exclude /usr/bin since it's not a real path.
34617     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34618       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34619       # a path prefixed by /cygdrive for fixpath to work.
34620       new_path="$CYGWIN_ROOT_PATH$input_path"
34621     fi
34622   fi
34623 
34624   # remove trailing .exe if any
34625   new_path="${new_path/%.exe/}"
34626 
34627     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34628 
34629   # First separate the path from the arguments. This will split at the first
34630   # space.
34631   complete="$CXXCPP"
34632   path="${complete%% *}"
34633   tmp="$complete EOL"
34634   arguments="${tmp#* }"
34635 
34636   # Input might be given as Windows format, start by converting to
34637   # unix format.
34638   new_path="$path"
34639 
34640   windows_path="$new_path"
34641   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34642     unix_path=`$CYGPATH -u "$windows_path"`
34643     new_path="$unix_path"
34644   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34645     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34646     new_path="$unix_path"
34647   fi
34648 
34649 
34650   # Now try to locate executable using which
34651   new_path=`$WHICH "$new_path" 2> /dev/null`
34652 
34653   if test "x$new_path" = x; then
34654     # Oops. Which didn't find the executable.
34655     # The splitting of arguments from the executable at a space might have been incorrect,
34656     # since paths with space are more likely in Windows. Give it another try with the whole
34657     # argument.
34658     path="$complete"
34659     arguments="EOL"
34660     new_path="$path"
34661 
34662   windows_path="$new_path"
34663   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34664     unix_path=`$CYGPATH -u "$windows_path"`
34665     new_path="$unix_path"
34666   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34667     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34668     new_path="$unix_path"
34669   fi
34670 
34671 
34672     new_path=`$WHICH "$new_path" 2> /dev/null`
34673     # bat and cmd files are not always considered executable in MSYS causing which
34674     # to not find them
34675     if test "x$new_path" = x \
34676         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34677         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34678       new_path="$path"
34679 
34680   windows_path="$new_path"
34681   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34682     unix_path=`$CYGPATH -u "$windows_path"`
34683     new_path="$unix_path"
34684   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34685     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34686     new_path="$unix_path"
34687   fi
34688 
34689     fi
34690 
34691     if test "x$new_path" = x; then
34692       # It's still not found. Now this is an unrecoverable error.
34693       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34694 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34695       has_space=`$ECHO "$complete" | $GREP " "`
34696       if test "x$has_space" != x; then
34697         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34698 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34699       fi
34700       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34701     fi
34702   fi
34703 
34704   # Now new_path has a complete unix path to the binary
34705   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34706     # Keep paths in /bin as-is, but remove trailing .exe if any
34707     new_path="${new_path/%.exe/}"
34708     # Do not save /bin paths to all_fixpath_prefixes!
34709   else
34710     # Not in mixed or Windows style, start by that.
34711     new_path=`cmd //c echo $new_path`
34712 
34713   input_path="$new_path"
34714   # Check if we need to convert this using DOS-style short mode. If the path
34715   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34716   # take no chances and rewrite it.
34717   # Note: m4 eats our [], so we need to use [ and ] instead.
34718   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34719   if test "x$has_forbidden_chars" != x; then
34720     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34721     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34722   fi
34723 
34724     # Output is in $new_path
34725 
34726   windows_path="$new_path"
34727   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34728     unix_path=`$CYGPATH -u "$windows_path"`
34729     new_path="$unix_path"
34730   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34731     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34732     new_path="$unix_path"
34733   fi
34734 
34735     # remove trailing .exe if any
34736     new_path="${new_path/%.exe/}"
34737 
34738     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34739     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34740   fi
34741 
34742     else
34743       # We're on a unix platform. Hooray! :)
34744       # First separate the path from the arguments. This will split at the first
34745       # space.
34746       complete="$CXXCPP"
34747       path="${complete%% *}"
34748       tmp="$complete EOL"
34749       arguments="${tmp#* }"
34750 
34751       # Cannot rely on the command "which" here since it doesn't always work.
34752       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34753       if test -z "$is_absolute_path"; then
34754         # Path to executable is not absolute. Find it.
34755         IFS_save="$IFS"
34756         IFS=:
34757         for p in $PATH; do
34758           if test -f "$p/$path" && test -x "$p/$path"; then
34759             new_path="$p/$path"
34760             break
34761           fi
34762         done
34763         IFS="$IFS_save"
34764       else
34765         # This is an absolute path, we can use it without further modifications.
34766         new_path="$path"
34767       fi
34768 
34769       if test "x$new_path" = x; then
34770         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34771 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34772         has_space=`$ECHO "$complete" | $GREP " "`
34773         if test "x$has_space" != x; then
34774           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34775 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34776         fi
34777         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34778       fi
34779     fi
34780 
34781     # Now join together the path and the arguments once again
34782     if test "x$arguments" != xEOL; then
34783       new_complete="$new_path ${arguments% *}"
34784     else
34785       new_complete="$new_path"
34786     fi
34787 
34788     if test "x$complete" != "x$new_complete"; then
34789       CXXCPP="$new_complete"
34790       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
34791 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
34792     fi
34793   fi
34794 
34795 
34796   #
34797   # Setup the linker (LD)
34798   #
34799   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34800     # In the Microsoft toolchain we have a separate LD command "link".
34801     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
34802     # a cygwin program for something completely different.
34803     # Extract the first word of "link", so it can be a program name with args.
34804 set dummy link; ac_word=$2
34805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34806 $as_echo_n "checking for $ac_word... " >&6; }
34807 if ${ac_cv_prog_LD+:} false; then :
34808   $as_echo_n "(cached) " >&6
34809 else
34810   if test -n "$LD"; then
34811   ac_cv_prog_LD="$LD" # Let the user override the test.
34812 else
34813   ac_prog_rejected=no
34814 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34815 for as_dir in $PATH
34816 do
34817   IFS=$as_save_IFS
34818   test -z "$as_dir" && as_dir=.
34819     for ac_exec_ext in '' $ac_executable_extensions; do
34820   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34821     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
34822        ac_prog_rejected=yes
34823        continue
34824      fi
34825     ac_cv_prog_LD="link"
34826     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34827     break 2
34828   fi
34829 done
34830   done
34831 IFS=$as_save_IFS
34832 
34833 if test $ac_prog_rejected = yes; then
34834   # We found a bogon in the path, so make sure we never use it.
34835   set dummy $ac_cv_prog_LD
34836   shift
34837   if test $# != 0; then
34838     # We chose a different compiler from the bogus one.
34839     # However, it has the same basename, so the bogon will be chosen
34840     # first if we set LD to just the basename; use the full file name.
34841     shift
34842     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
34843   fi
34844 fi
34845 fi
34846 fi
34847 LD=$ac_cv_prog_LD
34848 if test -n "$LD"; then
34849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
34850 $as_echo "$LD" >&6; }
34851 else
34852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34853 $as_echo "no" >&6; }
34854 fi
34855 
34856 
34857 
34858   # Only process if variable expands to non-empty
34859 
34860   if test "x$LD" != x; then
34861     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34862 
34863   # First separate the path from the arguments. This will split at the first
34864   # space.
34865   complete="$LD"
34866   path="${complete%% *}"
34867   tmp="$complete EOL"
34868   arguments="${tmp#* }"
34869 
34870   # Input might be given as Windows format, start by converting to
34871   # unix format.
34872   new_path=`$CYGPATH -u "$path"`
34873 
34874   # Now try to locate executable using which
34875   new_path=`$WHICH "$new_path" 2> /dev/null`
34876   # bat and cmd files are not always considered executable in cygwin causing which
34877   # to not find them
34878   if test "x$new_path" = x \
34879       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34880       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34881     new_path=`$CYGPATH -u "$path"`
34882   fi
34883   if test "x$new_path" = x; then
34884     # Oops. Which didn't find the executable.
34885     # The splitting of arguments from the executable at a space might have been incorrect,
34886     # since paths with space are more likely in Windows. Give it another try with the whole
34887     # argument.
34888     path="$complete"
34889     arguments="EOL"
34890     new_path=`$CYGPATH -u "$path"`
34891     new_path=`$WHICH "$new_path" 2> /dev/null`
34892     # bat and cmd files are not always considered executable in cygwin causing which
34893     # to not find them
34894     if test "x$new_path" = x \
34895         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34896         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34897       new_path=`$CYGPATH -u "$path"`
34898     fi
34899     if test "x$new_path" = x; then
34900       # It's still not found. Now this is an unrecoverable error.
34901       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
34902 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
34903       has_space=`$ECHO "$complete" | $GREP " "`
34904       if test "x$has_space" != x; then
34905         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34906 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34907       fi
34908       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34909     fi
34910   fi
34911 
34912   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34913   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34914   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34915   # "foo.exe" is OK but "foo" is an error.
34916   #
34917   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34918   # It is also a way to make sure we got the proper file name for the real test later on.
34919   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34920   if test "x$test_shortpath" = x; then
34921     # Short path failed, file does not exist as specified.
34922     # Try adding .exe or .cmd
34923     if test -f "${new_path}.exe"; then
34924       input_to_shortpath="${new_path}.exe"
34925     elif test -f "${new_path}.cmd"; then
34926       input_to_shortpath="${new_path}.cmd"
34927     else
34928       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
34929 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
34930       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34931 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34932       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34933     fi
34934   else
34935     input_to_shortpath="$new_path"
34936   fi
34937 
34938   # Call helper function which possibly converts this using DOS-style short mode.
34939   # If so, the updated path is stored in $new_path.
34940   new_path="$input_to_shortpath"
34941 
34942   input_path="$input_to_shortpath"
34943   # Check if we need to convert this using DOS-style short mode. If the path
34944   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34945   # take no chances and rewrite it.
34946   # Note: m4 eats our [], so we need to use [ and ] instead.
34947   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34948   if test "x$has_forbidden_chars" != x; then
34949     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34950     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34951     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34952     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34953       # Going to short mode and back again did indeed matter. Since short mode is
34954       # case insensitive, let's make it lowercase to improve readability.
34955       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34956       # Now convert it back to Unix-style (cygpath)
34957       input_path=`$CYGPATH -u "$shortmode_path"`
34958       new_path="$input_path"
34959     fi
34960   fi
34961 
34962   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34963   if test "x$test_cygdrive_prefix" = x; then
34964     # As a simple fix, exclude /usr/bin since it's not a real path.
34965     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34966       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34967       # a path prefixed by /cygdrive for fixpath to work.
34968       new_path="$CYGWIN_ROOT_PATH$input_path"
34969     fi
34970   fi
34971 
34972   # remove trailing .exe if any
34973   new_path="${new_path/%.exe/}"
34974 
34975     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34976 
34977   # First separate the path from the arguments. This will split at the first
34978   # space.
34979   complete="$LD"
34980   path="${complete%% *}"
34981   tmp="$complete EOL"
34982   arguments="${tmp#* }"
34983 
34984   # Input might be given as Windows format, start by converting to
34985   # unix format.
34986   new_path="$path"
34987 
34988   windows_path="$new_path"
34989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34990     unix_path=`$CYGPATH -u "$windows_path"`
34991     new_path="$unix_path"
34992   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34993     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34994     new_path="$unix_path"
34995   fi
34996 
34997 
34998   # Now try to locate executable using which
34999   new_path=`$WHICH "$new_path" 2> /dev/null`
35000 
35001   if test "x$new_path" = x; then
35002     # Oops. Which didn't find the executable.
35003     # The splitting of arguments from the executable at a space might have been incorrect,
35004     # since paths with space are more likely in Windows. Give it another try with the whole
35005     # argument.
35006     path="$complete"
35007     arguments="EOL"
35008     new_path="$path"
35009 
35010   windows_path="$new_path"
35011   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35012     unix_path=`$CYGPATH -u "$windows_path"`
35013     new_path="$unix_path"
35014   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35015     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35016     new_path="$unix_path"
35017   fi
35018 
35019 
35020     new_path=`$WHICH "$new_path" 2> /dev/null`
35021     # bat and cmd files are not always considered executable in MSYS causing which
35022     # to not find them
35023     if test "x$new_path" = x \
35024         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35025         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35026       new_path="$path"
35027 
35028   windows_path="$new_path"
35029   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35030     unix_path=`$CYGPATH -u "$windows_path"`
35031     new_path="$unix_path"
35032   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35033     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35034     new_path="$unix_path"
35035   fi
35036 
35037     fi
35038 
35039     if test "x$new_path" = x; then
35040       # It's still not found. Now this is an unrecoverable error.
35041       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35042 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35043       has_space=`$ECHO "$complete" | $GREP " "`
35044       if test "x$has_space" != x; then
35045         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35046 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35047       fi
35048       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35049     fi
35050   fi
35051 
35052   # Now new_path has a complete unix path to the binary
35053   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35054     # Keep paths in /bin as-is, but remove trailing .exe if any
35055     new_path="${new_path/%.exe/}"
35056     # Do not save /bin paths to all_fixpath_prefixes!
35057   else
35058     # Not in mixed or Windows style, start by that.
35059     new_path=`cmd //c echo $new_path`
35060 
35061   input_path="$new_path"
35062   # Check if we need to convert this using DOS-style short mode. If the path
35063   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35064   # take no chances and rewrite it.
35065   # Note: m4 eats our [], so we need to use [ and ] instead.
35066   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35067   if test "x$has_forbidden_chars" != x; then
35068     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35069     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35070   fi
35071 
35072     # Output is in $new_path
35073 
35074   windows_path="$new_path"
35075   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35076     unix_path=`$CYGPATH -u "$windows_path"`
35077     new_path="$unix_path"
35078   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35079     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35080     new_path="$unix_path"
35081   fi
35082 
35083     # remove trailing .exe if any
35084     new_path="${new_path/%.exe/}"
35085 
35086     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35087     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35088   fi
35089 
35090     else
35091       # We're on a unix platform. Hooray! :)
35092       # First separate the path from the arguments. This will split at the first
35093       # space.
35094       complete="$LD"
35095       path="${complete%% *}"
35096       tmp="$complete EOL"
35097       arguments="${tmp#* }"
35098 
35099       # Cannot rely on the command "which" here since it doesn't always work.
35100       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35101       if test -z "$is_absolute_path"; then
35102         # Path to executable is not absolute. Find it.
35103         IFS_save="$IFS"
35104         IFS=:
35105         for p in $PATH; do
35106           if test -f "$p/$path" && test -x "$p/$path"; then
35107             new_path="$p/$path"
35108             break
35109           fi
35110         done
35111         IFS="$IFS_save"
35112       else
35113         # This is an absolute path, we can use it without further modifications.
35114         new_path="$path"
35115       fi
35116 
35117       if test "x$new_path" = x; then
35118         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35119 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35120         has_space=`$ECHO "$complete" | $GREP " "`
35121         if test "x$has_space" != x; then
35122           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35123 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35124         fi
35125         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35126       fi
35127     fi
35128 
35129     # Now join together the path and the arguments once again
35130     if test "x$arguments" != xEOL; then
35131       new_complete="$new_path ${arguments% *}"
35132     else
35133       new_complete="$new_path"
35134     fi
35135 
35136     if test "x$complete" != "x$new_complete"; then
35137       LD="$new_complete"
35138       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35139 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35140     fi
35141   fi
35142 
35143     # Verify that we indeed succeeded with this trick.
35144     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35145 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35146     "$LD" --version > /dev/null
35147     if test $? -eq 0 ; then
35148       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35149 $as_echo "no" >&6; }
35150       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35151     else
35152       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35153 $as_echo "yes" >&6; }
35154     fi
35155     LDCXX="$LD"
35156   else
35157     # All other toolchains use the compiler to link.
35158     LD="$CC"
35159     LDCXX="$CXX"
35160   fi
35161 
35162   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35163 
35164 
35165   #
35166   # Setup the assembler (AS)
35167   #
35168   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35169     # FIXME: should this really be solaris, or solstudio?
35170 
35171 
35172   # Publish this variable in the help.
35173 
35174 
35175   if [ -z "${AS+x}" ]; then
35176     # The variable is not set by user, try to locate tool using the code snippet
35177     for ac_prog in as
35178 do
35179   # Extract the first word of "$ac_prog", so it can be a program name with args.
35180 set dummy $ac_prog; ac_word=$2
35181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35182 $as_echo_n "checking for $ac_word... " >&6; }
35183 if ${ac_cv_path_AS+:} false; then :
35184   $as_echo_n "(cached) " >&6
35185 else
35186   case $AS in
35187   [\\/]* | ?:[\\/]*)
35188   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35189   ;;
35190   *)
35191   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35192 for as_dir in $PATH
35193 do
35194   IFS=$as_save_IFS
35195   test -z "$as_dir" && as_dir=.
35196     for ac_exec_ext in '' $ac_executable_extensions; do
35197   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35198     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35199     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35200     break 2
35201   fi
35202 done
35203   done
35204 IFS=$as_save_IFS
35205 
35206   ;;
35207 esac
35208 fi
35209 AS=$ac_cv_path_AS
35210 if test -n "$AS"; then
35211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35212 $as_echo "$AS" >&6; }
35213 else
35214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35215 $as_echo "no" >&6; }
35216 fi
35217 
35218 
35219   test -n "$AS" && break
35220 done
35221 
35222   else
35223     # The variable is set, but is it from the command line or the environment?
35224 
35225     # Try to remove the string !AS! from our list.
35226     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35227     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35228       # If it failed, the variable was not from the command line. Ignore it,
35229       # but warn the user (except for BASH, which is always set by the calling BASH).
35230       if test "xAS" != xBASH; then
35231         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35232 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35233       fi
35234       # Try to locate tool using the code snippet
35235       for ac_prog in as
35236 do
35237   # Extract the first word of "$ac_prog", so it can be a program name with args.
35238 set dummy $ac_prog; ac_word=$2
35239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35240 $as_echo_n "checking for $ac_word... " >&6; }
35241 if ${ac_cv_path_AS+:} false; then :
35242   $as_echo_n "(cached) " >&6
35243 else
35244   case $AS in
35245   [\\/]* | ?:[\\/]*)
35246   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35247   ;;
35248   *)
35249   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35250 for as_dir in $PATH
35251 do
35252   IFS=$as_save_IFS
35253   test -z "$as_dir" && as_dir=.
35254     for ac_exec_ext in '' $ac_executable_extensions; do
35255   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35256     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35257     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35258     break 2
35259   fi
35260 done
35261   done
35262 IFS=$as_save_IFS
35263 
35264   ;;
35265 esac
35266 fi
35267 AS=$ac_cv_path_AS
35268 if test -n "$AS"; then
35269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35270 $as_echo "$AS" >&6; }
35271 else
35272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35273 $as_echo "no" >&6; }
35274 fi
35275 
35276 
35277   test -n "$AS" && break
35278 done
35279 
35280     else
35281       # If it succeeded, then it was overridden by the user. We will use it
35282       # for the tool.
35283 
35284       # First remove it from the list of overridden variables, so we can test
35285       # for unknown variables in the end.
35286       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35287 
35288       # Check if we try to supply an empty value
35289       if test "x$AS" = x; then
35290         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35291 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35292         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35293 $as_echo_n "checking for AS... " >&6; }
35294         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35295 $as_echo "disabled" >&6; }
35296       else
35297         # Check if the provided tool contains a complete path.
35298         tool_specified="$AS"
35299         tool_basename="${tool_specified##*/}"
35300         if test "x$tool_basename" = "x$tool_specified"; then
35301           # A command without a complete path is provided, search $PATH.
35302           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35303 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35304           # Extract the first word of "$tool_basename", so it can be a program name with args.
35305 set dummy $tool_basename; ac_word=$2
35306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35307 $as_echo_n "checking for $ac_word... " >&6; }
35308 if ${ac_cv_path_AS+:} false; then :
35309   $as_echo_n "(cached) " >&6
35310 else
35311   case $AS in
35312   [\\/]* | ?:[\\/]*)
35313   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35314   ;;
35315   *)
35316   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35317 for as_dir in $PATH
35318 do
35319   IFS=$as_save_IFS
35320   test -z "$as_dir" && as_dir=.
35321     for ac_exec_ext in '' $ac_executable_extensions; do
35322   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35323     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35324     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35325     break 2
35326   fi
35327 done
35328   done
35329 IFS=$as_save_IFS
35330 
35331   ;;
35332 esac
35333 fi
35334 AS=$ac_cv_path_AS
35335 if test -n "$AS"; then
35336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35337 $as_echo "$AS" >&6; }
35338 else
35339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35340 $as_echo "no" >&6; }
35341 fi
35342 
35343 
35344           if test "x$AS" = x; then
35345             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35346           fi
35347         else
35348           # Otherwise we believe it is a complete path. Use it as it is.
35349           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35350 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35351           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35352 $as_echo_n "checking for AS... " >&6; }
35353           if test ! -x "$tool_specified"; then
35354             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35355 $as_echo "not found" >&6; }
35356             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35357           fi
35358           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35359 $as_echo "$tool_specified" >&6; }
35360         fi
35361       fi
35362     fi
35363 
35364   fi
35365 
35366 
35367 
35368   # Only process if variable expands to non-empty
35369 
35370   if test "x$AS" != x; then
35371     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35372 
35373   # First separate the path from the arguments. This will split at the first
35374   # space.
35375   complete="$AS"
35376   path="${complete%% *}"
35377   tmp="$complete EOL"
35378   arguments="${tmp#* }"
35379 
35380   # Input might be given as Windows format, start by converting to
35381   # unix format.
35382   new_path=`$CYGPATH -u "$path"`
35383 
35384   # Now try to locate executable using which
35385   new_path=`$WHICH "$new_path" 2> /dev/null`
35386   # bat and cmd files are not always considered executable in cygwin causing which
35387   # to not find them
35388   if test "x$new_path" = x \
35389       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35390       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35391     new_path=`$CYGPATH -u "$path"`
35392   fi
35393   if test "x$new_path" = x; then
35394     # Oops. Which didn't find the executable.
35395     # The splitting of arguments from the executable at a space might have been incorrect,
35396     # since paths with space are more likely in Windows. Give it another try with the whole
35397     # argument.
35398     path="$complete"
35399     arguments="EOL"
35400     new_path=`$CYGPATH -u "$path"`
35401     new_path=`$WHICH "$new_path" 2> /dev/null`
35402     # bat and cmd files are not always considered executable in cygwin causing which
35403     # to not find them
35404     if test "x$new_path" = x \
35405         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35406         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35407       new_path=`$CYGPATH -u "$path"`
35408     fi
35409     if test "x$new_path" = x; then
35410       # It's still not found. Now this is an unrecoverable error.
35411       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35412 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35413       has_space=`$ECHO "$complete" | $GREP " "`
35414       if test "x$has_space" != x; then
35415         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35416 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35417       fi
35418       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35419     fi
35420   fi
35421 
35422   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35423   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35424   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35425   # "foo.exe" is OK but "foo" is an error.
35426   #
35427   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35428   # It is also a way to make sure we got the proper file name for the real test later on.
35429   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35430   if test "x$test_shortpath" = x; then
35431     # Short path failed, file does not exist as specified.
35432     # Try adding .exe or .cmd
35433     if test -f "${new_path}.exe"; then
35434       input_to_shortpath="${new_path}.exe"
35435     elif test -f "${new_path}.cmd"; then
35436       input_to_shortpath="${new_path}.cmd"
35437     else
35438       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
35439 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
35440       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35441 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35442       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35443     fi
35444   else
35445     input_to_shortpath="$new_path"
35446   fi
35447 
35448   # Call helper function which possibly converts this using DOS-style short mode.
35449   # If so, the updated path is stored in $new_path.
35450   new_path="$input_to_shortpath"
35451 
35452   input_path="$input_to_shortpath"
35453   # Check if we need to convert this using DOS-style short mode. If the path
35454   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35455   # take no chances and rewrite it.
35456   # Note: m4 eats our [], so we need to use [ and ] instead.
35457   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35458   if test "x$has_forbidden_chars" != x; then
35459     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35460     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35461     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35462     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35463       # Going to short mode and back again did indeed matter. Since short mode is
35464       # case insensitive, let's make it lowercase to improve readability.
35465       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35466       # Now convert it back to Unix-style (cygpath)
35467       input_path=`$CYGPATH -u "$shortmode_path"`
35468       new_path="$input_path"
35469     fi
35470   fi
35471 
35472   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35473   if test "x$test_cygdrive_prefix" = x; then
35474     # As a simple fix, exclude /usr/bin since it's not a real path.
35475     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35476       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35477       # a path prefixed by /cygdrive for fixpath to work.
35478       new_path="$CYGWIN_ROOT_PATH$input_path"
35479     fi
35480   fi
35481 
35482   # remove trailing .exe if any
35483   new_path="${new_path/%.exe/}"
35484 
35485     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35486 
35487   # First separate the path from the arguments. This will split at the first
35488   # space.
35489   complete="$AS"
35490   path="${complete%% *}"
35491   tmp="$complete EOL"
35492   arguments="${tmp#* }"
35493 
35494   # Input might be given as Windows format, start by converting to
35495   # unix format.
35496   new_path="$path"
35497 
35498   windows_path="$new_path"
35499   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35500     unix_path=`$CYGPATH -u "$windows_path"`
35501     new_path="$unix_path"
35502   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35503     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35504     new_path="$unix_path"
35505   fi
35506 
35507 
35508   # Now try to locate executable using which
35509   new_path=`$WHICH "$new_path" 2> /dev/null`
35510 
35511   if test "x$new_path" = x; then
35512     # Oops. Which didn't find the executable.
35513     # The splitting of arguments from the executable at a space might have been incorrect,
35514     # since paths with space are more likely in Windows. Give it another try with the whole
35515     # argument.
35516     path="$complete"
35517     arguments="EOL"
35518     new_path="$path"
35519 
35520   windows_path="$new_path"
35521   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35522     unix_path=`$CYGPATH -u "$windows_path"`
35523     new_path="$unix_path"
35524   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35525     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35526     new_path="$unix_path"
35527   fi
35528 
35529 
35530     new_path=`$WHICH "$new_path" 2> /dev/null`
35531     # bat and cmd files are not always considered executable in MSYS causing which
35532     # to not find them
35533     if test "x$new_path" = x \
35534         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35535         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35536       new_path="$path"
35537 
35538   windows_path="$new_path"
35539   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35540     unix_path=`$CYGPATH -u "$windows_path"`
35541     new_path="$unix_path"
35542   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35543     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35544     new_path="$unix_path"
35545   fi
35546 
35547     fi
35548 
35549     if test "x$new_path" = x; then
35550       # It's still not found. Now this is an unrecoverable error.
35551       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35552 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35553       has_space=`$ECHO "$complete" | $GREP " "`
35554       if test "x$has_space" != x; then
35555         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35556 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35557       fi
35558       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35559     fi
35560   fi
35561 
35562   # Now new_path has a complete unix path to the binary
35563   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35564     # Keep paths in /bin as-is, but remove trailing .exe if any
35565     new_path="${new_path/%.exe/}"
35566     # Do not save /bin paths to all_fixpath_prefixes!
35567   else
35568     # Not in mixed or Windows style, start by that.
35569     new_path=`cmd //c echo $new_path`
35570 
35571   input_path="$new_path"
35572   # Check if we need to convert this using DOS-style short mode. If the path
35573   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35574   # take no chances and rewrite it.
35575   # Note: m4 eats our [], so we need to use [ and ] instead.
35576   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35577   if test "x$has_forbidden_chars" != x; then
35578     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35579     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35580   fi
35581 
35582     # Output is in $new_path
35583 
35584   windows_path="$new_path"
35585   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35586     unix_path=`$CYGPATH -u "$windows_path"`
35587     new_path="$unix_path"
35588   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35589     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35590     new_path="$unix_path"
35591   fi
35592 
35593     # remove trailing .exe if any
35594     new_path="${new_path/%.exe/}"
35595 
35596     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35597     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35598   fi
35599 
35600     else
35601       # We're on a unix platform. Hooray! :)
35602       # First separate the path from the arguments. This will split at the first
35603       # space.
35604       complete="$AS"
35605       path="${complete%% *}"
35606       tmp="$complete EOL"
35607       arguments="${tmp#* }"
35608 
35609       # Cannot rely on the command "which" here since it doesn't always work.
35610       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35611       if test -z "$is_absolute_path"; then
35612         # Path to executable is not absolute. Find it.
35613         IFS_save="$IFS"
35614         IFS=:
35615         for p in $PATH; do
35616           if test -f "$p/$path" && test -x "$p/$path"; then
35617             new_path="$p/$path"
35618             break
35619           fi
35620         done
35621         IFS="$IFS_save"
35622       else
35623         # This is an absolute path, we can use it without further modifications.
35624         new_path="$path"
35625       fi
35626 
35627       if test "x$new_path" = x; then
35628         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35629 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35630         has_space=`$ECHO "$complete" | $GREP " "`
35631         if test "x$has_space" != x; then
35632           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35633 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35634         fi
35635         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35636       fi
35637     fi
35638 
35639     # Now join together the path and the arguments once again
35640     if test "x$arguments" != xEOL; then
35641       new_complete="$new_path ${arguments% *}"
35642     else
35643       new_complete="$new_path"
35644     fi
35645 
35646     if test "x$complete" != "x$new_complete"; then
35647       AS="$new_complete"
35648       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
35649 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
35650     fi
35651   fi
35652 
35653   else
35654     # FIXME: is this correct for microsoft?
35655     AS="$CC -c"
35656   fi
35657 
35658 
35659   #
35660   # Setup the archiver (AR)
35661   #
35662   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35663     # The corresponding ar tool is lib.exe (used to create static libraries)
35664     # Extract the first word of "lib", so it can be a program name with args.
35665 set dummy lib; ac_word=$2
35666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35667 $as_echo_n "checking for $ac_word... " >&6; }
35668 if ${ac_cv_prog_AR+:} false; then :
35669   $as_echo_n "(cached) " >&6
35670 else
35671   if test -n "$AR"; then
35672   ac_cv_prog_AR="$AR" # Let the user override the test.
35673 else
35674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35675 for as_dir in $PATH
35676 do
35677   IFS=$as_save_IFS
35678   test -z "$as_dir" && as_dir=.
35679     for ac_exec_ext in '' $ac_executable_extensions; do
35680   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35681     ac_cv_prog_AR="lib"
35682     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35683     break 2
35684   fi
35685 done
35686   done
35687 IFS=$as_save_IFS
35688 
35689 fi
35690 fi
35691 AR=$ac_cv_prog_AR
35692 if test -n "$AR"; then
35693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35694 $as_echo "$AR" >&6; }
35695 else
35696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35697 $as_echo "no" >&6; }
35698 fi
35699 
35700 
35701   else
35702 
35703 
35704   # Publish this variable in the help.
35705 
35706 
35707   if [ -z "${AR+x}" ]; then
35708     # The variable is not set by user, try to locate tool using the code snippet
35709     if test -n "$ac_tool_prefix"; then
35710   for ac_prog in ar
35711   do
35712     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35713 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35715 $as_echo_n "checking for $ac_word... " >&6; }
35716 if ${ac_cv_prog_AR+:} false; then :
35717   $as_echo_n "(cached) " >&6
35718 else
35719   if test -n "$AR"; then
35720   ac_cv_prog_AR="$AR" # Let the user override the test.
35721 else
35722 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35723 for as_dir in $PATH
35724 do
35725   IFS=$as_save_IFS
35726   test -z "$as_dir" && as_dir=.
35727     for ac_exec_ext in '' $ac_executable_extensions; do
35728   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35729     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35730     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35731     break 2
35732   fi
35733 done
35734   done
35735 IFS=$as_save_IFS
35736 
35737 fi
35738 fi
35739 AR=$ac_cv_prog_AR
35740 if test -n "$AR"; then
35741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35742 $as_echo "$AR" >&6; }
35743 else
35744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35745 $as_echo "no" >&6; }
35746 fi
35747 
35748 
35749     test -n "$AR" && break
35750   done
35751 fi
35752 if test -z "$AR"; then
35753   ac_ct_AR=$AR
35754   for ac_prog in ar
35755 do
35756   # Extract the first word of "$ac_prog", so it can be a program name with args.
35757 set dummy $ac_prog; ac_word=$2
35758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35759 $as_echo_n "checking for $ac_word... " >&6; }
35760 if ${ac_cv_prog_ac_ct_AR+:} false; then :
35761   $as_echo_n "(cached) " >&6
35762 else
35763   if test -n "$ac_ct_AR"; then
35764   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35765 else
35766 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35767 for as_dir in $PATH
35768 do
35769   IFS=$as_save_IFS
35770   test -z "$as_dir" && as_dir=.
35771     for ac_exec_ext in '' $ac_executable_extensions; do
35772   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35773     ac_cv_prog_ac_ct_AR="$ac_prog"
35774     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35775     break 2
35776   fi
35777 done
35778   done
35779 IFS=$as_save_IFS
35780 
35781 fi
35782 fi
35783 ac_ct_AR=$ac_cv_prog_ac_ct_AR
35784 if test -n "$ac_ct_AR"; then
35785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35786 $as_echo "$ac_ct_AR" >&6; }
35787 else
35788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35789 $as_echo "no" >&6; }
35790 fi
35791 
35792 
35793   test -n "$ac_ct_AR" && break
35794 done
35795 
35796   if test "x$ac_ct_AR" = x; then
35797     AR=""
35798   else
35799     case $cross_compiling:$ac_tool_warned in
35800 yes:)
35801 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35802 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35803 ac_tool_warned=yes ;;
35804 esac
35805     AR=$ac_ct_AR
35806   fi
35807 fi
35808 
35809   else
35810     # The variable is set, but is it from the command line or the environment?
35811 
35812     # Try to remove the string !AR! from our list.
35813     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
35814     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35815       # If it failed, the variable was not from the command line. Ignore it,
35816       # but warn the user (except for BASH, which is always set by the calling BASH).
35817       if test "xAR" != xBASH; then
35818         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
35819 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
35820       fi
35821       # Try to locate tool using the code snippet
35822       if test -n "$ac_tool_prefix"; then
35823   for ac_prog in ar
35824   do
35825     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35826 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35828 $as_echo_n "checking for $ac_word... " >&6; }
35829 if ${ac_cv_prog_AR+:} false; then :
35830   $as_echo_n "(cached) " >&6
35831 else
35832   if test -n "$AR"; then
35833   ac_cv_prog_AR="$AR" # Let the user override the test.
35834 else
35835 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35836 for as_dir in $PATH
35837 do
35838   IFS=$as_save_IFS
35839   test -z "$as_dir" && as_dir=.
35840     for ac_exec_ext in '' $ac_executable_extensions; do
35841   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35842     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35843     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35844     break 2
35845   fi
35846 done
35847   done
35848 IFS=$as_save_IFS
35849 
35850 fi
35851 fi
35852 AR=$ac_cv_prog_AR
35853 if test -n "$AR"; then
35854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35855 $as_echo "$AR" >&6; }
35856 else
35857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35858 $as_echo "no" >&6; }
35859 fi
35860 
35861 
35862     test -n "$AR" && break
35863   done
35864 fi
35865 if test -z "$AR"; then
35866   ac_ct_AR=$AR
35867   for ac_prog in ar
35868 do
35869   # Extract the first word of "$ac_prog", so it can be a program name with args.
35870 set dummy $ac_prog; ac_word=$2
35871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35872 $as_echo_n "checking for $ac_word... " >&6; }
35873 if ${ac_cv_prog_ac_ct_AR+:} false; then :
35874   $as_echo_n "(cached) " >&6
35875 else
35876   if test -n "$ac_ct_AR"; then
35877   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35878 else
35879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35880 for as_dir in $PATH
35881 do
35882   IFS=$as_save_IFS
35883   test -z "$as_dir" && as_dir=.
35884     for ac_exec_ext in '' $ac_executable_extensions; do
35885   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35886     ac_cv_prog_ac_ct_AR="$ac_prog"
35887     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35888     break 2
35889   fi
35890 done
35891   done
35892 IFS=$as_save_IFS
35893 
35894 fi
35895 fi
35896 ac_ct_AR=$ac_cv_prog_ac_ct_AR
35897 if test -n "$ac_ct_AR"; then
35898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35899 $as_echo "$ac_ct_AR" >&6; }
35900 else
35901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35902 $as_echo "no" >&6; }
35903 fi
35904 
35905 
35906   test -n "$ac_ct_AR" && break
35907 done
35908 
35909   if test "x$ac_ct_AR" = x; then
35910     AR=""
35911   else
35912     case $cross_compiling:$ac_tool_warned in
35913 yes:)
35914 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35915 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35916 ac_tool_warned=yes ;;
35917 esac
35918     AR=$ac_ct_AR
35919   fi
35920 fi
35921 
35922     else
35923       # If it succeeded, then it was overridden by the user. We will use it
35924       # for the tool.
35925 
35926       # First remove it from the list of overridden variables, so we can test
35927       # for unknown variables in the end.
35928       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35929 
35930       # Check if we try to supply an empty value
35931       if test "x$AR" = x; then
35932         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
35933 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
35934         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35935 $as_echo_n "checking for AR... " >&6; }
35936         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35937 $as_echo "disabled" >&6; }
35938       else
35939         # Check if the provided tool contains a complete path.
35940         tool_specified="$AR"
35941         tool_basename="${tool_specified##*/}"
35942         if test "x$tool_basename" = "x$tool_specified"; then
35943           # A command without a complete path is provided, search $PATH.
35944           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
35945 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
35946           # Extract the first word of "$tool_basename", so it can be a program name with args.
35947 set dummy $tool_basename; ac_word=$2
35948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35949 $as_echo_n "checking for $ac_word... " >&6; }
35950 if ${ac_cv_path_AR+:} false; then :
35951   $as_echo_n "(cached) " >&6
35952 else
35953   case $AR in
35954   [\\/]* | ?:[\\/]*)
35955   ac_cv_path_AR="$AR" # Let the user override the test with a path.
35956   ;;
35957   *)
35958   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35959 for as_dir in $PATH
35960 do
35961   IFS=$as_save_IFS
35962   test -z "$as_dir" && as_dir=.
35963     for ac_exec_ext in '' $ac_executable_extensions; do
35964   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35965     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
35966     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35967     break 2
35968   fi
35969 done
35970   done
35971 IFS=$as_save_IFS
35972 
35973   ;;
35974 esac
35975 fi
35976 AR=$ac_cv_path_AR
35977 if test -n "$AR"; then
35978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35979 $as_echo "$AR" >&6; }
35980 else
35981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35982 $as_echo "no" >&6; }
35983 fi
35984 
35985 
35986           if test "x$AR" = x; then
35987             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35988           fi
35989         else
35990           # Otherwise we believe it is a complete path. Use it as it is.
35991           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
35992 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
35993           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35994 $as_echo_n "checking for AR... " >&6; }
35995           if test ! -x "$tool_specified"; then
35996             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35997 $as_echo "not found" >&6; }
35998             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
35999           fi
36000           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36001 $as_echo "$tool_specified" >&6; }
36002         fi
36003       fi
36004     fi
36005 
36006   fi
36007 
36008 
36009   fi
36010 
36011   # Only process if variable expands to non-empty
36012 
36013   if test "x$AR" != x; then
36014     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36015 
36016   # First separate the path from the arguments. This will split at the first
36017   # space.
36018   complete="$AR"
36019   path="${complete%% *}"
36020   tmp="$complete EOL"
36021   arguments="${tmp#* }"
36022 
36023   # Input might be given as Windows format, start by converting to
36024   # unix format.
36025   new_path=`$CYGPATH -u "$path"`
36026 
36027   # Now try to locate executable using which
36028   new_path=`$WHICH "$new_path" 2> /dev/null`
36029   # bat and cmd files are not always considered executable in cygwin causing which
36030   # to not find them
36031   if test "x$new_path" = x \
36032       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36033       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36034     new_path=`$CYGPATH -u "$path"`
36035   fi
36036   if test "x$new_path" = x; then
36037     # Oops. Which didn't find the executable.
36038     # The splitting of arguments from the executable at a space might have been incorrect,
36039     # since paths with space are more likely in Windows. Give it another try with the whole
36040     # argument.
36041     path="$complete"
36042     arguments="EOL"
36043     new_path=`$CYGPATH -u "$path"`
36044     new_path=`$WHICH "$new_path" 2> /dev/null`
36045     # bat and cmd files are not always considered executable in cygwin causing which
36046     # to not find them
36047     if test "x$new_path" = x \
36048         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36049         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36050       new_path=`$CYGPATH -u "$path"`
36051     fi
36052     if test "x$new_path" = x; then
36053       # It's still not found. Now this is an unrecoverable error.
36054       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36055 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36056       has_space=`$ECHO "$complete" | $GREP " "`
36057       if test "x$has_space" != x; then
36058         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36059 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36060       fi
36061       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36062     fi
36063   fi
36064 
36065   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36066   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36067   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36068   # "foo.exe" is OK but "foo" is an error.
36069   #
36070   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36071   # It is also a way to make sure we got the proper file name for the real test later on.
36072   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36073   if test "x$test_shortpath" = x; then
36074     # Short path failed, file does not exist as specified.
36075     # Try adding .exe or .cmd
36076     if test -f "${new_path}.exe"; then
36077       input_to_shortpath="${new_path}.exe"
36078     elif test -f "${new_path}.cmd"; then
36079       input_to_shortpath="${new_path}.cmd"
36080     else
36081       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36082 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36083       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36084 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36085       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36086     fi
36087   else
36088     input_to_shortpath="$new_path"
36089   fi
36090 
36091   # Call helper function which possibly converts this using DOS-style short mode.
36092   # If so, the updated path is stored in $new_path.
36093   new_path="$input_to_shortpath"
36094 
36095   input_path="$input_to_shortpath"
36096   # Check if we need to convert this using DOS-style short mode. If the path
36097   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36098   # take no chances and rewrite it.
36099   # Note: m4 eats our [], so we need to use [ and ] instead.
36100   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36101   if test "x$has_forbidden_chars" != x; then
36102     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36103     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36104     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36105     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36106       # Going to short mode and back again did indeed matter. Since short mode is
36107       # case insensitive, let's make it lowercase to improve readability.
36108       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36109       # Now convert it back to Unix-style (cygpath)
36110       input_path=`$CYGPATH -u "$shortmode_path"`
36111       new_path="$input_path"
36112     fi
36113   fi
36114 
36115   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36116   if test "x$test_cygdrive_prefix" = x; then
36117     # As a simple fix, exclude /usr/bin since it's not a real path.
36118     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36119       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36120       # a path prefixed by /cygdrive for fixpath to work.
36121       new_path="$CYGWIN_ROOT_PATH$input_path"
36122     fi
36123   fi
36124 
36125   # remove trailing .exe if any
36126   new_path="${new_path/%.exe/}"
36127 
36128     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36129 
36130   # First separate the path from the arguments. This will split at the first
36131   # space.
36132   complete="$AR"
36133   path="${complete%% *}"
36134   tmp="$complete EOL"
36135   arguments="${tmp#* }"
36136 
36137   # Input might be given as Windows format, start by converting to
36138   # unix format.
36139   new_path="$path"
36140 
36141   windows_path="$new_path"
36142   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36143     unix_path=`$CYGPATH -u "$windows_path"`
36144     new_path="$unix_path"
36145   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36146     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36147     new_path="$unix_path"
36148   fi
36149 
36150 
36151   # Now try to locate executable using which
36152   new_path=`$WHICH "$new_path" 2> /dev/null`
36153 
36154   if test "x$new_path" = x; then
36155     # Oops. Which didn't find the executable.
36156     # The splitting of arguments from the executable at a space might have been incorrect,
36157     # since paths with space are more likely in Windows. Give it another try with the whole
36158     # argument.
36159     path="$complete"
36160     arguments="EOL"
36161     new_path="$path"
36162 
36163   windows_path="$new_path"
36164   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36165     unix_path=`$CYGPATH -u "$windows_path"`
36166     new_path="$unix_path"
36167   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36168     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36169     new_path="$unix_path"
36170   fi
36171 
36172 
36173     new_path=`$WHICH "$new_path" 2> /dev/null`
36174     # bat and cmd files are not always considered executable in MSYS causing which
36175     # to not find them
36176     if test "x$new_path" = x \
36177         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36178         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36179       new_path="$path"
36180 
36181   windows_path="$new_path"
36182   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36183     unix_path=`$CYGPATH -u "$windows_path"`
36184     new_path="$unix_path"
36185   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36186     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36187     new_path="$unix_path"
36188   fi
36189 
36190     fi
36191 
36192     if test "x$new_path" = x; then
36193       # It's still not found. Now this is an unrecoverable error.
36194       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36195 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36196       has_space=`$ECHO "$complete" | $GREP " "`
36197       if test "x$has_space" != x; then
36198         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36199 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36200       fi
36201       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36202     fi
36203   fi
36204 
36205   # Now new_path has a complete unix path to the binary
36206   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36207     # Keep paths in /bin as-is, but remove trailing .exe if any
36208     new_path="${new_path/%.exe/}"
36209     # Do not save /bin paths to all_fixpath_prefixes!
36210   else
36211     # Not in mixed or Windows style, start by that.
36212     new_path=`cmd //c echo $new_path`
36213 
36214   input_path="$new_path"
36215   # Check if we need to convert this using DOS-style short mode. If the path
36216   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36217   # take no chances and rewrite it.
36218   # Note: m4 eats our [], so we need to use [ and ] instead.
36219   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36220   if test "x$has_forbidden_chars" != x; then
36221     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36222     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36223   fi
36224 
36225     # Output is in $new_path
36226 
36227   windows_path="$new_path"
36228   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36229     unix_path=`$CYGPATH -u "$windows_path"`
36230     new_path="$unix_path"
36231   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36232     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36233     new_path="$unix_path"
36234   fi
36235 
36236     # remove trailing .exe if any
36237     new_path="${new_path/%.exe/}"
36238 
36239     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36240     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36241   fi
36242 
36243     else
36244       # We're on a unix platform. Hooray! :)
36245       # First separate the path from the arguments. This will split at the first
36246       # space.
36247       complete="$AR"
36248       path="${complete%% *}"
36249       tmp="$complete EOL"
36250       arguments="${tmp#* }"
36251 
36252       # Cannot rely on the command "which" here since it doesn't always work.
36253       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36254       if test -z "$is_absolute_path"; then
36255         # Path to executable is not absolute. Find it.
36256         IFS_save="$IFS"
36257         IFS=:
36258         for p in $PATH; do
36259           if test -f "$p/$path" && test -x "$p/$path"; then
36260             new_path="$p/$path"
36261             break
36262           fi
36263         done
36264         IFS="$IFS_save"
36265       else
36266         # This is an absolute path, we can use it without further modifications.
36267         new_path="$path"
36268       fi
36269 
36270       if test "x$new_path" = x; then
36271         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36272 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36273         has_space=`$ECHO "$complete" | $GREP " "`
36274         if test "x$has_space" != x; then
36275           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36276 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36277         fi
36278         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36279       fi
36280     fi
36281 
36282     # Now join together the path and the arguments once again
36283     if test "x$arguments" != xEOL; then
36284       new_complete="$new_path ${arguments% *}"
36285     else
36286       new_complete="$new_path"
36287     fi
36288 
36289     if test "x$complete" != "x$new_complete"; then
36290       AR="$new_complete"
36291       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
36292 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
36293     fi
36294   fi
36295 
36296 
36297 
36298   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
36299 
36300 
36301   # Publish this variable in the help.
36302 
36303 
36304   if [ -z "${LIPO+x}" ]; then
36305     # The variable is not set by user, try to locate tool using the code snippet
36306     for ac_prog in lipo
36307 do
36308   # Extract the first word of "$ac_prog", so it can be a program name with args.
36309 set dummy $ac_prog; ac_word=$2
36310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36311 $as_echo_n "checking for $ac_word... " >&6; }
36312 if ${ac_cv_path_LIPO+:} false; then :
36313   $as_echo_n "(cached) " >&6
36314 else
36315   case $LIPO in
36316   [\\/]* | ?:[\\/]*)
36317   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36318   ;;
36319   *)
36320   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36321 for as_dir in $PATH
36322 do
36323   IFS=$as_save_IFS
36324   test -z "$as_dir" && as_dir=.
36325     for ac_exec_ext in '' $ac_executable_extensions; do
36326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36327     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36329     break 2
36330   fi
36331 done
36332   done
36333 IFS=$as_save_IFS
36334 
36335   ;;
36336 esac
36337 fi
36338 LIPO=$ac_cv_path_LIPO
36339 if test -n "$LIPO"; then
36340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36341 $as_echo "$LIPO" >&6; }
36342 else
36343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36344 $as_echo "no" >&6; }
36345 fi
36346 
36347 
36348   test -n "$LIPO" && break
36349 done
36350 
36351   else
36352     # The variable is set, but is it from the command line or the environment?
36353 
36354     # Try to remove the string !LIPO! from our list.
36355     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
36356     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36357       # If it failed, the variable was not from the command line. Ignore it,
36358       # but warn the user (except for BASH, which is always set by the calling BASH).
36359       if test "xLIPO" != xBASH; then
36360         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
36361 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
36362       fi
36363       # Try to locate tool using the code snippet
36364       for ac_prog in lipo
36365 do
36366   # Extract the first word of "$ac_prog", so it can be a program name with args.
36367 set dummy $ac_prog; ac_word=$2
36368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36369 $as_echo_n "checking for $ac_word... " >&6; }
36370 if ${ac_cv_path_LIPO+:} false; then :
36371   $as_echo_n "(cached) " >&6
36372 else
36373   case $LIPO in
36374   [\\/]* | ?:[\\/]*)
36375   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36376   ;;
36377   *)
36378   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36379 for as_dir in $PATH
36380 do
36381   IFS=$as_save_IFS
36382   test -z "$as_dir" && as_dir=.
36383     for ac_exec_ext in '' $ac_executable_extensions; do
36384   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36385     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36386     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36387     break 2
36388   fi
36389 done
36390   done
36391 IFS=$as_save_IFS
36392 
36393   ;;
36394 esac
36395 fi
36396 LIPO=$ac_cv_path_LIPO
36397 if test -n "$LIPO"; then
36398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36399 $as_echo "$LIPO" >&6; }
36400 else
36401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36402 $as_echo "no" >&6; }
36403 fi
36404 
36405 
36406   test -n "$LIPO" && break
36407 done
36408 
36409     else
36410       # If it succeeded, then it was overridden by the user. We will use it
36411       # for the tool.
36412 
36413       # First remove it from the list of overridden variables, so we can test
36414       # for unknown variables in the end.
36415       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36416 
36417       # Check if we try to supply an empty value
36418       if test "x$LIPO" = x; then
36419         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
36420 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
36421         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36422 $as_echo_n "checking for LIPO... " >&6; }
36423         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36424 $as_echo "disabled" >&6; }
36425       else
36426         # Check if the provided tool contains a complete path.
36427         tool_specified="$LIPO"
36428         tool_basename="${tool_specified##*/}"
36429         if test "x$tool_basename" = "x$tool_specified"; then
36430           # A command without a complete path is provided, search $PATH.
36431           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
36432 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
36433           # Extract the first word of "$tool_basename", so it can be a program name with args.
36434 set dummy $tool_basename; ac_word=$2
36435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36436 $as_echo_n "checking for $ac_word... " >&6; }
36437 if ${ac_cv_path_LIPO+:} false; then :
36438   $as_echo_n "(cached) " >&6
36439 else
36440   case $LIPO in
36441   [\\/]* | ?:[\\/]*)
36442   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36443   ;;
36444   *)
36445   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36446 for as_dir in $PATH
36447 do
36448   IFS=$as_save_IFS
36449   test -z "$as_dir" && as_dir=.
36450     for ac_exec_ext in '' $ac_executable_extensions; do
36451   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36452     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36454     break 2
36455   fi
36456 done
36457   done
36458 IFS=$as_save_IFS
36459 
36460   ;;
36461 esac
36462 fi
36463 LIPO=$ac_cv_path_LIPO
36464 if test -n "$LIPO"; then
36465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36466 $as_echo "$LIPO" >&6; }
36467 else
36468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36469 $as_echo "no" >&6; }
36470 fi
36471 
36472 
36473           if test "x$LIPO" = x; then
36474             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36475           fi
36476         else
36477           # Otherwise we believe it is a complete path. Use it as it is.
36478           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
36479 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
36480           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36481 $as_echo_n "checking for LIPO... " >&6; }
36482           if test ! -x "$tool_specified"; then
36483             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36484 $as_echo "not found" >&6; }
36485             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
36486           fi
36487           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36488 $as_echo "$tool_specified" >&6; }
36489         fi
36490       fi
36491     fi
36492 
36493   fi
36494 
36495 
36496 
36497   # Only process if variable expands to non-empty
36498 
36499   if test "x$LIPO" != x; then
36500     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36501 
36502   # First separate the path from the arguments. This will split at the first
36503   # space.
36504   complete="$LIPO"
36505   path="${complete%% *}"
36506   tmp="$complete EOL"
36507   arguments="${tmp#* }"
36508 
36509   # Input might be given as Windows format, start by converting to
36510   # unix format.
36511   new_path=`$CYGPATH -u "$path"`
36512 
36513   # Now try to locate executable using which
36514   new_path=`$WHICH "$new_path" 2> /dev/null`
36515   # bat and cmd files are not always considered executable in cygwin causing which
36516   # to not find them
36517   if test "x$new_path" = x \
36518       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36519       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36520     new_path=`$CYGPATH -u "$path"`
36521   fi
36522   if test "x$new_path" = x; then
36523     # Oops. Which didn't find the executable.
36524     # The splitting of arguments from the executable at a space might have been incorrect,
36525     # since paths with space are more likely in Windows. Give it another try with the whole
36526     # argument.
36527     path="$complete"
36528     arguments="EOL"
36529     new_path=`$CYGPATH -u "$path"`
36530     new_path=`$WHICH "$new_path" 2> /dev/null`
36531     # bat and cmd files are not always considered executable in cygwin causing which
36532     # to not find them
36533     if test "x$new_path" = x \
36534         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36535         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36536       new_path=`$CYGPATH -u "$path"`
36537     fi
36538     if test "x$new_path" = x; then
36539       # It's still not found. Now this is an unrecoverable error.
36540       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36541 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36542       has_space=`$ECHO "$complete" | $GREP " "`
36543       if test "x$has_space" != x; then
36544         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36545 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36546       fi
36547       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36548     fi
36549   fi
36550 
36551   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36552   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36553   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36554   # "foo.exe" is OK but "foo" is an error.
36555   #
36556   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36557   # It is also a way to make sure we got the proper file name for the real test later on.
36558   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36559   if test "x$test_shortpath" = x; then
36560     # Short path failed, file does not exist as specified.
36561     # Try adding .exe or .cmd
36562     if test -f "${new_path}.exe"; then
36563       input_to_shortpath="${new_path}.exe"
36564     elif test -f "${new_path}.cmd"; then
36565       input_to_shortpath="${new_path}.cmd"
36566     else
36567       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
36568 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
36569       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36570 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36571       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36572     fi
36573   else
36574     input_to_shortpath="$new_path"
36575   fi
36576 
36577   # Call helper function which possibly converts this using DOS-style short mode.
36578   # If so, the updated path is stored in $new_path.
36579   new_path="$input_to_shortpath"
36580 
36581   input_path="$input_to_shortpath"
36582   # Check if we need to convert this using DOS-style short mode. If the path
36583   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36584   # take no chances and rewrite it.
36585   # Note: m4 eats our [], so we need to use [ and ] instead.
36586   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36587   if test "x$has_forbidden_chars" != x; then
36588     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36589     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36590     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36591     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36592       # Going to short mode and back again did indeed matter. Since short mode is
36593       # case insensitive, let's make it lowercase to improve readability.
36594       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36595       # Now convert it back to Unix-style (cygpath)
36596       input_path=`$CYGPATH -u "$shortmode_path"`
36597       new_path="$input_path"
36598     fi
36599   fi
36600 
36601   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36602   if test "x$test_cygdrive_prefix" = x; then
36603     # As a simple fix, exclude /usr/bin since it's not a real path.
36604     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36605       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36606       # a path prefixed by /cygdrive for fixpath to work.
36607       new_path="$CYGWIN_ROOT_PATH$input_path"
36608     fi
36609   fi
36610 
36611   # remove trailing .exe if any
36612   new_path="${new_path/%.exe/}"
36613 
36614     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36615 
36616   # First separate the path from the arguments. This will split at the first
36617   # space.
36618   complete="$LIPO"
36619   path="${complete%% *}"
36620   tmp="$complete EOL"
36621   arguments="${tmp#* }"
36622 
36623   # Input might be given as Windows format, start by converting to
36624   # unix format.
36625   new_path="$path"
36626 
36627   windows_path="$new_path"
36628   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36629     unix_path=`$CYGPATH -u "$windows_path"`
36630     new_path="$unix_path"
36631   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36632     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36633     new_path="$unix_path"
36634   fi
36635 
36636 
36637   # Now try to locate executable using which
36638   new_path=`$WHICH "$new_path" 2> /dev/null`
36639 
36640   if test "x$new_path" = x; then
36641     # Oops. Which didn't find the executable.
36642     # The splitting of arguments from the executable at a space might have been incorrect,
36643     # since paths with space are more likely in Windows. Give it another try with the whole
36644     # argument.
36645     path="$complete"
36646     arguments="EOL"
36647     new_path="$path"
36648 
36649   windows_path="$new_path"
36650   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36651     unix_path=`$CYGPATH -u "$windows_path"`
36652     new_path="$unix_path"
36653   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36654     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36655     new_path="$unix_path"
36656   fi
36657 
36658 
36659     new_path=`$WHICH "$new_path" 2> /dev/null`
36660     # bat and cmd files are not always considered executable in MSYS causing which
36661     # to not find them
36662     if test "x$new_path" = x \
36663         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36664         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36665       new_path="$path"
36666 
36667   windows_path="$new_path"
36668   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36669     unix_path=`$CYGPATH -u "$windows_path"`
36670     new_path="$unix_path"
36671   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36672     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36673     new_path="$unix_path"
36674   fi
36675 
36676     fi
36677 
36678     if test "x$new_path" = x; then
36679       # It's still not found. Now this is an unrecoverable error.
36680       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36681 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36682       has_space=`$ECHO "$complete" | $GREP " "`
36683       if test "x$has_space" != x; then
36684         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36685 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36686       fi
36687       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36688     fi
36689   fi
36690 
36691   # Now new_path has a complete unix path to the binary
36692   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36693     # Keep paths in /bin as-is, but remove trailing .exe if any
36694     new_path="${new_path/%.exe/}"
36695     # Do not save /bin paths to all_fixpath_prefixes!
36696   else
36697     # Not in mixed or Windows style, start by that.
36698     new_path=`cmd //c echo $new_path`
36699 
36700   input_path="$new_path"
36701   # Check if we need to convert this using DOS-style short mode. If the path
36702   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36703   # take no chances and rewrite it.
36704   # Note: m4 eats our [], so we need to use [ and ] instead.
36705   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36706   if test "x$has_forbidden_chars" != x; then
36707     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36708     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36709   fi
36710 
36711     # Output is in $new_path
36712 
36713   windows_path="$new_path"
36714   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36715     unix_path=`$CYGPATH -u "$windows_path"`
36716     new_path="$unix_path"
36717   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36718     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36719     new_path="$unix_path"
36720   fi
36721 
36722     # remove trailing .exe if any
36723     new_path="${new_path/%.exe/}"
36724 
36725     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36726     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36727   fi
36728 
36729     else
36730       # We're on a unix platform. Hooray! :)
36731       # First separate the path from the arguments. This will split at the first
36732       # space.
36733       complete="$LIPO"
36734       path="${complete%% *}"
36735       tmp="$complete EOL"
36736       arguments="${tmp#* }"
36737 
36738       # Cannot rely on the command "which" here since it doesn't always work.
36739       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36740       if test -z "$is_absolute_path"; then
36741         # Path to executable is not absolute. Find it.
36742         IFS_save="$IFS"
36743         IFS=:
36744         for p in $PATH; do
36745           if test -f "$p/$path" && test -x "$p/$path"; then
36746             new_path="$p/$path"
36747             break
36748           fi
36749         done
36750         IFS="$IFS_save"
36751       else
36752         # This is an absolute path, we can use it without further modifications.
36753         new_path="$path"
36754       fi
36755 
36756       if test "x$new_path" = x; then
36757         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36758 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36759         has_space=`$ECHO "$complete" | $GREP " "`
36760         if test "x$has_space" != x; then
36761           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36762 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36763         fi
36764         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36765       fi
36766     fi
36767 
36768     # Now join together the path and the arguments once again
36769     if test "x$arguments" != xEOL; then
36770       new_complete="$new_path ${arguments% *}"
36771     else
36772       new_complete="$new_path"
36773     fi
36774 
36775     if test "x$complete" != "x$new_complete"; then
36776       LIPO="$new_complete"
36777       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
36778 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
36779     fi
36780   fi
36781 
36782   fi
36783 
36784   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36785     # Extract the first word of "mt", so it can be a program name with args.
36786 set dummy mt; ac_word=$2
36787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36788 $as_echo_n "checking for $ac_word... " >&6; }
36789 if ${ac_cv_prog_MT+:} false; then :
36790   $as_echo_n "(cached) " >&6
36791 else
36792   if test -n "$MT"; then
36793   ac_cv_prog_MT="$MT" # Let the user override the test.
36794 else
36795   ac_prog_rejected=no
36796 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36797 for as_dir in $PATH
36798 do
36799   IFS=$as_save_IFS
36800   test -z "$as_dir" && as_dir=.
36801     for ac_exec_ext in '' $ac_executable_extensions; do
36802   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36803     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
36804        ac_prog_rejected=yes
36805        continue
36806      fi
36807     ac_cv_prog_MT="mt"
36808     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36809     break 2
36810   fi
36811 done
36812   done
36813 IFS=$as_save_IFS
36814 
36815 if test $ac_prog_rejected = yes; then
36816   # We found a bogon in the path, so make sure we never use it.
36817   set dummy $ac_cv_prog_MT
36818   shift
36819   if test $# != 0; then
36820     # We chose a different compiler from the bogus one.
36821     # However, it has the same basename, so the bogon will be chosen
36822     # first if we set MT to just the basename; use the full file name.
36823     shift
36824     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
36825   fi
36826 fi
36827 fi
36828 fi
36829 MT=$ac_cv_prog_MT
36830 if test -n "$MT"; then
36831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
36832 $as_echo "$MT" >&6; }
36833 else
36834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36835 $as_echo "no" >&6; }
36836 fi
36837 
36838 
36839 
36840   # Only process if variable expands to non-empty
36841 
36842   if test "x$MT" != x; then
36843     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36844 
36845   # First separate the path from the arguments. This will split at the first
36846   # space.
36847   complete="$MT"
36848   path="${complete%% *}"
36849   tmp="$complete EOL"
36850   arguments="${tmp#* }"
36851 
36852   # Input might be given as Windows format, start by converting to
36853   # unix format.
36854   new_path=`$CYGPATH -u "$path"`
36855 
36856   # Now try to locate executable using which
36857   new_path=`$WHICH "$new_path" 2> /dev/null`
36858   # bat and cmd files are not always considered executable in cygwin causing which
36859   # to not find them
36860   if test "x$new_path" = x \
36861       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36862       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36863     new_path=`$CYGPATH -u "$path"`
36864   fi
36865   if test "x$new_path" = x; then
36866     # Oops. Which didn't find the executable.
36867     # The splitting of arguments from the executable at a space might have been incorrect,
36868     # since paths with space are more likely in Windows. Give it another try with the whole
36869     # argument.
36870     path="$complete"
36871     arguments="EOL"
36872     new_path=`$CYGPATH -u "$path"`
36873     new_path=`$WHICH "$new_path" 2> /dev/null`
36874     # bat and cmd files are not always considered executable in cygwin causing which
36875     # to not find them
36876     if test "x$new_path" = x \
36877         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36878         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36879       new_path=`$CYGPATH -u "$path"`
36880     fi
36881     if test "x$new_path" = x; then
36882       # It's still not found. Now this is an unrecoverable error.
36883       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
36884 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
36885       has_space=`$ECHO "$complete" | $GREP " "`
36886       if test "x$has_space" != x; then
36887         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36888 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36889       fi
36890       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
36891     fi
36892   fi
36893 
36894   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36895   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36896   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36897   # "foo.exe" is OK but "foo" is an error.
36898   #
36899   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36900   # It is also a way to make sure we got the proper file name for the real test later on.
36901   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36902   if test "x$test_shortpath" = x; then
36903     # Short path failed, file does not exist as specified.
36904     # Try adding .exe or .cmd
36905     if test -f "${new_path}.exe"; then
36906       input_to_shortpath="${new_path}.exe"
36907     elif test -f "${new_path}.cmd"; then
36908       input_to_shortpath="${new_path}.cmd"
36909     else
36910       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
36911 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
36912       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36913 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36914       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
36915     fi
36916   else
36917     input_to_shortpath="$new_path"
36918   fi
36919 
36920   # Call helper function which possibly converts this using DOS-style short mode.
36921   # If so, the updated path is stored in $new_path.
36922   new_path="$input_to_shortpath"
36923 
36924   input_path="$input_to_shortpath"
36925   # Check if we need to convert this using DOS-style short mode. If the path
36926   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36927   # take no chances and rewrite it.
36928   # Note: m4 eats our [], so we need to use [ and ] instead.
36929   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36930   if test "x$has_forbidden_chars" != x; then
36931     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36932     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36933     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36934     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36935       # Going to short mode and back again did indeed matter. Since short mode is
36936       # case insensitive, let's make it lowercase to improve readability.
36937       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36938       # Now convert it back to Unix-style (cygpath)
36939       input_path=`$CYGPATH -u "$shortmode_path"`
36940       new_path="$input_path"
36941     fi
36942   fi
36943 
36944   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36945   if test "x$test_cygdrive_prefix" = x; then
36946     # As a simple fix, exclude /usr/bin since it's not a real path.
36947     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36948       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36949       # a path prefixed by /cygdrive for fixpath to work.
36950       new_path="$CYGWIN_ROOT_PATH$input_path"
36951     fi
36952   fi
36953 
36954   # remove trailing .exe if any
36955   new_path="${new_path/%.exe/}"
36956 
36957     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36958 
36959   # First separate the path from the arguments. This will split at the first
36960   # space.
36961   complete="$MT"
36962   path="${complete%% *}"
36963   tmp="$complete EOL"
36964   arguments="${tmp#* }"
36965 
36966   # Input might be given as Windows format, start by converting to
36967   # unix format.
36968   new_path="$path"
36969 
36970   windows_path="$new_path"
36971   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36972     unix_path=`$CYGPATH -u "$windows_path"`
36973     new_path="$unix_path"
36974   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36975     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36976     new_path="$unix_path"
36977   fi
36978 
36979 
36980   # Now try to locate executable using which
36981   new_path=`$WHICH "$new_path" 2> /dev/null`
36982 
36983   if test "x$new_path" = x; then
36984     # Oops. Which didn't find the executable.
36985     # The splitting of arguments from the executable at a space might have been incorrect,
36986     # since paths with space are more likely in Windows. Give it another try with the whole
36987     # argument.
36988     path="$complete"
36989     arguments="EOL"
36990     new_path="$path"
36991 
36992   windows_path="$new_path"
36993   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36994     unix_path=`$CYGPATH -u "$windows_path"`
36995     new_path="$unix_path"
36996   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36997     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36998     new_path="$unix_path"
36999   fi
37000 
37001 
37002     new_path=`$WHICH "$new_path" 2> /dev/null`
37003     # bat and cmd files are not always considered executable in MSYS causing which
37004     # to not find them
37005     if test "x$new_path" = x \
37006         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37007         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37008       new_path="$path"
37009 
37010   windows_path="$new_path"
37011   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37012     unix_path=`$CYGPATH -u "$windows_path"`
37013     new_path="$unix_path"
37014   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37015     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37016     new_path="$unix_path"
37017   fi
37018 
37019     fi
37020 
37021     if test "x$new_path" = x; then
37022       # It's still not found. Now this is an unrecoverable error.
37023       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37024 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37025       has_space=`$ECHO "$complete" | $GREP " "`
37026       if test "x$has_space" != x; then
37027         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37028 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37029       fi
37030       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37031     fi
37032   fi
37033 
37034   # Now new_path has a complete unix path to the binary
37035   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37036     # Keep paths in /bin as-is, but remove trailing .exe if any
37037     new_path="${new_path/%.exe/}"
37038     # Do not save /bin paths to all_fixpath_prefixes!
37039   else
37040     # Not in mixed or Windows style, start by that.
37041     new_path=`cmd //c echo $new_path`
37042 
37043   input_path="$new_path"
37044   # Check if we need to convert this using DOS-style short mode. If the path
37045   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37046   # take no chances and rewrite it.
37047   # Note: m4 eats our [], so we need to use [ and ] instead.
37048   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37049   if test "x$has_forbidden_chars" != x; then
37050     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37051     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37052   fi
37053 
37054     # Output is in $new_path
37055 
37056   windows_path="$new_path"
37057   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37058     unix_path=`$CYGPATH -u "$windows_path"`
37059     new_path="$unix_path"
37060   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37061     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37062     new_path="$unix_path"
37063   fi
37064 
37065     # remove trailing .exe if any
37066     new_path="${new_path/%.exe/}"
37067 
37068     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37069     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37070   fi
37071 
37072     else
37073       # We're on a unix platform. Hooray! :)
37074       # First separate the path from the arguments. This will split at the first
37075       # space.
37076       complete="$MT"
37077       path="${complete%% *}"
37078       tmp="$complete EOL"
37079       arguments="${tmp#* }"
37080 
37081       # Cannot rely on the command "which" here since it doesn't always work.
37082       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37083       if test -z "$is_absolute_path"; then
37084         # Path to executable is not absolute. Find it.
37085         IFS_save="$IFS"
37086         IFS=:
37087         for p in $PATH; do
37088           if test -f "$p/$path" && test -x "$p/$path"; then
37089             new_path="$p/$path"
37090             break
37091           fi
37092         done
37093         IFS="$IFS_save"
37094       else
37095         # This is an absolute path, we can use it without further modifications.
37096         new_path="$path"
37097       fi
37098 
37099       if test "x$new_path" = x; then
37100         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37101 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37102         has_space=`$ECHO "$complete" | $GREP " "`
37103         if test "x$has_space" != x; then
37104           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37105 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37106         fi
37107         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37108       fi
37109     fi
37110 
37111     # Now join together the path and the arguments once again
37112     if test "x$arguments" != xEOL; then
37113       new_complete="$new_path ${arguments% *}"
37114     else
37115       new_complete="$new_path"
37116     fi
37117 
37118     if test "x$complete" != "x$new_complete"; then
37119       MT="$new_complete"
37120       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
37121 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
37122     fi
37123   fi
37124 
37125     # Setup the resource compiler (RC)
37126     # Extract the first word of "rc", so it can be a program name with args.
37127 set dummy rc; ac_word=$2
37128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37129 $as_echo_n "checking for $ac_word... " >&6; }
37130 if ${ac_cv_prog_RC+:} false; then :
37131   $as_echo_n "(cached) " >&6
37132 else
37133   if test -n "$RC"; then
37134   ac_cv_prog_RC="$RC" # Let the user override the test.
37135 else
37136   ac_prog_rejected=no
37137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37138 for as_dir in $PATH
37139 do
37140   IFS=$as_save_IFS
37141   test -z "$as_dir" && as_dir=.
37142     for ac_exec_ext in '' $ac_executable_extensions; do
37143   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37144     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
37145        ac_prog_rejected=yes
37146        continue
37147      fi
37148     ac_cv_prog_RC="rc"
37149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37150     break 2
37151   fi
37152 done
37153   done
37154 IFS=$as_save_IFS
37155 
37156 if test $ac_prog_rejected = yes; then
37157   # We found a bogon in the path, so make sure we never use it.
37158   set dummy $ac_cv_prog_RC
37159   shift
37160   if test $# != 0; then
37161     # We chose a different compiler from the bogus one.
37162     # However, it has the same basename, so the bogon will be chosen
37163     # first if we set RC to just the basename; use the full file name.
37164     shift
37165     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
37166   fi
37167 fi
37168 fi
37169 fi
37170 RC=$ac_cv_prog_RC
37171 if test -n "$RC"; then
37172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
37173 $as_echo "$RC" >&6; }
37174 else
37175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37176 $as_echo "no" >&6; }
37177 fi
37178 
37179 
37180 
37181   # Only process if variable expands to non-empty
37182 
37183   if test "x$RC" != x; then
37184     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37185 
37186   # First separate the path from the arguments. This will split at the first
37187   # space.
37188   complete="$RC"
37189   path="${complete%% *}"
37190   tmp="$complete EOL"
37191   arguments="${tmp#* }"
37192 
37193   # Input might be given as Windows format, start by converting to
37194   # unix format.
37195   new_path=`$CYGPATH -u "$path"`
37196 
37197   # Now try to locate executable using which
37198   new_path=`$WHICH "$new_path" 2> /dev/null`
37199   # bat and cmd files are not always considered executable in cygwin causing which
37200   # to not find them
37201   if test "x$new_path" = x \
37202       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37203       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37204     new_path=`$CYGPATH -u "$path"`
37205   fi
37206   if test "x$new_path" = x; then
37207     # Oops. Which didn't find the executable.
37208     # The splitting of arguments from the executable at a space might have been incorrect,
37209     # since paths with space are more likely in Windows. Give it another try with the whole
37210     # argument.
37211     path="$complete"
37212     arguments="EOL"
37213     new_path=`$CYGPATH -u "$path"`
37214     new_path=`$WHICH "$new_path" 2> /dev/null`
37215     # bat and cmd files are not always considered executable in cygwin causing which
37216     # to not find them
37217     if test "x$new_path" = x \
37218         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37219         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37220       new_path=`$CYGPATH -u "$path"`
37221     fi
37222     if test "x$new_path" = x; then
37223       # It's still not found. Now this is an unrecoverable error.
37224       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37225 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37226       has_space=`$ECHO "$complete" | $GREP " "`
37227       if test "x$has_space" != x; then
37228         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37229 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37230       fi
37231       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37232     fi
37233   fi
37234 
37235   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37236   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37237   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37238   # "foo.exe" is OK but "foo" is an error.
37239   #
37240   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37241   # It is also a way to make sure we got the proper file name for the real test later on.
37242   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37243   if test "x$test_shortpath" = x; then
37244     # Short path failed, file does not exist as specified.
37245     # Try adding .exe or .cmd
37246     if test -f "${new_path}.exe"; then
37247       input_to_shortpath="${new_path}.exe"
37248     elif test -f "${new_path}.cmd"; then
37249       input_to_shortpath="${new_path}.cmd"
37250     else
37251       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
37252 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
37253       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37254 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37255       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37256     fi
37257   else
37258     input_to_shortpath="$new_path"
37259   fi
37260 
37261   # Call helper function which possibly converts this using DOS-style short mode.
37262   # If so, the updated path is stored in $new_path.
37263   new_path="$input_to_shortpath"
37264 
37265   input_path="$input_to_shortpath"
37266   # Check if we need to convert this using DOS-style short mode. If the path
37267   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37268   # take no chances and rewrite it.
37269   # Note: m4 eats our [], so we need to use [ and ] instead.
37270   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37271   if test "x$has_forbidden_chars" != x; then
37272     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37273     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37274     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37275     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37276       # Going to short mode and back again did indeed matter. Since short mode is
37277       # case insensitive, let's make it lowercase to improve readability.
37278       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37279       # Now convert it back to Unix-style (cygpath)
37280       input_path=`$CYGPATH -u "$shortmode_path"`
37281       new_path="$input_path"
37282     fi
37283   fi
37284 
37285   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37286   if test "x$test_cygdrive_prefix" = x; then
37287     # As a simple fix, exclude /usr/bin since it's not a real path.
37288     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37289       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37290       # a path prefixed by /cygdrive for fixpath to work.
37291       new_path="$CYGWIN_ROOT_PATH$input_path"
37292     fi
37293   fi
37294 
37295   # remove trailing .exe if any
37296   new_path="${new_path/%.exe/}"
37297 
37298     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37299 
37300   # First separate the path from the arguments. This will split at the first
37301   # space.
37302   complete="$RC"
37303   path="${complete%% *}"
37304   tmp="$complete EOL"
37305   arguments="${tmp#* }"
37306 
37307   # Input might be given as Windows format, start by converting to
37308   # unix format.
37309   new_path="$path"
37310 
37311   windows_path="$new_path"
37312   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37313     unix_path=`$CYGPATH -u "$windows_path"`
37314     new_path="$unix_path"
37315   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37316     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37317     new_path="$unix_path"
37318   fi
37319 
37320 
37321   # Now try to locate executable using which
37322   new_path=`$WHICH "$new_path" 2> /dev/null`
37323 
37324   if test "x$new_path" = x; then
37325     # Oops. Which didn't find the executable.
37326     # The splitting of arguments from the executable at a space might have been incorrect,
37327     # since paths with space are more likely in Windows. Give it another try with the whole
37328     # argument.
37329     path="$complete"
37330     arguments="EOL"
37331     new_path="$path"
37332 
37333   windows_path="$new_path"
37334   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37335     unix_path=`$CYGPATH -u "$windows_path"`
37336     new_path="$unix_path"
37337   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37338     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37339     new_path="$unix_path"
37340   fi
37341 
37342 
37343     new_path=`$WHICH "$new_path" 2> /dev/null`
37344     # bat and cmd files are not always considered executable in MSYS causing which
37345     # to not find them
37346     if test "x$new_path" = x \
37347         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37348         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37349       new_path="$path"
37350 
37351   windows_path="$new_path"
37352   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37353     unix_path=`$CYGPATH -u "$windows_path"`
37354     new_path="$unix_path"
37355   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37356     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37357     new_path="$unix_path"
37358   fi
37359 
37360     fi
37361 
37362     if test "x$new_path" = x; then
37363       # It's still not found. Now this is an unrecoverable error.
37364       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37365 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37366       has_space=`$ECHO "$complete" | $GREP " "`
37367       if test "x$has_space" != x; then
37368         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37369 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37370       fi
37371       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37372     fi
37373   fi
37374 
37375   # Now new_path has a complete unix path to the binary
37376   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37377     # Keep paths in /bin as-is, but remove trailing .exe if any
37378     new_path="${new_path/%.exe/}"
37379     # Do not save /bin paths to all_fixpath_prefixes!
37380   else
37381     # Not in mixed or Windows style, start by that.
37382     new_path=`cmd //c echo $new_path`
37383 
37384   input_path="$new_path"
37385   # Check if we need to convert this using DOS-style short mode. If the path
37386   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37387   # take no chances and rewrite it.
37388   # Note: m4 eats our [], so we need to use [ and ] instead.
37389   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37390   if test "x$has_forbidden_chars" != x; then
37391     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37392     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37393   fi
37394 
37395     # Output is in $new_path
37396 
37397   windows_path="$new_path"
37398   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37399     unix_path=`$CYGPATH -u "$windows_path"`
37400     new_path="$unix_path"
37401   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37402     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37403     new_path="$unix_path"
37404   fi
37405 
37406     # remove trailing .exe if any
37407     new_path="${new_path/%.exe/}"
37408 
37409     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37410     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37411   fi
37412 
37413     else
37414       # We're on a unix platform. Hooray! :)
37415       # First separate the path from the arguments. This will split at the first
37416       # space.
37417       complete="$RC"
37418       path="${complete%% *}"
37419       tmp="$complete EOL"
37420       arguments="${tmp#* }"
37421 
37422       # Cannot rely on the command "which" here since it doesn't always work.
37423       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37424       if test -z "$is_absolute_path"; then
37425         # Path to executable is not absolute. Find it.
37426         IFS_save="$IFS"
37427         IFS=:
37428         for p in $PATH; do
37429           if test -f "$p/$path" && test -x "$p/$path"; then
37430             new_path="$p/$path"
37431             break
37432           fi
37433         done
37434         IFS="$IFS_save"
37435       else
37436         # This is an absolute path, we can use it without further modifications.
37437         new_path="$path"
37438       fi
37439 
37440       if test "x$new_path" = x; then
37441         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37442 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37443         has_space=`$ECHO "$complete" | $GREP " "`
37444         if test "x$has_space" != x; then
37445           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37446 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37447         fi
37448         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37449       fi
37450     fi
37451 
37452     # Now join together the path and the arguments once again
37453     if test "x$arguments" != xEOL; then
37454       new_complete="$new_path ${arguments% *}"
37455     else
37456       new_complete="$new_path"
37457     fi
37458 
37459     if test "x$complete" != "x$new_complete"; then
37460       RC="$new_complete"
37461       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
37462 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
37463     fi
37464   fi
37465 
37466     # Extract the first word of "dumpbin", so it can be a program name with args.
37467 set dummy dumpbin; ac_word=$2
37468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37469 $as_echo_n "checking for $ac_word... " >&6; }
37470 if ${ac_cv_prog_DUMPBIN+:} false; then :
37471   $as_echo_n "(cached) " >&6
37472 else
37473   if test -n "$DUMPBIN"; then
37474   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
37475 else
37476 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37477 for as_dir in $PATH
37478 do
37479   IFS=$as_save_IFS
37480   test -z "$as_dir" && as_dir=.
37481     for ac_exec_ext in '' $ac_executable_extensions; do
37482   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37483     ac_cv_prog_DUMPBIN="dumpbin"
37484     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37485     break 2
37486   fi
37487 done
37488   done
37489 IFS=$as_save_IFS
37490 
37491 fi
37492 fi
37493 DUMPBIN=$ac_cv_prog_DUMPBIN
37494 if test -n "$DUMPBIN"; then
37495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
37496 $as_echo "$DUMPBIN" >&6; }
37497 else
37498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37499 $as_echo "no" >&6; }
37500 fi
37501 
37502 
37503 
37504   # Only process if variable expands to non-empty
37505 
37506   if test "x$DUMPBIN" != x; then
37507     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37508 
37509   # First separate the path from the arguments. This will split at the first
37510   # space.
37511   complete="$DUMPBIN"
37512   path="${complete%% *}"
37513   tmp="$complete EOL"
37514   arguments="${tmp#* }"
37515 
37516   # Input might be given as Windows format, start by converting to
37517   # unix format.
37518   new_path=`$CYGPATH -u "$path"`
37519 
37520   # Now try to locate executable using which
37521   new_path=`$WHICH "$new_path" 2> /dev/null`
37522   # bat and cmd files are not always considered executable in cygwin causing which
37523   # to not find them
37524   if test "x$new_path" = x \
37525       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37526       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37527     new_path=`$CYGPATH -u "$path"`
37528   fi
37529   if test "x$new_path" = x; then
37530     # Oops. Which didn't find the executable.
37531     # The splitting of arguments from the executable at a space might have been incorrect,
37532     # since paths with space are more likely in Windows. Give it another try with the whole
37533     # argument.
37534     path="$complete"
37535     arguments="EOL"
37536     new_path=`$CYGPATH -u "$path"`
37537     new_path=`$WHICH "$new_path" 2> /dev/null`
37538     # bat and cmd files are not always considered executable in cygwin causing which
37539     # to not find them
37540     if test "x$new_path" = x \
37541         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37542         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37543       new_path=`$CYGPATH -u "$path"`
37544     fi
37545     if test "x$new_path" = x; then
37546       # It's still not found. Now this is an unrecoverable error.
37547       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37548 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37549       has_space=`$ECHO "$complete" | $GREP " "`
37550       if test "x$has_space" != x; then
37551         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37552 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37553       fi
37554       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37555     fi
37556   fi
37557 
37558   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37559   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37560   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37561   # "foo.exe" is OK but "foo" is an error.
37562   #
37563   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37564   # It is also a way to make sure we got the proper file name for the real test later on.
37565   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37566   if test "x$test_shortpath" = x; then
37567     # Short path failed, file does not exist as specified.
37568     # Try adding .exe or .cmd
37569     if test -f "${new_path}.exe"; then
37570       input_to_shortpath="${new_path}.exe"
37571     elif test -f "${new_path}.cmd"; then
37572       input_to_shortpath="${new_path}.cmd"
37573     else
37574       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
37575 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
37576       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37577 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37578       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37579     fi
37580   else
37581     input_to_shortpath="$new_path"
37582   fi
37583 
37584   # Call helper function which possibly converts this using DOS-style short mode.
37585   # If so, the updated path is stored in $new_path.
37586   new_path="$input_to_shortpath"
37587 
37588   input_path="$input_to_shortpath"
37589   # Check if we need to convert this using DOS-style short mode. If the path
37590   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37591   # take no chances and rewrite it.
37592   # Note: m4 eats our [], so we need to use [ and ] instead.
37593   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37594   if test "x$has_forbidden_chars" != x; then
37595     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37596     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37597     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37598     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37599       # Going to short mode and back again did indeed matter. Since short mode is
37600       # case insensitive, let's make it lowercase to improve readability.
37601       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37602       # Now convert it back to Unix-style (cygpath)
37603       input_path=`$CYGPATH -u "$shortmode_path"`
37604       new_path="$input_path"
37605     fi
37606   fi
37607 
37608   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37609   if test "x$test_cygdrive_prefix" = x; then
37610     # As a simple fix, exclude /usr/bin since it's not a real path.
37611     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37612       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37613       # a path prefixed by /cygdrive for fixpath to work.
37614       new_path="$CYGWIN_ROOT_PATH$input_path"
37615     fi
37616   fi
37617 
37618   # remove trailing .exe if any
37619   new_path="${new_path/%.exe/}"
37620 
37621     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37622 
37623   # First separate the path from the arguments. This will split at the first
37624   # space.
37625   complete="$DUMPBIN"
37626   path="${complete%% *}"
37627   tmp="$complete EOL"
37628   arguments="${tmp#* }"
37629 
37630   # Input might be given as Windows format, start by converting to
37631   # unix format.
37632   new_path="$path"
37633 
37634   windows_path="$new_path"
37635   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37636     unix_path=`$CYGPATH -u "$windows_path"`
37637     new_path="$unix_path"
37638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37639     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37640     new_path="$unix_path"
37641   fi
37642 
37643 
37644   # Now try to locate executable using which
37645   new_path=`$WHICH "$new_path" 2> /dev/null`
37646 
37647   if test "x$new_path" = x; then
37648     # Oops. Which didn't find the executable.
37649     # The splitting of arguments from the executable at a space might have been incorrect,
37650     # since paths with space are more likely in Windows. Give it another try with the whole
37651     # argument.
37652     path="$complete"
37653     arguments="EOL"
37654     new_path="$path"
37655 
37656   windows_path="$new_path"
37657   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37658     unix_path=`$CYGPATH -u "$windows_path"`
37659     new_path="$unix_path"
37660   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37661     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37662     new_path="$unix_path"
37663   fi
37664 
37665 
37666     new_path=`$WHICH "$new_path" 2> /dev/null`
37667     # bat and cmd files are not always considered executable in MSYS causing which
37668     # to not find them
37669     if test "x$new_path" = x \
37670         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37671         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37672       new_path="$path"
37673 
37674   windows_path="$new_path"
37675   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37676     unix_path=`$CYGPATH -u "$windows_path"`
37677     new_path="$unix_path"
37678   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37679     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37680     new_path="$unix_path"
37681   fi
37682 
37683     fi
37684 
37685     if test "x$new_path" = x; then
37686       # It's still not found. Now this is an unrecoverable error.
37687       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37688 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37689       has_space=`$ECHO "$complete" | $GREP " "`
37690       if test "x$has_space" != x; then
37691         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37692 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37693       fi
37694       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37695     fi
37696   fi
37697 
37698   # Now new_path has a complete unix path to the binary
37699   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37700     # Keep paths in /bin as-is, but remove trailing .exe if any
37701     new_path="${new_path/%.exe/}"
37702     # Do not save /bin paths to all_fixpath_prefixes!
37703   else
37704     # Not in mixed or Windows style, start by that.
37705     new_path=`cmd //c echo $new_path`
37706 
37707   input_path="$new_path"
37708   # Check if we need to convert this using DOS-style short mode. If the path
37709   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37710   # take no chances and rewrite it.
37711   # Note: m4 eats our [], so we need to use [ and ] instead.
37712   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37713   if test "x$has_forbidden_chars" != x; then
37714     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37715     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37716   fi
37717 
37718     # Output is in $new_path
37719 
37720   windows_path="$new_path"
37721   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37722     unix_path=`$CYGPATH -u "$windows_path"`
37723     new_path="$unix_path"
37724   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37725     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37726     new_path="$unix_path"
37727   fi
37728 
37729     # remove trailing .exe if any
37730     new_path="${new_path/%.exe/}"
37731 
37732     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37733     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37734   fi
37735 
37736     else
37737       # We're on a unix platform. Hooray! :)
37738       # First separate the path from the arguments. This will split at the first
37739       # space.
37740       complete="$DUMPBIN"
37741       path="${complete%% *}"
37742       tmp="$complete EOL"
37743       arguments="${tmp#* }"
37744 
37745       # Cannot rely on the command "which" here since it doesn't always work.
37746       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37747       if test -z "$is_absolute_path"; then
37748         # Path to executable is not absolute. Find it.
37749         IFS_save="$IFS"
37750         IFS=:
37751         for p in $PATH; do
37752           if test -f "$p/$path" && test -x "$p/$path"; then
37753             new_path="$p/$path"
37754             break
37755           fi
37756         done
37757         IFS="$IFS_save"
37758       else
37759         # This is an absolute path, we can use it without further modifications.
37760         new_path="$path"
37761       fi
37762 
37763       if test "x$new_path" = x; then
37764         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37765 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37766         has_space=`$ECHO "$complete" | $GREP " "`
37767         if test "x$has_space" != x; then
37768           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37769 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37770         fi
37771         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37772       fi
37773     fi
37774 
37775     # Now join together the path and the arguments once again
37776     if test "x$arguments" != xEOL; then
37777       new_complete="$new_path ${arguments% *}"
37778     else
37779       new_complete="$new_path"
37780     fi
37781 
37782     if test "x$complete" != "x$new_complete"; then
37783       DUMPBIN="$new_complete"
37784       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
37785 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
37786     fi
37787   fi
37788 
37789     # We need to check for 'msbuild.exe' because at the place where we expect to
37790     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
37791     # won't find the 'msbuild.exe' executable in that case (and the
37792     # 'ac_executable_extensions' is unusable due to performance reasons).
37793     # Notice that we intentionally don't fix up the path to MSBUILD because we
37794     # will call it in a DOS shell during freetype detection on Windows (see
37795     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
37796     # Extract the first word of "msbuild.exe", so it can be a program name with args.
37797 set dummy msbuild.exe; ac_word=$2
37798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37799 $as_echo_n "checking for $ac_word... " >&6; }
37800 if ${ac_cv_prog_MSBUILD+:} false; then :
37801   $as_echo_n "(cached) " >&6
37802 else
37803   if test -n "$MSBUILD"; then
37804   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
37805 else
37806 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37807 for as_dir in $PATH
37808 do
37809   IFS=$as_save_IFS
37810   test -z "$as_dir" && as_dir=.
37811     for ac_exec_ext in '' $ac_executable_extensions; do
37812   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37813     ac_cv_prog_MSBUILD="msbuild.exe"
37814     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37815     break 2
37816   fi
37817 done
37818   done
37819 IFS=$as_save_IFS
37820 
37821 fi
37822 fi
37823 MSBUILD=$ac_cv_prog_MSBUILD
37824 if test -n "$MSBUILD"; then
37825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
37826 $as_echo "$MSBUILD" >&6; }
37827 else
37828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37829 $as_echo "no" >&6; }
37830 fi
37831 
37832 
37833   fi
37834 
37835   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37836 
37837 
37838   # Publish this variable in the help.
37839 
37840 
37841   if [ -z "${STRIP+x}" ]; then
37842     # The variable is not set by user, try to locate tool using the code snippet
37843     for ac_prog in strip
37844 do
37845   # Extract the first word of "$ac_prog", so it can be a program name with args.
37846 set dummy $ac_prog; ac_word=$2
37847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37848 $as_echo_n "checking for $ac_word... " >&6; }
37849 if ${ac_cv_path_STRIP+:} false; then :
37850   $as_echo_n "(cached) " >&6
37851 else
37852   case $STRIP in
37853   [\\/]* | ?:[\\/]*)
37854   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37855   ;;
37856   *)
37857   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37858 for as_dir in $PATH
37859 do
37860   IFS=$as_save_IFS
37861   test -z "$as_dir" && as_dir=.
37862     for ac_exec_ext in '' $ac_executable_extensions; do
37863   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37864     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37865     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37866     break 2
37867   fi
37868 done
37869   done
37870 IFS=$as_save_IFS
37871 
37872   ;;
37873 esac
37874 fi
37875 STRIP=$ac_cv_path_STRIP
37876 if test -n "$STRIP"; then
37877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37878 $as_echo "$STRIP" >&6; }
37879 else
37880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37881 $as_echo "no" >&6; }
37882 fi
37883 
37884 
37885   test -n "$STRIP" && break
37886 done
37887 
37888   else
37889     # The variable is set, but is it from the command line or the environment?
37890 
37891     # Try to remove the string !STRIP! from our list.
37892     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37893     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37894       # If it failed, the variable was not from the command line. Ignore it,
37895       # but warn the user (except for BASH, which is always set by the calling BASH).
37896       if test "xSTRIP" != xBASH; then
37897         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37898 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37899       fi
37900       # Try to locate tool using the code snippet
37901       for ac_prog in strip
37902 do
37903   # Extract the first word of "$ac_prog", so it can be a program name with args.
37904 set dummy $ac_prog; ac_word=$2
37905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37906 $as_echo_n "checking for $ac_word... " >&6; }
37907 if ${ac_cv_path_STRIP+:} false; then :
37908   $as_echo_n "(cached) " >&6
37909 else
37910   case $STRIP in
37911   [\\/]* | ?:[\\/]*)
37912   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37913   ;;
37914   *)
37915   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37916 for as_dir in $PATH
37917 do
37918   IFS=$as_save_IFS
37919   test -z "$as_dir" && as_dir=.
37920     for ac_exec_ext in '' $ac_executable_extensions; do
37921   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37922     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37923     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37924     break 2
37925   fi
37926 done
37927   done
37928 IFS=$as_save_IFS
37929 
37930   ;;
37931 esac
37932 fi
37933 STRIP=$ac_cv_path_STRIP
37934 if test -n "$STRIP"; then
37935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37936 $as_echo "$STRIP" >&6; }
37937 else
37938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37939 $as_echo "no" >&6; }
37940 fi
37941 
37942 
37943   test -n "$STRIP" && break
37944 done
37945 
37946     else
37947       # If it succeeded, then it was overridden by the user. We will use it
37948       # for the tool.
37949 
37950       # First remove it from the list of overridden variables, so we can test
37951       # for unknown variables in the end.
37952       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37953 
37954       # Check if we try to supply an empty value
37955       if test "x$STRIP" = x; then
37956         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
37957 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
37958         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37959 $as_echo_n "checking for STRIP... " >&6; }
37960         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37961 $as_echo "disabled" >&6; }
37962       else
37963         # Check if the provided tool contains a complete path.
37964         tool_specified="$STRIP"
37965         tool_basename="${tool_specified##*/}"
37966         if test "x$tool_basename" = "x$tool_specified"; then
37967           # A command without a complete path is provided, search $PATH.
37968           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37969 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37970           # Extract the first word of "$tool_basename", so it can be a program name with args.
37971 set dummy $tool_basename; ac_word=$2
37972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37973 $as_echo_n "checking for $ac_word... " >&6; }
37974 if ${ac_cv_path_STRIP+:} false; then :
37975   $as_echo_n "(cached) " >&6
37976 else
37977   case $STRIP in
37978   [\\/]* | ?:[\\/]*)
37979   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37980   ;;
37981   *)
37982   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37983 for as_dir in $PATH
37984 do
37985   IFS=$as_save_IFS
37986   test -z "$as_dir" && as_dir=.
37987     for ac_exec_ext in '' $ac_executable_extensions; do
37988   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37989     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37990     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37991     break 2
37992   fi
37993 done
37994   done
37995 IFS=$as_save_IFS
37996 
37997   ;;
37998 esac
37999 fi
38000 STRIP=$ac_cv_path_STRIP
38001 if test -n "$STRIP"; then
38002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38003 $as_echo "$STRIP" >&6; }
38004 else
38005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38006 $as_echo "no" >&6; }
38007 fi
38008 
38009 
38010           if test "x$STRIP" = x; then
38011             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38012           fi
38013         else
38014           # Otherwise we believe it is a complete path. Use it as it is.
38015           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38016 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38017           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38018 $as_echo_n "checking for STRIP... " >&6; }
38019           if test ! -x "$tool_specified"; then
38020             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38021 $as_echo "not found" >&6; }
38022             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38023           fi
38024           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38025 $as_echo "$tool_specified" >&6; }
38026         fi
38027       fi
38028     fi
38029 
38030   fi
38031 
38032 
38033 
38034   # Only process if variable expands to non-empty
38035 
38036   if test "x$STRIP" != x; then
38037     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38038 
38039   # First separate the path from the arguments. This will split at the first
38040   # space.
38041   complete="$STRIP"
38042   path="${complete%% *}"
38043   tmp="$complete EOL"
38044   arguments="${tmp#* }"
38045 
38046   # Input might be given as Windows format, start by converting to
38047   # unix format.
38048   new_path=`$CYGPATH -u "$path"`
38049 
38050   # Now try to locate executable using which
38051   new_path=`$WHICH "$new_path" 2> /dev/null`
38052   # bat and cmd files are not always considered executable in cygwin causing which
38053   # to not find them
38054   if test "x$new_path" = x \
38055       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38056       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38057     new_path=`$CYGPATH -u "$path"`
38058   fi
38059   if test "x$new_path" = x; then
38060     # Oops. Which didn't find the executable.
38061     # The splitting of arguments from the executable at a space might have been incorrect,
38062     # since paths with space are more likely in Windows. Give it another try with the whole
38063     # argument.
38064     path="$complete"
38065     arguments="EOL"
38066     new_path=`$CYGPATH -u "$path"`
38067     new_path=`$WHICH "$new_path" 2> /dev/null`
38068     # bat and cmd files are not always considered executable in cygwin causing which
38069     # to not find them
38070     if test "x$new_path" = x \
38071         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38072         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38073       new_path=`$CYGPATH -u "$path"`
38074     fi
38075     if test "x$new_path" = x; then
38076       # It's still not found. Now this is an unrecoverable error.
38077       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38078 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38079       has_space=`$ECHO "$complete" | $GREP " "`
38080       if test "x$has_space" != x; then
38081         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38082 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38083       fi
38084       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38085     fi
38086   fi
38087 
38088   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38089   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38090   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38091   # "foo.exe" is OK but "foo" is an error.
38092   #
38093   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38094   # It is also a way to make sure we got the proper file name for the real test later on.
38095   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38096   if test "x$test_shortpath" = x; then
38097     # Short path failed, file does not exist as specified.
38098     # Try adding .exe or .cmd
38099     if test -f "${new_path}.exe"; then
38100       input_to_shortpath="${new_path}.exe"
38101     elif test -f "${new_path}.cmd"; then
38102       input_to_shortpath="${new_path}.cmd"
38103     else
38104       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38105 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38106       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38107 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38108       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38109     fi
38110   else
38111     input_to_shortpath="$new_path"
38112   fi
38113 
38114   # Call helper function which possibly converts this using DOS-style short mode.
38115   # If so, the updated path is stored in $new_path.
38116   new_path="$input_to_shortpath"
38117 
38118   input_path="$input_to_shortpath"
38119   # Check if we need to convert this using DOS-style short mode. If the path
38120   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38121   # take no chances and rewrite it.
38122   # Note: m4 eats our [], so we need to use [ and ] instead.
38123   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38124   if test "x$has_forbidden_chars" != x; then
38125     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38126     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38127     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38128     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38129       # Going to short mode and back again did indeed matter. Since short mode is
38130       # case insensitive, let's make it lowercase to improve readability.
38131       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38132       # Now convert it back to Unix-style (cygpath)
38133       input_path=`$CYGPATH -u "$shortmode_path"`
38134       new_path="$input_path"
38135     fi
38136   fi
38137 
38138   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38139   if test "x$test_cygdrive_prefix" = x; then
38140     # As a simple fix, exclude /usr/bin since it's not a real path.
38141     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38142       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38143       # a path prefixed by /cygdrive for fixpath to work.
38144       new_path="$CYGWIN_ROOT_PATH$input_path"
38145     fi
38146   fi
38147 
38148   # remove trailing .exe if any
38149   new_path="${new_path/%.exe/}"
38150 
38151     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38152 
38153   # First separate the path from the arguments. This will split at the first
38154   # space.
38155   complete="$STRIP"
38156   path="${complete%% *}"
38157   tmp="$complete EOL"
38158   arguments="${tmp#* }"
38159 
38160   # Input might be given as Windows format, start by converting to
38161   # unix format.
38162   new_path="$path"
38163 
38164   windows_path="$new_path"
38165   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38166     unix_path=`$CYGPATH -u "$windows_path"`
38167     new_path="$unix_path"
38168   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38169     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38170     new_path="$unix_path"
38171   fi
38172 
38173 
38174   # Now try to locate executable using which
38175   new_path=`$WHICH "$new_path" 2> /dev/null`
38176 
38177   if test "x$new_path" = x; then
38178     # Oops. Which didn't find the executable.
38179     # The splitting of arguments from the executable at a space might have been incorrect,
38180     # since paths with space are more likely in Windows. Give it another try with the whole
38181     # argument.
38182     path="$complete"
38183     arguments="EOL"
38184     new_path="$path"
38185 
38186   windows_path="$new_path"
38187   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38188     unix_path=`$CYGPATH -u "$windows_path"`
38189     new_path="$unix_path"
38190   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38191     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38192     new_path="$unix_path"
38193   fi
38194 
38195 
38196     new_path=`$WHICH "$new_path" 2> /dev/null`
38197     # bat and cmd files are not always considered executable in MSYS causing which
38198     # to not find them
38199     if test "x$new_path" = x \
38200         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38201         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38202       new_path="$path"
38203 
38204   windows_path="$new_path"
38205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38206     unix_path=`$CYGPATH -u "$windows_path"`
38207     new_path="$unix_path"
38208   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38209     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38210     new_path="$unix_path"
38211   fi
38212 
38213     fi
38214 
38215     if test "x$new_path" = x; then
38216       # It's still not found. Now this is an unrecoverable error.
38217       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38218 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38219       has_space=`$ECHO "$complete" | $GREP " "`
38220       if test "x$has_space" != x; then
38221         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38222 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38223       fi
38224       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38225     fi
38226   fi
38227 
38228   # Now new_path has a complete unix path to the binary
38229   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38230     # Keep paths in /bin as-is, but remove trailing .exe if any
38231     new_path="${new_path/%.exe/}"
38232     # Do not save /bin paths to all_fixpath_prefixes!
38233   else
38234     # Not in mixed or Windows style, start by that.
38235     new_path=`cmd //c echo $new_path`
38236 
38237   input_path="$new_path"
38238   # Check if we need to convert this using DOS-style short mode. If the path
38239   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38240   # take no chances and rewrite it.
38241   # Note: m4 eats our [], so we need to use [ and ] instead.
38242   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38243   if test "x$has_forbidden_chars" != x; then
38244     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38245     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38246   fi
38247 
38248     # Output is in $new_path
38249 
38250   windows_path="$new_path"
38251   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38252     unix_path=`$CYGPATH -u "$windows_path"`
38253     new_path="$unix_path"
38254   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38255     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38256     new_path="$unix_path"
38257   fi
38258 
38259     # remove trailing .exe if any
38260     new_path="${new_path/%.exe/}"
38261 
38262     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38263     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38264   fi
38265 
38266     else
38267       # We're on a unix platform. Hooray! :)
38268       # First separate the path from the arguments. This will split at the first
38269       # space.
38270       complete="$STRIP"
38271       path="${complete%% *}"
38272       tmp="$complete EOL"
38273       arguments="${tmp#* }"
38274 
38275       # Cannot rely on the command "which" here since it doesn't always work.
38276       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38277       if test -z "$is_absolute_path"; then
38278         # Path to executable is not absolute. Find it.
38279         IFS_save="$IFS"
38280         IFS=:
38281         for p in $PATH; do
38282           if test -f "$p/$path" && test -x "$p/$path"; then
38283             new_path="$p/$path"
38284             break
38285           fi
38286         done
38287         IFS="$IFS_save"
38288       else
38289         # This is an absolute path, we can use it without further modifications.
38290         new_path="$path"
38291       fi
38292 
38293       if test "x$new_path" = x; then
38294         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38295 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38296         has_space=`$ECHO "$complete" | $GREP " "`
38297         if test "x$has_space" != x; then
38298           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38299 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38300         fi
38301         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38302       fi
38303     fi
38304 
38305     # Now join together the path and the arguments once again
38306     if test "x$arguments" != xEOL; then
38307       new_complete="$new_path ${arguments% *}"
38308     else
38309       new_complete="$new_path"
38310     fi
38311 
38312     if test "x$complete" != "x$new_complete"; then
38313       STRIP="$new_complete"
38314       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38315 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38316     fi
38317   fi
38318 
38319 
38320 
38321   # Publish this variable in the help.
38322 
38323 
38324   if [ -z "${NM+x}" ]; then
38325     # The variable is not set by user, try to locate tool using the code snippet
38326     for ac_prog in nm
38327 do
38328   # Extract the first word of "$ac_prog", so it can be a program name with args.
38329 set dummy $ac_prog; ac_word=$2
38330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38331 $as_echo_n "checking for $ac_word... " >&6; }
38332 if ${ac_cv_path_NM+:} false; then :
38333   $as_echo_n "(cached) " >&6
38334 else
38335   case $NM in
38336   [\\/]* | ?:[\\/]*)
38337   ac_cv_path_NM="$NM" # Let the user override the test with a path.
38338   ;;
38339   *)
38340   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38341 for as_dir in $PATH
38342 do
38343   IFS=$as_save_IFS
38344   test -z "$as_dir" && as_dir=.
38345     for ac_exec_ext in '' $ac_executable_extensions; do
38346   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38347     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38348     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38349     break 2
38350   fi
38351 done
38352   done
38353 IFS=$as_save_IFS
38354 
38355   ;;
38356 esac
38357 fi
38358 NM=$ac_cv_path_NM
38359 if test -n "$NM"; then
38360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38361 $as_echo "$NM" >&6; }
38362 else
38363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38364 $as_echo "no" >&6; }
38365 fi
38366 
38367 
38368   test -n "$NM" && break
38369 done
38370 
38371   else
38372     # The variable is set, but is it from the command line or the environment?
38373 
38374     # Try to remove the string !NM! from our list.
38375     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38376     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38377       # If it failed, the variable was not from the command line. Ignore it,
38378       # but warn the user (except for BASH, which is always set by the calling BASH).
38379       if test "xNM" != xBASH; then
38380         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38381 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38382       fi
38383       # Try to locate tool using the code snippet
38384       for ac_prog in nm
38385 do
38386   # Extract the first word of "$ac_prog", so it can be a program name with args.
38387 set dummy $ac_prog; 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_NM+:} false; then :
38391   $as_echo_n "(cached) " >&6
38392 else
38393   case $NM in
38394   [\\/]* | ?:[\\/]*)
38395   ac_cv_path_NM="$NM" # 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_NM="$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 NM=$ac_cv_path_NM
38417 if test -n "$NM"; then
38418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38419 $as_echo "$NM" >&6; }
38420 else
38421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38422 $as_echo "no" >&6; }
38423 fi
38424 
38425 
38426   test -n "$NM" && break
38427 done
38428 
38429     else
38430       # If it succeeded, then it was overridden by the user. We will use it
38431       # for the tool.
38432 
38433       # First remove it from the list of overridden variables, so we can test
38434       # for unknown variables in the end.
38435       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38436 
38437       # Check if we try to supply an empty value
38438       if test "x$NM" = x; then
38439         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38440 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38441         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38442 $as_echo_n "checking for NM... " >&6; }
38443         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38444 $as_echo "disabled" >&6; }
38445       else
38446         # Check if the provided tool contains a complete path.
38447         tool_specified="$NM"
38448         tool_basename="${tool_specified##*/}"
38449         if test "x$tool_basename" = "x$tool_specified"; then
38450           # A command without a complete path is provided, search $PATH.
38451           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38452 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38453           # Extract the first word of "$tool_basename", so it can be a program name with args.
38454 set dummy $tool_basename; ac_word=$2
38455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38456 $as_echo_n "checking for $ac_word... " >&6; }
38457 if ${ac_cv_path_NM+:} false; then :
38458   $as_echo_n "(cached) " >&6
38459 else
38460   case $NM in
38461   [\\/]* | ?:[\\/]*)
38462   ac_cv_path_NM="$NM" # Let the user override the test with a path.
38463   ;;
38464   *)
38465   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38466 for as_dir in $PATH
38467 do
38468   IFS=$as_save_IFS
38469   test -z "$as_dir" && as_dir=.
38470     for ac_exec_ext in '' $ac_executable_extensions; do
38471   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38472     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38473     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38474     break 2
38475   fi
38476 done
38477   done
38478 IFS=$as_save_IFS
38479 
38480   ;;
38481 esac
38482 fi
38483 NM=$ac_cv_path_NM
38484 if test -n "$NM"; then
38485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38486 $as_echo "$NM" >&6; }
38487 else
38488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38489 $as_echo "no" >&6; }
38490 fi
38491 
38492 
38493           if test "x$NM" = x; then
38494             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38495           fi
38496         else
38497           # Otherwise we believe it is a complete path. Use it as it is.
38498           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38499 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38500           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38501 $as_echo_n "checking for NM... " >&6; }
38502           if test ! -x "$tool_specified"; then
38503             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38504 $as_echo "not found" >&6; }
38505             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38506           fi
38507           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38508 $as_echo "$tool_specified" >&6; }
38509         fi
38510       fi
38511     fi
38512 
38513   fi
38514 
38515 
38516 
38517   # Only process if variable expands to non-empty
38518 
38519   if test "x$NM" != x; then
38520     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38521 
38522   # First separate the path from the arguments. This will split at the first
38523   # space.
38524   complete="$NM"
38525   path="${complete%% *}"
38526   tmp="$complete EOL"
38527   arguments="${tmp#* }"
38528 
38529   # Input might be given as Windows format, start by converting to
38530   # unix format.
38531   new_path=`$CYGPATH -u "$path"`
38532 
38533   # Now try to locate executable using which
38534   new_path=`$WHICH "$new_path" 2> /dev/null`
38535   # bat and cmd files are not always considered executable in cygwin causing which
38536   # to not find them
38537   if test "x$new_path" = x \
38538       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38539       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38540     new_path=`$CYGPATH -u "$path"`
38541   fi
38542   if test "x$new_path" = x; then
38543     # Oops. Which didn't find the executable.
38544     # The splitting of arguments from the executable at a space might have been incorrect,
38545     # since paths with space are more likely in Windows. Give it another try with the whole
38546     # argument.
38547     path="$complete"
38548     arguments="EOL"
38549     new_path=`$CYGPATH -u "$path"`
38550     new_path=`$WHICH "$new_path" 2> /dev/null`
38551     # bat and cmd files are not always considered executable in cygwin causing which
38552     # to not find them
38553     if test "x$new_path" = x \
38554         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38555         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38556       new_path=`$CYGPATH -u "$path"`
38557     fi
38558     if test "x$new_path" = x; then
38559       # It's still not found. Now this is an unrecoverable error.
38560       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38561 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38562       has_space=`$ECHO "$complete" | $GREP " "`
38563       if test "x$has_space" != x; then
38564         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38565 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38566       fi
38567       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38568     fi
38569   fi
38570 
38571   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38572   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38573   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38574   # "foo.exe" is OK but "foo" is an error.
38575   #
38576   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38577   # It is also a way to make sure we got the proper file name for the real test later on.
38578   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38579   if test "x$test_shortpath" = x; then
38580     # Short path failed, file does not exist as specified.
38581     # Try adding .exe or .cmd
38582     if test -f "${new_path}.exe"; then
38583       input_to_shortpath="${new_path}.exe"
38584     elif test -f "${new_path}.cmd"; then
38585       input_to_shortpath="${new_path}.cmd"
38586     else
38587       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38588 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38589       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38590 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38591       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38592     fi
38593   else
38594     input_to_shortpath="$new_path"
38595   fi
38596 
38597   # Call helper function which possibly converts this using DOS-style short mode.
38598   # If so, the updated path is stored in $new_path.
38599   new_path="$input_to_shortpath"
38600 
38601   input_path="$input_to_shortpath"
38602   # Check if we need to convert this using DOS-style short mode. If the path
38603   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38604   # take no chances and rewrite it.
38605   # Note: m4 eats our [], so we need to use [ and ] instead.
38606   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38607   if test "x$has_forbidden_chars" != x; then
38608     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38609     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38610     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38611     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38612       # Going to short mode and back again did indeed matter. Since short mode is
38613       # case insensitive, let's make it lowercase to improve readability.
38614       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38615       # Now convert it back to Unix-style (cygpath)
38616       input_path=`$CYGPATH -u "$shortmode_path"`
38617       new_path="$input_path"
38618     fi
38619   fi
38620 
38621   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38622   if test "x$test_cygdrive_prefix" = x; then
38623     # As a simple fix, exclude /usr/bin since it's not a real path.
38624     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38625       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38626       # a path prefixed by /cygdrive for fixpath to work.
38627       new_path="$CYGWIN_ROOT_PATH$input_path"
38628     fi
38629   fi
38630 
38631   # remove trailing .exe if any
38632   new_path="${new_path/%.exe/}"
38633 
38634     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38635 
38636   # First separate the path from the arguments. This will split at the first
38637   # space.
38638   complete="$NM"
38639   path="${complete%% *}"
38640   tmp="$complete EOL"
38641   arguments="${tmp#* }"
38642 
38643   # Input might be given as Windows format, start by converting to
38644   # unix format.
38645   new_path="$path"
38646 
38647   windows_path="$new_path"
38648   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38649     unix_path=`$CYGPATH -u "$windows_path"`
38650     new_path="$unix_path"
38651   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38652     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38653     new_path="$unix_path"
38654   fi
38655 
38656 
38657   # Now try to locate executable using which
38658   new_path=`$WHICH "$new_path" 2> /dev/null`
38659 
38660   if test "x$new_path" = x; then
38661     # Oops. Which didn't find the executable.
38662     # The splitting of arguments from the executable at a space might have been incorrect,
38663     # since paths with space are more likely in Windows. Give it another try with the whole
38664     # argument.
38665     path="$complete"
38666     arguments="EOL"
38667     new_path="$path"
38668 
38669   windows_path="$new_path"
38670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38671     unix_path=`$CYGPATH -u "$windows_path"`
38672     new_path="$unix_path"
38673   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38674     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38675     new_path="$unix_path"
38676   fi
38677 
38678 
38679     new_path=`$WHICH "$new_path" 2> /dev/null`
38680     # bat and cmd files are not always considered executable in MSYS causing which
38681     # to not find them
38682     if test "x$new_path" = x \
38683         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38684         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38685       new_path="$path"
38686 
38687   windows_path="$new_path"
38688   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38689     unix_path=`$CYGPATH -u "$windows_path"`
38690     new_path="$unix_path"
38691   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38692     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38693     new_path="$unix_path"
38694   fi
38695 
38696     fi
38697 
38698     if test "x$new_path" = x; then
38699       # It's still not found. Now this is an unrecoverable error.
38700       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38701 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38702       has_space=`$ECHO "$complete" | $GREP " "`
38703       if test "x$has_space" != x; then
38704         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38705 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38706       fi
38707       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38708     fi
38709   fi
38710 
38711   # Now new_path has a complete unix path to the binary
38712   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38713     # Keep paths in /bin as-is, but remove trailing .exe if any
38714     new_path="${new_path/%.exe/}"
38715     # Do not save /bin paths to all_fixpath_prefixes!
38716   else
38717     # Not in mixed or Windows style, start by that.
38718     new_path=`cmd //c echo $new_path`
38719 
38720   input_path="$new_path"
38721   # Check if we need to convert this using DOS-style short mode. If the path
38722   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38723   # take no chances and rewrite it.
38724   # Note: m4 eats our [], so we need to use [ and ] instead.
38725   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38726   if test "x$has_forbidden_chars" != x; then
38727     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38728     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38729   fi
38730 
38731     # Output is in $new_path
38732 
38733   windows_path="$new_path"
38734   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38735     unix_path=`$CYGPATH -u "$windows_path"`
38736     new_path="$unix_path"
38737   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38738     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38739     new_path="$unix_path"
38740   fi
38741 
38742     # remove trailing .exe if any
38743     new_path="${new_path/%.exe/}"
38744 
38745     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38746     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38747   fi
38748 
38749     else
38750       # We're on a unix platform. Hooray! :)
38751       # First separate the path from the arguments. This will split at the first
38752       # space.
38753       complete="$NM"
38754       path="${complete%% *}"
38755       tmp="$complete EOL"
38756       arguments="${tmp#* }"
38757 
38758       # Cannot rely on the command "which" here since it doesn't always work.
38759       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38760       if test -z "$is_absolute_path"; then
38761         # Path to executable is not absolute. Find it.
38762         IFS_save="$IFS"
38763         IFS=:
38764         for p in $PATH; do
38765           if test -f "$p/$path" && test -x "$p/$path"; then
38766             new_path="$p/$path"
38767             break
38768           fi
38769         done
38770         IFS="$IFS_save"
38771       else
38772         # This is an absolute path, we can use it without further modifications.
38773         new_path="$path"
38774       fi
38775 
38776       if test "x$new_path" = x; then
38777         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38778 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38779         has_space=`$ECHO "$complete" | $GREP " "`
38780         if test "x$has_space" != x; then
38781           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38782 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38783         fi
38784         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38785       fi
38786     fi
38787 
38788     # Now join together the path and the arguments once again
38789     if test "x$arguments" != xEOL; then
38790       new_complete="$new_path ${arguments% *}"
38791     else
38792       new_complete="$new_path"
38793     fi
38794 
38795     if test "x$complete" != "x$new_complete"; then
38796       NM="$new_complete"
38797       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38798 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38799     fi
38800   fi
38801 
38802 
38803 
38804   # Publish this variable in the help.
38805 
38806 
38807   if [ -z "${GNM+x}" ]; then
38808     # The variable is not set by user, try to locate tool using the code snippet
38809     for ac_prog in gnm
38810 do
38811   # Extract the first word of "$ac_prog", so it can be a program name with args.
38812 set dummy $ac_prog; ac_word=$2
38813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38814 $as_echo_n "checking for $ac_word... " >&6; }
38815 if ${ac_cv_path_GNM+:} false; then :
38816   $as_echo_n "(cached) " >&6
38817 else
38818   case $GNM in
38819   [\\/]* | ?:[\\/]*)
38820   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
38821   ;;
38822   *)
38823   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38824 for as_dir in $PATH
38825 do
38826   IFS=$as_save_IFS
38827   test -z "$as_dir" && as_dir=.
38828     for ac_exec_ext in '' $ac_executable_extensions; do
38829   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38830     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
38831     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38832     break 2
38833   fi
38834 done
38835   done
38836 IFS=$as_save_IFS
38837 
38838   ;;
38839 esac
38840 fi
38841 GNM=$ac_cv_path_GNM
38842 if test -n "$GNM"; then
38843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
38844 $as_echo "$GNM" >&6; }
38845 else
38846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38847 $as_echo "no" >&6; }
38848 fi
38849 
38850 
38851   test -n "$GNM" && break
38852 done
38853 
38854   else
38855     # The variable is set, but is it from the command line or the environment?
38856 
38857     # Try to remove the string !GNM! from our list.
38858     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
38859     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38860       # If it failed, the variable was not from the command line. Ignore it,
38861       # but warn the user (except for BASH, which is always set by the calling BASH).
38862       if test "xGNM" != xBASH; then
38863         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
38864 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
38865       fi
38866       # Try to locate tool using the code snippet
38867       for ac_prog in gnm
38868 do
38869   # Extract the first word of "$ac_prog", so it can be a program name with args.
38870 set dummy $ac_prog; ac_word=$2
38871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38872 $as_echo_n "checking for $ac_word... " >&6; }
38873 if ${ac_cv_path_GNM+:} false; then :
38874   $as_echo_n "(cached) " >&6
38875 else
38876   case $GNM in
38877   [\\/]* | ?:[\\/]*)
38878   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
38879   ;;
38880   *)
38881   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38882 for as_dir in $PATH
38883 do
38884   IFS=$as_save_IFS
38885   test -z "$as_dir" && as_dir=.
38886     for ac_exec_ext in '' $ac_executable_extensions; do
38887   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38888     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
38889     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38890     break 2
38891   fi
38892 done
38893   done
38894 IFS=$as_save_IFS
38895 
38896   ;;
38897 esac
38898 fi
38899 GNM=$ac_cv_path_GNM
38900 if test -n "$GNM"; then
38901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
38902 $as_echo "$GNM" >&6; }
38903 else
38904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38905 $as_echo "no" >&6; }
38906 fi
38907 
38908 
38909   test -n "$GNM" && break
38910 done
38911 
38912     else
38913       # If it succeeded, then it was overridden by the user. We will use it
38914       # for the tool.
38915 
38916       # First remove it from the list of overridden variables, so we can test
38917       # for unknown variables in the end.
38918       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38919 
38920       # Check if we try to supply an empty value
38921       if test "x$GNM" = x; then
38922         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
38923 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
38924         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
38925 $as_echo_n "checking for GNM... " >&6; }
38926         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38927 $as_echo "disabled" >&6; }
38928       else
38929         # Check if the provided tool contains a complete path.
38930         tool_specified="$GNM"
38931         tool_basename="${tool_specified##*/}"
38932         if test "x$tool_basename" = "x$tool_specified"; then
38933           # A command without a complete path is provided, search $PATH.
38934           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
38935 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
38936           # Extract the first word of "$tool_basename", so it can be a program name with args.
38937 set dummy $tool_basename; ac_word=$2
38938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38939 $as_echo_n "checking for $ac_word... " >&6; }
38940 if ${ac_cv_path_GNM+:} false; then :
38941   $as_echo_n "(cached) " >&6
38942 else
38943   case $GNM in
38944   [\\/]* | ?:[\\/]*)
38945   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
38946   ;;
38947   *)
38948   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38949 for as_dir in $PATH
38950 do
38951   IFS=$as_save_IFS
38952   test -z "$as_dir" && as_dir=.
38953     for ac_exec_ext in '' $ac_executable_extensions; do
38954   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38955     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
38956     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38957     break 2
38958   fi
38959 done
38960   done
38961 IFS=$as_save_IFS
38962 
38963   ;;
38964 esac
38965 fi
38966 GNM=$ac_cv_path_GNM
38967 if test -n "$GNM"; then
38968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
38969 $as_echo "$GNM" >&6; }
38970 else
38971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38972 $as_echo "no" >&6; }
38973 fi
38974 
38975 
38976           if test "x$GNM" = x; then
38977             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38978           fi
38979         else
38980           # Otherwise we believe it is a complete path. Use it as it is.
38981           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
38982 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
38983           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
38984 $as_echo_n "checking for GNM... " >&6; }
38985           if test ! -x "$tool_specified"; then
38986             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38987 $as_echo "not found" >&6; }
38988             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
38989           fi
38990           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38991 $as_echo "$tool_specified" >&6; }
38992         fi
38993       fi
38994     fi
38995 
38996   fi
38997 
38998 
38999 
39000   # Only process if variable expands to non-empty
39001 
39002   if test "x$GNM" != x; then
39003     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39004 
39005   # First separate the path from the arguments. This will split at the first
39006   # space.
39007   complete="$GNM"
39008   path="${complete%% *}"
39009   tmp="$complete EOL"
39010   arguments="${tmp#* }"
39011 
39012   # Input might be given as Windows format, start by converting to
39013   # unix format.
39014   new_path=`$CYGPATH -u "$path"`
39015 
39016   # Now try to locate executable using which
39017   new_path=`$WHICH "$new_path" 2> /dev/null`
39018   # bat and cmd files are not always considered executable in cygwin causing which
39019   # to not find them
39020   if test "x$new_path" = x \
39021       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39022       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39023     new_path=`$CYGPATH -u "$path"`
39024   fi
39025   if test "x$new_path" = x; then
39026     # Oops. Which didn't find the executable.
39027     # The splitting of arguments from the executable at a space might have been incorrect,
39028     # since paths with space are more likely in Windows. Give it another try with the whole
39029     # argument.
39030     path="$complete"
39031     arguments="EOL"
39032     new_path=`$CYGPATH -u "$path"`
39033     new_path=`$WHICH "$new_path" 2> /dev/null`
39034     # bat and cmd files are not always considered executable in cygwin causing which
39035     # to not find them
39036     if test "x$new_path" = x \
39037         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39038         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39039       new_path=`$CYGPATH -u "$path"`
39040     fi
39041     if test "x$new_path" = x; then
39042       # It's still not found. Now this is an unrecoverable error.
39043       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39044 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39045       has_space=`$ECHO "$complete" | $GREP " "`
39046       if test "x$has_space" != x; then
39047         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39048 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39049       fi
39050       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39051     fi
39052   fi
39053 
39054   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39055   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39056   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39057   # "foo.exe" is OK but "foo" is an error.
39058   #
39059   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39060   # It is also a way to make sure we got the proper file name for the real test later on.
39061   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39062   if test "x$test_shortpath" = x; then
39063     # Short path failed, file does not exist as specified.
39064     # Try adding .exe or .cmd
39065     if test -f "${new_path}.exe"; then
39066       input_to_shortpath="${new_path}.exe"
39067     elif test -f "${new_path}.cmd"; then
39068       input_to_shortpath="${new_path}.cmd"
39069     else
39070       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39071 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39072       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39073 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39074       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39075     fi
39076   else
39077     input_to_shortpath="$new_path"
39078   fi
39079 
39080   # Call helper function which possibly converts this using DOS-style short mode.
39081   # If so, the updated path is stored in $new_path.
39082   new_path="$input_to_shortpath"
39083 
39084   input_path="$input_to_shortpath"
39085   # Check if we need to convert this using DOS-style short mode. If the path
39086   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39087   # take no chances and rewrite it.
39088   # Note: m4 eats our [], so we need to use [ and ] instead.
39089   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39090   if test "x$has_forbidden_chars" != x; then
39091     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39092     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39093     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39094     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39095       # Going to short mode and back again did indeed matter. Since short mode is
39096       # case insensitive, let's make it lowercase to improve readability.
39097       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39098       # Now convert it back to Unix-style (cygpath)
39099       input_path=`$CYGPATH -u "$shortmode_path"`
39100       new_path="$input_path"
39101     fi
39102   fi
39103 
39104   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39105   if test "x$test_cygdrive_prefix" = x; then
39106     # As a simple fix, exclude /usr/bin since it's not a real path.
39107     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39108       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39109       # a path prefixed by /cygdrive for fixpath to work.
39110       new_path="$CYGWIN_ROOT_PATH$input_path"
39111     fi
39112   fi
39113 
39114   # remove trailing .exe if any
39115   new_path="${new_path/%.exe/}"
39116 
39117     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39118 
39119   # First separate the path from the arguments. This will split at the first
39120   # space.
39121   complete="$GNM"
39122   path="${complete%% *}"
39123   tmp="$complete EOL"
39124   arguments="${tmp#* }"
39125 
39126   # Input might be given as Windows format, start by converting to
39127   # unix format.
39128   new_path="$path"
39129 
39130   windows_path="$new_path"
39131   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39132     unix_path=`$CYGPATH -u "$windows_path"`
39133     new_path="$unix_path"
39134   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39135     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39136     new_path="$unix_path"
39137   fi
39138 
39139 
39140   # Now try to locate executable using which
39141   new_path=`$WHICH "$new_path" 2> /dev/null`
39142 
39143   if test "x$new_path" = x; then
39144     # Oops. Which didn't find the executable.
39145     # The splitting of arguments from the executable at a space might have been incorrect,
39146     # since paths with space are more likely in Windows. Give it another try with the whole
39147     # argument.
39148     path="$complete"
39149     arguments="EOL"
39150     new_path="$path"
39151 
39152   windows_path="$new_path"
39153   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39154     unix_path=`$CYGPATH -u "$windows_path"`
39155     new_path="$unix_path"
39156   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39157     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39158     new_path="$unix_path"
39159   fi
39160 
39161 
39162     new_path=`$WHICH "$new_path" 2> /dev/null`
39163     # bat and cmd files are not always considered executable in MSYS causing which
39164     # to not find them
39165     if test "x$new_path" = x \
39166         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39167         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39168       new_path="$path"
39169 
39170   windows_path="$new_path"
39171   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39172     unix_path=`$CYGPATH -u "$windows_path"`
39173     new_path="$unix_path"
39174   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39175     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39176     new_path="$unix_path"
39177   fi
39178 
39179     fi
39180 
39181     if test "x$new_path" = x; then
39182       # It's still not found. Now this is an unrecoverable error.
39183       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39184 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39185       has_space=`$ECHO "$complete" | $GREP " "`
39186       if test "x$has_space" != x; then
39187         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39188 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39189       fi
39190       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39191     fi
39192   fi
39193 
39194   # Now new_path has a complete unix path to the binary
39195   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39196     # Keep paths in /bin as-is, but remove trailing .exe if any
39197     new_path="${new_path/%.exe/}"
39198     # Do not save /bin paths to all_fixpath_prefixes!
39199   else
39200     # Not in mixed or Windows style, start by that.
39201     new_path=`cmd //c echo $new_path`
39202 
39203   input_path="$new_path"
39204   # Check if we need to convert this using DOS-style short mode. If the path
39205   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39206   # take no chances and rewrite it.
39207   # Note: m4 eats our [], so we need to use [ and ] instead.
39208   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39209   if test "x$has_forbidden_chars" != x; then
39210     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39211     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39212   fi
39213 
39214     # Output is in $new_path
39215 
39216   windows_path="$new_path"
39217   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39218     unix_path=`$CYGPATH -u "$windows_path"`
39219     new_path="$unix_path"
39220   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39221     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39222     new_path="$unix_path"
39223   fi
39224 
39225     # remove trailing .exe if any
39226     new_path="${new_path/%.exe/}"
39227 
39228     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39229     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39230   fi
39231 
39232     else
39233       # We're on a unix platform. Hooray! :)
39234       # First separate the path from the arguments. This will split at the first
39235       # space.
39236       complete="$GNM"
39237       path="${complete%% *}"
39238       tmp="$complete EOL"
39239       arguments="${tmp#* }"
39240 
39241       # Cannot rely on the command "which" here since it doesn't always work.
39242       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39243       if test -z "$is_absolute_path"; then
39244         # Path to executable is not absolute. Find it.
39245         IFS_save="$IFS"
39246         IFS=:
39247         for p in $PATH; do
39248           if test -f "$p/$path" && test -x "$p/$path"; then
39249             new_path="$p/$path"
39250             break
39251           fi
39252         done
39253         IFS="$IFS_save"
39254       else
39255         # This is an absolute path, we can use it without further modifications.
39256         new_path="$path"
39257       fi
39258 
39259       if test "x$new_path" = x; then
39260         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39261 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39262         has_space=`$ECHO "$complete" | $GREP " "`
39263         if test "x$has_space" != x; then
39264           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39265 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39266         fi
39267         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39268       fi
39269     fi
39270 
39271     # Now join together the path and the arguments once again
39272     if test "x$arguments" != xEOL; then
39273       new_complete="$new_path ${arguments% *}"
39274     else
39275       new_complete="$new_path"
39276     fi
39277 
39278     if test "x$complete" != "x$new_complete"; then
39279       GNM="$new_complete"
39280       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
39281 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
39282     fi
39283   fi
39284 
39285   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
39286     # FIXME: we should unify this with the solaris case above.
39287 
39288 
39289   # Publish this variable in the help.
39290 
39291 
39292   if [ -z "${STRIP+x}" ]; then
39293     # The variable is not set by user, try to locate tool using the code snippet
39294     if test -n "$ac_tool_prefix"; then
39295   for ac_prog in strip
39296   do
39297     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39298 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39300 $as_echo_n "checking for $ac_word... " >&6; }
39301 if ${ac_cv_prog_STRIP+:} false; then :
39302   $as_echo_n "(cached) " >&6
39303 else
39304   if test -n "$STRIP"; then
39305   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39306 else
39307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39308 for as_dir in $PATH
39309 do
39310   IFS=$as_save_IFS
39311   test -z "$as_dir" && as_dir=.
39312     for ac_exec_ext in '' $ac_executable_extensions; do
39313   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39314     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39315     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39316     break 2
39317   fi
39318 done
39319   done
39320 IFS=$as_save_IFS
39321 
39322 fi
39323 fi
39324 STRIP=$ac_cv_prog_STRIP
39325 if test -n "$STRIP"; then
39326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39327 $as_echo "$STRIP" >&6; }
39328 else
39329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39330 $as_echo "no" >&6; }
39331 fi
39332 
39333 
39334     test -n "$STRIP" && break
39335   done
39336 fi
39337 if test -z "$STRIP"; then
39338   ac_ct_STRIP=$STRIP
39339   for ac_prog in strip
39340 do
39341   # Extract the first word of "$ac_prog", so it can be a program name with args.
39342 set dummy $ac_prog; ac_word=$2
39343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39344 $as_echo_n "checking for $ac_word... " >&6; }
39345 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39346   $as_echo_n "(cached) " >&6
39347 else
39348   if test -n "$ac_ct_STRIP"; then
39349   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39350 else
39351 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39352 for as_dir in $PATH
39353 do
39354   IFS=$as_save_IFS
39355   test -z "$as_dir" && as_dir=.
39356     for ac_exec_ext in '' $ac_executable_extensions; do
39357   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39358     ac_cv_prog_ac_ct_STRIP="$ac_prog"
39359     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39360     break 2
39361   fi
39362 done
39363   done
39364 IFS=$as_save_IFS
39365 
39366 fi
39367 fi
39368 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39369 if test -n "$ac_ct_STRIP"; then
39370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39371 $as_echo "$ac_ct_STRIP" >&6; }
39372 else
39373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39374 $as_echo "no" >&6; }
39375 fi
39376 
39377 
39378   test -n "$ac_ct_STRIP" && break
39379 done
39380 
39381   if test "x$ac_ct_STRIP" = x; then
39382     STRIP=""
39383   else
39384     case $cross_compiling:$ac_tool_warned in
39385 yes:)
39386 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39387 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39388 ac_tool_warned=yes ;;
39389 esac
39390     STRIP=$ac_ct_STRIP
39391   fi
39392 fi
39393 
39394   else
39395     # The variable is set, but is it from the command line or the environment?
39396 
39397     # Try to remove the string !STRIP! from our list.
39398     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39399     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39400       # If it failed, the variable was not from the command line. Ignore it,
39401       # but warn the user (except for BASH, which is always set by the calling BASH).
39402       if test "xSTRIP" != xBASH; then
39403         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39404 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39405       fi
39406       # Try to locate tool using the code snippet
39407       if test -n "$ac_tool_prefix"; then
39408   for ac_prog in strip
39409   do
39410     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39411 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39413 $as_echo_n "checking for $ac_word... " >&6; }
39414 if ${ac_cv_prog_STRIP+:} false; then :
39415   $as_echo_n "(cached) " >&6
39416 else
39417   if test -n "$STRIP"; then
39418   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39419 else
39420 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39421 for as_dir in $PATH
39422 do
39423   IFS=$as_save_IFS
39424   test -z "$as_dir" && as_dir=.
39425     for ac_exec_ext in '' $ac_executable_extensions; do
39426   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39427     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39428     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39429     break 2
39430   fi
39431 done
39432   done
39433 IFS=$as_save_IFS
39434 
39435 fi
39436 fi
39437 STRIP=$ac_cv_prog_STRIP
39438 if test -n "$STRIP"; then
39439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39440 $as_echo "$STRIP" >&6; }
39441 else
39442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39443 $as_echo "no" >&6; }
39444 fi
39445 
39446 
39447     test -n "$STRIP" && break
39448   done
39449 fi
39450 if test -z "$STRIP"; then
39451   ac_ct_STRIP=$STRIP
39452   for ac_prog in strip
39453 do
39454   # Extract the first word of "$ac_prog", so it can be a program name with args.
39455 set dummy $ac_prog; ac_word=$2
39456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39457 $as_echo_n "checking for $ac_word... " >&6; }
39458 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39459   $as_echo_n "(cached) " >&6
39460 else
39461   if test -n "$ac_ct_STRIP"; then
39462   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39463 else
39464 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39465 for as_dir in $PATH
39466 do
39467   IFS=$as_save_IFS
39468   test -z "$as_dir" && as_dir=.
39469     for ac_exec_ext in '' $ac_executable_extensions; do
39470   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39471     ac_cv_prog_ac_ct_STRIP="$ac_prog"
39472     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39473     break 2
39474   fi
39475 done
39476   done
39477 IFS=$as_save_IFS
39478 
39479 fi
39480 fi
39481 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39482 if test -n "$ac_ct_STRIP"; then
39483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39484 $as_echo "$ac_ct_STRIP" >&6; }
39485 else
39486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39487 $as_echo "no" >&6; }
39488 fi
39489 
39490 
39491   test -n "$ac_ct_STRIP" && break
39492 done
39493 
39494   if test "x$ac_ct_STRIP" = x; then
39495     STRIP=""
39496   else
39497     case $cross_compiling:$ac_tool_warned in
39498 yes:)
39499 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39500 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39501 ac_tool_warned=yes ;;
39502 esac
39503     STRIP=$ac_ct_STRIP
39504   fi
39505 fi
39506 
39507     else
39508       # If it succeeded, then it was overridden by the user. We will use it
39509       # for the tool.
39510 
39511       # First remove it from the list of overridden variables, so we can test
39512       # for unknown variables in the end.
39513       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39514 
39515       # Check if we try to supply an empty value
39516       if test "x$STRIP" = x; then
39517         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39518 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39519         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39520 $as_echo_n "checking for STRIP... " >&6; }
39521         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39522 $as_echo "disabled" >&6; }
39523       else
39524         # Check if the provided tool contains a complete path.
39525         tool_specified="$STRIP"
39526         tool_basename="${tool_specified##*/}"
39527         if test "x$tool_basename" = "x$tool_specified"; then
39528           # A command without a complete path is provided, search $PATH.
39529           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39530 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39531           # Extract the first word of "$tool_basename", so it can be a program name with args.
39532 set dummy $tool_basename; ac_word=$2
39533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39534 $as_echo_n "checking for $ac_word... " >&6; }
39535 if ${ac_cv_path_STRIP+:} false; then :
39536   $as_echo_n "(cached) " >&6
39537 else
39538   case $STRIP in
39539   [\\/]* | ?:[\\/]*)
39540   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39541   ;;
39542   *)
39543   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39544 for as_dir in $PATH
39545 do
39546   IFS=$as_save_IFS
39547   test -z "$as_dir" && as_dir=.
39548     for ac_exec_ext in '' $ac_executable_extensions; do
39549   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39550     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39551     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39552     break 2
39553   fi
39554 done
39555   done
39556 IFS=$as_save_IFS
39557 
39558   ;;
39559 esac
39560 fi
39561 STRIP=$ac_cv_path_STRIP
39562 if test -n "$STRIP"; then
39563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39564 $as_echo "$STRIP" >&6; }
39565 else
39566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39567 $as_echo "no" >&6; }
39568 fi
39569 
39570 
39571           if test "x$STRIP" = x; then
39572             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39573           fi
39574         else
39575           # Otherwise we believe it is a complete path. Use it as it is.
39576           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39577 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39578           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39579 $as_echo_n "checking for STRIP... " >&6; }
39580           if test ! -x "$tool_specified"; then
39581             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39582 $as_echo "not found" >&6; }
39583             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39584           fi
39585           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39586 $as_echo "$tool_specified" >&6; }
39587         fi
39588       fi
39589     fi
39590 
39591   fi
39592 
39593 
39594 
39595   # Only process if variable expands to non-empty
39596 
39597   if test "x$STRIP" != x; then
39598     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39599 
39600   # First separate the path from the arguments. This will split at the first
39601   # space.
39602   complete="$STRIP"
39603   path="${complete%% *}"
39604   tmp="$complete EOL"
39605   arguments="${tmp#* }"
39606 
39607   # Input might be given as Windows format, start by converting to
39608   # unix format.
39609   new_path=`$CYGPATH -u "$path"`
39610 
39611   # Now try to locate executable using which
39612   new_path=`$WHICH "$new_path" 2> /dev/null`
39613   # bat and cmd files are not always considered executable in cygwin causing which
39614   # to not find them
39615   if test "x$new_path" = x \
39616       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39617       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39618     new_path=`$CYGPATH -u "$path"`
39619   fi
39620   if test "x$new_path" = x; then
39621     # Oops. Which didn't find the executable.
39622     # The splitting of arguments from the executable at a space might have been incorrect,
39623     # since paths with space are more likely in Windows. Give it another try with the whole
39624     # argument.
39625     path="$complete"
39626     arguments="EOL"
39627     new_path=`$CYGPATH -u "$path"`
39628     new_path=`$WHICH "$new_path" 2> /dev/null`
39629     # bat and cmd files are not always considered executable in cygwin causing which
39630     # to not find them
39631     if test "x$new_path" = x \
39632         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39633         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39634       new_path=`$CYGPATH -u "$path"`
39635     fi
39636     if test "x$new_path" = x; then
39637       # It's still not found. Now this is an unrecoverable error.
39638       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39639 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39640       has_space=`$ECHO "$complete" | $GREP " "`
39641       if test "x$has_space" != x; then
39642         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39643 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39644       fi
39645       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39646     fi
39647   fi
39648 
39649   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39650   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39651   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39652   # "foo.exe" is OK but "foo" is an error.
39653   #
39654   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39655   # It is also a way to make sure we got the proper file name for the real test later on.
39656   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39657   if test "x$test_shortpath" = x; then
39658     # Short path failed, file does not exist as specified.
39659     # Try adding .exe or .cmd
39660     if test -f "${new_path}.exe"; then
39661       input_to_shortpath="${new_path}.exe"
39662     elif test -f "${new_path}.cmd"; then
39663       input_to_shortpath="${new_path}.cmd"
39664     else
39665       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39666 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39667       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39668 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39669       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39670     fi
39671   else
39672     input_to_shortpath="$new_path"
39673   fi
39674 
39675   # Call helper function which possibly converts this using DOS-style short mode.
39676   # If so, the updated path is stored in $new_path.
39677   new_path="$input_to_shortpath"
39678 
39679   input_path="$input_to_shortpath"
39680   # Check if we need to convert this using DOS-style short mode. If the path
39681   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39682   # take no chances and rewrite it.
39683   # Note: m4 eats our [], so we need to use [ and ] instead.
39684   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39685   if test "x$has_forbidden_chars" != x; then
39686     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39687     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39688     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39689     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39690       # Going to short mode and back again did indeed matter. Since short mode is
39691       # case insensitive, let's make it lowercase to improve readability.
39692       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39693       # Now convert it back to Unix-style (cygpath)
39694       input_path=`$CYGPATH -u "$shortmode_path"`
39695       new_path="$input_path"
39696     fi
39697   fi
39698 
39699   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39700   if test "x$test_cygdrive_prefix" = x; then
39701     # As a simple fix, exclude /usr/bin since it's not a real path.
39702     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39703       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39704       # a path prefixed by /cygdrive for fixpath to work.
39705       new_path="$CYGWIN_ROOT_PATH$input_path"
39706     fi
39707   fi
39708 
39709   # remove trailing .exe if any
39710   new_path="${new_path/%.exe/}"
39711 
39712     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39713 
39714   # First separate the path from the arguments. This will split at the first
39715   # space.
39716   complete="$STRIP"
39717   path="${complete%% *}"
39718   tmp="$complete EOL"
39719   arguments="${tmp#* }"
39720 
39721   # Input might be given as Windows format, start by converting to
39722   # unix format.
39723   new_path="$path"
39724 
39725   windows_path="$new_path"
39726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39727     unix_path=`$CYGPATH -u "$windows_path"`
39728     new_path="$unix_path"
39729   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39730     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39731     new_path="$unix_path"
39732   fi
39733 
39734 
39735   # Now try to locate executable using which
39736   new_path=`$WHICH "$new_path" 2> /dev/null`
39737 
39738   if test "x$new_path" = x; then
39739     # Oops. Which didn't find the executable.
39740     # The splitting of arguments from the executable at a space might have been incorrect,
39741     # since paths with space are more likely in Windows. Give it another try with the whole
39742     # argument.
39743     path="$complete"
39744     arguments="EOL"
39745     new_path="$path"
39746 
39747   windows_path="$new_path"
39748   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39749     unix_path=`$CYGPATH -u "$windows_path"`
39750     new_path="$unix_path"
39751   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39752     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39753     new_path="$unix_path"
39754   fi
39755 
39756 
39757     new_path=`$WHICH "$new_path" 2> /dev/null`
39758     # bat and cmd files are not always considered executable in MSYS causing which
39759     # to not find them
39760     if test "x$new_path" = x \
39761         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39762         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39763       new_path="$path"
39764 
39765   windows_path="$new_path"
39766   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39767     unix_path=`$CYGPATH -u "$windows_path"`
39768     new_path="$unix_path"
39769   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39770     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39771     new_path="$unix_path"
39772   fi
39773 
39774     fi
39775 
39776     if test "x$new_path" = x; then
39777       # It's still not found. Now this is an unrecoverable error.
39778       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39779 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39780       has_space=`$ECHO "$complete" | $GREP " "`
39781       if test "x$has_space" != x; then
39782         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39783 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39784       fi
39785       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39786     fi
39787   fi
39788 
39789   # Now new_path has a complete unix path to the binary
39790   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39791     # Keep paths in /bin as-is, but remove trailing .exe if any
39792     new_path="${new_path/%.exe/}"
39793     # Do not save /bin paths to all_fixpath_prefixes!
39794   else
39795     # Not in mixed or Windows style, start by that.
39796     new_path=`cmd //c echo $new_path`
39797 
39798   input_path="$new_path"
39799   # Check if we need to convert this using DOS-style short mode. If the path
39800   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39801   # take no chances and rewrite it.
39802   # Note: m4 eats our [], so we need to use [ and ] instead.
39803   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39804   if test "x$has_forbidden_chars" != x; then
39805     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39806     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39807   fi
39808 
39809     # Output is in $new_path
39810 
39811   windows_path="$new_path"
39812   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39813     unix_path=`$CYGPATH -u "$windows_path"`
39814     new_path="$unix_path"
39815   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39816     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39817     new_path="$unix_path"
39818   fi
39819 
39820     # remove trailing .exe if any
39821     new_path="${new_path/%.exe/}"
39822 
39823     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39824     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39825   fi
39826 
39827     else
39828       # We're on a unix platform. Hooray! :)
39829       # First separate the path from the arguments. This will split at the first
39830       # space.
39831       complete="$STRIP"
39832       path="${complete%% *}"
39833       tmp="$complete EOL"
39834       arguments="${tmp#* }"
39835 
39836       # Cannot rely on the command "which" here since it doesn't always work.
39837       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39838       if test -z "$is_absolute_path"; then
39839         # Path to executable is not absolute. Find it.
39840         IFS_save="$IFS"
39841         IFS=:
39842         for p in $PATH; do
39843           if test -f "$p/$path" && test -x "$p/$path"; then
39844             new_path="$p/$path"
39845             break
39846           fi
39847         done
39848         IFS="$IFS_save"
39849       else
39850         # This is an absolute path, we can use it without further modifications.
39851         new_path="$path"
39852       fi
39853 
39854       if test "x$new_path" = x; then
39855         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39856 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39857         has_space=`$ECHO "$complete" | $GREP " "`
39858         if test "x$has_space" != x; then
39859           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39860 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39861         fi
39862         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39863       fi
39864     fi
39865 
39866     # Now join together the path and the arguments once again
39867     if test "x$arguments" != xEOL; then
39868       new_complete="$new_path ${arguments% *}"
39869     else
39870       new_complete="$new_path"
39871     fi
39872 
39873     if test "x$complete" != "x$new_complete"; then
39874       STRIP="$new_complete"
39875       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39876 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39877     fi
39878   fi
39879 
39880 
39881 
39882   # Publish this variable in the help.
39883 
39884 
39885   if [ -z "${NM+x}" ]; then
39886     # The variable is not set by user, try to locate tool using the code snippet
39887     if test -n "$ac_tool_prefix"; then
39888   for ac_prog in nm
39889   do
39890     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39891 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39893 $as_echo_n "checking for $ac_word... " >&6; }
39894 if ${ac_cv_prog_NM+:} false; then :
39895   $as_echo_n "(cached) " >&6
39896 else
39897   if test -n "$NM"; then
39898   ac_cv_prog_NM="$NM" # Let the user override the test.
39899 else
39900 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39901 for as_dir in $PATH
39902 do
39903   IFS=$as_save_IFS
39904   test -z "$as_dir" && as_dir=.
39905     for ac_exec_ext in '' $ac_executable_extensions; do
39906   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39907     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
39908     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39909     break 2
39910   fi
39911 done
39912   done
39913 IFS=$as_save_IFS
39914 
39915 fi
39916 fi
39917 NM=$ac_cv_prog_NM
39918 if test -n "$NM"; then
39919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39920 $as_echo "$NM" >&6; }
39921 else
39922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39923 $as_echo "no" >&6; }
39924 fi
39925 
39926 
39927     test -n "$NM" && break
39928   done
39929 fi
39930 if test -z "$NM"; then
39931   ac_ct_NM=$NM
39932   for ac_prog in nm
39933 do
39934   # Extract the first word of "$ac_prog", so it can be a program name with args.
39935 set dummy $ac_prog; ac_word=$2
39936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39937 $as_echo_n "checking for $ac_word... " >&6; }
39938 if ${ac_cv_prog_ac_ct_NM+:} false; then :
39939   $as_echo_n "(cached) " >&6
39940 else
39941   if test -n "$ac_ct_NM"; then
39942   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
39943 else
39944 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39945 for as_dir in $PATH
39946 do
39947   IFS=$as_save_IFS
39948   test -z "$as_dir" && as_dir=.
39949     for ac_exec_ext in '' $ac_executable_extensions; do
39950   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39951     ac_cv_prog_ac_ct_NM="$ac_prog"
39952     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39953     break 2
39954   fi
39955 done
39956   done
39957 IFS=$as_save_IFS
39958 
39959 fi
39960 fi
39961 ac_ct_NM=$ac_cv_prog_ac_ct_NM
39962 if test -n "$ac_ct_NM"; then
39963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
39964 $as_echo "$ac_ct_NM" >&6; }
39965 else
39966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39967 $as_echo "no" >&6; }
39968 fi
39969 
39970 
39971   test -n "$ac_ct_NM" && break
39972 done
39973 
39974   if test "x$ac_ct_NM" = x; then
39975     NM=""
39976   else
39977     case $cross_compiling:$ac_tool_warned in
39978 yes:)
39979 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39980 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39981 ac_tool_warned=yes ;;
39982 esac
39983     NM=$ac_ct_NM
39984   fi
39985 fi
39986 
39987   else
39988     # The variable is set, but is it from the command line or the environment?
39989 
39990     # Try to remove the string !NM! from our list.
39991     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39992     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39993       # If it failed, the variable was not from the command line. Ignore it,
39994       # but warn the user (except for BASH, which is always set by the calling BASH).
39995       if test "xNM" != xBASH; then
39996         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39997 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39998       fi
39999       # Try to locate tool using the code snippet
40000       if test -n "$ac_tool_prefix"; then
40001   for ac_prog in nm
40002   do
40003     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40004 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40006 $as_echo_n "checking for $ac_word... " >&6; }
40007 if ${ac_cv_prog_NM+:} false; then :
40008   $as_echo_n "(cached) " >&6
40009 else
40010   if test -n "$NM"; then
40011   ac_cv_prog_NM="$NM" # Let the user override the test.
40012 else
40013 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40014 for as_dir in $PATH
40015 do
40016   IFS=$as_save_IFS
40017   test -z "$as_dir" && as_dir=.
40018     for ac_exec_ext in '' $ac_executable_extensions; do
40019   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40020     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40021     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40022     break 2
40023   fi
40024 done
40025   done
40026 IFS=$as_save_IFS
40027 
40028 fi
40029 fi
40030 NM=$ac_cv_prog_NM
40031 if test -n "$NM"; then
40032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40033 $as_echo "$NM" >&6; }
40034 else
40035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40036 $as_echo "no" >&6; }
40037 fi
40038 
40039 
40040     test -n "$NM" && break
40041   done
40042 fi
40043 if test -z "$NM"; then
40044   ac_ct_NM=$NM
40045   for ac_prog in nm
40046 do
40047   # Extract the first word of "$ac_prog", so it can be a program name with args.
40048 set dummy $ac_prog; ac_word=$2
40049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40050 $as_echo_n "checking for $ac_word... " >&6; }
40051 if ${ac_cv_prog_ac_ct_NM+:} false; then :
40052   $as_echo_n "(cached) " >&6
40053 else
40054   if test -n "$ac_ct_NM"; then
40055   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40056 else
40057 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40058 for as_dir in $PATH
40059 do
40060   IFS=$as_save_IFS
40061   test -z "$as_dir" && as_dir=.
40062     for ac_exec_ext in '' $ac_executable_extensions; do
40063   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40064     ac_cv_prog_ac_ct_NM="$ac_prog"
40065     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40066     break 2
40067   fi
40068 done
40069   done
40070 IFS=$as_save_IFS
40071 
40072 fi
40073 fi
40074 ac_ct_NM=$ac_cv_prog_ac_ct_NM
40075 if test -n "$ac_ct_NM"; then
40076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40077 $as_echo "$ac_ct_NM" >&6; }
40078 else
40079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40080 $as_echo "no" >&6; }
40081 fi
40082 
40083 
40084   test -n "$ac_ct_NM" && break
40085 done
40086 
40087   if test "x$ac_ct_NM" = x; then
40088     NM=""
40089   else
40090     case $cross_compiling:$ac_tool_warned in
40091 yes:)
40092 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40093 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40094 ac_tool_warned=yes ;;
40095 esac
40096     NM=$ac_ct_NM
40097   fi
40098 fi
40099 
40100     else
40101       # If it succeeded, then it was overridden by the user. We will use it
40102       # for the tool.
40103 
40104       # First remove it from the list of overridden variables, so we can test
40105       # for unknown variables in the end.
40106       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40107 
40108       # Check if we try to supply an empty value
40109       if test "x$NM" = x; then
40110         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40111 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40112         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40113 $as_echo_n "checking for NM... " >&6; }
40114         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40115 $as_echo "disabled" >&6; }
40116       else
40117         # Check if the provided tool contains a complete path.
40118         tool_specified="$NM"
40119         tool_basename="${tool_specified##*/}"
40120         if test "x$tool_basename" = "x$tool_specified"; then
40121           # A command without a complete path is provided, search $PATH.
40122           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40123 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40124           # Extract the first word of "$tool_basename", so it can be a program name with args.
40125 set dummy $tool_basename; ac_word=$2
40126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40127 $as_echo_n "checking for $ac_word... " >&6; }
40128 if ${ac_cv_path_NM+:} false; then :
40129   $as_echo_n "(cached) " >&6
40130 else
40131   case $NM in
40132   [\\/]* | ?:[\\/]*)
40133   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40134   ;;
40135   *)
40136   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40137 for as_dir in $PATH
40138 do
40139   IFS=$as_save_IFS
40140   test -z "$as_dir" && as_dir=.
40141     for ac_exec_ext in '' $ac_executable_extensions; do
40142   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40143     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40144     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40145     break 2
40146   fi
40147 done
40148   done
40149 IFS=$as_save_IFS
40150 
40151   ;;
40152 esac
40153 fi
40154 NM=$ac_cv_path_NM
40155 if test -n "$NM"; then
40156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40157 $as_echo "$NM" >&6; }
40158 else
40159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40160 $as_echo "no" >&6; }
40161 fi
40162 
40163 
40164           if test "x$NM" = x; then
40165             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40166           fi
40167         else
40168           # Otherwise we believe it is a complete path. Use it as it is.
40169           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40170 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40171           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40172 $as_echo_n "checking for NM... " >&6; }
40173           if test ! -x "$tool_specified"; then
40174             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40175 $as_echo "not found" >&6; }
40176             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40177           fi
40178           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40179 $as_echo "$tool_specified" >&6; }
40180         fi
40181       fi
40182     fi
40183 
40184   fi
40185 
40186 
40187 
40188   # Only process if variable expands to non-empty
40189 
40190   if test "x$NM" != x; then
40191     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40192 
40193   # First separate the path from the arguments. This will split at the first
40194   # space.
40195   complete="$NM"
40196   path="${complete%% *}"
40197   tmp="$complete EOL"
40198   arguments="${tmp#* }"
40199 
40200   # Input might be given as Windows format, start by converting to
40201   # unix format.
40202   new_path=`$CYGPATH -u "$path"`
40203 
40204   # Now try to locate executable using which
40205   new_path=`$WHICH "$new_path" 2> /dev/null`
40206   # bat and cmd files are not always considered executable in cygwin causing which
40207   # to not find them
40208   if test "x$new_path" = x \
40209       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40210       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40211     new_path=`$CYGPATH -u "$path"`
40212   fi
40213   if test "x$new_path" = x; then
40214     # Oops. Which didn't find the executable.
40215     # The splitting of arguments from the executable at a space might have been incorrect,
40216     # since paths with space are more likely in Windows. Give it another try with the whole
40217     # argument.
40218     path="$complete"
40219     arguments="EOL"
40220     new_path=`$CYGPATH -u "$path"`
40221     new_path=`$WHICH "$new_path" 2> /dev/null`
40222     # bat and cmd files are not always considered executable in cygwin causing which
40223     # to not find them
40224     if test "x$new_path" = x \
40225         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40226         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40227       new_path=`$CYGPATH -u "$path"`
40228     fi
40229     if test "x$new_path" = x; then
40230       # It's still not found. Now this is an unrecoverable error.
40231       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40232 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40233       has_space=`$ECHO "$complete" | $GREP " "`
40234       if test "x$has_space" != x; then
40235         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40236 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40237       fi
40238       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40239     fi
40240   fi
40241 
40242   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40243   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40244   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40245   # "foo.exe" is OK but "foo" is an error.
40246   #
40247   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40248   # It is also a way to make sure we got the proper file name for the real test later on.
40249   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40250   if test "x$test_shortpath" = x; then
40251     # Short path failed, file does not exist as specified.
40252     # Try adding .exe or .cmd
40253     if test -f "${new_path}.exe"; then
40254       input_to_shortpath="${new_path}.exe"
40255     elif test -f "${new_path}.cmd"; then
40256       input_to_shortpath="${new_path}.cmd"
40257     else
40258       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40259 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40260       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40261 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40262       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40263     fi
40264   else
40265     input_to_shortpath="$new_path"
40266   fi
40267 
40268   # Call helper function which possibly converts this using DOS-style short mode.
40269   # If so, the updated path is stored in $new_path.
40270   new_path="$input_to_shortpath"
40271 
40272   input_path="$input_to_shortpath"
40273   # Check if we need to convert this using DOS-style short mode. If the path
40274   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40275   # take no chances and rewrite it.
40276   # Note: m4 eats our [], so we need to use [ and ] instead.
40277   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40278   if test "x$has_forbidden_chars" != x; then
40279     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40280     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40281     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40282     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40283       # Going to short mode and back again did indeed matter. Since short mode is
40284       # case insensitive, let's make it lowercase to improve readability.
40285       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40286       # Now convert it back to Unix-style (cygpath)
40287       input_path=`$CYGPATH -u "$shortmode_path"`
40288       new_path="$input_path"
40289     fi
40290   fi
40291 
40292   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40293   if test "x$test_cygdrive_prefix" = x; then
40294     # As a simple fix, exclude /usr/bin since it's not a real path.
40295     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40296       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40297       # a path prefixed by /cygdrive for fixpath to work.
40298       new_path="$CYGWIN_ROOT_PATH$input_path"
40299     fi
40300   fi
40301 
40302   # remove trailing .exe if any
40303   new_path="${new_path/%.exe/}"
40304 
40305     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40306 
40307   # First separate the path from the arguments. This will split at the first
40308   # space.
40309   complete="$NM"
40310   path="${complete%% *}"
40311   tmp="$complete EOL"
40312   arguments="${tmp#* }"
40313 
40314   # Input might be given as Windows format, start by converting to
40315   # unix format.
40316   new_path="$path"
40317 
40318   windows_path="$new_path"
40319   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40320     unix_path=`$CYGPATH -u "$windows_path"`
40321     new_path="$unix_path"
40322   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40323     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40324     new_path="$unix_path"
40325   fi
40326 
40327 
40328   # Now try to locate executable using which
40329   new_path=`$WHICH "$new_path" 2> /dev/null`
40330 
40331   if test "x$new_path" = x; then
40332     # Oops. Which didn't find the executable.
40333     # The splitting of arguments from the executable at a space might have been incorrect,
40334     # since paths with space are more likely in Windows. Give it another try with the whole
40335     # argument.
40336     path="$complete"
40337     arguments="EOL"
40338     new_path="$path"
40339 
40340   windows_path="$new_path"
40341   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40342     unix_path=`$CYGPATH -u "$windows_path"`
40343     new_path="$unix_path"
40344   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40345     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40346     new_path="$unix_path"
40347   fi
40348 
40349 
40350     new_path=`$WHICH "$new_path" 2> /dev/null`
40351     # bat and cmd files are not always considered executable in MSYS causing which
40352     # to not find them
40353     if test "x$new_path" = x \
40354         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40355         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40356       new_path="$path"
40357 
40358   windows_path="$new_path"
40359   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40360     unix_path=`$CYGPATH -u "$windows_path"`
40361     new_path="$unix_path"
40362   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40363     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40364     new_path="$unix_path"
40365   fi
40366 
40367     fi
40368 
40369     if test "x$new_path" = x; then
40370       # It's still not found. Now this is an unrecoverable error.
40371       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40372 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40373       has_space=`$ECHO "$complete" | $GREP " "`
40374       if test "x$has_space" != x; then
40375         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40376 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40377       fi
40378       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40379     fi
40380   fi
40381 
40382   # Now new_path has a complete unix path to the binary
40383   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40384     # Keep paths in /bin as-is, but remove trailing .exe if any
40385     new_path="${new_path/%.exe/}"
40386     # Do not save /bin paths to all_fixpath_prefixes!
40387   else
40388     # Not in mixed or Windows style, start by that.
40389     new_path=`cmd //c echo $new_path`
40390 
40391   input_path="$new_path"
40392   # Check if we need to convert this using DOS-style short mode. If the path
40393   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40394   # take no chances and rewrite it.
40395   # Note: m4 eats our [], so we need to use [ and ] instead.
40396   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40397   if test "x$has_forbidden_chars" != x; then
40398     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40399     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40400   fi
40401 
40402     # Output is in $new_path
40403 
40404   windows_path="$new_path"
40405   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40406     unix_path=`$CYGPATH -u "$windows_path"`
40407     new_path="$unix_path"
40408   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40409     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40410     new_path="$unix_path"
40411   fi
40412 
40413     # remove trailing .exe if any
40414     new_path="${new_path/%.exe/}"
40415 
40416     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40417     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40418   fi
40419 
40420     else
40421       # We're on a unix platform. Hooray! :)
40422       # First separate the path from the arguments. This will split at the first
40423       # space.
40424       complete="$NM"
40425       path="${complete%% *}"
40426       tmp="$complete EOL"
40427       arguments="${tmp#* }"
40428 
40429       # Cannot rely on the command "which" here since it doesn't always work.
40430       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40431       if test -z "$is_absolute_path"; then
40432         # Path to executable is not absolute. Find it.
40433         IFS_save="$IFS"
40434         IFS=:
40435         for p in $PATH; do
40436           if test -f "$p/$path" && test -x "$p/$path"; then
40437             new_path="$p/$path"
40438             break
40439           fi
40440         done
40441         IFS="$IFS_save"
40442       else
40443         # This is an absolute path, we can use it without further modifications.
40444         new_path="$path"
40445       fi
40446 
40447       if test "x$new_path" = x; then
40448         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40449 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40450         has_space=`$ECHO "$complete" | $GREP " "`
40451         if test "x$has_space" != x; then
40452           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40453 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40454         fi
40455         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40456       fi
40457     fi
40458 
40459     # Now join together the path and the arguments once again
40460     if test "x$arguments" != xEOL; then
40461       new_complete="$new_path ${arguments% *}"
40462     else
40463       new_complete="$new_path"
40464     fi
40465 
40466     if test "x$complete" != "x$new_complete"; then
40467       NM="$new_complete"
40468       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40469 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40470     fi
40471   fi
40472 
40473     GNM="$NM"
40474 
40475   fi
40476 
40477   # objcopy is used for moving debug symbols to separate files when
40478   # full debug symbols are enabled.
40479   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
40480 
40481 
40482   # Publish this variable in the help.
40483 
40484 
40485   if [ -z "${OBJCOPY+x}" ]; then
40486     # The variable is not set by user, try to locate tool using the code snippet
40487     if test -n "$ac_tool_prefix"; then
40488   for ac_prog in gobjcopy objcopy
40489   do
40490     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40491 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40493 $as_echo_n "checking for $ac_word... " >&6; }
40494 if ${ac_cv_prog_OBJCOPY+:} false; then :
40495   $as_echo_n "(cached) " >&6
40496 else
40497   if test -n "$OBJCOPY"; then
40498   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
40499 else
40500 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40501 for as_dir in $PATH
40502 do
40503   IFS=$as_save_IFS
40504   test -z "$as_dir" && as_dir=.
40505     for ac_exec_ext in '' $ac_executable_extensions; do
40506   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40507     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
40508     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40509     break 2
40510   fi
40511 done
40512   done
40513 IFS=$as_save_IFS
40514 
40515 fi
40516 fi
40517 OBJCOPY=$ac_cv_prog_OBJCOPY
40518 if test -n "$OBJCOPY"; then
40519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40520 $as_echo "$OBJCOPY" >&6; }
40521 else
40522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40523 $as_echo "no" >&6; }
40524 fi
40525 
40526 
40527     test -n "$OBJCOPY" && break
40528   done
40529 fi
40530 if test -z "$OBJCOPY"; then
40531   ac_ct_OBJCOPY=$OBJCOPY
40532   for ac_prog in gobjcopy objcopy
40533 do
40534   # Extract the first word of "$ac_prog", so it can be a program name with args.
40535 set dummy $ac_prog; ac_word=$2
40536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40537 $as_echo_n "checking for $ac_word... " >&6; }
40538 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
40539   $as_echo_n "(cached) " >&6
40540 else
40541   if test -n "$ac_ct_OBJCOPY"; then
40542   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
40543 else
40544 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40545 for as_dir in $PATH
40546 do
40547   IFS=$as_save_IFS
40548   test -z "$as_dir" && as_dir=.
40549     for ac_exec_ext in '' $ac_executable_extensions; do
40550   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40551     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
40552     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40553     break 2
40554   fi
40555 done
40556   done
40557 IFS=$as_save_IFS
40558 
40559 fi
40560 fi
40561 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
40562 if test -n "$ac_ct_OBJCOPY"; then
40563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
40564 $as_echo "$ac_ct_OBJCOPY" >&6; }
40565 else
40566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40567 $as_echo "no" >&6; }
40568 fi
40569 
40570 
40571   test -n "$ac_ct_OBJCOPY" && break
40572 done
40573 
40574   if test "x$ac_ct_OBJCOPY" = x; then
40575     OBJCOPY=""
40576   else
40577     case $cross_compiling:$ac_tool_warned in
40578 yes:)
40579 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40580 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40581 ac_tool_warned=yes ;;
40582 esac
40583     OBJCOPY=$ac_ct_OBJCOPY
40584   fi
40585 fi
40586 
40587   else
40588     # The variable is set, but is it from the command line or the environment?
40589 
40590     # Try to remove the string !OBJCOPY! from our list.
40591     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
40592     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40593       # If it failed, the variable was not from the command line. Ignore it,
40594       # but warn the user (except for BASH, which is always set by the calling BASH).
40595       if test "xOBJCOPY" != xBASH; then
40596         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
40597 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
40598       fi
40599       # Try to locate tool using the code snippet
40600       if test -n "$ac_tool_prefix"; then
40601   for ac_prog in gobjcopy objcopy
40602   do
40603     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40604 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40606 $as_echo_n "checking for $ac_word... " >&6; }
40607 if ${ac_cv_prog_OBJCOPY+:} false; then :
40608   $as_echo_n "(cached) " >&6
40609 else
40610   if test -n "$OBJCOPY"; then
40611   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
40612 else
40613 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40614 for as_dir in $PATH
40615 do
40616   IFS=$as_save_IFS
40617   test -z "$as_dir" && as_dir=.
40618     for ac_exec_ext in '' $ac_executable_extensions; do
40619   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40620     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
40621     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40622     break 2
40623   fi
40624 done
40625   done
40626 IFS=$as_save_IFS
40627 
40628 fi
40629 fi
40630 OBJCOPY=$ac_cv_prog_OBJCOPY
40631 if test -n "$OBJCOPY"; then
40632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40633 $as_echo "$OBJCOPY" >&6; }
40634 else
40635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40636 $as_echo "no" >&6; }
40637 fi
40638 
40639 
40640     test -n "$OBJCOPY" && break
40641   done
40642 fi
40643 if test -z "$OBJCOPY"; then
40644   ac_ct_OBJCOPY=$OBJCOPY
40645   for ac_prog in gobjcopy objcopy
40646 do
40647   # Extract the first word of "$ac_prog", so it can be a program name with args.
40648 set dummy $ac_prog; ac_word=$2
40649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40650 $as_echo_n "checking for $ac_word... " >&6; }
40651 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
40652   $as_echo_n "(cached) " >&6
40653 else
40654   if test -n "$ac_ct_OBJCOPY"; then
40655   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
40656 else
40657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40658 for as_dir in $PATH
40659 do
40660   IFS=$as_save_IFS
40661   test -z "$as_dir" && as_dir=.
40662     for ac_exec_ext in '' $ac_executable_extensions; do
40663   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40664     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
40665     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40666     break 2
40667   fi
40668 done
40669   done
40670 IFS=$as_save_IFS
40671 
40672 fi
40673 fi
40674 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
40675 if test -n "$ac_ct_OBJCOPY"; then
40676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
40677 $as_echo "$ac_ct_OBJCOPY" >&6; }
40678 else
40679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40680 $as_echo "no" >&6; }
40681 fi
40682 
40683 
40684   test -n "$ac_ct_OBJCOPY" && break
40685 done
40686 
40687   if test "x$ac_ct_OBJCOPY" = x; then
40688     OBJCOPY=""
40689   else
40690     case $cross_compiling:$ac_tool_warned in
40691 yes:)
40692 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40693 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40694 ac_tool_warned=yes ;;
40695 esac
40696     OBJCOPY=$ac_ct_OBJCOPY
40697   fi
40698 fi
40699 
40700     else
40701       # If it succeeded, then it was overridden by the user. We will use it
40702       # for the tool.
40703 
40704       # First remove it from the list of overridden variables, so we can test
40705       # for unknown variables in the end.
40706       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40707 
40708       # Check if we try to supply an empty value
40709       if test "x$OBJCOPY" = x; then
40710         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
40711 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
40712         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
40713 $as_echo_n "checking for OBJCOPY... " >&6; }
40714         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40715 $as_echo "disabled" >&6; }
40716       else
40717         # Check if the provided tool contains a complete path.
40718         tool_specified="$OBJCOPY"
40719         tool_basename="${tool_specified##*/}"
40720         if test "x$tool_basename" = "x$tool_specified"; then
40721           # A command without a complete path is provided, search $PATH.
40722           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
40723 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
40724           # Extract the first word of "$tool_basename", so it can be a program name with args.
40725 set dummy $tool_basename; ac_word=$2
40726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40727 $as_echo_n "checking for $ac_word... " >&6; }
40728 if ${ac_cv_path_OBJCOPY+:} false; then :
40729   $as_echo_n "(cached) " >&6
40730 else
40731   case $OBJCOPY in
40732   [\\/]* | ?:[\\/]*)
40733   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
40734   ;;
40735   *)
40736   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40737 for as_dir in $PATH
40738 do
40739   IFS=$as_save_IFS
40740   test -z "$as_dir" && as_dir=.
40741     for ac_exec_ext in '' $ac_executable_extensions; do
40742   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40743     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
40744     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40745     break 2
40746   fi
40747 done
40748   done
40749 IFS=$as_save_IFS
40750 
40751   ;;
40752 esac
40753 fi
40754 OBJCOPY=$ac_cv_path_OBJCOPY
40755 if test -n "$OBJCOPY"; then
40756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40757 $as_echo "$OBJCOPY" >&6; }
40758 else
40759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40760 $as_echo "no" >&6; }
40761 fi
40762 
40763 
40764           if test "x$OBJCOPY" = x; then
40765             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40766           fi
40767         else
40768           # Otherwise we believe it is a complete path. Use it as it is.
40769           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
40770 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
40771           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
40772 $as_echo_n "checking for OBJCOPY... " >&6; }
40773           if test ! -x "$tool_specified"; then
40774             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40775 $as_echo "not found" >&6; }
40776             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
40777           fi
40778           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40779 $as_echo "$tool_specified" >&6; }
40780         fi
40781       fi
40782     fi
40783 
40784   fi
40785 
40786 
40787     # Only call fixup if objcopy was found.
40788     if test -n "$OBJCOPY"; then
40789 
40790   # Only process if variable expands to non-empty
40791 
40792   if test "x$OBJCOPY" != x; then
40793     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40794 
40795   # First separate the path from the arguments. This will split at the first
40796   # space.
40797   complete="$OBJCOPY"
40798   path="${complete%% *}"
40799   tmp="$complete EOL"
40800   arguments="${tmp#* }"
40801 
40802   # Input might be given as Windows format, start by converting to
40803   # unix format.
40804   new_path=`$CYGPATH -u "$path"`
40805 
40806   # Now try to locate executable using which
40807   new_path=`$WHICH "$new_path" 2> /dev/null`
40808   # bat and cmd files are not always considered executable in cygwin causing which
40809   # to not find them
40810   if test "x$new_path" = x \
40811       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40812       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40813     new_path=`$CYGPATH -u "$path"`
40814   fi
40815   if test "x$new_path" = x; then
40816     # Oops. Which didn't find the executable.
40817     # The splitting of arguments from the executable at a space might have been incorrect,
40818     # since paths with space are more likely in Windows. Give it another try with the whole
40819     # argument.
40820     path="$complete"
40821     arguments="EOL"
40822     new_path=`$CYGPATH -u "$path"`
40823     new_path=`$WHICH "$new_path" 2> /dev/null`
40824     # bat and cmd files are not always considered executable in cygwin causing which
40825     # to not find them
40826     if test "x$new_path" = x \
40827         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40828         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40829       new_path=`$CYGPATH -u "$path"`
40830     fi
40831     if test "x$new_path" = x; then
40832       # It's still not found. Now this is an unrecoverable error.
40833       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
40834 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
40835       has_space=`$ECHO "$complete" | $GREP " "`
40836       if test "x$has_space" != x; then
40837         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40838 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40839       fi
40840       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
40841     fi
40842   fi
40843 
40844   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40845   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40846   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40847   # "foo.exe" is OK but "foo" is an error.
40848   #
40849   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40850   # It is also a way to make sure we got the proper file name for the real test later on.
40851   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40852   if test "x$test_shortpath" = x; then
40853     # Short path failed, file does not exist as specified.
40854     # Try adding .exe or .cmd
40855     if test -f "${new_path}.exe"; then
40856       input_to_shortpath="${new_path}.exe"
40857     elif test -f "${new_path}.cmd"; then
40858       input_to_shortpath="${new_path}.cmd"
40859     else
40860       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
40861 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
40862       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40863 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40864       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
40865     fi
40866   else
40867     input_to_shortpath="$new_path"
40868   fi
40869 
40870   # Call helper function which possibly converts this using DOS-style short mode.
40871   # If so, the updated path is stored in $new_path.
40872   new_path="$input_to_shortpath"
40873 
40874   input_path="$input_to_shortpath"
40875   # Check if we need to convert this using DOS-style short mode. If the path
40876   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40877   # take no chances and rewrite it.
40878   # Note: m4 eats our [], so we need to use [ and ] instead.
40879   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40880   if test "x$has_forbidden_chars" != x; then
40881     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40882     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40883     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40884     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40885       # Going to short mode and back again did indeed matter. Since short mode is
40886       # case insensitive, let's make it lowercase to improve readability.
40887       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40888       # Now convert it back to Unix-style (cygpath)
40889       input_path=`$CYGPATH -u "$shortmode_path"`
40890       new_path="$input_path"
40891     fi
40892   fi
40893 
40894   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40895   if test "x$test_cygdrive_prefix" = x; then
40896     # As a simple fix, exclude /usr/bin since it's not a real path.
40897     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40898       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40899       # a path prefixed by /cygdrive for fixpath to work.
40900       new_path="$CYGWIN_ROOT_PATH$input_path"
40901     fi
40902   fi
40903 
40904   # remove trailing .exe if any
40905   new_path="${new_path/%.exe/}"
40906 
40907     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40908 
40909   # First separate the path from the arguments. This will split at the first
40910   # space.
40911   complete="$OBJCOPY"
40912   path="${complete%% *}"
40913   tmp="$complete EOL"
40914   arguments="${tmp#* }"
40915 
40916   # Input might be given as Windows format, start by converting to
40917   # unix format.
40918   new_path="$path"
40919 
40920   windows_path="$new_path"
40921   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40922     unix_path=`$CYGPATH -u "$windows_path"`
40923     new_path="$unix_path"
40924   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40925     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40926     new_path="$unix_path"
40927   fi
40928 
40929 
40930   # Now try to locate executable using which
40931   new_path=`$WHICH "$new_path" 2> /dev/null`
40932 
40933   if test "x$new_path" = x; then
40934     # Oops. Which didn't find the executable.
40935     # The splitting of arguments from the executable at a space might have been incorrect,
40936     # since paths with space are more likely in Windows. Give it another try with the whole
40937     # argument.
40938     path="$complete"
40939     arguments="EOL"
40940     new_path="$path"
40941 
40942   windows_path="$new_path"
40943   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40944     unix_path=`$CYGPATH -u "$windows_path"`
40945     new_path="$unix_path"
40946   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40947     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40948     new_path="$unix_path"
40949   fi
40950 
40951 
40952     new_path=`$WHICH "$new_path" 2> /dev/null`
40953     # bat and cmd files are not always considered executable in MSYS causing which
40954     # to not find them
40955     if test "x$new_path" = x \
40956         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40957         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40958       new_path="$path"
40959 
40960   windows_path="$new_path"
40961   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40962     unix_path=`$CYGPATH -u "$windows_path"`
40963     new_path="$unix_path"
40964   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40965     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40966     new_path="$unix_path"
40967   fi
40968 
40969     fi
40970 
40971     if test "x$new_path" = x; then
40972       # It's still not found. Now this is an unrecoverable error.
40973       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
40974 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
40975       has_space=`$ECHO "$complete" | $GREP " "`
40976       if test "x$has_space" != x; then
40977         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40978 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40979       fi
40980       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
40981     fi
40982   fi
40983 
40984   # Now new_path has a complete unix path to the binary
40985   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40986     # Keep paths in /bin as-is, but remove trailing .exe if any
40987     new_path="${new_path/%.exe/}"
40988     # Do not save /bin paths to all_fixpath_prefixes!
40989   else
40990     # Not in mixed or Windows style, start by that.
40991     new_path=`cmd //c echo $new_path`
40992 
40993   input_path="$new_path"
40994   # Check if we need to convert this using DOS-style short mode. If the path
40995   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40996   # take no chances and rewrite it.
40997   # Note: m4 eats our [], so we need to use [ and ] instead.
40998   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40999   if test "x$has_forbidden_chars" != x; then
41000     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41001     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41002   fi
41003 
41004     # Output is in $new_path
41005 
41006   windows_path="$new_path"
41007   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41008     unix_path=`$CYGPATH -u "$windows_path"`
41009     new_path="$unix_path"
41010   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41011     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41012     new_path="$unix_path"
41013   fi
41014 
41015     # remove trailing .exe if any
41016     new_path="${new_path/%.exe/}"
41017 
41018     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41019     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41020   fi
41021 
41022     else
41023       # We're on a unix platform. Hooray! :)
41024       # First separate the path from the arguments. This will split at the first
41025       # space.
41026       complete="$OBJCOPY"
41027       path="${complete%% *}"
41028       tmp="$complete EOL"
41029       arguments="${tmp#* }"
41030 
41031       # Cannot rely on the command "which" here since it doesn't always work.
41032       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41033       if test -z "$is_absolute_path"; then
41034         # Path to executable is not absolute. Find it.
41035         IFS_save="$IFS"
41036         IFS=:
41037         for p in $PATH; do
41038           if test -f "$p/$path" && test -x "$p/$path"; then
41039             new_path="$p/$path"
41040             break
41041           fi
41042         done
41043         IFS="$IFS_save"
41044       else
41045         # This is an absolute path, we can use it without further modifications.
41046         new_path="$path"
41047       fi
41048 
41049       if test "x$new_path" = x; then
41050         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41051 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41052         has_space=`$ECHO "$complete" | $GREP " "`
41053         if test "x$has_space" != x; then
41054           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41055 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41056         fi
41057         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41058       fi
41059     fi
41060 
41061     # Now join together the path and the arguments once again
41062     if test "x$arguments" != xEOL; then
41063       new_complete="$new_path ${arguments% *}"
41064     else
41065       new_complete="$new_path"
41066     fi
41067 
41068     if test "x$complete" != "x$new_complete"; then
41069       OBJCOPY="$new_complete"
41070       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
41071 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
41072     fi
41073   fi
41074 
41075       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
41076         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
41077         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
41078         # - version number is last blank separate word on first line
41079         # - version number formats that have been seen:
41080         #   - <major>.<minor>
41081         #   - <major>.<minor>.<micro>
41082         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
41083         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
41084          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
41085               -e 's/.* //' \
41086               -e '/^[01]\./b bad' \
41087               -e '/^2\./{' \
41088               -e '  s/^2\.//' \
41089               -e '  /^[0-9]$/b bad' \
41090               -e '  /^[0-9]\./b bad' \
41091               -e '  /^1[0-9]$/b bad' \
41092               -e '  /^1[0-9]\./b bad' \
41093               -e '  /^20\./b bad' \
41094               -e '  /^21\.0$/b bad' \
41095               -e '  /^21\.0\./b bad' \
41096               -e '}' \
41097               -e ':good' \
41098               -e 's/.*/VALID_VERSION/p' \
41099               -e 'q' \
41100               -e ':bad' \
41101               -e 's/.*/BAD_VERSION/p' \
41102               -e 'q'`
41103         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
41104           OBJCOPY=
41105           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&5
41106 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
41107           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
41108 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
41109           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
41110 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
41111           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
41112 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
41113           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
41114 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
41115         fi
41116       fi
41117     fi
41118   fi
41119 
41120 
41121 
41122   # Publish this variable in the help.
41123 
41124 
41125   if [ -z "${OBJDUMP+x}" ]; then
41126     # The variable is not set by user, try to locate tool using the code snippet
41127     if test -n "$ac_tool_prefix"; then
41128   for ac_prog in gobjdump objdump
41129   do
41130     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41131 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41133 $as_echo_n "checking for $ac_word... " >&6; }
41134 if ${ac_cv_prog_OBJDUMP+:} false; then :
41135   $as_echo_n "(cached) " >&6
41136 else
41137   if test -n "$OBJDUMP"; then
41138   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41139 else
41140 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41141 for as_dir in $PATH
41142 do
41143   IFS=$as_save_IFS
41144   test -z "$as_dir" && as_dir=.
41145     for ac_exec_ext in '' $ac_executable_extensions; do
41146   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41147     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41148     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41149     break 2
41150   fi
41151 done
41152   done
41153 IFS=$as_save_IFS
41154 
41155 fi
41156 fi
41157 OBJDUMP=$ac_cv_prog_OBJDUMP
41158 if test -n "$OBJDUMP"; then
41159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41160 $as_echo "$OBJDUMP" >&6; }
41161 else
41162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41163 $as_echo "no" >&6; }
41164 fi
41165 
41166 
41167     test -n "$OBJDUMP" && break
41168   done
41169 fi
41170 if test -z "$OBJDUMP"; then
41171   ac_ct_OBJDUMP=$OBJDUMP
41172   for ac_prog in gobjdump objdump
41173 do
41174   # Extract the first word of "$ac_prog", so it can be a program name with args.
41175 set dummy $ac_prog; ac_word=$2
41176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41177 $as_echo_n "checking for $ac_word... " >&6; }
41178 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41179   $as_echo_n "(cached) " >&6
41180 else
41181   if test -n "$ac_ct_OBJDUMP"; then
41182   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41183 else
41184 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41185 for as_dir in $PATH
41186 do
41187   IFS=$as_save_IFS
41188   test -z "$as_dir" && as_dir=.
41189     for ac_exec_ext in '' $ac_executable_extensions; do
41190   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41191     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41192     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41193     break 2
41194   fi
41195 done
41196   done
41197 IFS=$as_save_IFS
41198 
41199 fi
41200 fi
41201 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41202 if test -n "$ac_ct_OBJDUMP"; then
41203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41204 $as_echo "$ac_ct_OBJDUMP" >&6; }
41205 else
41206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41207 $as_echo "no" >&6; }
41208 fi
41209 
41210 
41211   test -n "$ac_ct_OBJDUMP" && break
41212 done
41213 
41214   if test "x$ac_ct_OBJDUMP" = x; then
41215     OBJDUMP=""
41216   else
41217     case $cross_compiling:$ac_tool_warned in
41218 yes:)
41219 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41220 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41221 ac_tool_warned=yes ;;
41222 esac
41223     OBJDUMP=$ac_ct_OBJDUMP
41224   fi
41225 fi
41226 
41227   else
41228     # The variable is set, but is it from the command line or the environment?
41229 
41230     # Try to remove the string !OBJDUMP! from our list.
41231     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
41232     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41233       # If it failed, the variable was not from the command line. Ignore it,
41234       # but warn the user (except for BASH, which is always set by the calling BASH).
41235       if test "xOBJDUMP" != xBASH; then
41236         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
41237 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
41238       fi
41239       # Try to locate tool using the code snippet
41240       if test -n "$ac_tool_prefix"; then
41241   for ac_prog in gobjdump objdump
41242   do
41243     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41244 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41246 $as_echo_n "checking for $ac_word... " >&6; }
41247 if ${ac_cv_prog_OBJDUMP+:} false; then :
41248   $as_echo_n "(cached) " >&6
41249 else
41250   if test -n "$OBJDUMP"; then
41251   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41252 else
41253 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41254 for as_dir in $PATH
41255 do
41256   IFS=$as_save_IFS
41257   test -z "$as_dir" && as_dir=.
41258     for ac_exec_ext in '' $ac_executable_extensions; do
41259   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41260     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41261     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41262     break 2
41263   fi
41264 done
41265   done
41266 IFS=$as_save_IFS
41267 
41268 fi
41269 fi
41270 OBJDUMP=$ac_cv_prog_OBJDUMP
41271 if test -n "$OBJDUMP"; then
41272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41273 $as_echo "$OBJDUMP" >&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 "$OBJDUMP" && break
41281   done
41282 fi
41283 if test -z "$OBJDUMP"; then
41284   ac_ct_OBJDUMP=$OBJDUMP
41285   for ac_prog in gobjdump objdump
41286 do
41287   # Extract the first word of "$ac_prog", so it can be a program name with args.
41288 set dummy $ac_prog; ac_word=$2
41289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41290 $as_echo_n "checking for $ac_word... " >&6; }
41291 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41292   $as_echo_n "(cached) " >&6
41293 else
41294   if test -n "$ac_ct_OBJDUMP"; then
41295   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41296 else
41297 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41298 for as_dir in $PATH
41299 do
41300   IFS=$as_save_IFS
41301   test -z "$as_dir" && as_dir=.
41302     for ac_exec_ext in '' $ac_executable_extensions; do
41303   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41304     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41305     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41306     break 2
41307   fi
41308 done
41309   done
41310 IFS=$as_save_IFS
41311 
41312 fi
41313 fi
41314 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41315 if test -n "$ac_ct_OBJDUMP"; then
41316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41317 $as_echo "$ac_ct_OBJDUMP" >&6; }
41318 else
41319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41320 $as_echo "no" >&6; }
41321 fi
41322 
41323 
41324   test -n "$ac_ct_OBJDUMP" && break
41325 done
41326 
41327   if test "x$ac_ct_OBJDUMP" = x; then
41328     OBJDUMP=""
41329   else
41330     case $cross_compiling:$ac_tool_warned in
41331 yes:)
41332 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41333 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41334 ac_tool_warned=yes ;;
41335 esac
41336     OBJDUMP=$ac_ct_OBJDUMP
41337   fi
41338 fi
41339 
41340     else
41341       # If it succeeded, then it was overridden by the user. We will use it
41342       # for the tool.
41343 
41344       # First remove it from the list of overridden variables, so we can test
41345       # for unknown variables in the end.
41346       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41347 
41348       # Check if we try to supply an empty value
41349       if test "x$OBJDUMP" = x; then
41350         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
41351 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
41352         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41353 $as_echo_n "checking for OBJDUMP... " >&6; }
41354         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41355 $as_echo "disabled" >&6; }
41356       else
41357         # Check if the provided tool contains a complete path.
41358         tool_specified="$OBJDUMP"
41359         tool_basename="${tool_specified##*/}"
41360         if test "x$tool_basename" = "x$tool_specified"; then
41361           # A command without a complete path is provided, search $PATH.
41362           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
41363 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
41364           # Extract the first word of "$tool_basename", so it can be a program name with args.
41365 set dummy $tool_basename; ac_word=$2
41366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41367 $as_echo_n "checking for $ac_word... " >&6; }
41368 if ${ac_cv_path_OBJDUMP+:} false; then :
41369   $as_echo_n "(cached) " >&6
41370 else
41371   case $OBJDUMP in
41372   [\\/]* | ?:[\\/]*)
41373   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
41374   ;;
41375   *)
41376   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41377 for as_dir in $PATH
41378 do
41379   IFS=$as_save_IFS
41380   test -z "$as_dir" && as_dir=.
41381     for ac_exec_ext in '' $ac_executable_extensions; do
41382   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41383     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
41384     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41385     break 2
41386   fi
41387 done
41388   done
41389 IFS=$as_save_IFS
41390 
41391   ;;
41392 esac
41393 fi
41394 OBJDUMP=$ac_cv_path_OBJDUMP
41395 if test -n "$OBJDUMP"; then
41396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41397 $as_echo "$OBJDUMP" >&6; }
41398 else
41399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41400 $as_echo "no" >&6; }
41401 fi
41402 
41403 
41404           if test "x$OBJDUMP" = x; then
41405             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41406           fi
41407         else
41408           # Otherwise we believe it is a complete path. Use it as it is.
41409           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
41410 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
41411           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41412 $as_echo_n "checking for OBJDUMP... " >&6; }
41413           if test ! -x "$tool_specified"; then
41414             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41415 $as_echo "not found" >&6; }
41416             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
41417           fi
41418           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41419 $as_echo "$tool_specified" >&6; }
41420         fi
41421       fi
41422     fi
41423 
41424   fi
41425 
41426 
41427   if test "x$OBJDUMP" != x; then
41428     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
41429     # bails if argument is missing.
41430 
41431   # Only process if variable expands to non-empty
41432 
41433   if test "x$OBJDUMP" != x; then
41434     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41435 
41436   # First separate the path from the arguments. This will split at the first
41437   # space.
41438   complete="$OBJDUMP"
41439   path="${complete%% *}"
41440   tmp="$complete EOL"
41441   arguments="${tmp#* }"
41442 
41443   # Input might be given as Windows format, start by converting to
41444   # unix format.
41445   new_path=`$CYGPATH -u "$path"`
41446 
41447   # Now try to locate executable using which
41448   new_path=`$WHICH "$new_path" 2> /dev/null`
41449   # bat and cmd files are not always considered executable in cygwin causing which
41450   # to not find them
41451   if test "x$new_path" = x \
41452       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41453       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41454     new_path=`$CYGPATH -u "$path"`
41455   fi
41456   if test "x$new_path" = x; then
41457     # Oops. Which didn't find the executable.
41458     # The splitting of arguments from the executable at a space might have been incorrect,
41459     # since paths with space are more likely in Windows. Give it another try with the whole
41460     # argument.
41461     path="$complete"
41462     arguments="EOL"
41463     new_path=`$CYGPATH -u "$path"`
41464     new_path=`$WHICH "$new_path" 2> /dev/null`
41465     # bat and cmd files are not always considered executable in cygwin causing which
41466     # to not find them
41467     if test "x$new_path" = x \
41468         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41469         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41470       new_path=`$CYGPATH -u "$path"`
41471     fi
41472     if test "x$new_path" = x; then
41473       # It's still not found. Now this is an unrecoverable error.
41474       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41475 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41476       has_space=`$ECHO "$complete" | $GREP " "`
41477       if test "x$has_space" != x; then
41478         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41479 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41480       fi
41481       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41482     fi
41483   fi
41484 
41485   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41486   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41487   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41488   # "foo.exe" is OK but "foo" is an error.
41489   #
41490   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41491   # It is also a way to make sure we got the proper file name for the real test later on.
41492   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41493   if test "x$test_shortpath" = x; then
41494     # Short path failed, file does not exist as specified.
41495     # Try adding .exe or .cmd
41496     if test -f "${new_path}.exe"; then
41497       input_to_shortpath="${new_path}.exe"
41498     elif test -f "${new_path}.cmd"; then
41499       input_to_shortpath="${new_path}.cmd"
41500     else
41501       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
41502 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
41503       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41504 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41505       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41506     fi
41507   else
41508     input_to_shortpath="$new_path"
41509   fi
41510 
41511   # Call helper function which possibly converts this using DOS-style short mode.
41512   # If so, the updated path is stored in $new_path.
41513   new_path="$input_to_shortpath"
41514 
41515   input_path="$input_to_shortpath"
41516   # Check if we need to convert this using DOS-style short mode. If the path
41517   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41518   # take no chances and rewrite it.
41519   # Note: m4 eats our [], so we need to use [ and ] instead.
41520   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41521   if test "x$has_forbidden_chars" != x; then
41522     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41523     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41524     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41525     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41526       # Going to short mode and back again did indeed matter. Since short mode is
41527       # case insensitive, let's make it lowercase to improve readability.
41528       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41529       # Now convert it back to Unix-style (cygpath)
41530       input_path=`$CYGPATH -u "$shortmode_path"`
41531       new_path="$input_path"
41532     fi
41533   fi
41534 
41535   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41536   if test "x$test_cygdrive_prefix" = x; then
41537     # As a simple fix, exclude /usr/bin since it's not a real path.
41538     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41539       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41540       # a path prefixed by /cygdrive for fixpath to work.
41541       new_path="$CYGWIN_ROOT_PATH$input_path"
41542     fi
41543   fi
41544 
41545   # remove trailing .exe if any
41546   new_path="${new_path/%.exe/}"
41547 
41548     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41549 
41550   # First separate the path from the arguments. This will split at the first
41551   # space.
41552   complete="$OBJDUMP"
41553   path="${complete%% *}"
41554   tmp="$complete EOL"
41555   arguments="${tmp#* }"
41556 
41557   # Input might be given as Windows format, start by converting to
41558   # unix format.
41559   new_path="$path"
41560 
41561   windows_path="$new_path"
41562   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41563     unix_path=`$CYGPATH -u "$windows_path"`
41564     new_path="$unix_path"
41565   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41566     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41567     new_path="$unix_path"
41568   fi
41569 
41570 
41571   # Now try to locate executable using which
41572   new_path=`$WHICH "$new_path" 2> /dev/null`
41573 
41574   if test "x$new_path" = x; then
41575     # Oops. Which didn't find the executable.
41576     # The splitting of arguments from the executable at a space might have been incorrect,
41577     # since paths with space are more likely in Windows. Give it another try with the whole
41578     # argument.
41579     path="$complete"
41580     arguments="EOL"
41581     new_path="$path"
41582 
41583   windows_path="$new_path"
41584   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41585     unix_path=`$CYGPATH -u "$windows_path"`
41586     new_path="$unix_path"
41587   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41588     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41589     new_path="$unix_path"
41590   fi
41591 
41592 
41593     new_path=`$WHICH "$new_path" 2> /dev/null`
41594     # bat and cmd files are not always considered executable in MSYS causing which
41595     # to not find them
41596     if test "x$new_path" = x \
41597         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41598         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41599       new_path="$path"
41600 
41601   windows_path="$new_path"
41602   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41603     unix_path=`$CYGPATH -u "$windows_path"`
41604     new_path="$unix_path"
41605   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41606     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41607     new_path="$unix_path"
41608   fi
41609 
41610     fi
41611 
41612     if test "x$new_path" = x; then
41613       # It's still not found. Now this is an unrecoverable error.
41614       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41615 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41616       has_space=`$ECHO "$complete" | $GREP " "`
41617       if test "x$has_space" != x; then
41618         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41619 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41620       fi
41621       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41622     fi
41623   fi
41624 
41625   # Now new_path has a complete unix path to the binary
41626   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41627     # Keep paths in /bin as-is, but remove trailing .exe if any
41628     new_path="${new_path/%.exe/}"
41629     # Do not save /bin paths to all_fixpath_prefixes!
41630   else
41631     # Not in mixed or Windows style, start by that.
41632     new_path=`cmd //c echo $new_path`
41633 
41634   input_path="$new_path"
41635   # Check if we need to convert this using DOS-style short mode. If the path
41636   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41637   # take no chances and rewrite it.
41638   # Note: m4 eats our [], so we need to use [ and ] instead.
41639   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41640   if test "x$has_forbidden_chars" != x; then
41641     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41642     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41643   fi
41644 
41645     # Output is in $new_path
41646 
41647   windows_path="$new_path"
41648   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41649     unix_path=`$CYGPATH -u "$windows_path"`
41650     new_path="$unix_path"
41651   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41652     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41653     new_path="$unix_path"
41654   fi
41655 
41656     # remove trailing .exe if any
41657     new_path="${new_path/%.exe/}"
41658 
41659     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41660     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41661   fi
41662 
41663     else
41664       # We're on a unix platform. Hooray! :)
41665       # First separate the path from the arguments. This will split at the first
41666       # space.
41667       complete="$OBJDUMP"
41668       path="${complete%% *}"
41669       tmp="$complete EOL"
41670       arguments="${tmp#* }"
41671 
41672       # Cannot rely on the command "which" here since it doesn't always work.
41673       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41674       if test -z "$is_absolute_path"; then
41675         # Path to executable is not absolute. Find it.
41676         IFS_save="$IFS"
41677         IFS=:
41678         for p in $PATH; do
41679           if test -f "$p/$path" && test -x "$p/$path"; then
41680             new_path="$p/$path"
41681             break
41682           fi
41683         done
41684         IFS="$IFS_save"
41685       else
41686         # This is an absolute path, we can use it without further modifications.
41687         new_path="$path"
41688       fi
41689 
41690       if test "x$new_path" = x; then
41691         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41692 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41693         has_space=`$ECHO "$complete" | $GREP " "`
41694         if test "x$has_space" != x; then
41695           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41696 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41697         fi
41698         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41699       fi
41700     fi
41701 
41702     # Now join together the path and the arguments once again
41703     if test "x$arguments" != xEOL; then
41704       new_complete="$new_path ${arguments% *}"
41705     else
41706       new_complete="$new_path"
41707     fi
41708 
41709     if test "x$complete" != "x$new_complete"; then
41710       OBJDUMP="$new_complete"
41711       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
41712 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
41713     fi
41714   fi
41715 
41716   fi
41717 
41718 
41719   # Restore old path.
41720   PATH="$OLD_PATH"
41721 
41722   # Restore the flags to the user specified values.
41723   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
41724   CFLAGS="$ORG_CFLAGS"
41725   CXXFLAGS="$ORG_CXXFLAGS"
41726 
41727 
41728 # Finally do some processing after the detection phase
41729 
41730   if test "x$COMPILE_TYPE" = "xcross"; then
41731     # Now we need to find a C/C++ compiler that can build executables for the
41732     # build platform. We can't use the AC_PROG_CC macro, since it can only be
41733     # used once. Also, we need to do this without adding a tools dir to the
41734     # path, otherwise we might pick up cross-compilers which don't use standard
41735     # naming.
41736 
41737     OLDPATH="$PATH"
41738 
41739 
41740 # Check whether --with-build-devkit was given.
41741 if test "${with_build_devkit+set}" = set; then :
41742   withval=$with_build_devkit;
41743 fi
41744 
41745     if test "x$with_build_devkit" = "xyes"; then
41746       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
41747     elif test -n "$with_build_devkit"; then
41748       if test ! -d "$with_build_devkit"; then
41749         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
41750       else
41751 
41752   # Only process if variable expands to non-empty
41753 
41754   if test "x$with_build_devkit" != x; then
41755     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41756 
41757   # Input might be given as Windows format, start by converting to
41758   # unix format.
41759   path="$with_build_devkit"
41760   new_path=`$CYGPATH -u "$path"`
41761 
41762   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41763   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41764   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41765   # "foo.exe" is OK but "foo" is an error.
41766   #
41767   # This test is therefore slightly more accurate than "test -f" to check for file precense.
41768   # It is also a way to make sure we got the proper file name for the real test later on.
41769   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41770   if test "x$test_shortpath" = x; then
41771     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
41772 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
41773     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
41774   fi
41775 
41776   # Call helper function which possibly converts this using DOS-style short mode.
41777   # If so, the updated path is stored in $new_path.
41778 
41779   input_path="$new_path"
41780   # Check if we need to convert this using DOS-style short mode. If the path
41781   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41782   # take no chances and rewrite it.
41783   # Note: m4 eats our [], so we need to use [ and ] instead.
41784   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41785   if test "x$has_forbidden_chars" != x; then
41786     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41787     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41788     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41789     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41790       # Going to short mode and back again did indeed matter. Since short mode is
41791       # case insensitive, let's make it lowercase to improve readability.
41792       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41793       # Now convert it back to Unix-style (cygpath)
41794       input_path=`$CYGPATH -u "$shortmode_path"`
41795       new_path="$input_path"
41796     fi
41797   fi
41798 
41799   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41800   if test "x$test_cygdrive_prefix" = x; then
41801     # As a simple fix, exclude /usr/bin since it's not a real path.
41802     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41803       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41804       # a path prefixed by /cygdrive for fixpath to work.
41805       new_path="$CYGWIN_ROOT_PATH$input_path"
41806     fi
41807   fi
41808 
41809 
41810   if test "x$path" != "x$new_path"; then
41811     with_build_devkit="$new_path"
41812     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
41813 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
41814   fi
41815 
41816     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41817 
41818   path="$with_build_devkit"
41819   has_colon=`$ECHO $path | $GREP ^.:`
41820   new_path="$path"
41821   if test "x$has_colon" = x; then
41822     # Not in mixed or Windows style, start by that.
41823     new_path=`cmd //c echo $path`
41824   fi
41825 
41826 
41827   input_path="$new_path"
41828   # Check if we need to convert this using DOS-style short mode. If the path
41829   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41830   # take no chances and rewrite it.
41831   # Note: m4 eats our [], so we need to use [ and ] instead.
41832   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41833   if test "x$has_forbidden_chars" != x; then
41834     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41835     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41836   fi
41837 
41838 
41839   windows_path="$new_path"
41840   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41841     unix_path=`$CYGPATH -u "$windows_path"`
41842     new_path="$unix_path"
41843   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41844     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41845     new_path="$unix_path"
41846   fi
41847 
41848   if test "x$path" != "x$new_path"; then
41849     with_build_devkit="$new_path"
41850     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
41851 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
41852   fi
41853 
41854   # Save the first 10 bytes of this path to the storage, so fixpath can work.
41855   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41856 
41857     else
41858       # We're on a unix platform. Hooray! :)
41859       path="$with_build_devkit"
41860       has_space=`$ECHO "$path" | $GREP " "`
41861       if test "x$has_space" != x; then
41862         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
41863 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
41864         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41865       fi
41866 
41867       # Use eval to expand a potential ~
41868       eval path="$path"
41869       if test ! -f "$path" && test ! -d "$path"; then
41870         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
41871       fi
41872 
41873       with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
41874     fi
41875   fi
41876 
41877         BUILD_DEVKIT_ROOT="$with_build_devkit"
41878         # Check for a meta data info file in the root of the devkit
41879         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
41880           # Process devkit.info so that existing devkit variables are not
41881           # modified by this
41882           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
41883               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
41884               -e "s/\$host/\$build/g" \
41885               $BUILD_DEVKIT_ROOT/devkit.info \
41886               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
41887           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
41888           # This potentially sets the following:
41889           # A descriptive name of the devkit
41890 
41891   if test "x$BUILD_DEVKIT_NAME" = x; then
41892     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
41893   fi
41894 
41895           # Corresponds to --with-extra-path
41896 
41897   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
41898     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
41899   fi
41900 
41901           # Corresponds to --with-toolchain-path
41902 
41903   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
41904     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
41905   fi
41906 
41907           # Corresponds to --with-sysroot
41908 
41909   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
41910     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
41911   fi
41912 
41913           # Skip the Window specific parts
41914         fi
41915 
41916         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
41917 $as_echo_n "checking for build platform devkit... " >&6; }
41918         if test "x$BUILD_DEVKIT_NAME" != x; then
41919           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
41920 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
41921         else
41922           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
41923 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
41924         fi
41925 
41926         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
41927 
41928   if test "x$BUILD_SYSROOT" != "x"; then
41929     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41930       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41931         # Solaris Studio does not have a concept of sysroot. Instead we must
41932         # make sure the default include and lib dirs are appended to each
41933         # compile and link command line.
41934         BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
41935         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41936             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41937             -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41938       fi
41939     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41940       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
41941       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
41942     elif test "x$TOOLCHAIN_TYPE" = xclang; then
41943       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
41944       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
41945     fi
41946     # Propagate the sysroot args to hotspot
41947     BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
41948     BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
41949     BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
41950     # The global CFLAGS and LDFLAGS variables need these for configure to function
41951     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
41952     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
41953     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
41954     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
41955   fi
41956 
41957   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41958     # We also need -iframework<path>/System/Library/Frameworks
41959     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
41960     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
41961     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41962     # set this here so it doesn't have to be peppered throughout the forest
41963     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
41964     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
41965   fi
41966 
41967 
41968 
41969 
41970 
41971          # Fallback default of just /bin if DEVKIT_PATH is not defined
41972         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
41973           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
41974         fi
41975         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
41976       fi
41977     fi
41978 
41979     # FIXME: we should list the discovered compilers as an exclude pattern!
41980     # If we do that, we can do this detection before POST_DETECTION, and still
41981     # find the build compilers in the tools dir, if needed.
41982 
41983 
41984 
41985   # Publish this variable in the help.
41986 
41987 
41988   if [ -z "${BUILD_CC+x}" ]; then
41989     # The variable is not set by user, try to locate tool using the code snippet
41990     for ac_prog in cl cc gcc
41991 do
41992   # Extract the first word of "$ac_prog", so it can be a program name with args.
41993 set dummy $ac_prog; ac_word=$2
41994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41995 $as_echo_n "checking for $ac_word... " >&6; }
41996 if ${ac_cv_path_BUILD_CC+:} false; then :
41997   $as_echo_n "(cached) " >&6
41998 else
41999   case $BUILD_CC in
42000   [\\/]* | ?:[\\/]*)
42001   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42002   ;;
42003   *)
42004   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42005 for as_dir in $PATH
42006 do
42007   IFS=$as_save_IFS
42008   test -z "$as_dir" && as_dir=.
42009     for ac_exec_ext in '' $ac_executable_extensions; do
42010   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42011     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42012     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42013     break 2
42014   fi
42015 done
42016   done
42017 IFS=$as_save_IFS
42018 
42019   ;;
42020 esac
42021 fi
42022 BUILD_CC=$ac_cv_path_BUILD_CC
42023 if test -n "$BUILD_CC"; then
42024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42025 $as_echo "$BUILD_CC" >&6; }
42026 else
42027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42028 $as_echo "no" >&6; }
42029 fi
42030 
42031 
42032   test -n "$BUILD_CC" && break
42033 done
42034 
42035   else
42036     # The variable is set, but is it from the command line or the environment?
42037 
42038     # Try to remove the string !BUILD_CC! from our list.
42039     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
42040     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42041       # If it failed, the variable was not from the command line. Ignore it,
42042       # but warn the user (except for BASH, which is always set by the calling BASH).
42043       if test "xBUILD_CC" != xBASH; then
42044         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
42045 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
42046       fi
42047       # Try to locate tool using the code snippet
42048       for ac_prog in cl cc gcc
42049 do
42050   # Extract the first word of "$ac_prog", so it can be a program name with args.
42051 set dummy $ac_prog; ac_word=$2
42052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42053 $as_echo_n "checking for $ac_word... " >&6; }
42054 if ${ac_cv_path_BUILD_CC+:} false; then :
42055   $as_echo_n "(cached) " >&6
42056 else
42057   case $BUILD_CC in
42058   [\\/]* | ?:[\\/]*)
42059   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42060   ;;
42061   *)
42062   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42063 for as_dir in $PATH
42064 do
42065   IFS=$as_save_IFS
42066   test -z "$as_dir" && as_dir=.
42067     for ac_exec_ext in '' $ac_executable_extensions; do
42068   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42069     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42070     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42071     break 2
42072   fi
42073 done
42074   done
42075 IFS=$as_save_IFS
42076 
42077   ;;
42078 esac
42079 fi
42080 BUILD_CC=$ac_cv_path_BUILD_CC
42081 if test -n "$BUILD_CC"; then
42082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42083 $as_echo "$BUILD_CC" >&6; }
42084 else
42085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42086 $as_echo "no" >&6; }
42087 fi
42088 
42089 
42090   test -n "$BUILD_CC" && break
42091 done
42092 
42093     else
42094       # If it succeeded, then it was overridden by the user. We will use it
42095       # for the tool.
42096 
42097       # First remove it from the list of overridden variables, so we can test
42098       # for unknown variables in the end.
42099       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42100 
42101       # Check if we try to supply an empty value
42102       if test "x$BUILD_CC" = x; then
42103         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
42104 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
42105         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42106 $as_echo_n "checking for BUILD_CC... " >&6; }
42107         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42108 $as_echo "disabled" >&6; }
42109       else
42110         # Check if the provided tool contains a complete path.
42111         tool_specified="$BUILD_CC"
42112         tool_basename="${tool_specified##*/}"
42113         if test "x$tool_basename" = "x$tool_specified"; then
42114           # A command without a complete path is provided, search $PATH.
42115           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
42116 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
42117           # Extract the first word of "$tool_basename", so it can be a program name with args.
42118 set dummy $tool_basename; ac_word=$2
42119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42120 $as_echo_n "checking for $ac_word... " >&6; }
42121 if ${ac_cv_path_BUILD_CC+:} false; then :
42122   $as_echo_n "(cached) " >&6
42123 else
42124   case $BUILD_CC in
42125   [\\/]* | ?:[\\/]*)
42126   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42127   ;;
42128   *)
42129   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42130 for as_dir in $PATH
42131 do
42132   IFS=$as_save_IFS
42133   test -z "$as_dir" && as_dir=.
42134     for ac_exec_ext in '' $ac_executable_extensions; do
42135   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42136     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42137     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42138     break 2
42139   fi
42140 done
42141   done
42142 IFS=$as_save_IFS
42143 
42144   ;;
42145 esac
42146 fi
42147 BUILD_CC=$ac_cv_path_BUILD_CC
42148 if test -n "$BUILD_CC"; then
42149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42150 $as_echo "$BUILD_CC" >&6; }
42151 else
42152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42153 $as_echo "no" >&6; }
42154 fi
42155 
42156 
42157           if test "x$BUILD_CC" = x; then
42158             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42159           fi
42160         else
42161           # Otherwise we believe it is a complete path. Use it as it is.
42162           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
42163 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
42164           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42165 $as_echo_n "checking for BUILD_CC... " >&6; }
42166           if test ! -x "$tool_specified"; then
42167             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42168 $as_echo "not found" >&6; }
42169             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
42170           fi
42171           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42172 $as_echo "$tool_specified" >&6; }
42173         fi
42174       fi
42175     fi
42176 
42177   fi
42178 
42179 
42180 
42181   if test "x$BUILD_CC" = x; then
42182     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
42183   fi
42184 
42185 
42186 
42187   # Only process if variable expands to non-empty
42188 
42189   if test "x$BUILD_CC" != x; then
42190     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42191 
42192   # First separate the path from the arguments. This will split at the first
42193   # space.
42194   complete="$BUILD_CC"
42195   path="${complete%% *}"
42196   tmp="$complete EOL"
42197   arguments="${tmp#* }"
42198 
42199   # Input might be given as Windows format, start by converting to
42200   # unix format.
42201   new_path=`$CYGPATH -u "$path"`
42202 
42203   # Now try to locate executable using which
42204   new_path=`$WHICH "$new_path" 2> /dev/null`
42205   # bat and cmd files are not always considered executable in cygwin causing which
42206   # to not find them
42207   if test "x$new_path" = x \
42208       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42209       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42210     new_path=`$CYGPATH -u "$path"`
42211   fi
42212   if test "x$new_path" = x; then
42213     # Oops. Which didn't find the executable.
42214     # The splitting of arguments from the executable at a space might have been incorrect,
42215     # since paths with space are more likely in Windows. Give it another try with the whole
42216     # argument.
42217     path="$complete"
42218     arguments="EOL"
42219     new_path=`$CYGPATH -u "$path"`
42220     new_path=`$WHICH "$new_path" 2> /dev/null`
42221     # bat and cmd files are not always considered executable in cygwin causing which
42222     # to not find them
42223     if test "x$new_path" = x \
42224         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42225         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42226       new_path=`$CYGPATH -u "$path"`
42227     fi
42228     if test "x$new_path" = x; then
42229       # It's still not found. Now this is an unrecoverable error.
42230       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42231 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42232       has_space=`$ECHO "$complete" | $GREP " "`
42233       if test "x$has_space" != x; then
42234         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42235 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42236       fi
42237       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42238     fi
42239   fi
42240 
42241   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42242   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42243   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42244   # "foo.exe" is OK but "foo" is an error.
42245   #
42246   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42247   # It is also a way to make sure we got the proper file name for the real test later on.
42248   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42249   if test "x$test_shortpath" = x; then
42250     # Short path failed, file does not exist as specified.
42251     # Try adding .exe or .cmd
42252     if test -f "${new_path}.exe"; then
42253       input_to_shortpath="${new_path}.exe"
42254     elif test -f "${new_path}.cmd"; then
42255       input_to_shortpath="${new_path}.cmd"
42256     else
42257       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
42258 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
42259       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42260 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42261       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42262     fi
42263   else
42264     input_to_shortpath="$new_path"
42265   fi
42266 
42267   # Call helper function which possibly converts this using DOS-style short mode.
42268   # If so, the updated path is stored in $new_path.
42269   new_path="$input_to_shortpath"
42270 
42271   input_path="$input_to_shortpath"
42272   # Check if we need to convert this using DOS-style short mode. If the path
42273   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42274   # take no chances and rewrite it.
42275   # Note: m4 eats our [], so we need to use [ and ] instead.
42276   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42277   if test "x$has_forbidden_chars" != x; then
42278     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42279     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42280     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42281     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42282       # Going to short mode and back again did indeed matter. Since short mode is
42283       # case insensitive, let's make it lowercase to improve readability.
42284       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42285       # Now convert it back to Unix-style (cygpath)
42286       input_path=`$CYGPATH -u "$shortmode_path"`
42287       new_path="$input_path"
42288     fi
42289   fi
42290 
42291   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42292   if test "x$test_cygdrive_prefix" = x; then
42293     # As a simple fix, exclude /usr/bin since it's not a real path.
42294     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42295       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42296       # a path prefixed by /cygdrive for fixpath to work.
42297       new_path="$CYGWIN_ROOT_PATH$input_path"
42298     fi
42299   fi
42300 
42301   # remove trailing .exe if any
42302   new_path="${new_path/%.exe/}"
42303 
42304     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42305 
42306   # First separate the path from the arguments. This will split at the first
42307   # space.
42308   complete="$BUILD_CC"
42309   path="${complete%% *}"
42310   tmp="$complete EOL"
42311   arguments="${tmp#* }"
42312 
42313   # Input might be given as Windows format, start by converting to
42314   # unix format.
42315   new_path="$path"
42316 
42317   windows_path="$new_path"
42318   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42319     unix_path=`$CYGPATH -u "$windows_path"`
42320     new_path="$unix_path"
42321   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42322     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42323     new_path="$unix_path"
42324   fi
42325 
42326 
42327   # Now try to locate executable using which
42328   new_path=`$WHICH "$new_path" 2> /dev/null`
42329 
42330   if test "x$new_path" = x; then
42331     # Oops. Which didn't find the executable.
42332     # The splitting of arguments from the executable at a space might have been incorrect,
42333     # since paths with space are more likely in Windows. Give it another try with the whole
42334     # argument.
42335     path="$complete"
42336     arguments="EOL"
42337     new_path="$path"
42338 
42339   windows_path="$new_path"
42340   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42341     unix_path=`$CYGPATH -u "$windows_path"`
42342     new_path="$unix_path"
42343   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42344     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42345     new_path="$unix_path"
42346   fi
42347 
42348 
42349     new_path=`$WHICH "$new_path" 2> /dev/null`
42350     # bat and cmd files are not always considered executable in MSYS causing which
42351     # to not find them
42352     if test "x$new_path" = x \
42353         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42354         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42355       new_path="$path"
42356 
42357   windows_path="$new_path"
42358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42359     unix_path=`$CYGPATH -u "$windows_path"`
42360     new_path="$unix_path"
42361   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42362     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42363     new_path="$unix_path"
42364   fi
42365 
42366     fi
42367 
42368     if test "x$new_path" = x; then
42369       # It's still not found. Now this is an unrecoverable error.
42370       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42371 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42372       has_space=`$ECHO "$complete" | $GREP " "`
42373       if test "x$has_space" != x; then
42374         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42375 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42376       fi
42377       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42378     fi
42379   fi
42380 
42381   # Now new_path has a complete unix path to the binary
42382   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42383     # Keep paths in /bin as-is, but remove trailing .exe if any
42384     new_path="${new_path/%.exe/}"
42385     # Do not save /bin paths to all_fixpath_prefixes!
42386   else
42387     # Not in mixed or Windows style, start by that.
42388     new_path=`cmd //c echo $new_path`
42389 
42390   input_path="$new_path"
42391   # Check if we need to convert this using DOS-style short mode. If the path
42392   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42393   # take no chances and rewrite it.
42394   # Note: m4 eats our [], so we need to use [ and ] instead.
42395   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42396   if test "x$has_forbidden_chars" != x; then
42397     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42398     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42399   fi
42400 
42401     # Output is in $new_path
42402 
42403   windows_path="$new_path"
42404   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42405     unix_path=`$CYGPATH -u "$windows_path"`
42406     new_path="$unix_path"
42407   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42408     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42409     new_path="$unix_path"
42410   fi
42411 
42412     # remove trailing .exe if any
42413     new_path="${new_path/%.exe/}"
42414 
42415     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42416     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42417   fi
42418 
42419     else
42420       # We're on a unix platform. Hooray! :)
42421       # First separate the path from the arguments. This will split at the first
42422       # space.
42423       complete="$BUILD_CC"
42424       path="${complete%% *}"
42425       tmp="$complete EOL"
42426       arguments="${tmp#* }"
42427 
42428       # Cannot rely on the command "which" here since it doesn't always work.
42429       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42430       if test -z "$is_absolute_path"; then
42431         # Path to executable is not absolute. Find it.
42432         IFS_save="$IFS"
42433         IFS=:
42434         for p in $PATH; do
42435           if test -f "$p/$path" && test -x "$p/$path"; then
42436             new_path="$p/$path"
42437             break
42438           fi
42439         done
42440         IFS="$IFS_save"
42441       else
42442         # This is an absolute path, we can use it without further modifications.
42443         new_path="$path"
42444       fi
42445 
42446       if test "x$new_path" = x; then
42447         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42448 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42449         has_space=`$ECHO "$complete" | $GREP " "`
42450         if test "x$has_space" != x; then
42451           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42452 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42453         fi
42454         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42455       fi
42456     fi
42457 
42458     # Now join together the path and the arguments once again
42459     if test "x$arguments" != xEOL; then
42460       new_complete="$new_path ${arguments% *}"
42461     else
42462       new_complete="$new_path"
42463     fi
42464 
42465     if test "x$complete" != "x$new_complete"; then
42466       BUILD_CC="$new_complete"
42467       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
42468 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
42469     fi
42470   fi
42471 
42472 
42473 
42474 
42475   # Publish this variable in the help.
42476 
42477 
42478   if [ -z "${BUILD_CXX+x}" ]; then
42479     # The variable is not set by user, try to locate tool using the code snippet
42480     for ac_prog in cl CC g++
42481 do
42482   # Extract the first word of "$ac_prog", so it can be a program name with args.
42483 set dummy $ac_prog; ac_word=$2
42484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42485 $as_echo_n "checking for $ac_word... " >&6; }
42486 if ${ac_cv_path_BUILD_CXX+:} false; then :
42487   $as_echo_n "(cached) " >&6
42488 else
42489   case $BUILD_CXX in
42490   [\\/]* | ?:[\\/]*)
42491   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42492   ;;
42493   *)
42494   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42495 for as_dir in $PATH
42496 do
42497   IFS=$as_save_IFS
42498   test -z "$as_dir" && as_dir=.
42499     for ac_exec_ext in '' $ac_executable_extensions; do
42500   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42501     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42502     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42503     break 2
42504   fi
42505 done
42506   done
42507 IFS=$as_save_IFS
42508 
42509   ;;
42510 esac
42511 fi
42512 BUILD_CXX=$ac_cv_path_BUILD_CXX
42513 if test -n "$BUILD_CXX"; then
42514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42515 $as_echo "$BUILD_CXX" >&6; }
42516 else
42517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42518 $as_echo "no" >&6; }
42519 fi
42520 
42521 
42522   test -n "$BUILD_CXX" && break
42523 done
42524 
42525   else
42526     # The variable is set, but is it from the command line or the environment?
42527 
42528     # Try to remove the string !BUILD_CXX! from our list.
42529     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
42530     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42531       # If it failed, the variable was not from the command line. Ignore it,
42532       # but warn the user (except for BASH, which is always set by the calling BASH).
42533       if test "xBUILD_CXX" != xBASH; then
42534         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
42535 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
42536       fi
42537       # Try to locate tool using the code snippet
42538       for ac_prog in cl CC g++
42539 do
42540   # Extract the first word of "$ac_prog", so it can be a program name with args.
42541 set dummy $ac_prog; ac_word=$2
42542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42543 $as_echo_n "checking for $ac_word... " >&6; }
42544 if ${ac_cv_path_BUILD_CXX+:} false; then :
42545   $as_echo_n "(cached) " >&6
42546 else
42547   case $BUILD_CXX in
42548   [\\/]* | ?:[\\/]*)
42549   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42550   ;;
42551   *)
42552   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42553 for as_dir in $PATH
42554 do
42555   IFS=$as_save_IFS
42556   test -z "$as_dir" && as_dir=.
42557     for ac_exec_ext in '' $ac_executable_extensions; do
42558   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42559     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42560     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42561     break 2
42562   fi
42563 done
42564   done
42565 IFS=$as_save_IFS
42566 
42567   ;;
42568 esac
42569 fi
42570 BUILD_CXX=$ac_cv_path_BUILD_CXX
42571 if test -n "$BUILD_CXX"; then
42572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42573 $as_echo "$BUILD_CXX" >&6; }
42574 else
42575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42576 $as_echo "no" >&6; }
42577 fi
42578 
42579 
42580   test -n "$BUILD_CXX" && break
42581 done
42582 
42583     else
42584       # If it succeeded, then it was overridden by the user. We will use it
42585       # for the tool.
42586 
42587       # First remove it from the list of overridden variables, so we can test
42588       # for unknown variables in the end.
42589       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42590 
42591       # Check if we try to supply an empty value
42592       if test "x$BUILD_CXX" = x; then
42593         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
42594 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
42595         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
42596 $as_echo_n "checking for BUILD_CXX... " >&6; }
42597         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42598 $as_echo "disabled" >&6; }
42599       else
42600         # Check if the provided tool contains a complete path.
42601         tool_specified="$BUILD_CXX"
42602         tool_basename="${tool_specified##*/}"
42603         if test "x$tool_basename" = "x$tool_specified"; then
42604           # A command without a complete path is provided, search $PATH.
42605           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
42606 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
42607           # Extract the first word of "$tool_basename", so it can be a program name with args.
42608 set dummy $tool_basename; ac_word=$2
42609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42610 $as_echo_n "checking for $ac_word... " >&6; }
42611 if ${ac_cv_path_BUILD_CXX+:} false; then :
42612   $as_echo_n "(cached) " >&6
42613 else
42614   case $BUILD_CXX in
42615   [\\/]* | ?:[\\/]*)
42616   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42617   ;;
42618   *)
42619   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42620 for as_dir in $PATH
42621 do
42622   IFS=$as_save_IFS
42623   test -z "$as_dir" && as_dir=.
42624     for ac_exec_ext in '' $ac_executable_extensions; do
42625   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42626     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42627     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42628     break 2
42629   fi
42630 done
42631   done
42632 IFS=$as_save_IFS
42633 
42634   ;;
42635 esac
42636 fi
42637 BUILD_CXX=$ac_cv_path_BUILD_CXX
42638 if test -n "$BUILD_CXX"; then
42639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42640 $as_echo "$BUILD_CXX" >&6; }
42641 else
42642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42643 $as_echo "no" >&6; }
42644 fi
42645 
42646 
42647           if test "x$BUILD_CXX" = x; then
42648             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42649           fi
42650         else
42651           # Otherwise we believe it is a complete path. Use it as it is.
42652           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
42653 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
42654           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
42655 $as_echo_n "checking for BUILD_CXX... " >&6; }
42656           if test ! -x "$tool_specified"; then
42657             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42658 $as_echo "not found" >&6; }
42659             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
42660           fi
42661           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42662 $as_echo "$tool_specified" >&6; }
42663         fi
42664       fi
42665     fi
42666 
42667   fi
42668 
42669 
42670 
42671   if test "x$BUILD_CXX" = x; then
42672     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
42673   fi
42674 
42675 
42676 
42677   # Only process if variable expands to non-empty
42678 
42679   if test "x$BUILD_CXX" != x; then
42680     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42681 
42682   # First separate the path from the arguments. This will split at the first
42683   # space.
42684   complete="$BUILD_CXX"
42685   path="${complete%% *}"
42686   tmp="$complete EOL"
42687   arguments="${tmp#* }"
42688 
42689   # Input might be given as Windows format, start by converting to
42690   # unix format.
42691   new_path=`$CYGPATH -u "$path"`
42692 
42693   # Now try to locate executable using which
42694   new_path=`$WHICH "$new_path" 2> /dev/null`
42695   # bat and cmd files are not always considered executable in cygwin causing which
42696   # to not find them
42697   if test "x$new_path" = x \
42698       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42699       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42700     new_path=`$CYGPATH -u "$path"`
42701   fi
42702   if test "x$new_path" = x; then
42703     # Oops. Which didn't find the executable.
42704     # The splitting of arguments from the executable at a space might have been incorrect,
42705     # since paths with space are more likely in Windows. Give it another try with the whole
42706     # argument.
42707     path="$complete"
42708     arguments="EOL"
42709     new_path=`$CYGPATH -u "$path"`
42710     new_path=`$WHICH "$new_path" 2> /dev/null`
42711     # bat and cmd files are not always considered executable in cygwin causing which
42712     # to not find them
42713     if test "x$new_path" = x \
42714         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42715         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42716       new_path=`$CYGPATH -u "$path"`
42717     fi
42718     if test "x$new_path" = x; then
42719       # It's still not found. Now this is an unrecoverable error.
42720       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
42721 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
42722       has_space=`$ECHO "$complete" | $GREP " "`
42723       if test "x$has_space" != x; then
42724         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42725 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42726       fi
42727       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
42728     fi
42729   fi
42730 
42731   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42732   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42733   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42734   # "foo.exe" is OK but "foo" is an error.
42735   #
42736   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42737   # It is also a way to make sure we got the proper file name for the real test later on.
42738   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42739   if test "x$test_shortpath" = x; then
42740     # Short path failed, file does not exist as specified.
42741     # Try adding .exe or .cmd
42742     if test -f "${new_path}.exe"; then
42743       input_to_shortpath="${new_path}.exe"
42744     elif test -f "${new_path}.cmd"; then
42745       input_to_shortpath="${new_path}.cmd"
42746     else
42747       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
42748 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
42749       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42750 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42751       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
42752     fi
42753   else
42754     input_to_shortpath="$new_path"
42755   fi
42756 
42757   # Call helper function which possibly converts this using DOS-style short mode.
42758   # If so, the updated path is stored in $new_path.
42759   new_path="$input_to_shortpath"
42760 
42761   input_path="$input_to_shortpath"
42762   # Check if we need to convert this using DOS-style short mode. If the path
42763   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42764   # take no chances and rewrite it.
42765   # Note: m4 eats our [], so we need to use [ and ] instead.
42766   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42767   if test "x$has_forbidden_chars" != x; then
42768     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42769     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42770     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42771     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42772       # Going to short mode and back again did indeed matter. Since short mode is
42773       # case insensitive, let's make it lowercase to improve readability.
42774       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42775       # Now convert it back to Unix-style (cygpath)
42776       input_path=`$CYGPATH -u "$shortmode_path"`
42777       new_path="$input_path"
42778     fi
42779   fi
42780 
42781   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42782   if test "x$test_cygdrive_prefix" = x; then
42783     # As a simple fix, exclude /usr/bin since it's not a real path.
42784     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42785       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42786       # a path prefixed by /cygdrive for fixpath to work.
42787       new_path="$CYGWIN_ROOT_PATH$input_path"
42788     fi
42789   fi
42790 
42791   # remove trailing .exe if any
42792   new_path="${new_path/%.exe/}"
42793 
42794     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42795 
42796   # First separate the path from the arguments. This will split at the first
42797   # space.
42798   complete="$BUILD_CXX"
42799   path="${complete%% *}"
42800   tmp="$complete EOL"
42801   arguments="${tmp#* }"
42802 
42803   # Input might be given as Windows format, start by converting to
42804   # unix format.
42805   new_path="$path"
42806 
42807   windows_path="$new_path"
42808   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42809     unix_path=`$CYGPATH -u "$windows_path"`
42810     new_path="$unix_path"
42811   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42812     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42813     new_path="$unix_path"
42814   fi
42815 
42816 
42817   # Now try to locate executable using which
42818   new_path=`$WHICH "$new_path" 2> /dev/null`
42819 
42820   if test "x$new_path" = x; then
42821     # Oops. Which didn't find the executable.
42822     # The splitting of arguments from the executable at a space might have been incorrect,
42823     # since paths with space are more likely in Windows. Give it another try with the whole
42824     # argument.
42825     path="$complete"
42826     arguments="EOL"
42827     new_path="$path"
42828 
42829   windows_path="$new_path"
42830   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42831     unix_path=`$CYGPATH -u "$windows_path"`
42832     new_path="$unix_path"
42833   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42834     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42835     new_path="$unix_path"
42836   fi
42837 
42838 
42839     new_path=`$WHICH "$new_path" 2> /dev/null`
42840     # bat and cmd files are not always considered executable in MSYS causing which
42841     # to not find them
42842     if test "x$new_path" = x \
42843         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42844         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42845       new_path="$path"
42846 
42847   windows_path="$new_path"
42848   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42849     unix_path=`$CYGPATH -u "$windows_path"`
42850     new_path="$unix_path"
42851   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42852     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42853     new_path="$unix_path"
42854   fi
42855 
42856     fi
42857 
42858     if test "x$new_path" = x; then
42859       # It's still not found. Now this is an unrecoverable error.
42860       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
42861 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
42862       has_space=`$ECHO "$complete" | $GREP " "`
42863       if test "x$has_space" != x; then
42864         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42865 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42866       fi
42867       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
42868     fi
42869   fi
42870 
42871   # Now new_path has a complete unix path to the binary
42872   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42873     # Keep paths in /bin as-is, but remove trailing .exe if any
42874     new_path="${new_path/%.exe/}"
42875     # Do not save /bin paths to all_fixpath_prefixes!
42876   else
42877     # Not in mixed or Windows style, start by that.
42878     new_path=`cmd //c echo $new_path`
42879 
42880   input_path="$new_path"
42881   # Check if we need to convert this using DOS-style short mode. If the path
42882   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42883   # take no chances and rewrite it.
42884   # Note: m4 eats our [], so we need to use [ and ] instead.
42885   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42886   if test "x$has_forbidden_chars" != x; then
42887     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42888     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42889   fi
42890 
42891     # Output is in $new_path
42892 
42893   windows_path="$new_path"
42894   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42895     unix_path=`$CYGPATH -u "$windows_path"`
42896     new_path="$unix_path"
42897   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42898     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42899     new_path="$unix_path"
42900   fi
42901 
42902     # remove trailing .exe if any
42903     new_path="${new_path/%.exe/}"
42904 
42905     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42906     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42907   fi
42908 
42909     else
42910       # We're on a unix platform. Hooray! :)
42911       # First separate the path from the arguments. This will split at the first
42912       # space.
42913       complete="$BUILD_CXX"
42914       path="${complete%% *}"
42915       tmp="$complete EOL"
42916       arguments="${tmp#* }"
42917 
42918       # Cannot rely on the command "which" here since it doesn't always work.
42919       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42920       if test -z "$is_absolute_path"; then
42921         # Path to executable is not absolute. Find it.
42922         IFS_save="$IFS"
42923         IFS=:
42924         for p in $PATH; do
42925           if test -f "$p/$path" && test -x "$p/$path"; then
42926             new_path="$p/$path"
42927             break
42928           fi
42929         done
42930         IFS="$IFS_save"
42931       else
42932         # This is an absolute path, we can use it without further modifications.
42933         new_path="$path"
42934       fi
42935 
42936       if test "x$new_path" = x; then
42937         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
42938 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
42939         has_space=`$ECHO "$complete" | $GREP " "`
42940         if test "x$has_space" != x; then
42941           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42942 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42943         fi
42944         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
42945       fi
42946     fi
42947 
42948     # Now join together the path and the arguments once again
42949     if test "x$arguments" != xEOL; then
42950       new_complete="$new_path ${arguments% *}"
42951     else
42952       new_complete="$new_path"
42953     fi
42954 
42955     if test "x$complete" != "x$new_complete"; then
42956       BUILD_CXX="$new_complete"
42957       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
42958 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
42959     fi
42960   fi
42961 
42962     BUILD_LD="$BUILD_CC"
42963 
42964     PATH="$OLDPATH"
42965   else
42966     # If we are not cross compiling, use the normal target compilers for
42967     # building the build platform executables.
42968     BUILD_CC="$CC"
42969     BUILD_CXX="$CXX"
42970     BUILD_LD="$LD"
42971     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
42972     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
42973   fi
42974 
42975 
42976 
42977 
42978 
42979 
42980 
42981 
42982   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42983     # For hotspot, we need these in Windows mixed path,
42984     # so rewrite them all. Need added .exe suffix.
42985     HOTSPOT_CXX="$CXX.exe"
42986     HOTSPOT_LD="$LD.exe"
42987     HOTSPOT_MT="$MT.exe"
42988     HOTSPOT_RC="$RC.exe"
42989 
42990   unix_path="$HOTSPOT_CXX"
42991   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42992     windows_path=`$CYGPATH -m "$unix_path"`
42993     HOTSPOT_CXX="$windows_path"
42994   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42995     windows_path=`cmd //c echo $unix_path`
42996     HOTSPOT_CXX="$windows_path"
42997   fi
42998 
42999 
43000   unix_path="$HOTSPOT_LD"
43001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43002     windows_path=`$CYGPATH -m "$unix_path"`
43003     HOTSPOT_LD="$windows_path"
43004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43005     windows_path=`cmd //c echo $unix_path`
43006     HOTSPOT_LD="$windows_path"
43007   fi
43008 
43009 
43010   unix_path="$HOTSPOT_MT"
43011   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43012     windows_path=`$CYGPATH -m "$unix_path"`
43013     HOTSPOT_MT="$windows_path"
43014   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43015     windows_path=`cmd //c echo $unix_path`
43016     HOTSPOT_MT="$windows_path"
43017   fi
43018 
43019 
43020   unix_path="$HOTSPOT_RC"
43021   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43022     windows_path=`$CYGPATH -m "$unix_path"`
43023     HOTSPOT_RC="$windows_path"
43024   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43025     windows_path=`cmd //c echo $unix_path`
43026     HOTSPOT_RC="$windows_path"
43027   fi
43028 
43029 
43030 
43031   else
43032     HOTSPOT_CXX="$CXX"
43033     HOTSPOT_LD="$LD"
43034   fi
43035 
43036 
43037 
43038   if test  "x$TOOLCHAIN_TYPE" = xclang; then
43039     USE_CLANG=true
43040   fi
43041 
43042 
43043 
43044 
43045 
43046   # The package path is used only on macosx?
43047   # FIXME: clean this up, and/or move it elsewhere.
43048   PACKAGE_PATH=/opt/local
43049 
43050 
43051   # Check for extra potential brokenness.
43052   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43053     # On Windows, double-check that we got the right compiler.
43054     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
43055     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
43056     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
43057       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
43058         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
43059       fi
43060     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
43061       if test "x$COMPILER_CPU_TEST" != "xx64"; then
43062         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
43063       fi
43064     fi
43065   fi
43066 
43067   if test "x$TOOLCHAIN_TYPE" = xgcc; then
43068     # If this is a --hash-style=gnu system, use --hash-style=both, why?
43069     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
43070     # This is later checked when setting flags.
43071 
43072     # "-Og" suppported for GCC 4.8 and later
43073     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
43074 
43075   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
43076 $as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
43077   supports=yes
43078 
43079   saved_cflags="$CFLAGS"
43080   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
43081   ac_ext=c
43082 ac_cpp='$CPP $CPPFLAGS'
43083 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43084 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43085 ac_compiler_gnu=$ac_cv_c_compiler_gnu
43086 
43087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43088 /* end confdefs.h.  */
43089 int i;
43090 _ACEOF
43091 if ac_fn_c_try_compile "$LINENO"; then :
43092 
43093 else
43094   supports=no
43095 fi
43096 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43097   ac_ext=cpp
43098 ac_cpp='$CXXCPP $CPPFLAGS'
43099 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43100 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43101 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43102 
43103   CFLAGS="$saved_cflags"
43104 
43105   saved_cxxflags="$CXXFLAGS"
43106   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
43107   ac_ext=cpp
43108 ac_cpp='$CXXCPP $CPPFLAGS'
43109 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43110 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43111 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43112 
43113   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43114 /* end confdefs.h.  */
43115 int i;
43116 _ACEOF
43117 if ac_fn_cxx_try_compile "$LINENO"; then :
43118 
43119 else
43120   supports=no
43121 fi
43122 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43123   ac_ext=cpp
43124 ac_cpp='$CXXCPP $CPPFLAGS'
43125 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43126 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43127 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43128 
43129   CXXFLAGS="$saved_cxxflags"
43130 
43131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43132 $as_echo "$supports" >&6; }
43133   if test "x$supports" = "xyes" ; then
43134     HAS_CFLAG_OPTIMIZE_DEBUG=true
43135   else
43136     HAS_CFLAG_OPTIMIZE_DEBUG=false
43137   fi
43138 
43139 
43140     # "-z relro" supported in GNU binutils 2.17 and later
43141     LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
43142 
43143   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
43144 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
43145   supports=yes
43146 
43147   saved_ldflags="$LDFLAGS"
43148   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
43149   ac_ext=c
43150 ac_cpp='$CPP $CPPFLAGS'
43151 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43152 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43153 ac_compiler_gnu=$ac_cv_c_compiler_gnu
43154 
43155   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43156 /* end confdefs.h.  */
43157 
43158 int
43159 main ()
43160 {
43161 
43162   ;
43163   return 0;
43164 }
43165 _ACEOF
43166 if ac_fn_c_try_link "$LINENO"; then :
43167 
43168 else
43169   supports=no
43170 fi
43171 rm -f core conftest.err conftest.$ac_objext \
43172     conftest$ac_exeext conftest.$ac_ext
43173   ac_ext=cpp
43174 ac_cpp='$CXXCPP $CPPFLAGS'
43175 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43176 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43177 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43178 
43179   LDFLAGS="$saved_ldflags"
43180 
43181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43182 $as_echo "$supports" >&6; }
43183   if test "x$supports" = "xyes" ; then
43184     HAS_LINKER_RELRO=true
43185   else
43186     HAS_LINKER_RELRO=false
43187   fi
43188 
43189 
43190     # "-z now" supported in GNU binutils 2.11 and later
43191     LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
43192 
43193   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
43194 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
43195   supports=yes
43196 
43197   saved_ldflags="$LDFLAGS"
43198   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
43199   ac_ext=c
43200 ac_cpp='$CPP $CPPFLAGS'
43201 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43202 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43203 ac_compiler_gnu=$ac_cv_c_compiler_gnu
43204 
43205   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43206 /* end confdefs.h.  */
43207 
43208 int
43209 main ()
43210 {
43211 
43212   ;
43213   return 0;
43214 }
43215 _ACEOF
43216 if ac_fn_c_try_link "$LINENO"; then :
43217 
43218 else
43219   supports=no
43220 fi
43221 rm -f core conftest.err conftest.$ac_objext \
43222     conftest$ac_exeext conftest.$ac_ext
43223   ac_ext=cpp
43224 ac_cpp='$CXXCPP $CPPFLAGS'
43225 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43226 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43227 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43228 
43229   LDFLAGS="$saved_ldflags"
43230 
43231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43232 $as_echo "$supports" >&6; }
43233   if test "x$supports" = "xyes" ; then
43234     HAS_LINKER_NOW=true
43235   else
43236     HAS_LINKER_NOW=false
43237   fi
43238 
43239   fi
43240 
43241   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
43242   # in executable.'
43243   USING_BROKEN_SUSE_LD=no
43244   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
43245     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
43246 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
43247     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
43248     $ECHO "int main() { }" > main.c
43249     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
43250       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43251 $as_echo "no" >&6; }
43252       USING_BROKEN_SUSE_LD=no
43253     else
43254       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43255 $as_echo "yes" >&6; }
43256       USING_BROKEN_SUSE_LD=yes
43257     fi
43258     rm -rf version-script.map main.c a.out
43259   fi
43260 
43261 
43262 
43263 # Setup the JTReg Regression Test Harness.
43264 
43265 
43266 # Check whether --with-jtreg was given.
43267 if test "${with_jtreg+set}" = set; then :
43268   withval=$with_jtreg;
43269 else
43270   with_jtreg=no
43271 fi
43272 
43273 
43274   if test "x$with_jtreg" = xno; then
43275     # jtreg disabled
43276     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
43277 $as_echo_n "checking for jtreg... " >&6; }
43278     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43279 $as_echo "no" >&6; }
43280   else
43281     if test "x$with_jtreg" != xyes; then
43282       # with path specified.
43283       JT_HOME="$with_jtreg"
43284     fi
43285 
43286     if test "x$JT_HOME" != x; then
43287       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
43288 $as_echo_n "checking for jtreg... " >&6; }
43289 
43290       # use JT_HOME enviroment var.
43291 
43292   # Only process if variable expands to non-empty
43293 
43294   if test "x$JT_HOME" != x; then
43295     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43296 
43297   # Input might be given as Windows format, start by converting to
43298   # unix format.
43299   path="$JT_HOME"
43300   new_path=`$CYGPATH -u "$path"`
43301 
43302   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43303   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43304   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43305   # "foo.exe" is OK but "foo" is an error.
43306   #
43307   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43308   # It is also a way to make sure we got the proper file name for the real test later on.
43309   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43310   if test "x$test_shortpath" = x; then
43311     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
43312 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
43313     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
43314   fi
43315 
43316   # Call helper function which possibly converts this using DOS-style short mode.
43317   # If so, the updated path is stored in $new_path.
43318 
43319   input_path="$new_path"
43320   # Check if we need to convert this using DOS-style short mode. If the path
43321   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43322   # take no chances and rewrite it.
43323   # Note: m4 eats our [], so we need to use [ and ] instead.
43324   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43325   if test "x$has_forbidden_chars" != x; then
43326     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43327     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43328     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43329     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43330       # Going to short mode and back again did indeed matter. Since short mode is
43331       # case insensitive, let's make it lowercase to improve readability.
43332       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43333       # Now convert it back to Unix-style (cygpath)
43334       input_path=`$CYGPATH -u "$shortmode_path"`
43335       new_path="$input_path"
43336     fi
43337   fi
43338 
43339   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43340   if test "x$test_cygdrive_prefix" = x; then
43341     # As a simple fix, exclude /usr/bin since it's not a real path.
43342     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43343       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43344       # a path prefixed by /cygdrive for fixpath to work.
43345       new_path="$CYGWIN_ROOT_PATH$input_path"
43346     fi
43347   fi
43348 
43349 
43350   if test "x$path" != "x$new_path"; then
43351     JT_HOME="$new_path"
43352     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
43353 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
43354   fi
43355 
43356     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43357 
43358   path="$JT_HOME"
43359   has_colon=`$ECHO $path | $GREP ^.:`
43360   new_path="$path"
43361   if test "x$has_colon" = x; then
43362     # Not in mixed or Windows style, start by that.
43363     new_path=`cmd //c echo $path`
43364   fi
43365 
43366 
43367   input_path="$new_path"
43368   # Check if we need to convert this using DOS-style short mode. If the path
43369   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43370   # take no chances and rewrite it.
43371   # Note: m4 eats our [], so we need to use [ and ] instead.
43372   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43373   if test "x$has_forbidden_chars" != x; then
43374     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43375     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43376   fi
43377 
43378 
43379   windows_path="$new_path"
43380   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43381     unix_path=`$CYGPATH -u "$windows_path"`
43382     new_path="$unix_path"
43383   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43384     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43385     new_path="$unix_path"
43386   fi
43387 
43388   if test "x$path" != "x$new_path"; then
43389     JT_HOME="$new_path"
43390     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
43391 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
43392   fi
43393 
43394   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43395   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43396 
43397     else
43398       # We're on a unix platform. Hooray! :)
43399       path="$JT_HOME"
43400       has_space=`$ECHO "$path" | $GREP " "`
43401       if test "x$has_space" != x; then
43402         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
43403 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
43404         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43405       fi
43406 
43407       # Use eval to expand a potential ~
43408       eval path="$path"
43409       if test ! -f "$path" && test ! -d "$path"; then
43410         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
43411       fi
43412 
43413       JT_HOME="`cd "$path"; $THEPWDCMD -L`"
43414     fi
43415   fi
43416 
43417 
43418       # jtreg win32 script works for everybody
43419       JTREGEXE="$JT_HOME/bin/jtreg"
43420 
43421       if test ! -f "$JTREGEXE"; then
43422         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
43423       fi
43424 
43425       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43426 $as_echo "$JTREGEXE" >&6; }
43427     else
43428       # try to find jtreg on path
43429 
43430 
43431 
43432   # Publish this variable in the help.
43433 
43434 
43435   if [ -z "${JTREGEXE+x}" ]; then
43436     # The variable is not set by user, try to locate tool using the code snippet
43437     for ac_prog in jtreg
43438 do
43439   # Extract the first word of "$ac_prog", so it can be a program name with args.
43440 set dummy $ac_prog; ac_word=$2
43441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43442 $as_echo_n "checking for $ac_word... " >&6; }
43443 if ${ac_cv_path_JTREGEXE+:} false; then :
43444   $as_echo_n "(cached) " >&6
43445 else
43446   case $JTREGEXE in
43447   [\\/]* | ?:[\\/]*)
43448   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43449   ;;
43450   *)
43451   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43452 for as_dir in $PATH
43453 do
43454   IFS=$as_save_IFS
43455   test -z "$as_dir" && as_dir=.
43456     for ac_exec_ext in '' $ac_executable_extensions; do
43457   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43458     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43459     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43460     break 2
43461   fi
43462 done
43463   done
43464 IFS=$as_save_IFS
43465 
43466   ;;
43467 esac
43468 fi
43469 JTREGEXE=$ac_cv_path_JTREGEXE
43470 if test -n "$JTREGEXE"; then
43471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43472 $as_echo "$JTREGEXE" >&6; }
43473 else
43474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43475 $as_echo "no" >&6; }
43476 fi
43477 
43478 
43479   test -n "$JTREGEXE" && break
43480 done
43481 
43482   else
43483     # The variable is set, but is it from the command line or the environment?
43484 
43485     # Try to remove the string !JTREGEXE! from our list.
43486     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
43487     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43488       # If it failed, the variable was not from the command line. Ignore it,
43489       # but warn the user (except for BASH, which is always set by the calling BASH).
43490       if test "xJTREGEXE" != xBASH; then
43491         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
43492 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
43493       fi
43494       # Try to locate tool using the code snippet
43495       for ac_prog in jtreg
43496 do
43497   # Extract the first word of "$ac_prog", so it can be a program name with args.
43498 set dummy $ac_prog; ac_word=$2
43499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43500 $as_echo_n "checking for $ac_word... " >&6; }
43501 if ${ac_cv_path_JTREGEXE+:} false; then :
43502   $as_echo_n "(cached) " >&6
43503 else
43504   case $JTREGEXE in
43505   [\\/]* | ?:[\\/]*)
43506   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43507   ;;
43508   *)
43509   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43510 for as_dir in $PATH
43511 do
43512   IFS=$as_save_IFS
43513   test -z "$as_dir" && as_dir=.
43514     for ac_exec_ext in '' $ac_executable_extensions; do
43515   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43516     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43517     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43518     break 2
43519   fi
43520 done
43521   done
43522 IFS=$as_save_IFS
43523 
43524   ;;
43525 esac
43526 fi
43527 JTREGEXE=$ac_cv_path_JTREGEXE
43528 if test -n "$JTREGEXE"; then
43529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43530 $as_echo "$JTREGEXE" >&6; }
43531 else
43532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43533 $as_echo "no" >&6; }
43534 fi
43535 
43536 
43537   test -n "$JTREGEXE" && break
43538 done
43539 
43540     else
43541       # If it succeeded, then it was overridden by the user. We will use it
43542       # for the tool.
43543 
43544       # First remove it from the list of overridden variables, so we can test
43545       # for unknown variables in the end.
43546       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43547 
43548       # Check if we try to supply an empty value
43549       if test "x$JTREGEXE" = x; then
43550         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
43551 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
43552         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
43553 $as_echo_n "checking for JTREGEXE... " >&6; }
43554         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43555 $as_echo "disabled" >&6; }
43556       else
43557         # Check if the provided tool contains a complete path.
43558         tool_specified="$JTREGEXE"
43559         tool_basename="${tool_specified##*/}"
43560         if test "x$tool_basename" = "x$tool_specified"; then
43561           # A command without a complete path is provided, search $PATH.
43562           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
43563 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
43564           # Extract the first word of "$tool_basename", so it can be a program name with args.
43565 set dummy $tool_basename; ac_word=$2
43566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43567 $as_echo_n "checking for $ac_word... " >&6; }
43568 if ${ac_cv_path_JTREGEXE+:} false; then :
43569   $as_echo_n "(cached) " >&6
43570 else
43571   case $JTREGEXE in
43572   [\\/]* | ?:[\\/]*)
43573   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43574   ;;
43575   *)
43576   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43577 for as_dir in $PATH
43578 do
43579   IFS=$as_save_IFS
43580   test -z "$as_dir" && as_dir=.
43581     for ac_exec_ext in '' $ac_executable_extensions; do
43582   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43583     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43584     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43585     break 2
43586   fi
43587 done
43588   done
43589 IFS=$as_save_IFS
43590 
43591   ;;
43592 esac
43593 fi
43594 JTREGEXE=$ac_cv_path_JTREGEXE
43595 if test -n "$JTREGEXE"; then
43596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43597 $as_echo "$JTREGEXE" >&6; }
43598 else
43599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43600 $as_echo "no" >&6; }
43601 fi
43602 
43603 
43604           if test "x$JTREGEXE" = x; then
43605             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43606           fi
43607         else
43608           # Otherwise we believe it is a complete path. Use it as it is.
43609           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
43610 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
43611           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
43612 $as_echo_n "checking for JTREGEXE... " >&6; }
43613           if test ! -x "$tool_specified"; then
43614             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43615 $as_echo "not found" >&6; }
43616             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
43617           fi
43618           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43619 $as_echo "$tool_specified" >&6; }
43620         fi
43621       fi
43622     fi
43623 
43624   fi
43625 
43626 
43627 
43628   if test "x$JTREGEXE" = x; then
43629     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
43630   fi
43631 
43632 
43633       JT_HOME="`$DIRNAME $JTREGEXE`"
43634     fi
43635   fi
43636 
43637 
43638 
43639 
43640 
43641 
43642   # Option used to tell the compiler whether to create 32- or 64-bit executables
43643   if test "x$TOOLCHAIN_TYPE" = xxlc; then
43644     COMPILER_TARGET_BITS_FLAG="-q"
43645   else
43646     COMPILER_TARGET_BITS_FLAG="-m"
43647   fi
43648 
43649 
43650   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
43651   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43652     ARFLAGS="-r"
43653   elif test "x$OPENJDK_TARGET_OS" = xaix; then
43654     ARFLAGS="-X64"
43655   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
43656     # lib.exe is used as AR to create static libraries.
43657     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
43658   else
43659     ARFLAGS=""
43660   fi
43661 
43662 
43663   ## Setup strip.
43664   # FIXME: should this really be per platform, or should it be per toolchain type?
43665   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
43666   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
43667   if test "x$OPENJDK_TARGET_OS" = xlinux; then
43668     STRIPFLAGS="-g"
43669   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
43670     STRIPFLAGS="-x"
43671   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
43672     STRIPFLAGS="-S"
43673   elif test "x$OPENJDK_TARGET_OS" = xaix; then
43674     STRIPFLAGS="-X32_64"
43675   fi
43676 
43677 
43678 
43679   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43680     CC_OUT_OPTION=-Fo
43681     EXE_OUT_OPTION=-out:
43682     LD_OUT_OPTION=-out:
43683     AR_OUT_OPTION=-out:
43684   else
43685     # The option used to specify the target .o,.a or .so file.
43686     # When compiling, how to specify the to be created object file.
43687     CC_OUT_OPTION='-o$(SPACE)'
43688     # When linking, how to specify the to be created executable.
43689     EXE_OUT_OPTION='-o$(SPACE)'
43690     # When linking, how to specify the to be created dynamically linkable library.
43691     LD_OUT_OPTION='-o$(SPACE)'
43692     # When archiving, how to specify the to be create static archive for object files.
43693     AR_OUT_OPTION='rcs$(SPACE)'
43694   fi
43695 
43696 
43697 
43698 
43699 
43700   # On Windows, we need to set RC flags.
43701   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43702     RC_FLAGS="-nologo -l0x409"
43703     if test "x$VARIANT" = xOPT; then
43704       RC_FLAGS="$RC_FLAGS -DNDEBUG"
43705     fi
43706 
43707     # The version variables used to create RC_FLAGS may be overridden
43708     # in a custom configure script, or possibly the command line.
43709     # Let those variables be expanded at make time in spec.gmk.
43710     # The \$ are escaped to the shell, and the $(...) variables
43711     # are evaluated by make.
43712     RC_FLAGS="$RC_FLAGS \
43713         -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
43714         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
43715         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
43716         -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
43717         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
43718         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
43719         -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
43720   fi
43721 
43722 
43723   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43724     # silence copyright notice and other headers.
43725     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
43726   fi
43727 
43728 
43729 # FIXME: Currently we must test this after toolchain but before flags. Fix!
43730 
43731 # Now we can test some aspects on the target using configure macros.
43732 
43733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
43734 $as_echo_n "checking for ANSI C header files... " >&6; }
43735 if ${ac_cv_header_stdc+:} false; then :
43736   $as_echo_n "(cached) " >&6
43737 else
43738   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43739 /* end confdefs.h.  */
43740 #include <stdlib.h>
43741 #include <stdarg.h>
43742 #include <string.h>
43743 #include <float.h>
43744 
43745 int
43746 main ()
43747 {
43748 
43749   ;
43750   return 0;
43751 }
43752 _ACEOF
43753 if ac_fn_cxx_try_compile "$LINENO"; then :
43754   ac_cv_header_stdc=yes
43755 else
43756   ac_cv_header_stdc=no
43757 fi
43758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43759 
43760 if test $ac_cv_header_stdc = yes; then
43761   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
43762   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43763 /* end confdefs.h.  */
43764 #include <string.h>
43765 
43766 _ACEOF
43767 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43768   $EGREP "memchr" >/dev/null 2>&1; then :
43769 
43770 else
43771   ac_cv_header_stdc=no
43772 fi
43773 rm -f conftest*
43774 
43775 fi
43776 
43777 if test $ac_cv_header_stdc = yes; then
43778   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
43779   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43780 /* end confdefs.h.  */
43781 #include <stdlib.h>
43782 
43783 _ACEOF
43784 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43785   $EGREP "free" >/dev/null 2>&1; then :
43786 
43787 else
43788   ac_cv_header_stdc=no
43789 fi
43790 rm -f conftest*
43791 
43792 fi
43793 
43794 if test $ac_cv_header_stdc = yes; then
43795   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
43796   if test "$cross_compiling" = yes; then :
43797   :
43798 else
43799   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43800 /* end confdefs.h.  */
43801 #include <ctype.h>
43802 #include <stdlib.h>
43803 #if ((' ' & 0x0FF) == 0x020)
43804 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
43805 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
43806 #else
43807 # define ISLOWER(c) \
43808                    (('a' <= (c) && (c) <= 'i') \
43809                      || ('j' <= (c) && (c) <= 'r') \
43810                      || ('s' <= (c) && (c) <= 'z'))
43811 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
43812 #endif
43813 
43814 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
43815 int
43816 main ()
43817 {
43818   int i;
43819   for (i = 0; i < 256; i++)
43820     if (XOR (islower (i), ISLOWER (i))
43821         || toupper (i) != TOUPPER (i))
43822       return 2;
43823   return 0;
43824 }
43825 _ACEOF
43826 if ac_fn_cxx_try_run "$LINENO"; then :
43827 
43828 else
43829   ac_cv_header_stdc=no
43830 fi
43831 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43832   conftest.$ac_objext conftest.beam conftest.$ac_ext
43833 fi
43834 
43835 fi
43836 fi
43837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
43838 $as_echo "$ac_cv_header_stdc" >&6; }
43839 if test $ac_cv_header_stdc = yes; then
43840 
43841 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
43842 
43843 fi
43844 
43845 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
43846 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
43847                   inttypes.h stdint.h unistd.h
43848 do :
43849   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43850 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
43851 "
43852 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43853   cat >>confdefs.h <<_ACEOF
43854 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43855 _ACEOF
43856 
43857 fi
43858 
43859 done
43860 
43861 
43862 
43863   ###############################################################################
43864   #
43865   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
43866   # (The JVM can use 32 or 64 bit Java pointers but that decision
43867   # is made at runtime.)
43868   #
43869 
43870   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
43871     # Always specify -m flag on Solaris
43872     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
43873 
43874   # When we add flags to the "official" CFLAGS etc, we need to
43875   # keep track of these additions in ADDED_CFLAGS etc. These
43876   # will later be checked to make sure only controlled additions
43877   # have been made to CFLAGS etc.
43878   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43879   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43880   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43881 
43882   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
43883   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
43884   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
43885 
43886   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
43887   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
43888   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
43889 
43890   elif test "x$COMPILE_TYPE" = xreduced; then
43891     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
43892       # Specify -m if running reduced on unix platforms
43893 
43894   # When we add flags to the "official" CFLAGS etc, we need to
43895   # keep track of these additions in ADDED_CFLAGS etc. These
43896   # will later be checked to make sure only controlled additions
43897   # have been made to CFLAGS etc.
43898   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43899   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43900   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43901 
43902   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
43903   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
43904   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
43905 
43906   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
43907   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
43908   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
43909 
43910     fi
43911   fi
43912 
43913   # Make compilation sanity check
43914   for ac_header in stdio.h
43915 do :
43916   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
43917 if test "x$ac_cv_header_stdio_h" = xyes; then :
43918   cat >>confdefs.h <<_ACEOF
43919 #define HAVE_STDIO_H 1
43920 _ACEOF
43921 
43922 else
43923 
43924     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
43925 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
43926     if test "x$COMPILE_TYPE" = xreduced; then
43927 
43928   # Print a helpful message on how to acquire the necessary build dependency.
43929   # reduced is the help tag: freetype, cups, alsa etc
43930   MISSING_DEPENDENCY=reduced
43931 
43932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43933     cygwin_help $MISSING_DEPENDENCY
43934   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43935     msys_help $MISSING_DEPENDENCY
43936   else
43937     PKGHANDLER_COMMAND=
43938 
43939     case $PKGHANDLER in
43940       apt-get)
43941         apt_help     $MISSING_DEPENDENCY ;;
43942       yum)
43943         yum_help     $MISSING_DEPENDENCY ;;
43944       port)
43945         port_help    $MISSING_DEPENDENCY ;;
43946       pkgutil)
43947         pkgutil_help $MISSING_DEPENDENCY ;;
43948       pkgadd)
43949         pkgadd_help  $MISSING_DEPENDENCY ;;
43950     esac
43951 
43952     if test "x$PKGHANDLER_COMMAND" != x; then
43953       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43954     fi
43955   fi
43956 
43957       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
43958 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
43959     elif test "x$COMPILE_TYPE" = xcross; then
43960       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
43961 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
43962     fi
43963     as_fn_error $? "Cannot continue." "$LINENO" 5
43964 
43965 fi
43966 
43967 done
43968 
43969 
43970   # The cast to long int works around a bug in the HP C Compiler
43971 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
43972 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
43973 # This bug is HP SR number 8606223364.
43974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
43975 $as_echo_n "checking size of int *... " >&6; }
43976 if ${ac_cv_sizeof_int_p+:} false; then :
43977   $as_echo_n "(cached) " >&6
43978 else
43979   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
43980 
43981 else
43982   if test "$ac_cv_type_int_p" = yes; then
43983      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
43984 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
43985 as_fn_error 77 "cannot compute sizeof (int *)
43986 See \`config.log' for more details" "$LINENO" 5; }
43987    else
43988      ac_cv_sizeof_int_p=0
43989    fi
43990 fi
43991 
43992 fi
43993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
43994 $as_echo "$ac_cv_sizeof_int_p" >&6; }
43995 
43996 
43997 
43998 cat >>confdefs.h <<_ACEOF
43999 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
44000 _ACEOF
44001 
44002 
44003 
44004   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
44005   if test "x$ac_cv_sizeof_int_p" = x; then
44006     # The test failed, lets stick to the assumed value.
44007     { $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
44008 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
44009   else
44010     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
44011 
44012     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
44013       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
44014       # Let's try to implicitely set the compilers target architecture and retry the test
44015       { $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
44016 $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;}
44017       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
44018 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
44019 
44020   # When we add flags to the "official" CFLAGS etc, we need to
44021   # keep track of these additions in ADDED_CFLAGS etc. These
44022   # will later be checked to make sure only controlled additions
44023   # have been made to CFLAGS etc.
44024   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44025   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44026   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44027 
44028   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
44029   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
44030   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
44031 
44032   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
44033   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
44034   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
44035 
44036 
44037       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
44038       unset ac_cv_sizeof_int_p
44039       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
44040       cat >>confdefs.h <<_ACEOF
44041 #undef SIZEOF_INT_P
44042 _ACEOF
44043 
44044       # The cast to long int works around a bug in the HP C Compiler
44045 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
44046 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
44047 # This bug is HP SR number 8606223364.
44048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
44049 $as_echo_n "checking size of int *... " >&6; }
44050 if ${ac_cv_sizeof_int_p+:} false; then :
44051   $as_echo_n "(cached) " >&6
44052 else
44053   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
44054 
44055 else
44056   if test "$ac_cv_type_int_p" = yes; then
44057      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
44058 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
44059 as_fn_error 77 "cannot compute sizeof (int *)
44060 See \`config.log' for more details" "$LINENO" 5; }
44061    else
44062      ac_cv_sizeof_int_p=0
44063    fi
44064 fi
44065 
44066 fi
44067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
44068 $as_echo "$ac_cv_sizeof_int_p" >&6; }
44069 
44070 
44071 
44072 cat >>confdefs.h <<_ACEOF
44073 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
44074 _ACEOF
44075 
44076 
44077 
44078       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
44079 
44080       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
44081         { $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
44082 $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;}
44083         if test "x$COMPILE_TYPE" = xreduced; then
44084 
44085   # Print a helpful message on how to acquire the necessary build dependency.
44086   # reduced is the help tag: freetype, cups, alsa etc
44087   MISSING_DEPENDENCY=reduced
44088 
44089   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44090     cygwin_help $MISSING_DEPENDENCY
44091   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44092     msys_help $MISSING_DEPENDENCY
44093   else
44094     PKGHANDLER_COMMAND=
44095 
44096     case $PKGHANDLER in
44097       apt-get)
44098         apt_help     $MISSING_DEPENDENCY ;;
44099       yum)
44100         yum_help     $MISSING_DEPENDENCY ;;
44101       port)
44102         port_help    $MISSING_DEPENDENCY ;;
44103       pkgutil)
44104         pkgutil_help $MISSING_DEPENDENCY ;;
44105       pkgadd)
44106         pkgadd_help  $MISSING_DEPENDENCY ;;
44107     esac
44108 
44109     if test "x$PKGHANDLER_COMMAND" != x; then
44110       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44111     fi
44112   fi
44113 
44114           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
44115 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
44116         elif test "x$COMPILE_TYPE" = xcross; then
44117           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
44118 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
44119         fi
44120         as_fn_error $? "Cannot continue." "$LINENO" 5
44121       fi
44122     fi
44123   fi
44124 
44125   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
44126 $as_echo_n "checking for target address size... " >&6; }
44127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
44128 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
44129 
44130 
44131   ###############################################################################
44132   #
44133   # Is the target little of big endian?
44134   #
44135    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
44136 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
44137 if ${ac_cv_c_bigendian+:} false; then :
44138   $as_echo_n "(cached) " >&6
44139 else
44140   ac_cv_c_bigendian=unknown
44141     # See if we're dealing with a universal compiler.
44142     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44143 /* end confdefs.h.  */
44144 #ifndef __APPLE_CC__
44145                not a universal capable compiler
44146              #endif
44147              typedef int dummy;
44148 
44149 _ACEOF
44150 if ac_fn_cxx_try_compile "$LINENO"; then :
44151 
44152         # Check for potential -arch flags.  It is not universal unless
44153         # there are at least two -arch flags with different values.
44154         ac_arch=
44155         ac_prev=
44156         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
44157          if test -n "$ac_prev"; then
44158            case $ac_word in
44159              i?86 | x86_64 | ppc | ppc64)
44160                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
44161                  ac_arch=$ac_word
44162                else
44163                  ac_cv_c_bigendian=universal
44164                  break
44165                fi
44166                ;;
44167            esac
44168            ac_prev=
44169          elif test "x$ac_word" = "x-arch"; then
44170            ac_prev=arch
44171          fi
44172        done
44173 fi
44174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44175     if test $ac_cv_c_bigendian = unknown; then
44176       # See if sys/param.h defines the BYTE_ORDER macro.
44177       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44178 /* end confdefs.h.  */
44179 #include <sys/types.h>
44180              #include <sys/param.h>
44181 
44182 int
44183 main ()
44184 {
44185 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
44186                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
44187                      && LITTLE_ENDIAN)
44188               bogus endian macros
44189              #endif
44190 
44191   ;
44192   return 0;
44193 }
44194 _ACEOF
44195 if ac_fn_cxx_try_compile "$LINENO"; then :
44196   # It does; now see whether it defined to BIG_ENDIAN or not.
44197          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44198 /* end confdefs.h.  */
44199 #include <sys/types.h>
44200                 #include <sys/param.h>
44201 
44202 int
44203 main ()
44204 {
44205 #if BYTE_ORDER != BIG_ENDIAN
44206                  not big endian
44207                 #endif
44208 
44209   ;
44210   return 0;
44211 }
44212 _ACEOF
44213 if ac_fn_cxx_try_compile "$LINENO"; then :
44214   ac_cv_c_bigendian=yes
44215 else
44216   ac_cv_c_bigendian=no
44217 fi
44218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44219 fi
44220 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44221     fi
44222     if test $ac_cv_c_bigendian = unknown; then
44223       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
44224       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44225 /* end confdefs.h.  */
44226 #include <limits.h>
44227 
44228 int
44229 main ()
44230 {
44231 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
44232               bogus endian macros
44233              #endif
44234 
44235   ;
44236   return 0;
44237 }
44238 _ACEOF
44239 if ac_fn_cxx_try_compile "$LINENO"; then :
44240   # It does; now see whether it defined to _BIG_ENDIAN or not.
44241          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44242 /* end confdefs.h.  */
44243 #include <limits.h>
44244 
44245 int
44246 main ()
44247 {
44248 #ifndef _BIG_ENDIAN
44249                  not big endian
44250                 #endif
44251 
44252   ;
44253   return 0;
44254 }
44255 _ACEOF
44256 if ac_fn_cxx_try_compile "$LINENO"; then :
44257   ac_cv_c_bigendian=yes
44258 else
44259   ac_cv_c_bigendian=no
44260 fi
44261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44262 fi
44263 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44264     fi
44265     if test $ac_cv_c_bigendian = unknown; then
44266       # Compile a test program.
44267       if test "$cross_compiling" = yes; then :
44268   # Try to guess by grepping values from an object file.
44269          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44270 /* end confdefs.h.  */
44271 short int ascii_mm[] =
44272                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
44273                 short int ascii_ii[] =
44274                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
44275                 int use_ascii (int i) {
44276                   return ascii_mm[i] + ascii_ii[i];
44277                 }
44278                 short int ebcdic_ii[] =
44279                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
44280                 short int ebcdic_mm[] =
44281                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
44282                 int use_ebcdic (int i) {
44283                   return ebcdic_mm[i] + ebcdic_ii[i];
44284                 }
44285                 extern int foo;
44286 
44287 int
44288 main ()
44289 {
44290 return use_ascii (foo) == use_ebcdic (foo);
44291   ;
44292   return 0;
44293 }
44294 _ACEOF
44295 if ac_fn_cxx_try_compile "$LINENO"; then :
44296   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
44297               ac_cv_c_bigendian=yes
44298             fi
44299             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
44300               if test "$ac_cv_c_bigendian" = unknown; then
44301                 ac_cv_c_bigendian=no
44302               else
44303                 # finding both strings is unlikely to happen, but who knows?
44304                 ac_cv_c_bigendian=unknown
44305               fi
44306             fi
44307 fi
44308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44309 else
44310   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44311 /* end confdefs.h.  */
44312 $ac_includes_default
44313 int
44314 main ()
44315 {
44316 
44317              /* Are we little or big endian?  From Harbison&Steele.  */
44318              union
44319              {
44320                long int l;
44321                char c[sizeof (long int)];
44322              } u;
44323              u.l = 1;
44324              return u.c[sizeof (long int) - 1] == 1;
44325 
44326   ;
44327   return 0;
44328 }
44329 _ACEOF
44330 if ac_fn_cxx_try_run "$LINENO"; then :
44331   ac_cv_c_bigendian=no
44332 else
44333   ac_cv_c_bigendian=yes
44334 fi
44335 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44336   conftest.$ac_objext conftest.beam conftest.$ac_ext
44337 fi
44338 
44339     fi
44340 fi
44341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
44342 $as_echo "$ac_cv_c_bigendian" >&6; }
44343  case $ac_cv_c_bigendian in #(
44344    yes)
44345      ENDIAN="big";; #(
44346    no)
44347      ENDIAN="little" ;; #(
44348    universal)
44349      ENDIAN="universal_endianness"
44350      ;; #(
44351    *)
44352      ENDIAN="unknown" ;;
44353  esac
44354 
44355 
44356   if test "x$ENDIAN" = xuniversal_endianness; then
44357     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
44358   fi
44359   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
44360     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
44361   fi
44362 
44363 
44364 # Configure flags for the tools
44365 
44366   ###############################################################################
44367   #
44368   # How to compile shared libraries.
44369   #
44370 
44371   if test "x$TOOLCHAIN_TYPE" = xgcc; then
44372     PICFLAG="-fPIC"
44373     C_FLAG_REORDER=''
44374     CXX_FLAG_REORDER=''
44375 
44376     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44377       # Linking is different on MacOSX
44378       if test "x$STATIC_BUILD" = xtrue; then
44379         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
44380       else
44381         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
44382       fi
44383       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
44384       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44385       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
44386       SET_SHARED_LIBRARY_MAPFILE=''
44387     else
44388       # Default works for linux, might work on other platforms as well.
44389       SHARED_LIBRARY_FLAGS='-shared'
44390       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
44391       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
44392       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
44393       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
44394     fi
44395   elif test "x$TOOLCHAIN_TYPE" = xclang; then
44396     PICFLAG=''
44397     C_FLAG_REORDER=''
44398     CXX_FLAG_REORDER=''
44399 
44400     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44401       # Linking is different on MacOSX
44402       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
44403       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
44404       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44405       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
44406       SET_SHARED_LIBRARY_MAPFILE=''
44407     else
44408       # Default works for linux, might work on other platforms as well.
44409       SHARED_LIBRARY_FLAGS='-shared'
44410       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
44411       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
44412       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
44413       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
44414     fi
44415   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44416     PICFLAG="-KPIC"
44417     C_FLAG_REORDER='-xF'
44418     CXX_FLAG_REORDER='-xF'
44419     SHARED_LIBRARY_FLAGS="-G"
44420     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
44421     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44422     SET_SHARED_LIBRARY_NAME=''
44423     SET_SHARED_LIBRARY_MAPFILE='-M$1'
44424   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44425     PICFLAG="-qpic=large"
44426     C_FLAG_REORDER=''
44427     CXX_FLAG_REORDER=''
44428     SHARED_LIBRARY_FLAGS="-qmkshrobj"
44429     SET_EXECUTABLE_ORIGIN=""
44430     SET_SHARED_LIBRARY_ORIGIN=''
44431     SET_SHARED_LIBRARY_NAME=''
44432     SET_SHARED_LIBRARY_MAPFILE=''
44433   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44434     PICFLAG=""
44435     C_FLAG_REORDER=''
44436     CXX_FLAG_REORDER=''
44437     SHARED_LIBRARY_FLAGS="-LD"
44438     SET_EXECUTABLE_ORIGIN=''
44439     SET_SHARED_LIBRARY_ORIGIN=''
44440     SET_SHARED_LIBRARY_NAME=''
44441     SET_SHARED_LIBRARY_MAPFILE=''
44442   fi
44443 
44444 
44445 
44446 
44447 
44448 
44449 
44450 
44451   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44452     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
44453     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
44454     CFLAGS_JDKLIB_EXTRA='-xstrconst'
44455   fi
44456   # The (cross) compiler is now configured, we can now test capabilities
44457   # of the target platform.
44458 
44459 
44460 
44461   ###############################################################################
44462   #
44463   # Setup the opt flags for different compilers
44464   # and different operating systems.
44465   #
44466 
44467   # FIXME: this was indirectly the old default, but just inherited.
44468   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44469   #   C_FLAG_DEPS="-MMD -MF"
44470   # fi
44471 
44472   # Generate make dependency files
44473   if test "x$TOOLCHAIN_TYPE" = xgcc; then
44474     C_FLAG_DEPS="-MMD -MF"
44475   elif test "x$TOOLCHAIN_TYPE" = xclang; then
44476     C_FLAG_DEPS="-MMD -MF"
44477   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44478     C_FLAG_DEPS="-xMMD -xMF"
44479   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44480     C_FLAG_DEPS="-qmakedep=gcc -MF"
44481   fi
44482   CXX_FLAG_DEPS="$C_FLAG_DEPS"
44483 
44484 
44485 
44486   # Debug symbols
44487   if test "x$TOOLCHAIN_TYPE" = xgcc; then
44488     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
44489       # reduce from default "-g2" option to save space
44490       CFLAGS_DEBUG_SYMBOLS="-g1"
44491       CXXFLAGS_DEBUG_SYMBOLS="-g1"
44492     else
44493       CFLAGS_DEBUG_SYMBOLS="-g"
44494       CXXFLAGS_DEBUG_SYMBOLS="-g"
44495     fi
44496   elif test "x$TOOLCHAIN_TYPE" = xclang; then
44497     CFLAGS_DEBUG_SYMBOLS="-g"
44498     CXXFLAGS_DEBUG_SYMBOLS="-g"
44499   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44500     CFLAGS_DEBUG_SYMBOLS="-g -xs"
44501     # FIXME: likely a bug, this disables debug symbols rather than enables them
44502     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
44503   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44504     CFLAGS_DEBUG_SYMBOLS="-g"
44505     CXXFLAGS_DEBUG_SYMBOLS="-g"
44506   fi
44507 
44508 
44509 
44510   # bounds, memory and behavior checking options
44511   if test "x$TOOLCHAIN_TYPE" = xgcc; then
44512     case $DEBUG_LEVEL in
44513     release )
44514       # no adjustment
44515       ;;
44516     fastdebug )
44517       # no adjustment
44518       ;;
44519     slowdebug )
44520       # Add runtime stack smashing and undefined behavior checks.
44521       # Not all versions of gcc support -fstack-protector
44522       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
44523 
44524   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
44525 $as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
44526   supports=yes
44527 
44528   saved_cflags="$CFLAGS"
44529   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
44530   ac_ext=c
44531 ac_cpp='$CPP $CPPFLAGS'
44532 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44533 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44534 ac_compiler_gnu=$ac_cv_c_compiler_gnu
44535 
44536   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44537 /* end confdefs.h.  */
44538 int i;
44539 _ACEOF
44540 if ac_fn_c_try_compile "$LINENO"; then :
44541 
44542 else
44543   supports=no
44544 fi
44545 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44546   ac_ext=cpp
44547 ac_cpp='$CXXCPP $CPPFLAGS'
44548 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44549 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44550 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44551 
44552   CFLAGS="$saved_cflags"
44553 
44554   saved_cxxflags="$CXXFLAGS"
44555   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
44556   ac_ext=cpp
44557 ac_cpp='$CXXCPP $CPPFLAGS'
44558 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44559 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44560 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44561 
44562   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44563 /* end confdefs.h.  */
44564 int i;
44565 _ACEOF
44566 if ac_fn_cxx_try_compile "$LINENO"; then :
44567 
44568 else
44569   supports=no
44570 fi
44571 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44572   ac_ext=cpp
44573 ac_cpp='$CXXCPP $CPPFLAGS'
44574 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44575 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44576 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44577 
44578   CXXFLAGS="$saved_cxxflags"
44579 
44580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44581 $as_echo "$supports" >&6; }
44582   if test "x$supports" = "xyes" ; then
44583     :
44584   else
44585     STACK_PROTECTOR_CFLAG=""
44586   fi
44587 
44588 
44589       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
44590       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
44591       ;;
44592     esac
44593   fi
44594 
44595   # Optimization levels
44596   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44597     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
44598 
44599     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
44600       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
44601       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
44602       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
44603       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
44604       C_O_FLAG_DEBUG="-xregs=no%frameptr"
44605       C_O_FLAG_NONE="-xregs=no%frameptr"
44606       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
44607       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
44608       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
44609       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
44610       CXX_O_FLAG_NONE="-xregs=no%frameptr"
44611       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
44612         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
44613         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
44614       fi
44615     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
44616       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
44617       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
44618       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
44619       C_O_FLAG_DEBUG=""
44620       C_O_FLAG_NONE=""
44621       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
44622       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
44623       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
44624       C_O_FLAG_DEBUG=""
44625       CXX_O_FLAG_NONE=""
44626     fi
44627   else
44628     # The remaining toolchains share opt flags between CC and CXX;
44629     # setup for C and duplicate afterwards.
44630     if test "x$TOOLCHAIN_TYPE" = xgcc; then
44631       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44632         # On MacOSX we optimize for size, something
44633         # we should do for all platforms?
44634         C_O_FLAG_HIGHEST="-Os"
44635         C_O_FLAG_HI="-Os"
44636         C_O_FLAG_NORM="-Os"
44637       else
44638         C_O_FLAG_HIGHEST="-O3"
44639         C_O_FLAG_HI="-O3"
44640         C_O_FLAG_NORM="-O2"
44641       fi
44642       C_O_FLAG_DEBUG="-O0"
44643       C_O_FLAG_NONE="-O0"
44644     elif test "x$TOOLCHAIN_TYPE" = xclang; then
44645       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44646         # On MacOSX we optimize for size, something
44647         # we should do for all platforms?
44648         C_O_FLAG_HIGHEST="-Os"
44649         C_O_FLAG_HI="-Os"
44650         C_O_FLAG_NORM="-Os"
44651       else
44652         C_O_FLAG_HIGHEST="-O3"
44653         C_O_FLAG_HI="-O3"
44654         C_O_FLAG_NORM="-O2"
44655       fi
44656       C_O_FLAG_DEBUG="-O0"
44657       C_O_FLAG_NONE="-O0"
44658     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44659       C_O_FLAG_HIGHEST="-O3"
44660       C_O_FLAG_HI="-O3 -qstrict"
44661       C_O_FLAG_NORM="-O2"
44662       C_O_FLAG_DEBUG="-qnoopt"
44663       C_O_FLAG_NONE="-qnoop"
44664     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44665       C_O_FLAG_HIGHEST="-O2"
44666       C_O_FLAG_HI="-O1"
44667       C_O_FLAG_NORM="-O1"
44668       C_O_FLAG_DEBUG="-Od"
44669       C_O_FLAG_NONE="-Od"
44670     fi
44671     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
44672     CXX_O_FLAG_HI="$C_O_FLAG_HI"
44673     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
44674     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
44675     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
44676   fi
44677 
44678   # Adjust optimization flags according to debug level.
44679   case $DEBUG_LEVEL in
44680     release )
44681       # no adjustment
44682       ;;
44683     fastdebug )
44684       # Not quite so much optimization
44685       C_O_FLAG_HI="$C_O_FLAG_NORM"
44686       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
44687       ;;
44688     slowdebug )
44689       # Disable optimization
44690       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
44691       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
44692       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
44693       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
44694       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
44695       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
44696       ;;
44697   esac
44698 
44699 
44700 
44701 
44702 
44703 
44704 
44705 
44706 
44707 
44708 
44709 
44710 
44711   # Special extras...
44712   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44713     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
44714       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
44715       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
44716     fi
44717     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
44718     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
44719   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44720     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
44721     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
44722   fi
44723 
44724   CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
44725   CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
44726   LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
44727 
44728   ###############################################################################
44729   #
44730   # Now setup the CFLAGS and LDFLAGS for the JDK build.
44731   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
44732   #
44733 
44734   # Setup compiler/platform specific flags into
44735   #    CFLAGS_JDK    - C Compiler flags
44736   #    CXXFLAGS_JDK  - C++ Compiler flags
44737   #    COMMON_CCXXFLAGS_JDK - common to C and C++
44738   if test "x$TOOLCHAIN_TYPE" = xgcc; then
44739     if test "x$OPENJDK_TARGET_CPU" = xx86; then
44740       # Force compatibility with i586 on 32 bit intel platforms.
44741       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
44742     fi
44743     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
44744         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
44745     case $OPENJDK_TARGET_CPU_ARCH in
44746       arm )
44747         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
44748         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
44749         ;;
44750       ppc )
44751         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
44752         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
44753         ;;
44754       * )
44755         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
44756         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
44757         ;;
44758     esac
44759   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44760     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
44761     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
44762       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
44763     fi
44764 
44765     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
44766     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
44767   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44768     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
44769     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
44770   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44771     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
44772         -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
44773         -DWIN32_LEAN_AND_MEAN \
44774         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
44775         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
44776         -DWIN32 -DIAL"
44777     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44778       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
44779     else
44780       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
44781     fi
44782     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
44783     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
44784     # studio.
44785     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
44786       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
44787           -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
44788     fi
44789   fi
44790 
44791   ###############################################################################
44792 
44793   # Adjust flags according to debug level.
44794   case $DEBUG_LEVEL in
44795     fastdebug | slowdebug )
44796       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
44797       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
44798       JAVAC_FLAGS="$JAVAC_FLAGS -g"
44799       ;;
44800     release )
44801       ;;
44802     * )
44803       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
44804       ;;
44805   esac
44806 
44807   # Setup LP64
44808   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
44809 
44810   # Set some common defines. These works for all compilers, but assume
44811   # -D is universally accepted.
44812 
44813   # Setup endianness
44814   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
44815     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
44816     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
44817     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
44818     #   Note: -Dmacro         is the same as    #define macro 1
44819     #         -Dmacro=        is the same as    #define macro
44820     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44821       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
44822     else
44823       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
44824     fi
44825   else
44826     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
44827     # are defined in the system?
44828     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44829       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
44830     else
44831       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
44832     fi
44833   fi
44834 
44835   # Setup target OS define. Use OS target name but in upper case.
44836   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
44837   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
44838 
44839   # Setup target CPU
44840   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
44841 
44842   # Setup debug/release defines
44843   if test "x$DEBUG_LEVEL" = xrelease; then
44844     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
44845     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44846       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
44847     fi
44848   else
44849     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
44850   fi
44851 
44852   # Setup release name
44853   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
44854 
44855 
44856   # Set some additional per-OS defines.
44857   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44858     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
44859   elif test "x$OPENJDK_TARGET_OS" = xaix; then
44860     # FIXME: PPC64 should not be here.
44861     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
44862   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
44863     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
44864   fi
44865 
44866   # Additional macosx handling
44867   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44868     # Setting these parameters makes it an error to link to macosx APIs that are
44869     # newer than the given OS version and makes the linked binaries compatible
44870     # even if built on a newer version of the OS.
44871     # The expected format is X.Y.Z
44872     MACOSX_VERSION_MIN=10.7.0
44873 
44874 
44875     # The macro takes the version with no dots, ex: 1070
44876     # Let the flags variables get resolved in make for easier override on make
44877     # command line.
44878     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
44879     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
44880   fi
44881 
44882   # Setup some hard coded includes
44883   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
44884       -I${JDK_TOPDIR}/src/java.base/share/native/include \
44885       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
44886       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
44887       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
44888       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
44889 
44890   # The shared libraries are compiled using the picflag.
44891   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
44892   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
44893 
44894   # Executable flags
44895   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
44896   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
44897 
44898 
44899 
44900 
44901 
44902 
44903   # Flags for compiling test libraries
44904   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
44905   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
44906 
44907   # Flags for compiling test executables
44908   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
44909   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
44910 
44911 
44912 
44913 
44914 
44915 
44916   # Setup LDFLAGS et al.
44917   #
44918 
44919   # Now this is odd. The JDK native libraries have to link against libjvm.so
44920   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
44921   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
44922   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
44923   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
44924   # libraries will link to whatever is in memory. Yuck.
44925   #
44926   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
44927   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44928     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
44929     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
44930       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
44931     fi
44932     # TODO: make -debug optional "--disable-full-debug-symbols"
44933     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
44934   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44935     # If this is a --hash-style=gnu system, use --hash-style=both, why?
44936     # We have previously set HAS_GNU_HASH if this is the case
44937     if test -n "$HAS_GNU_HASH"; then
44938       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
44939     fi
44940     if test "x$OPENJDK_TARGET_OS" = xlinux; then
44941       # And since we now know that the linker is gnu, then add -z defs, to forbid
44942       # undefined symbols in object files.
44943       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
44944       case $DEBUG_LEVEL in
44945         release )
44946           # tell linker to optimize libraries.
44947           # Should this be supplied to the OSS linker as well?
44948           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
44949           ;;
44950         slowdebug )
44951           if test "x$HAS_LINKER_NOW" = "xtrue"; then
44952             # do relocations at load
44953             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
44954             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
44955           fi
44956           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
44957             # mark relocations read only
44958             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
44959             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
44960           fi
44961           ;;
44962         fastdebug )
44963           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
44964             # mark relocations read only
44965             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
44966             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
44967           fi
44968           ;;
44969         * )
44970           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
44971           ;;
44972         esac
44973     fi
44974   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44975     LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
44976     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
44977   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44978     LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
44979   fi
44980 
44981   # Customize LDFLAGS for executables
44982 
44983   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
44984 
44985   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44986     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
44987       LDFLAGS_STACK_SIZE=1048576
44988     else
44989       LDFLAGS_STACK_SIZE=327680
44990     fi
44991     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
44992   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
44993     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
44994   fi
44995 
44996   # Customize LDFLAGS for libs
44997   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
44998 
44999   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45000     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
45001     JDKLIB_LIBS=""
45002   else
45003     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
45004         -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
45005 
45006     # On some platforms (mac) the linker warns about non existing -L dirs.
45007     # Add server first if available. Linking aginst client does not always produce the same results.
45008     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
45009     # Default to server for other variants.
45010     if test "x$JVM_VARIANT_SERVER" = xtrue; then
45011       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
45012     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
45013       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
45014     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
45015       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
45016     else
45017       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
45018     fi
45019 
45020     JDKLIB_LIBS="-ljava -ljvm"
45021     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45022       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
45023     fi
45024   fi
45025 
45026 
45027 
45028 
45029 
45030 
45031 
45032   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
45033   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
45034 
45035 
45036 
45037 
45038 
45039   # Some Zero and Shark settings.
45040   # ZERO_ARCHFLAG tells the compiler which mode to build for
45041   case "${OPENJDK_TARGET_CPU}" in
45042     s390)
45043       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
45044       ;;
45045     *)
45046       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45047   esac
45048 
45049   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
45050 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
45051   supports=yes
45052 
45053   saved_cflags="$CFLAGS"
45054   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
45055   ac_ext=c
45056 ac_cpp='$CPP $CPPFLAGS'
45057 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45058 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45059 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45060 
45061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45062 /* end confdefs.h.  */
45063 int i;
45064 _ACEOF
45065 if ac_fn_c_try_compile "$LINENO"; then :
45066 
45067 else
45068   supports=no
45069 fi
45070 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45071   ac_ext=cpp
45072 ac_cpp='$CXXCPP $CPPFLAGS'
45073 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45074 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45075 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45076 
45077   CFLAGS="$saved_cflags"
45078 
45079   saved_cxxflags="$CXXFLAGS"
45080   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
45081   ac_ext=cpp
45082 ac_cpp='$CXXCPP $CPPFLAGS'
45083 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45084 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45085 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45086 
45087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45088 /* end confdefs.h.  */
45089 int i;
45090 _ACEOF
45091 if ac_fn_cxx_try_compile "$LINENO"; then :
45092 
45093 else
45094   supports=no
45095 fi
45096 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45097   ac_ext=cpp
45098 ac_cpp='$CXXCPP $CPPFLAGS'
45099 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45100 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45101 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45102 
45103   CXXFLAGS="$saved_cxxflags"
45104 
45105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45106 $as_echo "$supports" >&6; }
45107   if test "x$supports" = "xyes" ; then
45108     :
45109   else
45110     ZERO_ARCHFLAG=""
45111   fi
45112 
45113 
45114 
45115   # Check that the compiler supports -mX (or -qX on AIX) flags
45116   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
45117 
45118   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
45119 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
45120   supports=yes
45121 
45122   saved_cflags="$CFLAGS"
45123   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45124   ac_ext=c
45125 ac_cpp='$CPP $CPPFLAGS'
45126 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45127 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45128 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45129 
45130   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45131 /* end confdefs.h.  */
45132 int i;
45133 _ACEOF
45134 if ac_fn_c_try_compile "$LINENO"; then :
45135 
45136 else
45137   supports=no
45138 fi
45139 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45140   ac_ext=cpp
45141 ac_cpp='$CXXCPP $CPPFLAGS'
45142 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45143 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45144 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45145 
45146   CFLAGS="$saved_cflags"
45147 
45148   saved_cxxflags="$CXXFLAGS"
45149   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45150   ac_ext=cpp
45151 ac_cpp='$CXXCPP $CPPFLAGS'
45152 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45153 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45154 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45155 
45156   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45157 /* end confdefs.h.  */
45158 int i;
45159 _ACEOF
45160 if ac_fn_cxx_try_compile "$LINENO"; then :
45161 
45162 else
45163   supports=no
45164 fi
45165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45166   ac_ext=cpp
45167 ac_cpp='$CXXCPP $CPPFLAGS'
45168 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45169 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45170 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45171 
45172   CXXFLAGS="$saved_cxxflags"
45173 
45174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45175 $as_echo "$supports" >&6; }
45176   if test "x$supports" = "xyes" ; then
45177     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
45178   else
45179     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
45180   fi
45181 
45182 
45183 
45184   # Check whether --enable-warnings-as-errors was given.
45185 if test "${enable_warnings_as_errors+set}" = set; then :
45186   enableval=$enable_warnings_as_errors;
45187 fi
45188 
45189 
45190   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
45191 $as_echo_n "checking if native warnings are errors... " >&6; }
45192   if test "x$enable_warnings_as_errors" = "xyes"; then
45193     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
45194 $as_echo "yes (explicitely set)" >&6; }
45195     WARNINGS_AS_ERRORS=true
45196   elif test "x$enable_warnings_as_errors" = "xno"; then
45197     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45198 $as_echo "no" >&6; }
45199     WARNINGS_AS_ERRORS=false
45200   elif test "x$enable_warnings_as_errors" = "x"; then
45201     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
45202 $as_echo "yes (default)" >&6; }
45203     WARNINGS_AS_ERRORS=true
45204   else
45205     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
45206   fi
45207 
45208   if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
45209     # Set legacy hotspot variable
45210     HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
45211   else
45212     HOTSPOT_SET_WARNINGS_AS_ERRORS=""
45213   fi
45214 
45215 
45216 
45217 
45218   case "${TOOLCHAIN_TYPE}" in
45219     microsoft)
45220       DISABLE_WARNING_PREFIX="-wd"
45221       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
45222       ;;
45223     solstudio)
45224       DISABLE_WARNING_PREFIX="-erroff="
45225       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
45226       ;;
45227     gcc)
45228       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
45229 
45230   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
45231 $as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
45232   supports=yes
45233 
45234   saved_cflags="$CFLAGS"
45235   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
45236   ac_ext=c
45237 ac_cpp='$CPP $CPPFLAGS'
45238 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45239 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45240 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45241 
45242   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45243 /* end confdefs.h.  */
45244 int i;
45245 _ACEOF
45246 if ac_fn_c_try_compile "$LINENO"; then :
45247 
45248 else
45249   supports=no
45250 fi
45251 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45252   ac_ext=cpp
45253 ac_cpp='$CXXCPP $CPPFLAGS'
45254 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45255 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45256 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45257 
45258   CFLAGS="$saved_cflags"
45259 
45260   saved_cxxflags="$CXXFLAGS"
45261   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
45262   ac_ext=cpp
45263 ac_cpp='$CXXCPP $CPPFLAGS'
45264 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45265 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45266 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45267 
45268   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45269 /* end confdefs.h.  */
45270 int i;
45271 _ACEOF
45272 if ac_fn_cxx_try_compile "$LINENO"; then :
45273 
45274 else
45275   supports=no
45276 fi
45277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45278   ac_ext=cpp
45279 ac_cpp='$CXXCPP $CPPFLAGS'
45280 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45281 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45282 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45283 
45284   CXXFLAGS="$saved_cxxflags"
45285 
45286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45287 $as_echo "$supports" >&6; }
45288   if test "x$supports" = "xyes" ; then
45289     GCC_CAN_DISABLE_WARNINGS=true
45290   else
45291     GCC_CAN_DISABLE_WARNINGS=false
45292 
45293   fi
45294 
45295       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
45296         DISABLE_WARNING_PREFIX="-Wno-"
45297       else
45298         DISABLE_WARNING_PREFIX=
45299       fi
45300       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
45301       ;;
45302     clang)
45303       DISABLE_WARNING_PREFIX="-Wno-"
45304       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
45305       ;;
45306   esac
45307 
45308 
45309 
45310 
45311 # Setup debug symbols (need objcopy from the toolchain for that)
45312 
45313   #
45314   # ENABLE_DEBUG_SYMBOLS
45315   # This must be done after the toolchain is setup, since we're looking at objcopy.
45316   #
45317   # Check whether --enable-debug-symbols was given.
45318 if test "${enable_debug_symbols+set}" = set; then :
45319   enableval=$enable_debug_symbols;
45320 fi
45321 
45322 
45323   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
45324 $as_echo_n "checking if we should generate debug symbols... " >&6; }
45325 
45326   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
45327     # explicit enabling of enable-debug-symbols and can't find objcopy
45328     #   this is an error
45329     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
45330   fi
45331 
45332   if test "x$enable_debug_symbols" = "xyes"; then
45333     ENABLE_DEBUG_SYMBOLS=true
45334   elif test "x$enable_debug_symbols" = "xno"; then
45335     ENABLE_DEBUG_SYMBOLS=false
45336   else
45337     # Default is on if objcopy is found
45338     if test "x$OBJCOPY" != x; then
45339       ENABLE_DEBUG_SYMBOLS=true
45340     # MacOS X and Windows don't use objcopy but default is on for those OSes
45341     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
45342       ENABLE_DEBUG_SYMBOLS=true
45343     else
45344       ENABLE_DEBUG_SYMBOLS=false
45345     fi
45346   fi
45347 
45348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
45349 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
45350 
45351   #
45352   # ZIP_DEBUGINFO_FILES
45353   #
45354   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
45355 $as_echo_n "checking if we should zip debug-info files... " >&6; }
45356   # Check whether --enable-zip-debug-info was given.
45357 if test "${enable_zip_debug_info+set}" = set; then :
45358   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
45359 else
45360   enable_zip_debug_info="yes"
45361 fi
45362 
45363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
45364 $as_echo "${enable_zip_debug_info}" >&6; }
45365 
45366   if test "x${enable_zip_debug_info}" = "xno"; then
45367     ZIP_DEBUGINFO_FILES=false
45368   else
45369     ZIP_DEBUGINFO_FILES=true
45370   fi
45371 
45372   #
45373   # DEBUG_SYMBOL
45374   #
45375   { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of debug symbol" >&5
45376 $as_echo_n "checking type of debug symbol... " >&6; }
45377   DEBUG_SYMBOL="zipped"
45378 
45379 # Check whether --with-debug-symbols was given.
45380 if test "${with_debug_symbols+set}" = set; then :
45381   withval=$with_debug_symbols;
45382         DEBUG_SYMBOL="${withval}"
45383 
45384 fi
45385 
45386 
45387   if test "x$DEBUG_SYMBOL" != xzipped && \
45388       test "x$DEBUG_SYMBOL" != xnone && \
45389       test "x$DEBUG_SYMBOL" != xinternal && \
45390       test "x$DEBUG_SYMBOL" != xexternal; then
45391     as_fn_error $? "Allowed debug symbols are: none, internal, external, zipped" "$LINENO" 5
45392   fi
45393 
45394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_SYMBOL" >&5
45395 $as_echo "$DEBUG_SYMBOL" >&6; }
45396 
45397 
45398 
45399 
45400 
45401 
45402   # Check whether --enable-native-coverage was given.
45403 if test "${enable_native_coverage+set}" = set; then :
45404   enableval=$enable_native_coverage;
45405 fi
45406 
45407   GCOV_ENABLED="false"
45408   if test "x$enable_native_coverage" = "xyes"; then
45409     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
45410       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
45411 $as_echo_n "checking if native coverage is enabled... " >&6; }
45412       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45413 $as_echo "yes" >&6; }
45414       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
45415       GCOV_LDFLAGS="-fprofile-arcs"
45416       LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
45417       LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
45418       LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
45419       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
45420       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
45421       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
45422       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
45423       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
45424       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
45425       GCOV_ENABLED="true"
45426     else
45427       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
45428     fi
45429   elif test "x$enable_native_coverage" = "xno"; then
45430     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
45431 $as_echo_n "checking if native coverage is enabled... " >&6; }
45432     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45433 $as_echo "no" >&6; }
45434   elif test "x$enable_native_coverage" != "x"; then
45435     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
45436   fi
45437 
45438 
45439 
45440 
45441 ###############################################################################
45442 #
45443 # Check dependencies for external and internal libraries.
45444 #
45445 ###############################################################################
45446 
45447 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
45448 
45449   # When using cygwin or msys, we need a wrapper binary that renames
45450   # /cygdrive/c/ arguments into c:/ arguments and peeks into
45451   # @files and rewrites these too! This wrapper binary is
45452   # called fixpath.
45453   FIXPATH=
45454   if test "x$OPENJDK_BUILD_OS" = xwindows; then
45455     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
45456 $as_echo_n "checking if fixpath can be created... " >&6; }
45457     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
45458     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
45459     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
45460     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
45461       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
45462       FIXPATH="$FIXPATH_BIN -c"
45463     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
45464       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
45465       # @ was chosen as separator to minimize risk of other tools messing around with it
45466       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
45467           | tr ' ' '\n' | grep '^/./' | sort | uniq`
45468       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
45469       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
45470     fi
45471     FIXPATH_SRC_W="$FIXPATH_SRC"
45472     FIXPATH_BIN_W="$FIXPATH_BIN"
45473 
45474   unix_path="$FIXPATH_SRC_W"
45475   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45476     windows_path=`$CYGPATH -m "$unix_path"`
45477     FIXPATH_SRC_W="$windows_path"
45478   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45479     windows_path=`cmd //c echo $unix_path`
45480     FIXPATH_SRC_W="$windows_path"
45481   fi
45482 
45483 
45484   unix_path="$FIXPATH_BIN_W"
45485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45486     windows_path=`$CYGPATH -m "$unix_path"`
45487     FIXPATH_BIN_W="$windows_path"
45488   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45489     windows_path=`cmd //c echo $unix_path`
45490     FIXPATH_BIN_W="$windows_path"
45491   fi
45492 
45493     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
45494     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
45495     cd $FIXPATH_DIR
45496     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
45497     cd $CURDIR
45498 
45499     if test ! -x $FIXPATH_BIN; then
45500       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45501 $as_echo "no" >&6; }
45502       cat $FIXPATH_DIR/fixpath1.log
45503       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
45504     fi
45505     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45506 $as_echo "yes" >&6; }
45507     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
45508 $as_echo_n "checking if fixpath.exe works... " >&6; }
45509     cd $FIXPATH_DIR
45510     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
45511         > $FIXPATH_DIR/fixpath2.log 2>&1
45512     cd $CURDIR
45513     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
45514       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45515 $as_echo "no" >&6; }
45516       cat $FIXPATH_DIR/fixpath2.log
45517       as_fn_error $? "fixpath did not work!" "$LINENO" 5
45518     fi
45519     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45520 $as_echo "yes" >&6; }
45521   fi
45522 
45523 
45524 
45525 
45526 
45527   # Check if X11 is needed
45528   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
45529     # No X11 support on windows or macosx
45530     NEEDS_LIB_X11=false
45531   else
45532     if test "x$SUPPORT_HEADFUL" = xno; then
45533       # No X11 support if building headless-only
45534       NEEDS_LIB_X11=false
45535     else
45536       # All other instances need X11
45537       NEEDS_LIB_X11=true
45538     fi
45539   fi
45540 
45541   # Check if cups is needed
45542   if test "x$OPENJDK_TARGET_OS" = xwindows; then
45543     # Windows have a separate print system
45544     NEEDS_LIB_CUPS=false
45545   else
45546     NEEDS_LIB_CUPS=true
45547   fi
45548 
45549   # Check if freetype is needed
45550   if test "x$OPENJDK" = "xtrue"; then
45551     NEEDS_LIB_FREETYPE=true
45552   else
45553     NEEDS_LIB_FREETYPE=false
45554   fi
45555 
45556   # Check if alsa is needed
45557   if test "x$OPENJDK_TARGET_OS" = xlinux; then
45558     NEEDS_LIB_ALSA=true
45559   else
45560     NEEDS_LIB_ALSA=false
45561   fi
45562 
45563   # Check if ffi is needed
45564   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
45565     NEEDS_LIB_FFI=true
45566   else
45567     NEEDS_LIB_FFI=false
45568   fi
45569 
45570 
45571   # statically link libstdc++ before C++ ABI is stablized on Linux unless
45572   # dynamic build is configured on command line.
45573 
45574 # Check whether --with-stdc++lib was given.
45575 if test "${with_stdc__lib+set}" = set; then :
45576   withval=$with_stdc__lib;
45577         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
45578                 && test "x$with_stdc__lib" != xdefault; then
45579           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
45580         fi
45581 
45582 else
45583   with_stdc__lib=default
45584 
45585 fi
45586 
45587 
45588   if test "x$OPENJDK_TARGET_OS" = xlinux; then
45589     # Test if -lstdc++ works.
45590     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
45591 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
45592     ac_ext=cpp
45593 ac_cpp='$CXXCPP $CPPFLAGS'
45594 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45595 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45596 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45597 
45598     OLD_CXXFLAGS="$CXXFLAGS"
45599     CXXFLAGS="$CXXFLAGS -lstdc++"
45600     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45601 /* end confdefs.h.  */
45602 
45603 int
45604 main ()
45605 {
45606 return 0;
45607   ;
45608   return 0;
45609 }
45610 _ACEOF
45611 if ac_fn_cxx_try_link "$LINENO"; then :
45612   has_dynamic_libstdcxx=yes
45613 else
45614   has_dynamic_libstdcxx=no
45615 fi
45616 rm -f core conftest.err conftest.$ac_objext \
45617     conftest$ac_exeext conftest.$ac_ext
45618     CXXFLAGS="$OLD_CXXFLAGS"
45619     ac_ext=cpp
45620 ac_cpp='$CXXCPP $CPPFLAGS'
45621 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45622 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45623 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45624 
45625     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
45626 $as_echo "$has_dynamic_libstdcxx" >&6; }
45627 
45628     # Test if stdc++ can be linked statically.
45629     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
45630 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
45631     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
45632     ac_ext=cpp
45633 ac_cpp='$CXXCPP $CPPFLAGS'
45634 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45635 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45636 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45637 
45638     OLD_LIBS="$LIBS"
45639     OLD_CXX="$CXX"
45640     LIBS="$STATIC_STDCXX_FLAGS"
45641     CXX="$CC"
45642     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45643 /* end confdefs.h.  */
45644 
45645 int
45646 main ()
45647 {
45648 return 0;
45649   ;
45650   return 0;
45651 }
45652 _ACEOF
45653 if ac_fn_cxx_try_link "$LINENO"; then :
45654   has_static_libstdcxx=yes
45655 else
45656   has_static_libstdcxx=no
45657 fi
45658 rm -f core conftest.err conftest.$ac_objext \
45659     conftest$ac_exeext conftest.$ac_ext
45660     LIBS="$OLD_LIBS"
45661     CXX="$OLD_CXX"
45662     ac_ext=cpp
45663 ac_cpp='$CXXCPP $CPPFLAGS'
45664 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45665 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45666 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45667 
45668     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
45669 $as_echo "$has_static_libstdcxx" >&6; }
45670 
45671     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
45672       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
45673     fi
45674 
45675     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
45676       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
45677     fi
45678 
45679     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
45680       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
45681     fi
45682 
45683     # If dynamic was requested, it's available since it would fail above otherwise.
45684     # If dynamic wasn't requested, go with static unless it isn't available.
45685     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
45686 $as_echo_n "checking how to link with libstdc++... " >&6; }
45687     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
45688       LIBCXX="$LIBCXX -lstdc++"
45689       LDCXX="$CXX"
45690       STATIC_CXX_SETTING="STATIC_CXX=false"
45691       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
45692 $as_echo "dynamic" >&6; }
45693     else
45694       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
45695       LDCXX="$CC"
45696       STATIC_CXX_SETTING="STATIC_CXX=true"
45697       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
45698 $as_echo "static" >&6; }
45699     fi
45700   fi
45701 
45702 
45703   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
45704   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
45705     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
45706   fi
45707 
45708   # TODO better (platform agnostic) test
45709   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
45710     LIBCXX="-lstdc++"
45711   fi
45712 
45713 
45714   # Setup Windows runtime dlls
45715   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
45716 
45717 
45718 # Check whether --with-msvcr-dll was given.
45719 if test "${with_msvcr_dll+set}" = set; then :
45720   withval=$with_msvcr_dll;
45721 fi
45722 
45723 
45724   if test "x$with_msvcr_dll" != x; then
45725     # If given explicitely by user, do not probe. If not present, fail directly.
45726 
45727   DLL_NAME="$MSVCR_NAME"
45728   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
45729   METHOD="--with-msvcr-dll"
45730   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45731     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45732 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45733 
45734     # Need to check if the found msvcr is correct architecture
45735     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45736 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45737     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45738     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45739       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45740       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45741       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45742         CORRECT_MSVCR_ARCH="PE32 executable"
45743       else
45744         CORRECT_MSVCR_ARCH="PE32+ executable"
45745       fi
45746     else
45747       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45748         CORRECT_MSVCR_ARCH=386
45749       else
45750         CORRECT_MSVCR_ARCH=x86-64
45751       fi
45752     fi
45753     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45754       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45755 $as_echo "ok" >&6; }
45756       MSVC_DLL="$POSSIBLE_MSVC_DLL"
45757 
45758   # Only process if variable expands to non-empty
45759 
45760   if test "x$MSVC_DLL" != x; then
45761     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45762 
45763   # Input might be given as Windows format, start by converting to
45764   # unix format.
45765   path="$MSVC_DLL"
45766   new_path=`$CYGPATH -u "$path"`
45767 
45768   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45769   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45770   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45771   # "foo.exe" is OK but "foo" is an error.
45772   #
45773   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45774   # It is also a way to make sure we got the proper file name for the real test later on.
45775   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45776   if test "x$test_shortpath" = x; then
45777     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45778 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45779     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45780   fi
45781 
45782   # Call helper function which possibly converts this using DOS-style short mode.
45783   # If so, the updated path is stored in $new_path.
45784 
45785   input_path="$new_path"
45786   # Check if we need to convert this using DOS-style short mode. If the path
45787   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45788   # take no chances and rewrite it.
45789   # Note: m4 eats our [], so we need to use [ and ] instead.
45790   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45791   if test "x$has_forbidden_chars" != x; then
45792     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45793     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45794     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45795     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45796       # Going to short mode and back again did indeed matter. Since short mode is
45797       # case insensitive, let's make it lowercase to improve readability.
45798       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45799       # Now convert it back to Unix-style (cygpath)
45800       input_path=`$CYGPATH -u "$shortmode_path"`
45801       new_path="$input_path"
45802     fi
45803   fi
45804 
45805   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45806   if test "x$test_cygdrive_prefix" = x; then
45807     # As a simple fix, exclude /usr/bin since it's not a real path.
45808     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45809       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45810       # a path prefixed by /cygdrive for fixpath to work.
45811       new_path="$CYGWIN_ROOT_PATH$input_path"
45812     fi
45813   fi
45814 
45815 
45816   if test "x$path" != "x$new_path"; then
45817     MSVC_DLL="$new_path"
45818     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45819 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45820   fi
45821 
45822     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45823 
45824   path="$MSVC_DLL"
45825   has_colon=`$ECHO $path | $GREP ^.:`
45826   new_path="$path"
45827   if test "x$has_colon" = x; then
45828     # Not in mixed or Windows style, start by that.
45829     new_path=`cmd //c echo $path`
45830   fi
45831 
45832 
45833   input_path="$new_path"
45834   # Check if we need to convert this using DOS-style short mode. If the path
45835   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45836   # take no chances and rewrite it.
45837   # Note: m4 eats our [], so we need to use [ and ] instead.
45838   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45839   if test "x$has_forbidden_chars" != x; then
45840     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45841     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45842   fi
45843 
45844 
45845   windows_path="$new_path"
45846   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45847     unix_path=`$CYGPATH -u "$windows_path"`
45848     new_path="$unix_path"
45849   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45850     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45851     new_path="$unix_path"
45852   fi
45853 
45854   if test "x$path" != "x$new_path"; then
45855     MSVC_DLL="$new_path"
45856     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45857 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45858   fi
45859 
45860   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45861   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45862 
45863     else
45864       # We're on a unix platform. Hooray! :)
45865       path="$MSVC_DLL"
45866       has_space=`$ECHO "$path" | $GREP " "`
45867       if test "x$has_space" != x; then
45868         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45869 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45870         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45871       fi
45872 
45873       # Use eval to expand a potential ~
45874       eval path="$path"
45875       if test ! -f "$path" && test ! -d "$path"; then
45876         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45877       fi
45878 
45879       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45880     fi
45881   fi
45882 
45883       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45884 $as_echo_n "checking for $DLL_NAME... " >&6; }
45885       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45886 $as_echo "$MSVC_DLL" >&6; }
45887     else
45888       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45889 $as_echo "incorrect, ignoring" >&6; }
45890       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45891 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45892     fi
45893   fi
45894 
45895     if test "x$MSVC_DLL" = x; then
45896       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
45897     fi
45898     MSVCR_DLL="$MSVC_DLL"
45899   elif test "x$DEVKIT_MSVCR_DLL" != x; then
45900 
45901   DLL_NAME="$MSVCR_NAME"
45902   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
45903   METHOD="devkit"
45904   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45905     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45906 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45907 
45908     # Need to check if the found msvcr is correct architecture
45909     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45910 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45911     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45912     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45913       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45914       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45915       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45916         CORRECT_MSVCR_ARCH="PE32 executable"
45917       else
45918         CORRECT_MSVCR_ARCH="PE32+ executable"
45919       fi
45920     else
45921       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45922         CORRECT_MSVCR_ARCH=386
45923       else
45924         CORRECT_MSVCR_ARCH=x86-64
45925       fi
45926     fi
45927     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45928       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45929 $as_echo "ok" >&6; }
45930       MSVC_DLL="$POSSIBLE_MSVC_DLL"
45931 
45932   # Only process if variable expands to non-empty
45933 
45934   if test "x$MSVC_DLL" != x; then
45935     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45936 
45937   # Input might be given as Windows format, start by converting to
45938   # unix format.
45939   path="$MSVC_DLL"
45940   new_path=`$CYGPATH -u "$path"`
45941 
45942   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45943   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45944   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45945   # "foo.exe" is OK but "foo" is an error.
45946   #
45947   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45948   # It is also a way to make sure we got the proper file name for the real test later on.
45949   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45950   if test "x$test_shortpath" = x; then
45951     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45952 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45953     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45954   fi
45955 
45956   # Call helper function which possibly converts this using DOS-style short mode.
45957   # If so, the updated path is stored in $new_path.
45958 
45959   input_path="$new_path"
45960   # Check if we need to convert this using DOS-style short mode. If the path
45961   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45962   # take no chances and rewrite it.
45963   # Note: m4 eats our [], so we need to use [ and ] instead.
45964   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45965   if test "x$has_forbidden_chars" != x; then
45966     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45967     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45968     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45969     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45970       # Going to short mode and back again did indeed matter. Since short mode is
45971       # case insensitive, let's make it lowercase to improve readability.
45972       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45973       # Now convert it back to Unix-style (cygpath)
45974       input_path=`$CYGPATH -u "$shortmode_path"`
45975       new_path="$input_path"
45976     fi
45977   fi
45978 
45979   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45980   if test "x$test_cygdrive_prefix" = x; then
45981     # As a simple fix, exclude /usr/bin since it's not a real path.
45982     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45983       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45984       # a path prefixed by /cygdrive for fixpath to work.
45985       new_path="$CYGWIN_ROOT_PATH$input_path"
45986     fi
45987   fi
45988 
45989 
45990   if test "x$path" != "x$new_path"; then
45991     MSVC_DLL="$new_path"
45992     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45993 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45994   fi
45995 
45996     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45997 
45998   path="$MSVC_DLL"
45999   has_colon=`$ECHO $path | $GREP ^.:`
46000   new_path="$path"
46001   if test "x$has_colon" = x; then
46002     # Not in mixed or Windows style, start by that.
46003     new_path=`cmd //c echo $path`
46004   fi
46005 
46006 
46007   input_path="$new_path"
46008   # Check if we need to convert this using DOS-style short mode. If the path
46009   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46010   # take no chances and rewrite it.
46011   # Note: m4 eats our [], so we need to use [ and ] instead.
46012   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46013   if test "x$has_forbidden_chars" != x; then
46014     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46015     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46016   fi
46017 
46018 
46019   windows_path="$new_path"
46020   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46021     unix_path=`$CYGPATH -u "$windows_path"`
46022     new_path="$unix_path"
46023   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46024     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46025     new_path="$unix_path"
46026   fi
46027 
46028   if test "x$path" != "x$new_path"; then
46029     MSVC_DLL="$new_path"
46030     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46031 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46032   fi
46033 
46034   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46035   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46036 
46037     else
46038       # We're on a unix platform. Hooray! :)
46039       path="$MSVC_DLL"
46040       has_space=`$ECHO "$path" | $GREP " "`
46041       if test "x$has_space" != x; then
46042         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46043 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46044         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46045       fi
46046 
46047       # Use eval to expand a potential ~
46048       eval path="$path"
46049       if test ! -f "$path" && test ! -d "$path"; then
46050         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46051       fi
46052 
46053       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46054     fi
46055   fi
46056 
46057       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46058 $as_echo_n "checking for $DLL_NAME... " >&6; }
46059       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46060 $as_echo "$MSVC_DLL" >&6; }
46061     else
46062       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46063 $as_echo "incorrect, ignoring" >&6; }
46064       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46065 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46066     fi
46067   fi
46068 
46069     if test "x$MSVC_DLL" = x; then
46070       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
46071     fi
46072     MSVCR_DLL="$MSVC_DLL"
46073   else
46074 
46075   DLL_NAME="${MSVCR_NAME}"
46076   MSVC_DLL=
46077 
46078   if test "x$MSVC_DLL" = x; then
46079     # Probe: Using well-known location from Visual Studio 10.0
46080     if test "x$VCINSTALLDIR" != x; then
46081       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
46082 
46083   windows_path="$CYGWIN_VC_INSTALL_DIR"
46084   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46085     unix_path=`$CYGPATH -u "$windows_path"`
46086     CYGWIN_VC_INSTALL_DIR="$unix_path"
46087   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46088     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46089     CYGWIN_VC_INSTALL_DIR="$unix_path"
46090   fi
46091 
46092       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46093         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
46094       else
46095         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
46096       fi
46097       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
46098 
46099   DLL_NAME="$DLL_NAME"
46100   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46101   METHOD="well-known location in VCINSTALLDIR"
46102   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46103     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46104 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46105 
46106     # Need to check if the found msvcr is correct architecture
46107     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46108 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46109     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46110     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46111       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46112       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46113       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46114         CORRECT_MSVCR_ARCH="PE32 executable"
46115       else
46116         CORRECT_MSVCR_ARCH="PE32+ executable"
46117       fi
46118     else
46119       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46120         CORRECT_MSVCR_ARCH=386
46121       else
46122         CORRECT_MSVCR_ARCH=x86-64
46123       fi
46124     fi
46125     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46126       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46127 $as_echo "ok" >&6; }
46128       MSVC_DLL="$POSSIBLE_MSVC_DLL"
46129 
46130   # Only process if variable expands to non-empty
46131 
46132   if test "x$MSVC_DLL" != x; then
46133     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46134 
46135   # Input might be given as Windows format, start by converting to
46136   # unix format.
46137   path="$MSVC_DLL"
46138   new_path=`$CYGPATH -u "$path"`
46139 
46140   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46141   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46142   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46143   # "foo.exe" is OK but "foo" is an error.
46144   #
46145   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46146   # It is also a way to make sure we got the proper file name for the real test later on.
46147   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46148   if test "x$test_shortpath" = x; then
46149     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46150 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46151     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46152   fi
46153 
46154   # Call helper function which possibly converts this using DOS-style short mode.
46155   # If so, the updated path is stored in $new_path.
46156 
46157   input_path="$new_path"
46158   # Check if we need to convert this using DOS-style short mode. If the path
46159   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46160   # take no chances and rewrite it.
46161   # Note: m4 eats our [], so we need to use [ and ] instead.
46162   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46163   if test "x$has_forbidden_chars" != x; then
46164     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46165     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46166     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46167     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46168       # Going to short mode and back again did indeed matter. Since short mode is
46169       # case insensitive, let's make it lowercase to improve readability.
46170       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46171       # Now convert it back to Unix-style (cygpath)
46172       input_path=`$CYGPATH -u "$shortmode_path"`
46173       new_path="$input_path"
46174     fi
46175   fi
46176 
46177   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46178   if test "x$test_cygdrive_prefix" = x; then
46179     # As a simple fix, exclude /usr/bin since it's not a real path.
46180     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46181       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46182       # a path prefixed by /cygdrive for fixpath to work.
46183       new_path="$CYGWIN_ROOT_PATH$input_path"
46184     fi
46185   fi
46186 
46187 
46188   if test "x$path" != "x$new_path"; then
46189     MSVC_DLL="$new_path"
46190     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46191 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46192   fi
46193 
46194     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46195 
46196   path="$MSVC_DLL"
46197   has_colon=`$ECHO $path | $GREP ^.:`
46198   new_path="$path"
46199   if test "x$has_colon" = x; then
46200     # Not in mixed or Windows style, start by that.
46201     new_path=`cmd //c echo $path`
46202   fi
46203 
46204 
46205   input_path="$new_path"
46206   # Check if we need to convert this using DOS-style short mode. If the path
46207   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46208   # take no chances and rewrite it.
46209   # Note: m4 eats our [], so we need to use [ and ] instead.
46210   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46211   if test "x$has_forbidden_chars" != x; then
46212     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46213     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46214   fi
46215 
46216 
46217   windows_path="$new_path"
46218   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46219     unix_path=`$CYGPATH -u "$windows_path"`
46220     new_path="$unix_path"
46221   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46222     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46223     new_path="$unix_path"
46224   fi
46225 
46226   if test "x$path" != "x$new_path"; then
46227     MSVC_DLL="$new_path"
46228     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46229 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46230   fi
46231 
46232   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46233   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46234 
46235     else
46236       # We're on a unix platform. Hooray! :)
46237       path="$MSVC_DLL"
46238       has_space=`$ECHO "$path" | $GREP " "`
46239       if test "x$has_space" != x; then
46240         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46241 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46242         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46243       fi
46244 
46245       # Use eval to expand a potential ~
46246       eval path="$path"
46247       if test ! -f "$path" && test ! -d "$path"; then
46248         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46249       fi
46250 
46251       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46252     fi
46253   fi
46254 
46255       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46256 $as_echo_n "checking for $DLL_NAME... " >&6; }
46257       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46258 $as_echo "$MSVC_DLL" >&6; }
46259     else
46260       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46261 $as_echo "incorrect, ignoring" >&6; }
46262       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46263 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46264     fi
46265   fi
46266 
46267     fi
46268   fi
46269 
46270   if test "x$MSVC_DLL" = x; then
46271     # Probe: Check in the Boot JDK directory.
46272     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
46273 
46274   DLL_NAME="$DLL_NAME"
46275   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46276   METHOD="well-known location in Boot JDK"
46277   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46278     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46279 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46280 
46281     # Need to check if the found msvcr is correct architecture
46282     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46283 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46284     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46285     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46286       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46287       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46288       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46289         CORRECT_MSVCR_ARCH="PE32 executable"
46290       else
46291         CORRECT_MSVCR_ARCH="PE32+ executable"
46292       fi
46293     else
46294       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46295         CORRECT_MSVCR_ARCH=386
46296       else
46297         CORRECT_MSVCR_ARCH=x86-64
46298       fi
46299     fi
46300     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46301       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46302 $as_echo "ok" >&6; }
46303       MSVC_DLL="$POSSIBLE_MSVC_DLL"
46304 
46305   # Only process if variable expands to non-empty
46306 
46307   if test "x$MSVC_DLL" != x; then
46308     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46309 
46310   # Input might be given as Windows format, start by converting to
46311   # unix format.
46312   path="$MSVC_DLL"
46313   new_path=`$CYGPATH -u "$path"`
46314 
46315   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46316   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46317   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46318   # "foo.exe" is OK but "foo" is an error.
46319   #
46320   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46321   # It is also a way to make sure we got the proper file name for the real test later on.
46322   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46323   if test "x$test_shortpath" = x; then
46324     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46325 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46326     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46327   fi
46328 
46329   # Call helper function which possibly converts this using DOS-style short mode.
46330   # If so, the updated path is stored in $new_path.
46331 
46332   input_path="$new_path"
46333   # Check if we need to convert this using DOS-style short mode. If the path
46334   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46335   # take no chances and rewrite it.
46336   # Note: m4 eats our [], so we need to use [ and ] instead.
46337   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46338   if test "x$has_forbidden_chars" != x; then
46339     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46340     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46341     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46342     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46343       # Going to short mode and back again did indeed matter. Since short mode is
46344       # case insensitive, let's make it lowercase to improve readability.
46345       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46346       # Now convert it back to Unix-style (cygpath)
46347       input_path=`$CYGPATH -u "$shortmode_path"`
46348       new_path="$input_path"
46349     fi
46350   fi
46351 
46352   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46353   if test "x$test_cygdrive_prefix" = x; then
46354     # As a simple fix, exclude /usr/bin since it's not a real path.
46355     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46356       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46357       # a path prefixed by /cygdrive for fixpath to work.
46358       new_path="$CYGWIN_ROOT_PATH$input_path"
46359     fi
46360   fi
46361 
46362 
46363   if test "x$path" != "x$new_path"; then
46364     MSVC_DLL="$new_path"
46365     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46366 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46367   fi
46368 
46369     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46370 
46371   path="$MSVC_DLL"
46372   has_colon=`$ECHO $path | $GREP ^.:`
46373   new_path="$path"
46374   if test "x$has_colon" = x; then
46375     # Not in mixed or Windows style, start by that.
46376     new_path=`cmd //c echo $path`
46377   fi
46378 
46379 
46380   input_path="$new_path"
46381   # Check if we need to convert this using DOS-style short mode. If the path
46382   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46383   # take no chances and rewrite it.
46384   # Note: m4 eats our [], so we need to use [ and ] instead.
46385   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46386   if test "x$has_forbidden_chars" != x; then
46387     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46388     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46389   fi
46390 
46391 
46392   windows_path="$new_path"
46393   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46394     unix_path=`$CYGPATH -u "$windows_path"`
46395     new_path="$unix_path"
46396   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46397     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46398     new_path="$unix_path"
46399   fi
46400 
46401   if test "x$path" != "x$new_path"; then
46402     MSVC_DLL="$new_path"
46403     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46404 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46405   fi
46406 
46407   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46408   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46409 
46410     else
46411       # We're on a unix platform. Hooray! :)
46412       path="$MSVC_DLL"
46413       has_space=`$ECHO "$path" | $GREP " "`
46414       if test "x$has_space" != x; then
46415         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46416 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46417         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46418       fi
46419 
46420       # Use eval to expand a potential ~
46421       eval path="$path"
46422       if test ! -f "$path" && test ! -d "$path"; then
46423         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46424       fi
46425 
46426       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46427     fi
46428   fi
46429 
46430       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46431 $as_echo_n "checking for $DLL_NAME... " >&6; }
46432       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46433 $as_echo "$MSVC_DLL" >&6; }
46434     else
46435       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46436 $as_echo "incorrect, ignoring" >&6; }
46437       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46438 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46439     fi
46440   fi
46441 
46442   fi
46443 
46444   if test "x$MSVC_DLL" = x; then
46445     # Probe: Look in the Windows system32 directory
46446     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
46447 
46448   windows_path="$CYGWIN_SYSTEMROOT"
46449   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46450     unix_path=`$CYGPATH -u "$windows_path"`
46451     CYGWIN_SYSTEMROOT="$unix_path"
46452   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46453     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46454     CYGWIN_SYSTEMROOT="$unix_path"
46455   fi
46456 
46457     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
46458 
46459   DLL_NAME="$DLL_NAME"
46460   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46461   METHOD="well-known location in SYSTEMROOT"
46462   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46463     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46464 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46465 
46466     # Need to check if the found msvcr is correct architecture
46467     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46468 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46469     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46470     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46471       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46472       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46473       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46474         CORRECT_MSVCR_ARCH="PE32 executable"
46475       else
46476         CORRECT_MSVCR_ARCH="PE32+ executable"
46477       fi
46478     else
46479       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46480         CORRECT_MSVCR_ARCH=386
46481       else
46482         CORRECT_MSVCR_ARCH=x86-64
46483       fi
46484     fi
46485     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46486       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46487 $as_echo "ok" >&6; }
46488       MSVC_DLL="$POSSIBLE_MSVC_DLL"
46489 
46490   # Only process if variable expands to non-empty
46491 
46492   if test "x$MSVC_DLL" != x; then
46493     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46494 
46495   # Input might be given as Windows format, start by converting to
46496   # unix format.
46497   path="$MSVC_DLL"
46498   new_path=`$CYGPATH -u "$path"`
46499 
46500   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46501   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46502   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46503   # "foo.exe" is OK but "foo" is an error.
46504   #
46505   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46506   # It is also a way to make sure we got the proper file name for the real test later on.
46507   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46508   if test "x$test_shortpath" = x; then
46509     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46510 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46511     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46512   fi
46513 
46514   # Call helper function which possibly converts this using DOS-style short mode.
46515   # If so, the updated path is stored in $new_path.
46516 
46517   input_path="$new_path"
46518   # Check if we need to convert this using DOS-style short mode. If the path
46519   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46520   # take no chances and rewrite it.
46521   # Note: m4 eats our [], so we need to use [ and ] instead.
46522   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46523   if test "x$has_forbidden_chars" != x; then
46524     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46525     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46526     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46527     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46528       # Going to short mode and back again did indeed matter. Since short mode is
46529       # case insensitive, let's make it lowercase to improve readability.
46530       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46531       # Now convert it back to Unix-style (cygpath)
46532       input_path=`$CYGPATH -u "$shortmode_path"`
46533       new_path="$input_path"
46534     fi
46535   fi
46536 
46537   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46538   if test "x$test_cygdrive_prefix" = x; then
46539     # As a simple fix, exclude /usr/bin since it's not a real path.
46540     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46541       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46542       # a path prefixed by /cygdrive for fixpath to work.
46543       new_path="$CYGWIN_ROOT_PATH$input_path"
46544     fi
46545   fi
46546 
46547 
46548   if test "x$path" != "x$new_path"; then
46549     MSVC_DLL="$new_path"
46550     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46551 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46552   fi
46553 
46554     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46555 
46556   path="$MSVC_DLL"
46557   has_colon=`$ECHO $path | $GREP ^.:`
46558   new_path="$path"
46559   if test "x$has_colon" = x; then
46560     # Not in mixed or Windows style, start by that.
46561     new_path=`cmd //c echo $path`
46562   fi
46563 
46564 
46565   input_path="$new_path"
46566   # Check if we need to convert this using DOS-style short mode. If the path
46567   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46568   # take no chances and rewrite it.
46569   # Note: m4 eats our [], so we need to use [ and ] instead.
46570   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46571   if test "x$has_forbidden_chars" != x; then
46572     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46573     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46574   fi
46575 
46576 
46577   windows_path="$new_path"
46578   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46579     unix_path=`$CYGPATH -u "$windows_path"`
46580     new_path="$unix_path"
46581   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46582     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46583     new_path="$unix_path"
46584   fi
46585 
46586   if test "x$path" != "x$new_path"; then
46587     MSVC_DLL="$new_path"
46588     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46589 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46590   fi
46591 
46592   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46593   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46594 
46595     else
46596       # We're on a unix platform. Hooray! :)
46597       path="$MSVC_DLL"
46598       has_space=`$ECHO "$path" | $GREP " "`
46599       if test "x$has_space" != x; then
46600         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46601 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46602         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46603       fi
46604 
46605       # Use eval to expand a potential ~
46606       eval path="$path"
46607       if test ! -f "$path" && test ! -d "$path"; then
46608         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46609       fi
46610 
46611       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46612     fi
46613   fi
46614 
46615       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46616 $as_echo_n "checking for $DLL_NAME... " >&6; }
46617       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46618 $as_echo "$MSVC_DLL" >&6; }
46619     else
46620       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46621 $as_echo "incorrect, ignoring" >&6; }
46622       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46623 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46624     fi
46625   fi
46626 
46627   fi
46628 
46629   if test "x$MSVC_DLL" = x; then
46630     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
46631     if test "x$VS100COMNTOOLS" != x; then
46632       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
46633 
46634   windows_path="$CYGWIN_VS_TOOLS_DIR"
46635   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46636     unix_path=`$CYGPATH -u "$windows_path"`
46637     CYGWIN_VS_TOOLS_DIR="$unix_path"
46638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46639     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46640     CYGWIN_VS_TOOLS_DIR="$unix_path"
46641   fi
46642 
46643       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46644         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
46645             | $GREP -i /x64/ | $HEAD --lines 1`
46646       else
46647         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
46648             | $GREP -i /x86/ | $HEAD --lines 1`
46649       fi
46650 
46651   DLL_NAME="$DLL_NAME"
46652   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46653   METHOD="search of VS100COMNTOOLS"
46654   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46655     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46656 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46657 
46658     # Need to check if the found msvcr is correct architecture
46659     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46660 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46661     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46662     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46663       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46664       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46665       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46666         CORRECT_MSVCR_ARCH="PE32 executable"
46667       else
46668         CORRECT_MSVCR_ARCH="PE32+ executable"
46669       fi
46670     else
46671       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46672         CORRECT_MSVCR_ARCH=386
46673       else
46674         CORRECT_MSVCR_ARCH=x86-64
46675       fi
46676     fi
46677     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46678       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46679 $as_echo "ok" >&6; }
46680       MSVC_DLL="$POSSIBLE_MSVC_DLL"
46681 
46682   # Only process if variable expands to non-empty
46683 
46684   if test "x$MSVC_DLL" != x; then
46685     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46686 
46687   # Input might be given as Windows format, start by converting to
46688   # unix format.
46689   path="$MSVC_DLL"
46690   new_path=`$CYGPATH -u "$path"`
46691 
46692   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46693   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46694   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46695   # "foo.exe" is OK but "foo" is an error.
46696   #
46697   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46698   # It is also a way to make sure we got the proper file name for the real test later on.
46699   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46700   if test "x$test_shortpath" = x; then
46701     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46702 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46703     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46704   fi
46705 
46706   # Call helper function which possibly converts this using DOS-style short mode.
46707   # If so, the updated path is stored in $new_path.
46708 
46709   input_path="$new_path"
46710   # Check if we need to convert this using DOS-style short mode. If the path
46711   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46712   # take no chances and rewrite it.
46713   # Note: m4 eats our [], so we need to use [ and ] instead.
46714   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46715   if test "x$has_forbidden_chars" != x; then
46716     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46717     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46718     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46719     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46720       # Going to short mode and back again did indeed matter. Since short mode is
46721       # case insensitive, let's make it lowercase to improve readability.
46722       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46723       # Now convert it back to Unix-style (cygpath)
46724       input_path=`$CYGPATH -u "$shortmode_path"`
46725       new_path="$input_path"
46726     fi
46727   fi
46728 
46729   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46730   if test "x$test_cygdrive_prefix" = x; then
46731     # As a simple fix, exclude /usr/bin since it's not a real path.
46732     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46733       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46734       # a path prefixed by /cygdrive for fixpath to work.
46735       new_path="$CYGWIN_ROOT_PATH$input_path"
46736     fi
46737   fi
46738 
46739 
46740   if test "x$path" != "x$new_path"; then
46741     MSVC_DLL="$new_path"
46742     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46743 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46744   fi
46745 
46746     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46747 
46748   path="$MSVC_DLL"
46749   has_colon=`$ECHO $path | $GREP ^.:`
46750   new_path="$path"
46751   if test "x$has_colon" = x; then
46752     # Not in mixed or Windows style, start by that.
46753     new_path=`cmd //c echo $path`
46754   fi
46755 
46756 
46757   input_path="$new_path"
46758   # Check if we need to convert this using DOS-style short mode. If the path
46759   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46760   # take no chances and rewrite it.
46761   # Note: m4 eats our [], so we need to use [ and ] instead.
46762   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46763   if test "x$has_forbidden_chars" != x; then
46764     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46765     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46766   fi
46767 
46768 
46769   windows_path="$new_path"
46770   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46771     unix_path=`$CYGPATH -u "$windows_path"`
46772     new_path="$unix_path"
46773   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46774     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46775     new_path="$unix_path"
46776   fi
46777 
46778   if test "x$path" != "x$new_path"; then
46779     MSVC_DLL="$new_path"
46780     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46781 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46782   fi
46783 
46784   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46785   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46786 
46787     else
46788       # We're on a unix platform. Hooray! :)
46789       path="$MSVC_DLL"
46790       has_space=`$ECHO "$path" | $GREP " "`
46791       if test "x$has_space" != x; then
46792         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46793 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46794         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46795       fi
46796 
46797       # Use eval to expand a potential ~
46798       eval path="$path"
46799       if test ! -f "$path" && test ! -d "$path"; then
46800         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46801       fi
46802 
46803       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46804     fi
46805   fi
46806 
46807       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46808 $as_echo_n "checking for $DLL_NAME... " >&6; }
46809       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46810 $as_echo "$MSVC_DLL" >&6; }
46811     else
46812       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46813 $as_echo "incorrect, ignoring" >&6; }
46814       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46815 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46816     fi
46817   fi
46818 
46819     fi
46820   fi
46821 
46822   if test "x$MSVC_DLL" = x; then
46823     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
46824     # (This was the original behaviour; kept since it might turn something up)
46825     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
46826       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46827         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46828             | $GREP x64 | $HEAD --lines 1`
46829       else
46830         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46831             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
46832         if test "x$POSSIBLE_MSVC_DLL" = x; then
46833           # We're grasping at straws now...
46834           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46835               | $HEAD --lines 1`
46836         fi
46837       fi
46838 
46839 
46840   DLL_NAME="$DLL_NAME"
46841   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46842   METHOD="search of VCINSTALLDIR"
46843   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46844     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46845 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46846 
46847     # Need to check if the found msvcr is correct architecture
46848     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46849 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46850     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46851     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46852       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46853       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46854       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46855         CORRECT_MSVCR_ARCH="PE32 executable"
46856       else
46857         CORRECT_MSVCR_ARCH="PE32+ executable"
46858       fi
46859     else
46860       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46861         CORRECT_MSVCR_ARCH=386
46862       else
46863         CORRECT_MSVCR_ARCH=x86-64
46864       fi
46865     fi
46866     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46867       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46868 $as_echo "ok" >&6; }
46869       MSVC_DLL="$POSSIBLE_MSVC_DLL"
46870 
46871   # Only process if variable expands to non-empty
46872 
46873   if test "x$MSVC_DLL" != x; then
46874     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46875 
46876   # Input might be given as Windows format, start by converting to
46877   # unix format.
46878   path="$MSVC_DLL"
46879   new_path=`$CYGPATH -u "$path"`
46880 
46881   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46882   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46883   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46884   # "foo.exe" is OK but "foo" is an error.
46885   #
46886   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46887   # It is also a way to make sure we got the proper file name for the real test later on.
46888   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46889   if test "x$test_shortpath" = x; then
46890     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46891 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46892     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46893   fi
46894 
46895   # Call helper function which possibly converts this using DOS-style short mode.
46896   # If so, the updated path is stored in $new_path.
46897 
46898   input_path="$new_path"
46899   # Check if we need to convert this using DOS-style short mode. If the path
46900   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46901   # take no chances and rewrite it.
46902   # Note: m4 eats our [], so we need to use [ and ] instead.
46903   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46904   if test "x$has_forbidden_chars" != x; then
46905     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46906     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46907     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46908     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46909       # Going to short mode and back again did indeed matter. Since short mode is
46910       # case insensitive, let's make it lowercase to improve readability.
46911       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46912       # Now convert it back to Unix-style (cygpath)
46913       input_path=`$CYGPATH -u "$shortmode_path"`
46914       new_path="$input_path"
46915     fi
46916   fi
46917 
46918   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46919   if test "x$test_cygdrive_prefix" = x; then
46920     # As a simple fix, exclude /usr/bin since it's not a real path.
46921     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46922       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46923       # a path prefixed by /cygdrive for fixpath to work.
46924       new_path="$CYGWIN_ROOT_PATH$input_path"
46925     fi
46926   fi
46927 
46928 
46929   if test "x$path" != "x$new_path"; then
46930     MSVC_DLL="$new_path"
46931     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46932 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46933   fi
46934 
46935     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46936 
46937   path="$MSVC_DLL"
46938   has_colon=`$ECHO $path | $GREP ^.:`
46939   new_path="$path"
46940   if test "x$has_colon" = x; then
46941     # Not in mixed or Windows style, start by that.
46942     new_path=`cmd //c echo $path`
46943   fi
46944 
46945 
46946   input_path="$new_path"
46947   # Check if we need to convert this using DOS-style short mode. If the path
46948   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46949   # take no chances and rewrite it.
46950   # Note: m4 eats our [], so we need to use [ and ] instead.
46951   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46952   if test "x$has_forbidden_chars" != x; then
46953     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46954     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46955   fi
46956 
46957 
46958   windows_path="$new_path"
46959   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46960     unix_path=`$CYGPATH -u "$windows_path"`
46961     new_path="$unix_path"
46962   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46963     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46964     new_path="$unix_path"
46965   fi
46966 
46967   if test "x$path" != "x$new_path"; then
46968     MSVC_DLL="$new_path"
46969     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46970 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46971   fi
46972 
46973   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46974   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46975 
46976     else
46977       # We're on a unix platform. Hooray! :)
46978       path="$MSVC_DLL"
46979       has_space=`$ECHO "$path" | $GREP " "`
46980       if test "x$has_space" != x; then
46981         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46982 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46983         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46984       fi
46985 
46986       # Use eval to expand a potential ~
46987       eval path="$path"
46988       if test ! -f "$path" && test ! -d "$path"; then
46989         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46990       fi
46991 
46992       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46993     fi
46994   fi
46995 
46996       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46997 $as_echo_n "checking for $DLL_NAME... " >&6; }
46998       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46999 $as_echo "$MSVC_DLL" >&6; }
47000     else
47001       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47002 $as_echo "incorrect, ignoring" >&6; }
47003       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47004 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47005     fi
47006   fi
47007 
47008     fi
47009   fi
47010 
47011   if test "x$MSVC_DLL" = x; then
47012     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47013 $as_echo_n "checking for $DLL_NAME... " >&6; }
47014     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47015 $as_echo "no" >&6; }
47016     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
47017   fi
47018 
47019     MSVCR_DLL="$MSVC_DLL"
47020   fi
47021 
47022 
47023 
47024 # Check whether --with-msvcp-dll was given.
47025 if test "${with_msvcp_dll+set}" = set; then :
47026   withval=$with_msvcp_dll;
47027 fi
47028 
47029 
47030   if test "x$MSVCP_NAME" != "x"; then
47031     if test "x$with_msvcp_dll" != x; then
47032       # If given explicitely by user, do not probe. If not present, fail directly.
47033 
47034   DLL_NAME="$MSVCP_NAME"
47035   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
47036   METHOD="--with-msvcp-dll"
47037   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47038     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47039 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47040 
47041     # Need to check if the found msvcr is correct architecture
47042     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47043 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47044     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47045     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47046       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47047       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47048       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47049         CORRECT_MSVCR_ARCH="PE32 executable"
47050       else
47051         CORRECT_MSVCR_ARCH="PE32+ executable"
47052       fi
47053     else
47054       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47055         CORRECT_MSVCR_ARCH=386
47056       else
47057         CORRECT_MSVCR_ARCH=x86-64
47058       fi
47059     fi
47060     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47061       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47062 $as_echo "ok" >&6; }
47063       MSVC_DLL="$POSSIBLE_MSVC_DLL"
47064 
47065   # Only process if variable expands to non-empty
47066 
47067   if test "x$MSVC_DLL" != x; then
47068     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47069 
47070   # Input might be given as Windows format, start by converting to
47071   # unix format.
47072   path="$MSVC_DLL"
47073   new_path=`$CYGPATH -u "$path"`
47074 
47075   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47076   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47077   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47078   # "foo.exe" is OK but "foo" is an error.
47079   #
47080   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47081   # It is also a way to make sure we got the proper file name for the real test later on.
47082   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47083   if test "x$test_shortpath" = x; then
47084     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47085 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47086     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47087   fi
47088 
47089   # Call helper function which possibly converts this using DOS-style short mode.
47090   # If so, the updated path is stored in $new_path.
47091 
47092   input_path="$new_path"
47093   # Check if we need to convert this using DOS-style short mode. If the path
47094   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47095   # take no chances and rewrite it.
47096   # Note: m4 eats our [], so we need to use [ and ] instead.
47097   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47098   if test "x$has_forbidden_chars" != x; then
47099     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47100     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47101     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47102     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47103       # Going to short mode and back again did indeed matter. Since short mode is
47104       # case insensitive, let's make it lowercase to improve readability.
47105       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47106       # Now convert it back to Unix-style (cygpath)
47107       input_path=`$CYGPATH -u "$shortmode_path"`
47108       new_path="$input_path"
47109     fi
47110   fi
47111 
47112   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47113   if test "x$test_cygdrive_prefix" = x; then
47114     # As a simple fix, exclude /usr/bin since it's not a real path.
47115     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47116       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47117       # a path prefixed by /cygdrive for fixpath to work.
47118       new_path="$CYGWIN_ROOT_PATH$input_path"
47119     fi
47120   fi
47121 
47122 
47123   if test "x$path" != "x$new_path"; then
47124     MSVC_DLL="$new_path"
47125     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47126 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47127   fi
47128 
47129     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47130 
47131   path="$MSVC_DLL"
47132   has_colon=`$ECHO $path | $GREP ^.:`
47133   new_path="$path"
47134   if test "x$has_colon" = x; then
47135     # Not in mixed or Windows style, start by that.
47136     new_path=`cmd //c echo $path`
47137   fi
47138 
47139 
47140   input_path="$new_path"
47141   # Check if we need to convert this using DOS-style short mode. If the path
47142   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47143   # take no chances and rewrite it.
47144   # Note: m4 eats our [], so we need to use [ and ] instead.
47145   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47146   if test "x$has_forbidden_chars" != x; then
47147     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47148     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47149   fi
47150 
47151 
47152   windows_path="$new_path"
47153   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47154     unix_path=`$CYGPATH -u "$windows_path"`
47155     new_path="$unix_path"
47156   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47157     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47158     new_path="$unix_path"
47159   fi
47160 
47161   if test "x$path" != "x$new_path"; then
47162     MSVC_DLL="$new_path"
47163     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47164 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47165   fi
47166 
47167   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47168   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47169 
47170     else
47171       # We're on a unix platform. Hooray! :)
47172       path="$MSVC_DLL"
47173       has_space=`$ECHO "$path" | $GREP " "`
47174       if test "x$has_space" != x; then
47175         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47176 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47177         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47178       fi
47179 
47180       # Use eval to expand a potential ~
47181       eval path="$path"
47182       if test ! -f "$path" && test ! -d "$path"; then
47183         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47184       fi
47185 
47186       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47187     fi
47188   fi
47189 
47190       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47191 $as_echo_n "checking for $DLL_NAME... " >&6; }
47192       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47193 $as_echo "$MSVC_DLL" >&6; }
47194     else
47195       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47196 $as_echo "incorrect, ignoring" >&6; }
47197       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47198 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47199     fi
47200   fi
47201 
47202       if test "x$MSVC_DLL" = x; then
47203         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
47204       fi
47205       MSVCP_DLL="$MSVC_DLL"
47206     elif test "x$DEVKIT_MSVCP_DLL" != x; then
47207 
47208   DLL_NAME="$MSVCP_NAME"
47209   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
47210   METHOD="devkit"
47211   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47212     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47213 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47214 
47215     # Need to check if the found msvcr is correct architecture
47216     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47217 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47218     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47219     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47220       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47221       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47222       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47223         CORRECT_MSVCR_ARCH="PE32 executable"
47224       else
47225         CORRECT_MSVCR_ARCH="PE32+ executable"
47226       fi
47227     else
47228       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47229         CORRECT_MSVCR_ARCH=386
47230       else
47231         CORRECT_MSVCR_ARCH=x86-64
47232       fi
47233     fi
47234     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47235       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47236 $as_echo "ok" >&6; }
47237       MSVC_DLL="$POSSIBLE_MSVC_DLL"
47238 
47239   # Only process if variable expands to non-empty
47240 
47241   if test "x$MSVC_DLL" != x; then
47242     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47243 
47244   # Input might be given as Windows format, start by converting to
47245   # unix format.
47246   path="$MSVC_DLL"
47247   new_path=`$CYGPATH -u "$path"`
47248 
47249   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47250   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47251   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47252   # "foo.exe" is OK but "foo" is an error.
47253   #
47254   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47255   # It is also a way to make sure we got the proper file name for the real test later on.
47256   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47257   if test "x$test_shortpath" = x; then
47258     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47259 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47260     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47261   fi
47262 
47263   # Call helper function which possibly converts this using DOS-style short mode.
47264   # If so, the updated path is stored in $new_path.
47265 
47266   input_path="$new_path"
47267   # Check if we need to convert this using DOS-style short mode. If the path
47268   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47269   # take no chances and rewrite it.
47270   # Note: m4 eats our [], so we need to use [ and ] instead.
47271   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47272   if test "x$has_forbidden_chars" != x; then
47273     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47274     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47275     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47276     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47277       # Going to short mode and back again did indeed matter. Since short mode is
47278       # case insensitive, let's make it lowercase to improve readability.
47279       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47280       # Now convert it back to Unix-style (cygpath)
47281       input_path=`$CYGPATH -u "$shortmode_path"`
47282       new_path="$input_path"
47283     fi
47284   fi
47285 
47286   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47287   if test "x$test_cygdrive_prefix" = x; then
47288     # As a simple fix, exclude /usr/bin since it's not a real path.
47289     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47290       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47291       # a path prefixed by /cygdrive for fixpath to work.
47292       new_path="$CYGWIN_ROOT_PATH$input_path"
47293     fi
47294   fi
47295 
47296 
47297   if test "x$path" != "x$new_path"; then
47298     MSVC_DLL="$new_path"
47299     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47300 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47301   fi
47302 
47303     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47304 
47305   path="$MSVC_DLL"
47306   has_colon=`$ECHO $path | $GREP ^.:`
47307   new_path="$path"
47308   if test "x$has_colon" = x; then
47309     # Not in mixed or Windows style, start by that.
47310     new_path=`cmd //c echo $path`
47311   fi
47312 
47313 
47314   input_path="$new_path"
47315   # Check if we need to convert this using DOS-style short mode. If the path
47316   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47317   # take no chances and rewrite it.
47318   # Note: m4 eats our [], so we need to use [ and ] instead.
47319   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47320   if test "x$has_forbidden_chars" != x; then
47321     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47322     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47323   fi
47324 
47325 
47326   windows_path="$new_path"
47327   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47328     unix_path=`$CYGPATH -u "$windows_path"`
47329     new_path="$unix_path"
47330   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47331     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47332     new_path="$unix_path"
47333   fi
47334 
47335   if test "x$path" != "x$new_path"; then
47336     MSVC_DLL="$new_path"
47337     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47338 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47339   fi
47340 
47341   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47342   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47343 
47344     else
47345       # We're on a unix platform. Hooray! :)
47346       path="$MSVC_DLL"
47347       has_space=`$ECHO "$path" | $GREP " "`
47348       if test "x$has_space" != x; then
47349         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47350 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47351         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47352       fi
47353 
47354       # Use eval to expand a potential ~
47355       eval path="$path"
47356       if test ! -f "$path" && test ! -d "$path"; then
47357         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47358       fi
47359 
47360       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47361     fi
47362   fi
47363 
47364       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47365 $as_echo_n "checking for $DLL_NAME... " >&6; }
47366       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47367 $as_echo "$MSVC_DLL" >&6; }
47368     else
47369       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47370 $as_echo "incorrect, ignoring" >&6; }
47371       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47372 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47373     fi
47374   fi
47375 
47376       if test "x$MSVC_DLL" = x; then
47377         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
47378       fi
47379       MSVCP_DLL="$MSVC_DLL"
47380     else
47381 
47382   DLL_NAME="${MSVCP_NAME}"
47383   MSVC_DLL=
47384 
47385   if test "x$MSVC_DLL" = x; then
47386     # Probe: Using well-known location from Visual Studio 10.0
47387     if test "x$VCINSTALLDIR" != x; then
47388       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47389 
47390   windows_path="$CYGWIN_VC_INSTALL_DIR"
47391   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47392     unix_path=`$CYGPATH -u "$windows_path"`
47393     CYGWIN_VC_INSTALL_DIR="$unix_path"
47394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47395     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47396     CYGWIN_VC_INSTALL_DIR="$unix_path"
47397   fi
47398 
47399       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47400         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47401       else
47402         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47403       fi
47404       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
47405 
47406   DLL_NAME="$DLL_NAME"
47407   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47408   METHOD="well-known location in VCINSTALLDIR"
47409   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47410     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47411 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47412 
47413     # Need to check if the found msvcr is correct architecture
47414     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47415 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47416     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47417     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47418       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47419       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47420       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47421         CORRECT_MSVCR_ARCH="PE32 executable"
47422       else
47423         CORRECT_MSVCR_ARCH="PE32+ executable"
47424       fi
47425     else
47426       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47427         CORRECT_MSVCR_ARCH=386
47428       else
47429         CORRECT_MSVCR_ARCH=x86-64
47430       fi
47431     fi
47432     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47433       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47434 $as_echo "ok" >&6; }
47435       MSVC_DLL="$POSSIBLE_MSVC_DLL"
47436 
47437   # Only process if variable expands to non-empty
47438 
47439   if test "x$MSVC_DLL" != x; then
47440     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47441 
47442   # Input might be given as Windows format, start by converting to
47443   # unix format.
47444   path="$MSVC_DLL"
47445   new_path=`$CYGPATH -u "$path"`
47446 
47447   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47448   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47449   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47450   # "foo.exe" is OK but "foo" is an error.
47451   #
47452   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47453   # It is also a way to make sure we got the proper file name for the real test later on.
47454   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47455   if test "x$test_shortpath" = x; then
47456     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47457 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47458     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47459   fi
47460 
47461   # Call helper function which possibly converts this using DOS-style short mode.
47462   # If so, the updated path is stored in $new_path.
47463 
47464   input_path="$new_path"
47465   # Check if we need to convert this using DOS-style short mode. If the path
47466   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47467   # take no chances and rewrite it.
47468   # Note: m4 eats our [], so we need to use [ and ] instead.
47469   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47470   if test "x$has_forbidden_chars" != x; then
47471     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47472     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47473     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47474     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47475       # Going to short mode and back again did indeed matter. Since short mode is
47476       # case insensitive, let's make it lowercase to improve readability.
47477       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47478       # Now convert it back to Unix-style (cygpath)
47479       input_path=`$CYGPATH -u "$shortmode_path"`
47480       new_path="$input_path"
47481     fi
47482   fi
47483 
47484   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47485   if test "x$test_cygdrive_prefix" = x; then
47486     # As a simple fix, exclude /usr/bin since it's not a real path.
47487     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47488       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47489       # a path prefixed by /cygdrive for fixpath to work.
47490       new_path="$CYGWIN_ROOT_PATH$input_path"
47491     fi
47492   fi
47493 
47494 
47495   if test "x$path" != "x$new_path"; then
47496     MSVC_DLL="$new_path"
47497     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47498 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47499   fi
47500 
47501     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47502 
47503   path="$MSVC_DLL"
47504   has_colon=`$ECHO $path | $GREP ^.:`
47505   new_path="$path"
47506   if test "x$has_colon" = x; then
47507     # Not in mixed or Windows style, start by that.
47508     new_path=`cmd //c echo $path`
47509   fi
47510 
47511 
47512   input_path="$new_path"
47513   # Check if we need to convert this using DOS-style short mode. If the path
47514   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47515   # take no chances and rewrite it.
47516   # Note: m4 eats our [], so we need to use [ and ] instead.
47517   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47518   if test "x$has_forbidden_chars" != x; then
47519     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47520     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47521   fi
47522 
47523 
47524   windows_path="$new_path"
47525   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47526     unix_path=`$CYGPATH -u "$windows_path"`
47527     new_path="$unix_path"
47528   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47529     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47530     new_path="$unix_path"
47531   fi
47532 
47533   if test "x$path" != "x$new_path"; then
47534     MSVC_DLL="$new_path"
47535     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47536 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47537   fi
47538 
47539   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47540   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47541 
47542     else
47543       # We're on a unix platform. Hooray! :)
47544       path="$MSVC_DLL"
47545       has_space=`$ECHO "$path" | $GREP " "`
47546       if test "x$has_space" != x; then
47547         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47548 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47549         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47550       fi
47551 
47552       # Use eval to expand a potential ~
47553       eval path="$path"
47554       if test ! -f "$path" && test ! -d "$path"; then
47555         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47556       fi
47557 
47558       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47559     fi
47560   fi
47561 
47562       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47563 $as_echo_n "checking for $DLL_NAME... " >&6; }
47564       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47565 $as_echo "$MSVC_DLL" >&6; }
47566     else
47567       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47568 $as_echo "incorrect, ignoring" >&6; }
47569       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47570 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47571     fi
47572   fi
47573 
47574     fi
47575   fi
47576 
47577   if test "x$MSVC_DLL" = x; then
47578     # Probe: Check in the Boot JDK directory.
47579     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
47580 
47581   DLL_NAME="$DLL_NAME"
47582   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47583   METHOD="well-known location in Boot JDK"
47584   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47585     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47586 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47587 
47588     # Need to check if the found msvcr is correct architecture
47589     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47590 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47591     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47592     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47593       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47594       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47595       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47596         CORRECT_MSVCR_ARCH="PE32 executable"
47597       else
47598         CORRECT_MSVCR_ARCH="PE32+ executable"
47599       fi
47600     else
47601       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47602         CORRECT_MSVCR_ARCH=386
47603       else
47604         CORRECT_MSVCR_ARCH=x86-64
47605       fi
47606     fi
47607     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47608       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47609 $as_echo "ok" >&6; }
47610       MSVC_DLL="$POSSIBLE_MSVC_DLL"
47611 
47612   # Only process if variable expands to non-empty
47613 
47614   if test "x$MSVC_DLL" != x; then
47615     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47616 
47617   # Input might be given as Windows format, start by converting to
47618   # unix format.
47619   path="$MSVC_DLL"
47620   new_path=`$CYGPATH -u "$path"`
47621 
47622   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47623   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47624   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47625   # "foo.exe" is OK but "foo" is an error.
47626   #
47627   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47628   # It is also a way to make sure we got the proper file name for the real test later on.
47629   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47630   if test "x$test_shortpath" = x; then
47631     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47632 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47633     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47634   fi
47635 
47636   # Call helper function which possibly converts this using DOS-style short mode.
47637   # If so, the updated path is stored in $new_path.
47638 
47639   input_path="$new_path"
47640   # Check if we need to convert this using DOS-style short mode. If the path
47641   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47642   # take no chances and rewrite it.
47643   # Note: m4 eats our [], so we need to use [ and ] instead.
47644   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47645   if test "x$has_forbidden_chars" != x; then
47646     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47647     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47648     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47649     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47650       # Going to short mode and back again did indeed matter. Since short mode is
47651       # case insensitive, let's make it lowercase to improve readability.
47652       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47653       # Now convert it back to Unix-style (cygpath)
47654       input_path=`$CYGPATH -u "$shortmode_path"`
47655       new_path="$input_path"
47656     fi
47657   fi
47658 
47659   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47660   if test "x$test_cygdrive_prefix" = x; then
47661     # As a simple fix, exclude /usr/bin since it's not a real path.
47662     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47663       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47664       # a path prefixed by /cygdrive for fixpath to work.
47665       new_path="$CYGWIN_ROOT_PATH$input_path"
47666     fi
47667   fi
47668 
47669 
47670   if test "x$path" != "x$new_path"; then
47671     MSVC_DLL="$new_path"
47672     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47673 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47674   fi
47675 
47676     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47677 
47678   path="$MSVC_DLL"
47679   has_colon=`$ECHO $path | $GREP ^.:`
47680   new_path="$path"
47681   if test "x$has_colon" = x; then
47682     # Not in mixed or Windows style, start by that.
47683     new_path=`cmd //c echo $path`
47684   fi
47685 
47686 
47687   input_path="$new_path"
47688   # Check if we need to convert this using DOS-style short mode. If the path
47689   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47690   # take no chances and rewrite it.
47691   # Note: m4 eats our [], so we need to use [ and ] instead.
47692   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47693   if test "x$has_forbidden_chars" != x; then
47694     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47695     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47696   fi
47697 
47698 
47699   windows_path="$new_path"
47700   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47701     unix_path=`$CYGPATH -u "$windows_path"`
47702     new_path="$unix_path"
47703   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47704     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47705     new_path="$unix_path"
47706   fi
47707 
47708   if test "x$path" != "x$new_path"; then
47709     MSVC_DLL="$new_path"
47710     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47711 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47712   fi
47713 
47714   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47715   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47716 
47717     else
47718       # We're on a unix platform. Hooray! :)
47719       path="$MSVC_DLL"
47720       has_space=`$ECHO "$path" | $GREP " "`
47721       if test "x$has_space" != x; then
47722         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47723 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47724         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47725       fi
47726 
47727       # Use eval to expand a potential ~
47728       eval path="$path"
47729       if test ! -f "$path" && test ! -d "$path"; then
47730         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47731       fi
47732 
47733       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47734     fi
47735   fi
47736 
47737       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47738 $as_echo_n "checking for $DLL_NAME... " >&6; }
47739       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47740 $as_echo "$MSVC_DLL" >&6; }
47741     else
47742       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47743 $as_echo "incorrect, ignoring" >&6; }
47744       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47745 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47746     fi
47747   fi
47748 
47749   fi
47750 
47751   if test "x$MSVC_DLL" = x; then
47752     # Probe: Look in the Windows system32 directory
47753     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
47754 
47755   windows_path="$CYGWIN_SYSTEMROOT"
47756   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47757     unix_path=`$CYGPATH -u "$windows_path"`
47758     CYGWIN_SYSTEMROOT="$unix_path"
47759   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47760     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47761     CYGWIN_SYSTEMROOT="$unix_path"
47762   fi
47763 
47764     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
47765 
47766   DLL_NAME="$DLL_NAME"
47767   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47768   METHOD="well-known location in SYSTEMROOT"
47769   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47770     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47771 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47772 
47773     # Need to check if the found msvcr is correct architecture
47774     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47775 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47776     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47777     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47778       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47779       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47780       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47781         CORRECT_MSVCR_ARCH="PE32 executable"
47782       else
47783         CORRECT_MSVCR_ARCH="PE32+ executable"
47784       fi
47785     else
47786       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47787         CORRECT_MSVCR_ARCH=386
47788       else
47789         CORRECT_MSVCR_ARCH=x86-64
47790       fi
47791     fi
47792     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47793       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47794 $as_echo "ok" >&6; }
47795       MSVC_DLL="$POSSIBLE_MSVC_DLL"
47796 
47797   # Only process if variable expands to non-empty
47798 
47799   if test "x$MSVC_DLL" != x; then
47800     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47801 
47802   # Input might be given as Windows format, start by converting to
47803   # unix format.
47804   path="$MSVC_DLL"
47805   new_path=`$CYGPATH -u "$path"`
47806 
47807   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47808   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47809   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47810   # "foo.exe" is OK but "foo" is an error.
47811   #
47812   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47813   # It is also a way to make sure we got the proper file name for the real test later on.
47814   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47815   if test "x$test_shortpath" = x; then
47816     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47817 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47818     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47819   fi
47820 
47821   # Call helper function which possibly converts this using DOS-style short mode.
47822   # If so, the updated path is stored in $new_path.
47823 
47824   input_path="$new_path"
47825   # Check if we need to convert this using DOS-style short mode. If the path
47826   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47827   # take no chances and rewrite it.
47828   # Note: m4 eats our [], so we need to use [ and ] instead.
47829   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47830   if test "x$has_forbidden_chars" != x; then
47831     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47832     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47833     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47834     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47835       # Going to short mode and back again did indeed matter. Since short mode is
47836       # case insensitive, let's make it lowercase to improve readability.
47837       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47838       # Now convert it back to Unix-style (cygpath)
47839       input_path=`$CYGPATH -u "$shortmode_path"`
47840       new_path="$input_path"
47841     fi
47842   fi
47843 
47844   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47845   if test "x$test_cygdrive_prefix" = x; then
47846     # As a simple fix, exclude /usr/bin since it's not a real path.
47847     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47848       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47849       # a path prefixed by /cygdrive for fixpath to work.
47850       new_path="$CYGWIN_ROOT_PATH$input_path"
47851     fi
47852   fi
47853 
47854 
47855   if test "x$path" != "x$new_path"; then
47856     MSVC_DLL="$new_path"
47857     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47858 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47859   fi
47860 
47861     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47862 
47863   path="$MSVC_DLL"
47864   has_colon=`$ECHO $path | $GREP ^.:`
47865   new_path="$path"
47866   if test "x$has_colon" = x; then
47867     # Not in mixed or Windows style, start by that.
47868     new_path=`cmd //c echo $path`
47869   fi
47870 
47871 
47872   input_path="$new_path"
47873   # Check if we need to convert this using DOS-style short mode. If the path
47874   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47875   # take no chances and rewrite it.
47876   # Note: m4 eats our [], so we need to use [ and ] instead.
47877   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47878   if test "x$has_forbidden_chars" != x; then
47879     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47880     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47881   fi
47882 
47883 
47884   windows_path="$new_path"
47885   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47886     unix_path=`$CYGPATH -u "$windows_path"`
47887     new_path="$unix_path"
47888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47889     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47890     new_path="$unix_path"
47891   fi
47892 
47893   if test "x$path" != "x$new_path"; then
47894     MSVC_DLL="$new_path"
47895     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47896 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47897   fi
47898 
47899   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47900   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47901 
47902     else
47903       # We're on a unix platform. Hooray! :)
47904       path="$MSVC_DLL"
47905       has_space=`$ECHO "$path" | $GREP " "`
47906       if test "x$has_space" != x; then
47907         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47908 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47909         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47910       fi
47911 
47912       # Use eval to expand a potential ~
47913       eval path="$path"
47914       if test ! -f "$path" && test ! -d "$path"; then
47915         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47916       fi
47917 
47918       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47919     fi
47920   fi
47921 
47922       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47923 $as_echo_n "checking for $DLL_NAME... " >&6; }
47924       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47925 $as_echo "$MSVC_DLL" >&6; }
47926     else
47927       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47928 $as_echo "incorrect, ignoring" >&6; }
47929       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47930 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47931     fi
47932   fi
47933 
47934   fi
47935 
47936   if test "x$MSVC_DLL" = x; then
47937     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
47938     if test "x$VS100COMNTOOLS" != x; then
47939       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
47940 
47941   windows_path="$CYGWIN_VS_TOOLS_DIR"
47942   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47943     unix_path=`$CYGPATH -u "$windows_path"`
47944     CYGWIN_VS_TOOLS_DIR="$unix_path"
47945   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47946     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47947     CYGWIN_VS_TOOLS_DIR="$unix_path"
47948   fi
47949 
47950       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47951         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
47952             | $GREP -i /x64/ | $HEAD --lines 1`
47953       else
47954         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
47955             | $GREP -i /x86/ | $HEAD --lines 1`
47956       fi
47957 
47958   DLL_NAME="$DLL_NAME"
47959   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47960   METHOD="search of VS100COMNTOOLS"
47961   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47962     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47963 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47964 
47965     # Need to check if the found msvcr is correct architecture
47966     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47967 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47968     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47969     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47970       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47971       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47972       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47973         CORRECT_MSVCR_ARCH="PE32 executable"
47974       else
47975         CORRECT_MSVCR_ARCH="PE32+ executable"
47976       fi
47977     else
47978       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47979         CORRECT_MSVCR_ARCH=386
47980       else
47981         CORRECT_MSVCR_ARCH=x86-64
47982       fi
47983     fi
47984     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47985       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47986 $as_echo "ok" >&6; }
47987       MSVC_DLL="$POSSIBLE_MSVC_DLL"
47988 
47989   # Only process if variable expands to non-empty
47990 
47991   if test "x$MSVC_DLL" != x; then
47992     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47993 
47994   # Input might be given as Windows format, start by converting to
47995   # unix format.
47996   path="$MSVC_DLL"
47997   new_path=`$CYGPATH -u "$path"`
47998 
47999   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48000   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48001   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48002   # "foo.exe" is OK but "foo" is an error.
48003   #
48004   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48005   # It is also a way to make sure we got the proper file name for the real test later on.
48006   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48007   if test "x$test_shortpath" = x; then
48008     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48009 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48010     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48011   fi
48012 
48013   # Call helper function which possibly converts this using DOS-style short mode.
48014   # If so, the updated path is stored in $new_path.
48015 
48016   input_path="$new_path"
48017   # Check if we need to convert this using DOS-style short mode. If the path
48018   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48019   # take no chances and rewrite it.
48020   # Note: m4 eats our [], so we need to use [ and ] instead.
48021   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48022   if test "x$has_forbidden_chars" != x; then
48023     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48024     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48025     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48026     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48027       # Going to short mode and back again did indeed matter. Since short mode is
48028       # case insensitive, let's make it lowercase to improve readability.
48029       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48030       # Now convert it back to Unix-style (cygpath)
48031       input_path=`$CYGPATH -u "$shortmode_path"`
48032       new_path="$input_path"
48033     fi
48034   fi
48035 
48036   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48037   if test "x$test_cygdrive_prefix" = x; then
48038     # As a simple fix, exclude /usr/bin since it's not a real path.
48039     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48040       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48041       # a path prefixed by /cygdrive for fixpath to work.
48042       new_path="$CYGWIN_ROOT_PATH$input_path"
48043     fi
48044   fi
48045 
48046 
48047   if test "x$path" != "x$new_path"; then
48048     MSVC_DLL="$new_path"
48049     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48050 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48051   fi
48052 
48053     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48054 
48055   path="$MSVC_DLL"
48056   has_colon=`$ECHO $path | $GREP ^.:`
48057   new_path="$path"
48058   if test "x$has_colon" = x; then
48059     # Not in mixed or Windows style, start by that.
48060     new_path=`cmd //c echo $path`
48061   fi
48062 
48063 
48064   input_path="$new_path"
48065   # Check if we need to convert this using DOS-style short mode. If the path
48066   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48067   # take no chances and rewrite it.
48068   # Note: m4 eats our [], so we need to use [ and ] instead.
48069   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48070   if test "x$has_forbidden_chars" != x; then
48071     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48072     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48073   fi
48074 
48075 
48076   windows_path="$new_path"
48077   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48078     unix_path=`$CYGPATH -u "$windows_path"`
48079     new_path="$unix_path"
48080   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48081     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48082     new_path="$unix_path"
48083   fi
48084 
48085   if test "x$path" != "x$new_path"; then
48086     MSVC_DLL="$new_path"
48087     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48088 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48089   fi
48090 
48091   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48092   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48093 
48094     else
48095       # We're on a unix platform. Hooray! :)
48096       path="$MSVC_DLL"
48097       has_space=`$ECHO "$path" | $GREP " "`
48098       if test "x$has_space" != x; then
48099         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48100 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48101         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48102       fi
48103 
48104       # Use eval to expand a potential ~
48105       eval path="$path"
48106       if test ! -f "$path" && test ! -d "$path"; then
48107         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48108       fi
48109 
48110       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48111     fi
48112   fi
48113 
48114       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48115 $as_echo_n "checking for $DLL_NAME... " >&6; }
48116       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48117 $as_echo "$MSVC_DLL" >&6; }
48118     else
48119       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48120 $as_echo "incorrect, ignoring" >&6; }
48121       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48122 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48123     fi
48124   fi
48125 
48126     fi
48127   fi
48128 
48129   if test "x$MSVC_DLL" = x; then
48130     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48131     # (This was the original behaviour; kept since it might turn something up)
48132     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48133       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48134         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48135             | $GREP x64 | $HEAD --lines 1`
48136       else
48137         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48138             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48139         if test "x$POSSIBLE_MSVC_DLL" = x; then
48140           # We're grasping at straws now...
48141           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48142               | $HEAD --lines 1`
48143         fi
48144       fi
48145 
48146 
48147   DLL_NAME="$DLL_NAME"
48148   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48149   METHOD="search of VCINSTALLDIR"
48150   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48151     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48152 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48153 
48154     # Need to check if the found msvcr is correct architecture
48155     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48156 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48157     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48158     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48159       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48160       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48161       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48162         CORRECT_MSVCR_ARCH="PE32 executable"
48163       else
48164         CORRECT_MSVCR_ARCH="PE32+ executable"
48165       fi
48166     else
48167       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48168         CORRECT_MSVCR_ARCH=386
48169       else
48170         CORRECT_MSVCR_ARCH=x86-64
48171       fi
48172     fi
48173     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48174       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48175 $as_echo "ok" >&6; }
48176       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48177 
48178   # Only process if variable expands to non-empty
48179 
48180   if test "x$MSVC_DLL" != x; then
48181     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48182 
48183   # Input might be given as Windows format, start by converting to
48184   # unix format.
48185   path="$MSVC_DLL"
48186   new_path=`$CYGPATH -u "$path"`
48187 
48188   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48189   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48190   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48191   # "foo.exe" is OK but "foo" is an error.
48192   #
48193   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48194   # It is also a way to make sure we got the proper file name for the real test later on.
48195   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48196   if test "x$test_shortpath" = x; then
48197     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48198 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48199     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48200   fi
48201 
48202   # Call helper function which possibly converts this using DOS-style short mode.
48203   # If so, the updated path is stored in $new_path.
48204 
48205   input_path="$new_path"
48206   # Check if we need to convert this using DOS-style short mode. If the path
48207   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48208   # take no chances and rewrite it.
48209   # Note: m4 eats our [], so we need to use [ and ] instead.
48210   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48211   if test "x$has_forbidden_chars" != x; then
48212     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48213     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48214     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48215     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48216       # Going to short mode and back again did indeed matter. Since short mode is
48217       # case insensitive, let's make it lowercase to improve readability.
48218       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48219       # Now convert it back to Unix-style (cygpath)
48220       input_path=`$CYGPATH -u "$shortmode_path"`
48221       new_path="$input_path"
48222     fi
48223   fi
48224 
48225   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48226   if test "x$test_cygdrive_prefix" = x; then
48227     # As a simple fix, exclude /usr/bin since it's not a real path.
48228     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48229       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48230       # a path prefixed by /cygdrive for fixpath to work.
48231       new_path="$CYGWIN_ROOT_PATH$input_path"
48232     fi
48233   fi
48234 
48235 
48236   if test "x$path" != "x$new_path"; then
48237     MSVC_DLL="$new_path"
48238     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48239 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48240   fi
48241 
48242     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48243 
48244   path="$MSVC_DLL"
48245   has_colon=`$ECHO $path | $GREP ^.:`
48246   new_path="$path"
48247   if test "x$has_colon" = x; then
48248     # Not in mixed or Windows style, start by that.
48249     new_path=`cmd //c echo $path`
48250   fi
48251 
48252 
48253   input_path="$new_path"
48254   # Check if we need to convert this using DOS-style short mode. If the path
48255   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48256   # take no chances and rewrite it.
48257   # Note: m4 eats our [], so we need to use [ and ] instead.
48258   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48259   if test "x$has_forbidden_chars" != x; then
48260     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48261     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48262   fi
48263 
48264 
48265   windows_path="$new_path"
48266   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48267     unix_path=`$CYGPATH -u "$windows_path"`
48268     new_path="$unix_path"
48269   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48270     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48271     new_path="$unix_path"
48272   fi
48273 
48274   if test "x$path" != "x$new_path"; then
48275     MSVC_DLL="$new_path"
48276     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48277 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48278   fi
48279 
48280   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48281   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48282 
48283     else
48284       # We're on a unix platform. Hooray! :)
48285       path="$MSVC_DLL"
48286       has_space=`$ECHO "$path" | $GREP " "`
48287       if test "x$has_space" != x; then
48288         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48289 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48290         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48291       fi
48292 
48293       # Use eval to expand a potential ~
48294       eval path="$path"
48295       if test ! -f "$path" && test ! -d "$path"; then
48296         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48297       fi
48298 
48299       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48300     fi
48301   fi
48302 
48303       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48304 $as_echo_n "checking for $DLL_NAME... " >&6; }
48305       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48306 $as_echo "$MSVC_DLL" >&6; }
48307     else
48308       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48309 $as_echo "incorrect, ignoring" >&6; }
48310       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48311 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48312     fi
48313   fi
48314 
48315     fi
48316   fi
48317 
48318   if test "x$MSVC_DLL" = x; then
48319     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48320 $as_echo_n "checking for $DLL_NAME... " >&6; }
48321     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48322 $as_echo "no" >&6; }
48323     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
48324   fi
48325 
48326       MSVCP_DLL="$MSVC_DLL"
48327     fi
48328 
48329   fi
48330 
48331   fi
48332 
48333 
48334   if test "x$NEEDS_LIB_X11" = xfalse; then
48335     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
48336       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
48337 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
48338     fi
48339     X_CFLAGS=
48340     X_LIBS=
48341   else
48342 
48343     if test "x${with_x}" = xno; then
48344       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
48345     fi
48346 
48347     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
48348       # The user has specified a X11 base directory. Use it for includes and
48349       # libraries, unless explicitely overridden.
48350       if test "x$x_includes" = xNONE; then
48351         x_includes="${with_x}/include"
48352       fi
48353       if test "x$x_libraries" = xNONE; then
48354         x_libraries="${with_x}/lib"
48355       fi
48356     else
48357       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
48358       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
48359       # --x-libraries for the sysroot, if that seems to be correct.
48360       if test "x$SYSROOT" != "x"; then
48361         if test "x$x_includes" = xNONE; then
48362           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
48363             x_includes="$SYSROOT/usr/X11R6/include"
48364           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
48365             x_includes="$SYSROOT/usr/include"
48366           fi
48367         fi
48368         if test "x$x_libraries" = xNONE; then
48369           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
48370             x_libraries="$SYSROOT/usr/X11R6/lib"
48371           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48372             x_libraries="$SYSROOT/usr/lib64"
48373           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
48374             x_libraries="$SYSROOT/usr/lib"
48375           fi
48376         fi
48377       fi
48378     fi
48379 
48380     # Now let autoconf do it's magic
48381     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
48382 $as_echo_n "checking for X... " >&6; }
48383 
48384 
48385 # Check whether --with-x was given.
48386 if test "${with_x+set}" = set; then :
48387   withval=$with_x;
48388 fi
48389 
48390 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
48391 if test "x$with_x" = xno; then
48392   # The user explicitly disabled X.
48393   have_x=disabled
48394 else
48395   case $x_includes,$x_libraries in #(
48396     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
48397     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
48398   $as_echo_n "(cached) " >&6
48399 else
48400   # One or both of the vars are not set, and there is no cached value.
48401 ac_x_includes=no ac_x_libraries=no
48402 rm -f -r conftest.dir
48403 if mkdir conftest.dir; then
48404   cd conftest.dir
48405   cat >Imakefile <<'_ACEOF'
48406 incroot:
48407         @echo incroot='${INCROOT}'
48408 usrlibdir:
48409         @echo usrlibdir='${USRLIBDIR}'
48410 libdir:
48411         @echo libdir='${LIBDIR}'
48412 _ACEOF
48413   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
48414     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
48415     for ac_var in incroot usrlibdir libdir; do
48416       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
48417     done
48418     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
48419     for ac_extension in a so sl dylib la dll; do
48420       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
48421          test -f "$ac_im_libdir/libX11.$ac_extension"; then
48422         ac_im_usrlibdir=$ac_im_libdir; break
48423       fi
48424     done
48425     # Screen out bogus values from the imake configuration.  They are
48426     # bogus both because they are the default anyway, and because
48427     # using them would break gcc on systems where it needs fixed includes.
48428     case $ac_im_incroot in
48429         /usr/include) ac_x_includes= ;;
48430         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
48431     esac
48432     case $ac_im_usrlibdir in
48433         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
48434         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
48435     esac
48436   fi
48437   cd ..
48438   rm -f -r conftest.dir
48439 fi
48440 
48441 # Standard set of common directories for X headers.
48442 # Check X11 before X11Rn because it is often a symlink to the current release.
48443 ac_x_header_dirs='
48444 /usr/X11/include
48445 /usr/X11R7/include
48446 /usr/X11R6/include
48447 /usr/X11R5/include
48448 /usr/X11R4/include
48449 
48450 /usr/include/X11
48451 /usr/include/X11R7
48452 /usr/include/X11R6
48453 /usr/include/X11R5
48454 /usr/include/X11R4
48455 
48456 /usr/local/X11/include
48457 /usr/local/X11R7/include
48458 /usr/local/X11R6/include
48459 /usr/local/X11R5/include
48460 /usr/local/X11R4/include
48461 
48462 /usr/local/include/X11
48463 /usr/local/include/X11R7
48464 /usr/local/include/X11R6
48465 /usr/local/include/X11R5
48466 /usr/local/include/X11R4
48467 
48468 /usr/X386/include
48469 /usr/x386/include
48470 /usr/XFree86/include/X11
48471 
48472 /usr/include
48473 /usr/local/include
48474 /usr/unsupported/include
48475 /usr/athena/include
48476 /usr/local/x11r5/include
48477 /usr/lpp/Xamples/include
48478 
48479 /usr/openwin/include
48480 /usr/openwin/share/include'
48481 
48482 if test "$ac_x_includes" = no; then
48483   # Guess where to find include files, by looking for Xlib.h.
48484   # First, try using that file with no special directory specified.
48485   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48486 /* end confdefs.h.  */
48487 #include <X11/Xlib.h>
48488 _ACEOF
48489 if ac_fn_cxx_try_cpp "$LINENO"; then :
48490   # We can compile using X headers with no special include directory.
48491 ac_x_includes=
48492 else
48493   for ac_dir in $ac_x_header_dirs; do
48494   if test -r "$ac_dir/X11/Xlib.h"; then
48495     ac_x_includes=$ac_dir
48496     break
48497   fi
48498 done
48499 fi
48500 rm -f conftest.err conftest.i conftest.$ac_ext
48501 fi # $ac_x_includes = no
48502 
48503 if test "$ac_x_libraries" = no; then
48504   # Check for the libraries.
48505   # See if we find them without any special options.
48506   # Don't add to $LIBS permanently.
48507   ac_save_LIBS=$LIBS
48508   LIBS="-lX11 $LIBS"
48509   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48510 /* end confdefs.h.  */
48511 #include <X11/Xlib.h>
48512 int
48513 main ()
48514 {
48515 XrmInitialize ()
48516   ;
48517   return 0;
48518 }
48519 _ACEOF
48520 if ac_fn_cxx_try_link "$LINENO"; then :
48521   LIBS=$ac_save_LIBS
48522 # We can link X programs with no special library path.
48523 ac_x_libraries=
48524 else
48525   LIBS=$ac_save_LIBS
48526 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
48527 do
48528   # Don't even attempt the hair of trying to link an X program!
48529   for ac_extension in a so sl dylib la dll; do
48530     if test -r "$ac_dir/libX11.$ac_extension"; then
48531       ac_x_libraries=$ac_dir
48532       break 2
48533     fi
48534   done
48535 done
48536 fi
48537 rm -f core conftest.err conftest.$ac_objext \
48538     conftest$ac_exeext conftest.$ac_ext
48539 fi # $ac_x_libraries = no
48540 
48541 case $ac_x_includes,$ac_x_libraries in #(
48542   no,* | *,no | *\'*)
48543     # Didn't find X, or a directory has "'" in its name.
48544     ac_cv_have_x="have_x=no";; #(
48545   *)
48546     # Record where we found X for the cache.
48547     ac_cv_have_x="have_x=yes\
48548         ac_x_includes='$ac_x_includes'\
48549         ac_x_libraries='$ac_x_libraries'"
48550 esac
48551 fi
48552 ;; #(
48553     *) have_x=yes;;
48554   esac
48555   eval "$ac_cv_have_x"
48556 fi # $with_x != no
48557 
48558 if test "$have_x" != yes; then
48559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
48560 $as_echo "$have_x" >&6; }
48561   no_x=yes
48562 else
48563   # If each of the values was on the command line, it overrides each guess.
48564   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
48565   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
48566   # Update the cache value to reflect the command line values.
48567   ac_cv_have_x="have_x=yes\
48568         ac_x_includes='$x_includes'\
48569         ac_x_libraries='$x_libraries'"
48570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
48571 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
48572 fi
48573 
48574     if test "$no_x" = yes; then
48575   # Not all programs may use this symbol, but it does not hurt to define it.
48576 
48577 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
48578 
48579   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
48580 else
48581   if test -n "$x_includes"; then
48582     X_CFLAGS="$X_CFLAGS -I$x_includes"
48583   fi
48584 
48585   # It would also be nice to do this for all -L options, not just this one.
48586   if test -n "$x_libraries"; then
48587     X_LIBS="$X_LIBS -L$x_libraries"
48588     # For Solaris; some versions of Sun CC require a space after -R and
48589     # others require no space.  Words are not sufficient . . . .
48590     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
48591 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
48592     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
48593     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
48594     ac_cxx_werror_flag=yes
48595     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48596 /* end confdefs.h.  */
48597 
48598 int
48599 main ()
48600 {
48601 
48602   ;
48603   return 0;
48604 }
48605 _ACEOF
48606 if ac_fn_cxx_try_link "$LINENO"; then :
48607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48608 $as_echo "no" >&6; }
48609        X_LIBS="$X_LIBS -R$x_libraries"
48610 else
48611   LIBS="$ac_xsave_LIBS -R $x_libraries"
48612        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48613 /* end confdefs.h.  */
48614 
48615 int
48616 main ()
48617 {
48618 
48619   ;
48620   return 0;
48621 }
48622 _ACEOF
48623 if ac_fn_cxx_try_link "$LINENO"; then :
48624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48625 $as_echo "yes" >&6; }
48626           X_LIBS="$X_LIBS -R $x_libraries"
48627 else
48628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
48629 $as_echo "neither works" >&6; }
48630 fi
48631 rm -f core conftest.err conftest.$ac_objext \
48632     conftest$ac_exeext conftest.$ac_ext
48633 fi
48634 rm -f core conftest.err conftest.$ac_objext \
48635     conftest$ac_exeext conftest.$ac_ext
48636     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
48637     LIBS=$ac_xsave_LIBS
48638   fi
48639 
48640   # Check for system-dependent libraries X programs must link with.
48641   # Do this before checking for the system-independent R6 libraries
48642   # (-lICE), since we may need -lsocket or whatever for X linking.
48643 
48644   if test "$ISC" = yes; then
48645     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
48646   else
48647     # Martyn Johnson says this is needed for Ultrix, if the X
48648     # libraries were built with DECnet support.  And Karl Berry says
48649     # the Alpha needs dnet_stub (dnet does not exist).
48650     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
48651     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48652 /* end confdefs.h.  */
48653 
48654 /* Override any GCC internal prototype to avoid an error.
48655    Use char because int might match the return type of a GCC
48656    builtin and then its argument prototype would still apply.  */
48657 #ifdef __cplusplus
48658 extern "C"
48659 #endif
48660 char XOpenDisplay ();
48661 int
48662 main ()
48663 {
48664 return XOpenDisplay ();
48665   ;
48666   return 0;
48667 }
48668 _ACEOF
48669 if ac_fn_cxx_try_link "$LINENO"; then :
48670 
48671 else
48672   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
48673 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
48674 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
48675   $as_echo_n "(cached) " >&6
48676 else
48677   ac_check_lib_save_LIBS=$LIBS
48678 LIBS="-ldnet  $LIBS"
48679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48680 /* end confdefs.h.  */
48681 
48682 /* Override any GCC internal prototype to avoid an error.
48683    Use char because int might match the return type of a GCC
48684    builtin and then its argument prototype would still apply.  */
48685 #ifdef __cplusplus
48686 extern "C"
48687 #endif
48688 char dnet_ntoa ();
48689 int
48690 main ()
48691 {
48692 return dnet_ntoa ();
48693   ;
48694   return 0;
48695 }
48696 _ACEOF
48697 if ac_fn_cxx_try_link "$LINENO"; then :
48698   ac_cv_lib_dnet_dnet_ntoa=yes
48699 else
48700   ac_cv_lib_dnet_dnet_ntoa=no
48701 fi
48702 rm -f core conftest.err conftest.$ac_objext \
48703     conftest$ac_exeext conftest.$ac_ext
48704 LIBS=$ac_check_lib_save_LIBS
48705 fi
48706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
48707 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
48708 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
48709   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
48710 fi
48711 
48712     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
48713       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
48714 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
48715 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
48716   $as_echo_n "(cached) " >&6
48717 else
48718   ac_check_lib_save_LIBS=$LIBS
48719 LIBS="-ldnet_stub  $LIBS"
48720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48721 /* end confdefs.h.  */
48722 
48723 /* Override any GCC internal prototype to avoid an error.
48724    Use char because int might match the return type of a GCC
48725    builtin and then its argument prototype would still apply.  */
48726 #ifdef __cplusplus
48727 extern "C"
48728 #endif
48729 char dnet_ntoa ();
48730 int
48731 main ()
48732 {
48733 return dnet_ntoa ();
48734   ;
48735   return 0;
48736 }
48737 _ACEOF
48738 if ac_fn_cxx_try_link "$LINENO"; then :
48739   ac_cv_lib_dnet_stub_dnet_ntoa=yes
48740 else
48741   ac_cv_lib_dnet_stub_dnet_ntoa=no
48742 fi
48743 rm -f core conftest.err conftest.$ac_objext \
48744     conftest$ac_exeext conftest.$ac_ext
48745 LIBS=$ac_check_lib_save_LIBS
48746 fi
48747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
48748 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
48749 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
48750   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
48751 fi
48752 
48753     fi
48754 fi
48755 rm -f core conftest.err conftest.$ac_objext \
48756     conftest$ac_exeext conftest.$ac_ext
48757     LIBS="$ac_xsave_LIBS"
48758 
48759     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
48760     # to get the SysV transport functions.
48761     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
48762     # needs -lnsl.
48763     # The nsl library prevents programs from opening the X display
48764     # on Irix 5.2, according to T.E. Dickey.
48765     # The functions gethostbyname, getservbyname, and inet_addr are
48766     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
48767     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
48768 if test "x$ac_cv_func_gethostbyname" = xyes; then :
48769 
48770 fi
48771 
48772     if test $ac_cv_func_gethostbyname = no; then
48773       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
48774 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
48775 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
48776   $as_echo_n "(cached) " >&6
48777 else
48778   ac_check_lib_save_LIBS=$LIBS
48779 LIBS="-lnsl  $LIBS"
48780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48781 /* end confdefs.h.  */
48782 
48783 /* Override any GCC internal prototype to avoid an error.
48784    Use char because int might match the return type of a GCC
48785    builtin and then its argument prototype would still apply.  */
48786 #ifdef __cplusplus
48787 extern "C"
48788 #endif
48789 char gethostbyname ();
48790 int
48791 main ()
48792 {
48793 return gethostbyname ();
48794   ;
48795   return 0;
48796 }
48797 _ACEOF
48798 if ac_fn_cxx_try_link "$LINENO"; then :
48799   ac_cv_lib_nsl_gethostbyname=yes
48800 else
48801   ac_cv_lib_nsl_gethostbyname=no
48802 fi
48803 rm -f core conftest.err conftest.$ac_objext \
48804     conftest$ac_exeext conftest.$ac_ext
48805 LIBS=$ac_check_lib_save_LIBS
48806 fi
48807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
48808 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
48809 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
48810   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
48811 fi
48812 
48813       if test $ac_cv_lib_nsl_gethostbyname = no; then
48814         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
48815 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
48816 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
48817   $as_echo_n "(cached) " >&6
48818 else
48819   ac_check_lib_save_LIBS=$LIBS
48820 LIBS="-lbsd  $LIBS"
48821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48822 /* end confdefs.h.  */
48823 
48824 /* Override any GCC internal prototype to avoid an error.
48825    Use char because int might match the return type of a GCC
48826    builtin and then its argument prototype would still apply.  */
48827 #ifdef __cplusplus
48828 extern "C"
48829 #endif
48830 char gethostbyname ();
48831 int
48832 main ()
48833 {
48834 return gethostbyname ();
48835   ;
48836   return 0;
48837 }
48838 _ACEOF
48839 if ac_fn_cxx_try_link "$LINENO"; then :
48840   ac_cv_lib_bsd_gethostbyname=yes
48841 else
48842   ac_cv_lib_bsd_gethostbyname=no
48843 fi
48844 rm -f core conftest.err conftest.$ac_objext \
48845     conftest$ac_exeext conftest.$ac_ext
48846 LIBS=$ac_check_lib_save_LIBS
48847 fi
48848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
48849 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
48850 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
48851   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
48852 fi
48853 
48854       fi
48855     fi
48856 
48857     # lieder@skyler.mavd.honeywell.com says without -lsocket,
48858     # socket/setsockopt and other routines are undefined under SCO ODT
48859     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
48860     # on later versions), says Simon Leinen: it contains gethostby*
48861     # variants that don't use the name server (or something).  -lsocket
48862     # must be given before -lnsl if both are needed.  We assume that
48863     # if connect needs -lnsl, so does gethostbyname.
48864     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
48865 if test "x$ac_cv_func_connect" = xyes; then :
48866 
48867 fi
48868 
48869     if test $ac_cv_func_connect = no; then
48870       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
48871 $as_echo_n "checking for connect in -lsocket... " >&6; }
48872 if ${ac_cv_lib_socket_connect+:} false; then :
48873   $as_echo_n "(cached) " >&6
48874 else
48875   ac_check_lib_save_LIBS=$LIBS
48876 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
48877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48878 /* end confdefs.h.  */
48879 
48880 /* Override any GCC internal prototype to avoid an error.
48881    Use char because int might match the return type of a GCC
48882    builtin and then its argument prototype would still apply.  */
48883 #ifdef __cplusplus
48884 extern "C"
48885 #endif
48886 char connect ();
48887 int
48888 main ()
48889 {
48890 return connect ();
48891   ;
48892   return 0;
48893 }
48894 _ACEOF
48895 if ac_fn_cxx_try_link "$LINENO"; then :
48896   ac_cv_lib_socket_connect=yes
48897 else
48898   ac_cv_lib_socket_connect=no
48899 fi
48900 rm -f core conftest.err conftest.$ac_objext \
48901     conftest$ac_exeext conftest.$ac_ext
48902 LIBS=$ac_check_lib_save_LIBS
48903 fi
48904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
48905 $as_echo "$ac_cv_lib_socket_connect" >&6; }
48906 if test "x$ac_cv_lib_socket_connect" = xyes; then :
48907   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
48908 fi
48909 
48910     fi
48911 
48912     # Guillermo Gomez says -lposix is necessary on A/UX.
48913     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
48914 if test "x$ac_cv_func_remove" = xyes; then :
48915 
48916 fi
48917 
48918     if test $ac_cv_func_remove = no; then
48919       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
48920 $as_echo_n "checking for remove in -lposix... " >&6; }
48921 if ${ac_cv_lib_posix_remove+:} false; then :
48922   $as_echo_n "(cached) " >&6
48923 else
48924   ac_check_lib_save_LIBS=$LIBS
48925 LIBS="-lposix  $LIBS"
48926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48927 /* end confdefs.h.  */
48928 
48929 /* Override any GCC internal prototype to avoid an error.
48930    Use char because int might match the return type of a GCC
48931    builtin and then its argument prototype would still apply.  */
48932 #ifdef __cplusplus
48933 extern "C"
48934 #endif
48935 char remove ();
48936 int
48937 main ()
48938 {
48939 return remove ();
48940   ;
48941   return 0;
48942 }
48943 _ACEOF
48944 if ac_fn_cxx_try_link "$LINENO"; then :
48945   ac_cv_lib_posix_remove=yes
48946 else
48947   ac_cv_lib_posix_remove=no
48948 fi
48949 rm -f core conftest.err conftest.$ac_objext \
48950     conftest$ac_exeext conftest.$ac_ext
48951 LIBS=$ac_check_lib_save_LIBS
48952 fi
48953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
48954 $as_echo "$ac_cv_lib_posix_remove" >&6; }
48955 if test "x$ac_cv_lib_posix_remove" = xyes; then :
48956   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
48957 fi
48958 
48959     fi
48960 
48961     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
48962     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
48963 if test "x$ac_cv_func_shmat" = xyes; then :
48964 
48965 fi
48966 
48967     if test $ac_cv_func_shmat = no; then
48968       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
48969 $as_echo_n "checking for shmat in -lipc... " >&6; }
48970 if ${ac_cv_lib_ipc_shmat+:} false; then :
48971   $as_echo_n "(cached) " >&6
48972 else
48973   ac_check_lib_save_LIBS=$LIBS
48974 LIBS="-lipc  $LIBS"
48975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48976 /* end confdefs.h.  */
48977 
48978 /* Override any GCC internal prototype to avoid an error.
48979    Use char because int might match the return type of a GCC
48980    builtin and then its argument prototype would still apply.  */
48981 #ifdef __cplusplus
48982 extern "C"
48983 #endif
48984 char shmat ();
48985 int
48986 main ()
48987 {
48988 return shmat ();
48989   ;
48990   return 0;
48991 }
48992 _ACEOF
48993 if ac_fn_cxx_try_link "$LINENO"; then :
48994   ac_cv_lib_ipc_shmat=yes
48995 else
48996   ac_cv_lib_ipc_shmat=no
48997 fi
48998 rm -f core conftest.err conftest.$ac_objext \
48999     conftest$ac_exeext conftest.$ac_ext
49000 LIBS=$ac_check_lib_save_LIBS
49001 fi
49002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
49003 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
49004 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
49005   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
49006 fi
49007 
49008     fi
49009   fi
49010 
49011   # Check for libraries that X11R6 Xt/Xaw programs need.
49012   ac_save_LDFLAGS=$LDFLAGS
49013   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
49014   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
49015   # check for ICE first), but we must link in the order -lSM -lICE or
49016   # we get undefined symbols.  So assume we have SM if we have ICE.
49017   # These have to be linked with before -lX11, unlike the other
49018   # libraries we check for below, so use a different variable.
49019   # John Interrante, Karl Berry
49020   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
49021 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
49022 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
49023   $as_echo_n "(cached) " >&6
49024 else
49025   ac_check_lib_save_LIBS=$LIBS
49026 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
49027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49028 /* end confdefs.h.  */
49029 
49030 /* Override any GCC internal prototype to avoid an error.
49031    Use char because int might match the return type of a GCC
49032    builtin and then its argument prototype would still apply.  */
49033 #ifdef __cplusplus
49034 extern "C"
49035 #endif
49036 char IceConnectionNumber ();
49037 int
49038 main ()
49039 {
49040 return IceConnectionNumber ();
49041   ;
49042   return 0;
49043 }
49044 _ACEOF
49045 if ac_fn_cxx_try_link "$LINENO"; then :
49046   ac_cv_lib_ICE_IceConnectionNumber=yes
49047 else
49048   ac_cv_lib_ICE_IceConnectionNumber=no
49049 fi
49050 rm -f core conftest.err conftest.$ac_objext \
49051     conftest$ac_exeext conftest.$ac_ext
49052 LIBS=$ac_check_lib_save_LIBS
49053 fi
49054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
49055 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
49056 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
49057   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
49058 fi
49059 
49060   LDFLAGS=$ac_save_LDFLAGS
49061 
49062 fi
49063 
49064 
49065     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
49066     # this doesn't make sense so we remove it.
49067     if test "x$COMPILE_TYPE" = xcross; then
49068       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
49069     fi
49070 
49071     if test "x$no_x" = xyes; then
49072 
49073   # Print a helpful message on how to acquire the necessary build dependency.
49074   # x11 is the help tag: freetype, cups, alsa etc
49075   MISSING_DEPENDENCY=x11
49076 
49077   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49078     cygwin_help $MISSING_DEPENDENCY
49079   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49080     msys_help $MISSING_DEPENDENCY
49081   else
49082     PKGHANDLER_COMMAND=
49083 
49084     case $PKGHANDLER in
49085       apt-get)
49086         apt_help     $MISSING_DEPENDENCY ;;
49087       yum)
49088         yum_help     $MISSING_DEPENDENCY ;;
49089       port)
49090         port_help    $MISSING_DEPENDENCY ;;
49091       pkgutil)
49092         pkgutil_help $MISSING_DEPENDENCY ;;
49093       pkgadd)
49094         pkgadd_help  $MISSING_DEPENDENCY ;;
49095     esac
49096 
49097     if test "x$PKGHANDLER_COMMAND" != x; then
49098       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49099     fi
49100   fi
49101 
49102       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
49103     fi
49104 
49105     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49106       OPENWIN_HOME="/usr/openwin"
49107       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
49108       X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
49109           -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
49110           -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
49111           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
49112     fi
49113 
49114     ac_ext=c
49115 ac_cpp='$CPP $CPPFLAGS'
49116 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49117 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49118 ac_compiler_gnu=$ac_cv_c_compiler_gnu
49119 
49120     OLD_CFLAGS="$CFLAGS"
49121     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
49122 
49123     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
49124     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
49125 do :
49126   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49127 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
49128           # include <X11/Xlib.h>
49129           # include <X11/Xutil.h>
49130 
49131 
49132 "
49133 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49134   cat >>confdefs.h <<_ACEOF
49135 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49136 _ACEOF
49137  X11_HEADERS_OK=yes
49138 else
49139   X11_HEADERS_OK=no; break
49140 fi
49141 
49142 done
49143 
49144 
49145     if test "x$X11_HEADERS_OK" = xno; then
49146 
49147   # Print a helpful message on how to acquire the necessary build dependency.
49148   # x11 is the help tag: freetype, cups, alsa etc
49149   MISSING_DEPENDENCY=x11
49150 
49151   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49152     cygwin_help $MISSING_DEPENDENCY
49153   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49154     msys_help $MISSING_DEPENDENCY
49155   else
49156     PKGHANDLER_COMMAND=
49157 
49158     case $PKGHANDLER in
49159       apt-get)
49160         apt_help     $MISSING_DEPENDENCY ;;
49161       yum)
49162         yum_help     $MISSING_DEPENDENCY ;;
49163       port)
49164         port_help    $MISSING_DEPENDENCY ;;
49165       pkgutil)
49166         pkgutil_help $MISSING_DEPENDENCY ;;
49167       pkgadd)
49168         pkgadd_help  $MISSING_DEPENDENCY ;;
49169     esac
49170 
49171     if test "x$PKGHANDLER_COMMAND" != x; then
49172       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49173     fi
49174   fi
49175 
49176       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
49177     fi
49178 
49179     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
49180     # defined in libawt_xawt.
49181     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
49182 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
49183     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49184 /* end confdefs.h.  */
49185 #include <X11/extensions/Xrender.h>
49186 int
49187 main ()
49188 {
49189 XLinearGradient x;
49190   ;
49191   return 0;
49192 }
49193 _ACEOF
49194 if ac_fn_c_try_compile "$LINENO"; then :
49195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49196 $as_echo "yes" >&6; }
49197 else
49198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49199 $as_echo "no" >&6; }
49200          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
49201 fi
49202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49203 
49204     CFLAGS="$OLD_CFLAGS"
49205     ac_ext=cpp
49206 ac_cpp='$CXXCPP $CPPFLAGS'
49207 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49208 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49209 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49210 
49211   fi # NEEDS_LIB_X11
49212 
49213 
49214 
49215 
49216 
49217 
49218 # Check whether --with-cups was given.
49219 if test "${with_cups+set}" = set; then :
49220   withval=$with_cups;
49221 fi
49222 
49223 
49224 # Check whether --with-cups-include was given.
49225 if test "${with_cups_include+set}" = set; then :
49226   withval=$with_cups_include;
49227 fi
49228 
49229 
49230   if test "x$NEEDS_LIB_CUPS" = xfalse; then
49231     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
49232         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
49233       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
49234 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
49235     fi
49236     CUPS_CFLAGS=
49237   else
49238     CUPS_FOUND=no
49239 
49240     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
49241       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
49242     fi
49243 
49244     if test "x${with_cups}" != x; then
49245       CUPS_CFLAGS="-I${with_cups}/include"
49246       CUPS_FOUND=yes
49247     fi
49248     if test "x${with_cups_include}" != x; then
49249       CUPS_CFLAGS="-I${with_cups_include}"
49250       CUPS_FOUND=yes
49251     fi
49252     if test "x$CUPS_FOUND" = xno; then
49253       # Are the cups headers installed in the default /usr/include location?
49254       for ac_header in cups/cups.h cups/ppd.h
49255 do :
49256   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49257 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
49258 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49259   cat >>confdefs.h <<_ACEOF
49260 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49261 _ACEOF
49262 
49263           CUPS_FOUND=yes
49264           CUPS_CFLAGS=
49265           DEFAULT_CUPS=yes
49266 
49267 fi
49268 
49269 done
49270 
49271     fi
49272     if test "x$CUPS_FOUND" = xno; then
49273       # Getting nervous now? Lets poke around for standard Solaris third-party
49274       # package installation locations.
49275       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
49276 $as_echo_n "checking for cups headers... " >&6; }
49277       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
49278         # An SFW package seems to be installed!
49279         CUPS_FOUND=yes
49280         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
49281       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
49282         # A CSW package seems to be installed!
49283         CUPS_FOUND=yes
49284         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
49285       fi
49286       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
49287 $as_echo "$CUPS_FOUND" >&6; }
49288     fi
49289     if test "x$CUPS_FOUND" = xno; then
49290 
49291   # Print a helpful message on how to acquire the necessary build dependency.
49292   # cups is the help tag: freetype, cups, alsa etc
49293   MISSING_DEPENDENCY=cups
49294 
49295   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49296     cygwin_help $MISSING_DEPENDENCY
49297   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49298     msys_help $MISSING_DEPENDENCY
49299   else
49300     PKGHANDLER_COMMAND=
49301 
49302     case $PKGHANDLER in
49303       apt-get)
49304         apt_help     $MISSING_DEPENDENCY ;;
49305       yum)
49306         yum_help     $MISSING_DEPENDENCY ;;
49307       port)
49308         port_help    $MISSING_DEPENDENCY ;;
49309       pkgutil)
49310         pkgutil_help $MISSING_DEPENDENCY ;;
49311       pkgadd)
49312         pkgadd_help  $MISSING_DEPENDENCY ;;
49313     esac
49314 
49315     if test "x$PKGHANDLER_COMMAND" != x; then
49316       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49317     fi
49318   fi
49319 
49320       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
49321     fi
49322   fi
49323 
49324 
49325 
49326 
49327 
49328 # Check whether --with-freetype was given.
49329 if test "${with_freetype+set}" = set; then :
49330   withval=$with_freetype;
49331 fi
49332 
49333 
49334 # Check whether --with-freetype-include was given.
49335 if test "${with_freetype_include+set}" = set; then :
49336   withval=$with_freetype_include;
49337 fi
49338 
49339 
49340 # Check whether --with-freetype-lib was given.
49341 if test "${with_freetype_lib+set}" = set; then :
49342   withval=$with_freetype_lib;
49343 fi
49344 
49345 
49346 # Check whether --with-freetype-src was given.
49347 if test "${with_freetype_src+set}" = set; then :
49348   withval=$with_freetype_src;
49349 fi
49350 
49351   # Check whether --enable-freetype-bundling was given.
49352 if test "${enable_freetype_bundling+set}" = set; then :
49353   enableval=$enable_freetype_bundling;
49354 fi
49355 
49356 
49357   # Need to specify explicitly since it needs to be overridden on some versions of macosx
49358   FREETYPE_BASE_NAME=freetype
49359   FREETYPE_CFLAGS=
49360   FREETYPE_LIBS=
49361   FREETYPE_BUNDLE_LIB_PATH=
49362 
49363   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
49364     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
49365         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
49366         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
49367         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
49368       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
49369 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
49370     fi
49371     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
49372       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
49373 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
49374     fi
49375   else
49376     # freetype is needed to build; go get it!
49377 
49378     BUNDLE_FREETYPE="$enable_freetype_bundling"
49379 
49380     if  test "x$with_freetype_src" != x; then
49381       if test "x$OPENJDK_TARGET_OS" = xwindows; then
49382         # Try to build freetype if --with-freetype-src was given on Windows
49383 
49384   FREETYPE_SRC_PATH="$with_freetype_src"
49385   BUILD_FREETYPE=yes
49386 
49387   # Check if the freetype sources are acessible..
49388   if ! test -d $FREETYPE_SRC_PATH; then
49389     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
49390 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
49391     BUILD_FREETYPE=no
49392   fi
49393   # ..and contain a vc2010 project file
49394   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
49395   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
49396     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
49397 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
49398     BUILD_FREETYPE=no
49399   fi
49400   # Now check if configure found a version of 'msbuild.exe'
49401   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
49402     { $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
49403 $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;}
49404     BUILD_FREETYPE=no
49405   fi
49406 
49407   # Ready to go..
49408   if test "x$BUILD_FREETYPE" = xyes; then
49409     # msbuild requires trailing slashes for output directories
49410     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
49411     freetype_lib_path_unix="$freetype_lib_path"
49412     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
49413 
49414   unix_path="$vcxproj_path"
49415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49416     windows_path=`$CYGPATH -m "$unix_path"`
49417     vcxproj_path="$windows_path"
49418   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49419     windows_path=`cmd //c echo $unix_path`
49420     vcxproj_path="$windows_path"
49421   fi
49422 
49423 
49424   unix_path="$freetype_lib_path"
49425   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49426     windows_path=`$CYGPATH -m "$unix_path"`
49427     freetype_lib_path="$windows_path"
49428   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49429     windows_path=`cmd //c echo $unix_path`
49430     freetype_lib_path="$windows_path"
49431   fi
49432 
49433 
49434   unix_path="$freetype_obj_path"
49435   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49436     windows_path=`$CYGPATH -m "$unix_path"`
49437     freetype_obj_path="$windows_path"
49438   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49439     windows_path=`cmd //c echo $unix_path`
49440     freetype_obj_path="$windows_path"
49441   fi
49442 
49443     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49444       freetype_platform=x64
49445     else
49446       freetype_platform=win32
49447     fi
49448 
49449     # The original freetype project file is for VS 2010 (i.e. 'v100'),
49450     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
49451     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
49452     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
49453     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
49454 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
49455 
49456     # First we try to build the freetype.dll
49457     $ECHO -e "@echo off\n"\
49458         "$MSBUILD $vcxproj_path "\
49459         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
49460         "/p:Configuration=\"Release Multithreaded\" "\
49461         "/p:Platform=$freetype_platform "\
49462         "/p:ConfigurationType=DynamicLibrary "\
49463         "/p:TargetName=freetype "\
49464         "/p:OutDir=\"$freetype_lib_path\" "\
49465         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
49466     cmd /c freetype.bat
49467 
49468     if test -s "$freetype_lib_path_unix/freetype.dll"; then
49469       # If that succeeds we also build freetype.lib
49470       $ECHO -e "@echo off\n"\
49471           "$MSBUILD $vcxproj_path "\
49472           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
49473           "/p:Configuration=\"Release Multithreaded\" "\
49474           "/p:Platform=$freetype_platform "\
49475           "/p:ConfigurationType=StaticLibrary "\
49476           "/p:TargetName=freetype "\
49477           "/p:OutDir=\"$freetype_lib_path\" "\
49478           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
49479       cmd /c freetype.bat
49480 
49481       if test -s "$freetype_lib_path_unix/freetype.lib"; then
49482         # Once we build both, lib and dll, set freetype lib and include path appropriately
49483         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
49484         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
49485         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
49486 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
49487       else
49488         BUILD_FREETYPE=no
49489       fi
49490     else
49491       BUILD_FREETYPE=no
49492     fi
49493   fi
49494 
49495         if test "x$BUILD_FREETYPE" = xyes; then
49496           # Okay, we built it. Check that it works.
49497 
49498   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49499   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49500   METHOD="--with-freetype-src"
49501 
49502   # Let's start with an optimistic view of the world :-)
49503   FOUND_FREETYPE=yes
49504 
49505   # First look for the canonical freetype main include file ft2build.h.
49506   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49507     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49508     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49509     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49510       # Fail.
49511       FOUND_FREETYPE=no
49512     fi
49513   fi
49514 
49515   if test "x$FOUND_FREETYPE" = xyes; then
49516     # Include file found, let's continue the sanity check.
49517     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49518 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49519 
49520     # Reset to default value
49521     FREETYPE_BASE_NAME=freetype
49522     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49523     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49524       if test "x$OPENJDK_TARGET_OS" = xmacosx \
49525           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49526         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49527         # for the .6 version explicitly.
49528         FREETYPE_BASE_NAME=freetype.6
49529         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49530         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49531 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49532       else
49533         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49534 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49535         FOUND_FREETYPE=no
49536       fi
49537     else
49538       if test "x$OPENJDK_TARGET_OS" = xwindows; then
49539         # On Windows, we will need both .lib and .dll file.
49540         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49541           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49542 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49543           FOUND_FREETYPE=no
49544         fi
49545       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49546           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49547         # Found lib in isa dir, use that instead.
49548         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49549         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49550 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49551       fi
49552     fi
49553   fi
49554 
49555   if test "x$FOUND_FREETYPE" = xyes; then
49556 
49557   # Only process if variable expands to non-empty
49558 
49559   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49560     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49561 
49562   # Input might be given as Windows format, start by converting to
49563   # unix format.
49564   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49565   new_path=`$CYGPATH -u "$path"`
49566 
49567   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49568   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49569   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49570   # "foo.exe" is OK but "foo" is an error.
49571   #
49572   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49573   # It is also a way to make sure we got the proper file name for the real test later on.
49574   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49575   if test "x$test_shortpath" = x; then
49576     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49577 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49578     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49579   fi
49580 
49581   # Call helper function which possibly converts this using DOS-style short mode.
49582   # If so, the updated path is stored in $new_path.
49583 
49584   input_path="$new_path"
49585   # Check if we need to convert this using DOS-style short mode. If the path
49586   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49587   # take no chances and rewrite it.
49588   # Note: m4 eats our [], so we need to use [ and ] instead.
49589   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49590   if test "x$has_forbidden_chars" != x; then
49591     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49592     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49593     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49594     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49595       # Going to short mode and back again did indeed matter. Since short mode is
49596       # case insensitive, let's make it lowercase to improve readability.
49597       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49598       # Now convert it back to Unix-style (cygpath)
49599       input_path=`$CYGPATH -u "$shortmode_path"`
49600       new_path="$input_path"
49601     fi
49602   fi
49603 
49604   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49605   if test "x$test_cygdrive_prefix" = x; then
49606     # As a simple fix, exclude /usr/bin since it's not a real path.
49607     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49608       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49609       # a path prefixed by /cygdrive for fixpath to work.
49610       new_path="$CYGWIN_ROOT_PATH$input_path"
49611     fi
49612   fi
49613 
49614 
49615   if test "x$path" != "x$new_path"; then
49616     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49617     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49618 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49619   fi
49620 
49621     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49622 
49623   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49624   has_colon=`$ECHO $path | $GREP ^.:`
49625   new_path="$path"
49626   if test "x$has_colon" = x; then
49627     # Not in mixed or Windows style, start by that.
49628     new_path=`cmd //c echo $path`
49629   fi
49630 
49631 
49632   input_path="$new_path"
49633   # Check if we need to convert this using DOS-style short mode. If the path
49634   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49635   # take no chances and rewrite it.
49636   # Note: m4 eats our [], so we need to use [ and ] instead.
49637   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49638   if test "x$has_forbidden_chars" != x; then
49639     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49640     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49641   fi
49642 
49643 
49644   windows_path="$new_path"
49645   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49646     unix_path=`$CYGPATH -u "$windows_path"`
49647     new_path="$unix_path"
49648   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49649     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49650     new_path="$unix_path"
49651   fi
49652 
49653   if test "x$path" != "x$new_path"; then
49654     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49655     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49656 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49657   fi
49658 
49659   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49660   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49661 
49662     else
49663       # We're on a unix platform. Hooray! :)
49664       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49665       has_space=`$ECHO "$path" | $GREP " "`
49666       if test "x$has_space" != x; then
49667         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49668 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49669         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49670       fi
49671 
49672       # Use eval to expand a potential ~
49673       eval path="$path"
49674       if test ! -f "$path" && test ! -d "$path"; then
49675         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49676       fi
49677 
49678       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
49679     fi
49680   fi
49681 
49682 
49683   # Only process if variable expands to non-empty
49684 
49685   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49686     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49687 
49688   # Input might be given as Windows format, start by converting to
49689   # unix format.
49690   path="$POTENTIAL_FREETYPE_LIB_PATH"
49691   new_path=`$CYGPATH -u "$path"`
49692 
49693   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49694   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49695   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49696   # "foo.exe" is OK but "foo" is an error.
49697   #
49698   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49699   # It is also a way to make sure we got the proper file name for the real test later on.
49700   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49701   if test "x$test_shortpath" = x; then
49702     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49703 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49704     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
49705   fi
49706 
49707   # Call helper function which possibly converts this using DOS-style short mode.
49708   # If so, the updated path is stored in $new_path.
49709 
49710   input_path="$new_path"
49711   # Check if we need to convert this using DOS-style short mode. If the path
49712   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49713   # take no chances and rewrite it.
49714   # Note: m4 eats our [], so we need to use [ and ] instead.
49715   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49716   if test "x$has_forbidden_chars" != x; then
49717     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49718     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49719     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49720     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49721       # Going to short mode and back again did indeed matter. Since short mode is
49722       # case insensitive, let's make it lowercase to improve readability.
49723       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49724       # Now convert it back to Unix-style (cygpath)
49725       input_path=`$CYGPATH -u "$shortmode_path"`
49726       new_path="$input_path"
49727     fi
49728   fi
49729 
49730   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49731   if test "x$test_cygdrive_prefix" = x; then
49732     # As a simple fix, exclude /usr/bin since it's not a real path.
49733     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49734       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49735       # a path prefixed by /cygdrive for fixpath to work.
49736       new_path="$CYGWIN_ROOT_PATH$input_path"
49737     fi
49738   fi
49739 
49740 
49741   if test "x$path" != "x$new_path"; then
49742     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49743     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49744 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49745   fi
49746 
49747     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49748 
49749   path="$POTENTIAL_FREETYPE_LIB_PATH"
49750   has_colon=`$ECHO $path | $GREP ^.:`
49751   new_path="$path"
49752   if test "x$has_colon" = x; then
49753     # Not in mixed or Windows style, start by that.
49754     new_path=`cmd //c echo $path`
49755   fi
49756 
49757 
49758   input_path="$new_path"
49759   # Check if we need to convert this using DOS-style short mode. If the path
49760   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49761   # take no chances and rewrite it.
49762   # Note: m4 eats our [], so we need to use [ and ] instead.
49763   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49764   if test "x$has_forbidden_chars" != x; then
49765     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49766     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49767   fi
49768 
49769 
49770   windows_path="$new_path"
49771   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49772     unix_path=`$CYGPATH -u "$windows_path"`
49773     new_path="$unix_path"
49774   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49775     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49776     new_path="$unix_path"
49777   fi
49778 
49779   if test "x$path" != "x$new_path"; then
49780     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49781     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49782 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49783   fi
49784 
49785   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49786   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49787 
49788     else
49789       # We're on a unix platform. Hooray! :)
49790       path="$POTENTIAL_FREETYPE_LIB_PATH"
49791       has_space=`$ECHO "$path" | $GREP " "`
49792       if test "x$has_space" != x; then
49793         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49794 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49795         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49796       fi
49797 
49798       # Use eval to expand a potential ~
49799       eval path="$path"
49800       if test ! -f "$path" && test ! -d "$path"; then
49801         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49802       fi
49803 
49804       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
49805     fi
49806   fi
49807 
49808 
49809     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49810     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
49811 $as_echo_n "checking for freetype includes... " >&6; }
49812     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
49813 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
49814     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49815     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
49816 $as_echo_n "checking for freetype libraries... " >&6; }
49817     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
49818 $as_echo "$FREETYPE_LIB_PATH" >&6; }
49819   fi
49820 
49821           if test "x$FOUND_FREETYPE" != xyes; then
49822             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
49823           fi
49824         else
49825           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
49826 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
49827           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
49828         fi
49829       else
49830         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
49831 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
49832       fi
49833     fi
49834 
49835     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
49836       # User has specified settings
49837 
49838       if test "x$BUNDLE_FREETYPE" = x; then
49839         # If not specified, default is to bundle freetype
49840         BUNDLE_FREETYPE=yes
49841       fi
49842 
49843       if test "x$with_freetype" != x; then
49844         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
49845         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
49846       fi
49847 
49848       # Allow --with-freetype-lib and --with-freetype-include to override
49849       if test "x$with_freetype_include" != x; then
49850         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
49851       fi
49852       if test "x$with_freetype_lib" != x; then
49853         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
49854       fi
49855 
49856       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49857         # Okay, we got it. Check that it works.
49858 
49859   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49860   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49861   METHOD="--with-freetype"
49862 
49863   # Let's start with an optimistic view of the world :-)
49864   FOUND_FREETYPE=yes
49865 
49866   # First look for the canonical freetype main include file ft2build.h.
49867   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49868     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49869     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49870     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49871       # Fail.
49872       FOUND_FREETYPE=no
49873     fi
49874   fi
49875 
49876   if test "x$FOUND_FREETYPE" = xyes; then
49877     # Include file found, let's continue the sanity check.
49878     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49879 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49880 
49881     # Reset to default value
49882     FREETYPE_BASE_NAME=freetype
49883     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49884     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49885       if test "x$OPENJDK_TARGET_OS" = xmacosx \
49886           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49887         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49888         # for the .6 version explicitly.
49889         FREETYPE_BASE_NAME=freetype.6
49890         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49891         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49892 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49893       else
49894         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49895 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49896         FOUND_FREETYPE=no
49897       fi
49898     else
49899       if test "x$OPENJDK_TARGET_OS" = xwindows; then
49900         # On Windows, we will need both .lib and .dll file.
49901         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49902           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49903 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49904           FOUND_FREETYPE=no
49905         fi
49906       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49907           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49908         # Found lib in isa dir, use that instead.
49909         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49910         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49911 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49912       fi
49913     fi
49914   fi
49915 
49916   if test "x$FOUND_FREETYPE" = xyes; then
49917 
49918   # Only process if variable expands to non-empty
49919 
49920   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49921     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49922 
49923   # Input might be given as Windows format, start by converting to
49924   # unix format.
49925   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49926   new_path=`$CYGPATH -u "$path"`
49927 
49928   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49929   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49930   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49931   # "foo.exe" is OK but "foo" is an error.
49932   #
49933   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49934   # It is also a way to make sure we got the proper file name for the real test later on.
49935   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49936   if test "x$test_shortpath" = x; then
49937     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49938 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49939     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49940   fi
49941 
49942   # Call helper function which possibly converts this using DOS-style short mode.
49943   # If so, the updated path is stored in $new_path.
49944 
49945   input_path="$new_path"
49946   # Check if we need to convert this using DOS-style short mode. If the path
49947   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49948   # take no chances and rewrite it.
49949   # Note: m4 eats our [], so we need to use [ and ] instead.
49950   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49951   if test "x$has_forbidden_chars" != x; then
49952     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49953     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49954     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49955     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49956       # Going to short mode and back again did indeed matter. Since short mode is
49957       # case insensitive, let's make it lowercase to improve readability.
49958       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49959       # Now convert it back to Unix-style (cygpath)
49960       input_path=`$CYGPATH -u "$shortmode_path"`
49961       new_path="$input_path"
49962     fi
49963   fi
49964 
49965   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49966   if test "x$test_cygdrive_prefix" = x; then
49967     # As a simple fix, exclude /usr/bin since it's not a real path.
49968     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49969       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49970       # a path prefixed by /cygdrive for fixpath to work.
49971       new_path="$CYGWIN_ROOT_PATH$input_path"
49972     fi
49973   fi
49974 
49975 
49976   if test "x$path" != "x$new_path"; then
49977     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49978     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49979 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49980   fi
49981 
49982     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49983 
49984   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49985   has_colon=`$ECHO $path | $GREP ^.:`
49986   new_path="$path"
49987   if test "x$has_colon" = x; then
49988     # Not in mixed or Windows style, start by that.
49989     new_path=`cmd //c echo $path`
49990   fi
49991 
49992 
49993   input_path="$new_path"
49994   # Check if we need to convert this using DOS-style short mode. If the path
49995   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49996   # take no chances and rewrite it.
49997   # Note: m4 eats our [], so we need to use [ and ] instead.
49998   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49999   if test "x$has_forbidden_chars" != x; then
50000     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50001     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50002   fi
50003 
50004 
50005   windows_path="$new_path"
50006   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50007     unix_path=`$CYGPATH -u "$windows_path"`
50008     new_path="$unix_path"
50009   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50010     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50011     new_path="$unix_path"
50012   fi
50013 
50014   if test "x$path" != "x$new_path"; then
50015     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50016     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50017 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50018   fi
50019 
50020   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50021   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50022 
50023     else
50024       # We're on a unix platform. Hooray! :)
50025       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50026       has_space=`$ECHO "$path" | $GREP " "`
50027       if test "x$has_space" != x; then
50028         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50029 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50030         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50031       fi
50032 
50033       # Use eval to expand a potential ~
50034       eval path="$path"
50035       if test ! -f "$path" && test ! -d "$path"; then
50036         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50037       fi
50038 
50039       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50040     fi
50041   fi
50042 
50043 
50044   # Only process if variable expands to non-empty
50045 
50046   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50047     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50048 
50049   # Input might be given as Windows format, start by converting to
50050   # unix format.
50051   path="$POTENTIAL_FREETYPE_LIB_PATH"
50052   new_path=`$CYGPATH -u "$path"`
50053 
50054   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50055   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50056   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50057   # "foo.exe" is OK but "foo" is an error.
50058   #
50059   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50060   # It is also a way to make sure we got the proper file name for the real test later on.
50061   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50062   if test "x$test_shortpath" = x; then
50063     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50064 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50065     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50066   fi
50067 
50068   # Call helper function which possibly converts this using DOS-style short mode.
50069   # If so, the updated path is stored in $new_path.
50070 
50071   input_path="$new_path"
50072   # Check if we need to convert this using DOS-style short mode. If the path
50073   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50074   # take no chances and rewrite it.
50075   # Note: m4 eats our [], so we need to use [ and ] instead.
50076   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50077   if test "x$has_forbidden_chars" != x; then
50078     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50079     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50080     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50081     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50082       # Going to short mode and back again did indeed matter. Since short mode is
50083       # case insensitive, let's make it lowercase to improve readability.
50084       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50085       # Now convert it back to Unix-style (cygpath)
50086       input_path=`$CYGPATH -u "$shortmode_path"`
50087       new_path="$input_path"
50088     fi
50089   fi
50090 
50091   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50092   if test "x$test_cygdrive_prefix" = x; then
50093     # As a simple fix, exclude /usr/bin since it's not a real path.
50094     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50095       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50096       # a path prefixed by /cygdrive for fixpath to work.
50097       new_path="$CYGWIN_ROOT_PATH$input_path"
50098     fi
50099   fi
50100 
50101 
50102   if test "x$path" != "x$new_path"; then
50103     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50104     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50105 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50106   fi
50107 
50108     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50109 
50110   path="$POTENTIAL_FREETYPE_LIB_PATH"
50111   has_colon=`$ECHO $path | $GREP ^.:`
50112   new_path="$path"
50113   if test "x$has_colon" = x; then
50114     # Not in mixed or Windows style, start by that.
50115     new_path=`cmd //c echo $path`
50116   fi
50117 
50118 
50119   input_path="$new_path"
50120   # Check if we need to convert this using DOS-style short mode. If the path
50121   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50122   # take no chances and rewrite it.
50123   # Note: m4 eats our [], so we need to use [ and ] instead.
50124   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50125   if test "x$has_forbidden_chars" != x; then
50126     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50127     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50128   fi
50129 
50130 
50131   windows_path="$new_path"
50132   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50133     unix_path=`$CYGPATH -u "$windows_path"`
50134     new_path="$unix_path"
50135   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50136     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50137     new_path="$unix_path"
50138   fi
50139 
50140   if test "x$path" != "x$new_path"; then
50141     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50142     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50143 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50144   fi
50145 
50146   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50147   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50148 
50149     else
50150       # We're on a unix platform. Hooray! :)
50151       path="$POTENTIAL_FREETYPE_LIB_PATH"
50152       has_space=`$ECHO "$path" | $GREP " "`
50153       if test "x$has_space" != x; then
50154         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50155 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50156         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50157       fi
50158 
50159       # Use eval to expand a potential ~
50160       eval path="$path"
50161       if test ! -f "$path" && test ! -d "$path"; then
50162         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50163       fi
50164 
50165       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50166     fi
50167   fi
50168 
50169 
50170     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50171     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50172 $as_echo_n "checking for freetype includes... " >&6; }
50173     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50174 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50175     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50176     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50177 $as_echo_n "checking for freetype libraries... " >&6; }
50178     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50179 $as_echo "$FREETYPE_LIB_PATH" >&6; }
50180   fi
50181 
50182         if test "x$FOUND_FREETYPE" != xyes; then
50183           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
50184         fi
50185       else
50186         # User specified only one of lib or include. This is an error.
50187         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
50188           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
50189 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
50190           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
50191         else
50192           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
50193 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
50194           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
50195         fi
50196       fi
50197     else
50198       # User did not specify settings, but we need freetype. Try to locate it.
50199 
50200       if test "x$BUNDLE_FREETYPE" = x; then
50201         # If not specified, default is to bundle freetype only on windows
50202         if test "x$OPENJDK_TARGET_OS" = xwindows; then
50203           BUNDLE_FREETYPE=yes
50204         else
50205           BUNDLE_FREETYPE=no
50206         fi
50207       fi
50208 
50209       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
50210       if test "x$SYSROOT" = x; then
50211         if test "x$FOUND_FREETYPE" != xyes; then
50212           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
50213           if test "x$PKG_CONFIG" != x; then
50214 
50215 pkg_failed=no
50216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
50217 $as_echo_n "checking for FREETYPE... " >&6; }
50218 
50219 if test -n "$FREETYPE_CFLAGS"; then
50220     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
50221  elif test -n "$PKG_CONFIG"; then
50222     if test -n "$PKG_CONFIG" && \
50223     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
50224   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
50225   ac_status=$?
50226   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50227   test $ac_status = 0; }; then
50228   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
50229 else
50230   pkg_failed=yes
50231 fi
50232  else
50233     pkg_failed=untried
50234 fi
50235 if test -n "$FREETYPE_LIBS"; then
50236     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
50237  elif test -n "$PKG_CONFIG"; then
50238     if test -n "$PKG_CONFIG" && \
50239     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
50240   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
50241   ac_status=$?
50242   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50243   test $ac_status = 0; }; then
50244   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
50245 else
50246   pkg_failed=yes
50247 fi
50248  else
50249     pkg_failed=untried
50250 fi
50251 
50252 
50253 
50254 if test $pkg_failed = yes; then
50255 
50256 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
50257         _pkg_short_errors_supported=yes
50258 else
50259         _pkg_short_errors_supported=no
50260 fi
50261         if test $_pkg_short_errors_supported = yes; then
50262                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
50263         else
50264                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
50265         fi
50266         # Put the nasty error message in config.log where it belongs
50267         echo "$FREETYPE_PKG_ERRORS" >&5
50268 
50269         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50270 $as_echo "no" >&6; }
50271                 FOUND_FREETYPE=no
50272 elif test $pkg_failed = untried; then
50273         FOUND_FREETYPE=no
50274 else
50275         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
50276         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
50277         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50278 $as_echo "yes" >&6; }
50279         FOUND_FREETYPE=yes
50280 fi
50281             if test "x$FOUND_FREETYPE" = xyes; then
50282               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
50283               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
50284               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
50285               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50286                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
50287               fi
50288               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
50289               if test "x$BUNDLE_FREETYPE" = xyes; then
50290                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
50291 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
50292                 FOUND_FREETYPE=no
50293               else
50294                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
50295 $as_echo_n "checking for freetype... " >&6; }
50296                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
50297 $as_echo "yes (using pkg-config)" >&6; }
50298               fi
50299             fi
50300           fi
50301         fi
50302       fi
50303 
50304       if test "x$FOUND_FREETYPE" != xyes; then
50305         # Check in well-known locations
50306         if test "x$OPENJDK_TARGET_OS" = xwindows; then
50307           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
50308 
50309   windows_path="$FREETYPE_BASE_DIR"
50310   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50311     unix_path=`$CYGPATH -u "$windows_path"`
50312     FREETYPE_BASE_DIR="$unix_path"
50313   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50314     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50315     FREETYPE_BASE_DIR="$unix_path"
50316   fi
50317 
50318 
50319   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50320   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
50321   METHOD="well-known location"
50322 
50323   # Let's start with an optimistic view of the world :-)
50324   FOUND_FREETYPE=yes
50325 
50326   # First look for the canonical freetype main include file ft2build.h.
50327   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50328     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50329     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50330     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50331       # Fail.
50332       FOUND_FREETYPE=no
50333     fi
50334   fi
50335 
50336   if test "x$FOUND_FREETYPE" = xyes; then
50337     # Include file found, let's continue the sanity check.
50338     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50339 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50340 
50341     # Reset to default value
50342     FREETYPE_BASE_NAME=freetype
50343     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50344     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50345       if test "x$OPENJDK_TARGET_OS" = xmacosx \
50346           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50347         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50348         # for the .6 version explicitly.
50349         FREETYPE_BASE_NAME=freetype.6
50350         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50351         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50352 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50353       else
50354         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50355 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50356         FOUND_FREETYPE=no
50357       fi
50358     else
50359       if test "x$OPENJDK_TARGET_OS" = xwindows; then
50360         # On Windows, we will need both .lib and .dll file.
50361         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50362           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50363 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50364           FOUND_FREETYPE=no
50365         fi
50366       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50367           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50368         # Found lib in isa dir, use that instead.
50369         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50370         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50371 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50372       fi
50373     fi
50374   fi
50375 
50376   if test "x$FOUND_FREETYPE" = xyes; then
50377 
50378   # Only process if variable expands to non-empty
50379 
50380   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50381     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50382 
50383   # Input might be given as Windows format, start by converting to
50384   # unix format.
50385   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50386   new_path=`$CYGPATH -u "$path"`
50387 
50388   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50389   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50390   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50391   # "foo.exe" is OK but "foo" is an error.
50392   #
50393   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50394   # It is also a way to make sure we got the proper file name for the real test later on.
50395   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50396   if test "x$test_shortpath" = x; then
50397     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50398 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50399     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50400   fi
50401 
50402   # Call helper function which possibly converts this using DOS-style short mode.
50403   # If so, the updated path is stored in $new_path.
50404 
50405   input_path="$new_path"
50406   # Check if we need to convert this using DOS-style short mode. If the path
50407   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50408   # take no chances and rewrite it.
50409   # Note: m4 eats our [], so we need to use [ and ] instead.
50410   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50411   if test "x$has_forbidden_chars" != x; then
50412     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50413     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50414     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50415     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50416       # Going to short mode and back again did indeed matter. Since short mode is
50417       # case insensitive, let's make it lowercase to improve readability.
50418       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50419       # Now convert it back to Unix-style (cygpath)
50420       input_path=`$CYGPATH -u "$shortmode_path"`
50421       new_path="$input_path"
50422     fi
50423   fi
50424 
50425   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50426   if test "x$test_cygdrive_prefix" = x; then
50427     # As a simple fix, exclude /usr/bin since it's not a real path.
50428     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50429       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50430       # a path prefixed by /cygdrive for fixpath to work.
50431       new_path="$CYGWIN_ROOT_PATH$input_path"
50432     fi
50433   fi
50434 
50435 
50436   if test "x$path" != "x$new_path"; then
50437     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50438     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50439 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50440   fi
50441 
50442     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50443 
50444   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50445   has_colon=`$ECHO $path | $GREP ^.:`
50446   new_path="$path"
50447   if test "x$has_colon" = x; then
50448     # Not in mixed or Windows style, start by that.
50449     new_path=`cmd //c echo $path`
50450   fi
50451 
50452 
50453   input_path="$new_path"
50454   # Check if we need to convert this using DOS-style short mode. If the path
50455   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50456   # take no chances and rewrite it.
50457   # Note: m4 eats our [], so we need to use [ and ] instead.
50458   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50459   if test "x$has_forbidden_chars" != x; then
50460     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50461     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50462   fi
50463 
50464 
50465   windows_path="$new_path"
50466   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50467     unix_path=`$CYGPATH -u "$windows_path"`
50468     new_path="$unix_path"
50469   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50470     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50471     new_path="$unix_path"
50472   fi
50473 
50474   if test "x$path" != "x$new_path"; then
50475     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50476     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50477 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50478   fi
50479 
50480   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50481   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50482 
50483     else
50484       # We're on a unix platform. Hooray! :)
50485       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50486       has_space=`$ECHO "$path" | $GREP " "`
50487       if test "x$has_space" != x; then
50488         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50489 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50490         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50491       fi
50492 
50493       # Use eval to expand a potential ~
50494       eval path="$path"
50495       if test ! -f "$path" && test ! -d "$path"; then
50496         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50497       fi
50498 
50499       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50500     fi
50501   fi
50502 
50503 
50504   # Only process if variable expands to non-empty
50505 
50506   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50507     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50508 
50509   # Input might be given as Windows format, start by converting to
50510   # unix format.
50511   path="$POTENTIAL_FREETYPE_LIB_PATH"
50512   new_path=`$CYGPATH -u "$path"`
50513 
50514   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50515   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50516   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50517   # "foo.exe" is OK but "foo" is an error.
50518   #
50519   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50520   # It is also a way to make sure we got the proper file name for the real test later on.
50521   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50522   if test "x$test_shortpath" = x; then
50523     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50524 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50525     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50526   fi
50527 
50528   # Call helper function which possibly converts this using DOS-style short mode.
50529   # If so, the updated path is stored in $new_path.
50530 
50531   input_path="$new_path"
50532   # Check if we need to convert this using DOS-style short mode. If the path
50533   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50534   # take no chances and rewrite it.
50535   # Note: m4 eats our [], so we need to use [ and ] instead.
50536   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50537   if test "x$has_forbidden_chars" != x; then
50538     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50539     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50540     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50541     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50542       # Going to short mode and back again did indeed matter. Since short mode is
50543       # case insensitive, let's make it lowercase to improve readability.
50544       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50545       # Now convert it back to Unix-style (cygpath)
50546       input_path=`$CYGPATH -u "$shortmode_path"`
50547       new_path="$input_path"
50548     fi
50549   fi
50550 
50551   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50552   if test "x$test_cygdrive_prefix" = x; then
50553     # As a simple fix, exclude /usr/bin since it's not a real path.
50554     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50555       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50556       # a path prefixed by /cygdrive for fixpath to work.
50557       new_path="$CYGWIN_ROOT_PATH$input_path"
50558     fi
50559   fi
50560 
50561 
50562   if test "x$path" != "x$new_path"; then
50563     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50564     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50565 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50566   fi
50567 
50568     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50569 
50570   path="$POTENTIAL_FREETYPE_LIB_PATH"
50571   has_colon=`$ECHO $path | $GREP ^.:`
50572   new_path="$path"
50573   if test "x$has_colon" = x; then
50574     # Not in mixed or Windows style, start by that.
50575     new_path=`cmd //c echo $path`
50576   fi
50577 
50578 
50579   input_path="$new_path"
50580   # Check if we need to convert this using DOS-style short mode. If the path
50581   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50582   # take no chances and rewrite it.
50583   # Note: m4 eats our [], so we need to use [ and ] instead.
50584   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50585   if test "x$has_forbidden_chars" != x; then
50586     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50587     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50588   fi
50589 
50590 
50591   windows_path="$new_path"
50592   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50593     unix_path=`$CYGPATH -u "$windows_path"`
50594     new_path="$unix_path"
50595   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50596     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50597     new_path="$unix_path"
50598   fi
50599 
50600   if test "x$path" != "x$new_path"; then
50601     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50602     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50603 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50604   fi
50605 
50606   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50607   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50608 
50609     else
50610       # We're on a unix platform. Hooray! :)
50611       path="$POTENTIAL_FREETYPE_LIB_PATH"
50612       has_space=`$ECHO "$path" | $GREP " "`
50613       if test "x$has_space" != x; then
50614         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50615 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50616         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50617       fi
50618 
50619       # Use eval to expand a potential ~
50620       eval path="$path"
50621       if test ! -f "$path" && test ! -d "$path"; then
50622         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50623       fi
50624 
50625       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50626     fi
50627   fi
50628 
50629 
50630     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50631     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50632 $as_echo_n "checking for freetype includes... " >&6; }
50633     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50634 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50635     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50636     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50637 $as_echo_n "checking for freetype libraries... " >&6; }
50638     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50639 $as_echo "$FREETYPE_LIB_PATH" >&6; }
50640   fi
50641 
50642           if test "x$FOUND_FREETYPE" != xyes; then
50643             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
50644 
50645   windows_path="$FREETYPE_BASE_DIR"
50646   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50647     unix_path=`$CYGPATH -u "$windows_path"`
50648     FREETYPE_BASE_DIR="$unix_path"
50649   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50650     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50651     FREETYPE_BASE_DIR="$unix_path"
50652   fi
50653 
50654 
50655   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50656   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
50657   METHOD="well-known location"
50658 
50659   # Let's start with an optimistic view of the world :-)
50660   FOUND_FREETYPE=yes
50661 
50662   # First look for the canonical freetype main include file ft2build.h.
50663   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50664     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50665     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50666     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50667       # Fail.
50668       FOUND_FREETYPE=no
50669     fi
50670   fi
50671 
50672   if test "x$FOUND_FREETYPE" = xyes; then
50673     # Include file found, let's continue the sanity check.
50674     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50675 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50676 
50677     # Reset to default value
50678     FREETYPE_BASE_NAME=freetype
50679     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50680     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50681       if test "x$OPENJDK_TARGET_OS" = xmacosx \
50682           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50683         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50684         # for the .6 version explicitly.
50685         FREETYPE_BASE_NAME=freetype.6
50686         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50687         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50688 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50689       else
50690         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50691 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50692         FOUND_FREETYPE=no
50693       fi
50694     else
50695       if test "x$OPENJDK_TARGET_OS" = xwindows; then
50696         # On Windows, we will need both .lib and .dll file.
50697         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50698           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50699 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50700           FOUND_FREETYPE=no
50701         fi
50702       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50703           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50704         # Found lib in isa dir, use that instead.
50705         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50706         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50707 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50708       fi
50709     fi
50710   fi
50711 
50712   if test "x$FOUND_FREETYPE" = xyes; then
50713 
50714   # Only process if variable expands to non-empty
50715 
50716   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50717     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50718 
50719   # Input might be given as Windows format, start by converting to
50720   # unix format.
50721   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50722   new_path=`$CYGPATH -u "$path"`
50723 
50724   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50725   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50726   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50727   # "foo.exe" is OK but "foo" is an error.
50728   #
50729   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50730   # It is also a way to make sure we got the proper file name for the real test later on.
50731   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50732   if test "x$test_shortpath" = x; then
50733     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50734 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50735     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50736   fi
50737 
50738   # Call helper function which possibly converts this using DOS-style short mode.
50739   # If so, the updated path is stored in $new_path.
50740 
50741   input_path="$new_path"
50742   # Check if we need to convert this using DOS-style short mode. If the path
50743   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50744   # take no chances and rewrite it.
50745   # Note: m4 eats our [], so we need to use [ and ] instead.
50746   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50747   if test "x$has_forbidden_chars" != x; then
50748     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50749     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50750     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50751     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50752       # Going to short mode and back again did indeed matter. Since short mode is
50753       # case insensitive, let's make it lowercase to improve readability.
50754       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50755       # Now convert it back to Unix-style (cygpath)
50756       input_path=`$CYGPATH -u "$shortmode_path"`
50757       new_path="$input_path"
50758     fi
50759   fi
50760 
50761   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50762   if test "x$test_cygdrive_prefix" = x; then
50763     # As a simple fix, exclude /usr/bin since it's not a real path.
50764     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50765       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50766       # a path prefixed by /cygdrive for fixpath to work.
50767       new_path="$CYGWIN_ROOT_PATH$input_path"
50768     fi
50769   fi
50770 
50771 
50772   if test "x$path" != "x$new_path"; then
50773     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50774     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50775 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50776   fi
50777 
50778     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50779 
50780   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50781   has_colon=`$ECHO $path | $GREP ^.:`
50782   new_path="$path"
50783   if test "x$has_colon" = x; then
50784     # Not in mixed or Windows style, start by that.
50785     new_path=`cmd //c echo $path`
50786   fi
50787 
50788 
50789   input_path="$new_path"
50790   # Check if we need to convert this using DOS-style short mode. If the path
50791   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50792   # take no chances and rewrite it.
50793   # Note: m4 eats our [], so we need to use [ and ] instead.
50794   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50795   if test "x$has_forbidden_chars" != x; then
50796     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50797     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50798   fi
50799 
50800 
50801   windows_path="$new_path"
50802   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50803     unix_path=`$CYGPATH -u "$windows_path"`
50804     new_path="$unix_path"
50805   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50806     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50807     new_path="$unix_path"
50808   fi
50809 
50810   if test "x$path" != "x$new_path"; then
50811     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50812     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50813 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50814   fi
50815 
50816   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50817   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50818 
50819     else
50820       # We're on a unix platform. Hooray! :)
50821       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50822       has_space=`$ECHO "$path" | $GREP " "`
50823       if test "x$has_space" != x; then
50824         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50825 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50826         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50827       fi
50828 
50829       # Use eval to expand a potential ~
50830       eval path="$path"
50831       if test ! -f "$path" && test ! -d "$path"; then
50832         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50833       fi
50834 
50835       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50836     fi
50837   fi
50838 
50839 
50840   # Only process if variable expands to non-empty
50841 
50842   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50843     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50844 
50845   # Input might be given as Windows format, start by converting to
50846   # unix format.
50847   path="$POTENTIAL_FREETYPE_LIB_PATH"
50848   new_path=`$CYGPATH -u "$path"`
50849 
50850   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50851   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50852   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50853   # "foo.exe" is OK but "foo" is an error.
50854   #
50855   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50856   # It is also a way to make sure we got the proper file name for the real test later on.
50857   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50858   if test "x$test_shortpath" = x; then
50859     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50860 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50861     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50862   fi
50863 
50864   # Call helper function which possibly converts this using DOS-style short mode.
50865   # If so, the updated path is stored in $new_path.
50866 
50867   input_path="$new_path"
50868   # Check if we need to convert this using DOS-style short mode. If the path
50869   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50870   # take no chances and rewrite it.
50871   # Note: m4 eats our [], so we need to use [ and ] instead.
50872   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50873   if test "x$has_forbidden_chars" != x; then
50874     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50875     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50876     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50877     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50878       # Going to short mode and back again did indeed matter. Since short mode is
50879       # case insensitive, let's make it lowercase to improve readability.
50880       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50881       # Now convert it back to Unix-style (cygpath)
50882       input_path=`$CYGPATH -u "$shortmode_path"`
50883       new_path="$input_path"
50884     fi
50885   fi
50886 
50887   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50888   if test "x$test_cygdrive_prefix" = x; then
50889     # As a simple fix, exclude /usr/bin since it's not a real path.
50890     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50891       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50892       # a path prefixed by /cygdrive for fixpath to work.
50893       new_path="$CYGWIN_ROOT_PATH$input_path"
50894     fi
50895   fi
50896 
50897 
50898   if test "x$path" != "x$new_path"; then
50899     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50900     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50901 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50902   fi
50903 
50904     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50905 
50906   path="$POTENTIAL_FREETYPE_LIB_PATH"
50907   has_colon=`$ECHO $path | $GREP ^.:`
50908   new_path="$path"
50909   if test "x$has_colon" = x; then
50910     # Not in mixed or Windows style, start by that.
50911     new_path=`cmd //c echo $path`
50912   fi
50913 
50914 
50915   input_path="$new_path"
50916   # Check if we need to convert this using DOS-style short mode. If the path
50917   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50918   # take no chances and rewrite it.
50919   # Note: m4 eats our [], so we need to use [ and ] instead.
50920   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50921   if test "x$has_forbidden_chars" != x; then
50922     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50923     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50924   fi
50925 
50926 
50927   windows_path="$new_path"
50928   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50929     unix_path=`$CYGPATH -u "$windows_path"`
50930     new_path="$unix_path"
50931   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50932     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50933     new_path="$unix_path"
50934   fi
50935 
50936   if test "x$path" != "x$new_path"; then
50937     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50938     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50939 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50940   fi
50941 
50942   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50943   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50944 
50945     else
50946       # We're on a unix platform. Hooray! :)
50947       path="$POTENTIAL_FREETYPE_LIB_PATH"
50948       has_space=`$ECHO "$path" | $GREP " "`
50949       if test "x$has_space" != x; then
50950         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50951 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50952         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50953       fi
50954 
50955       # Use eval to expand a potential ~
50956       eval path="$path"
50957       if test ! -f "$path" && test ! -d "$path"; then
50958         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50959       fi
50960 
50961       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50962     fi
50963   fi
50964 
50965 
50966     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50967     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50968 $as_echo_n "checking for freetype includes... " >&6; }
50969     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50970 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50971     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50972     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50973 $as_echo_n "checking for freetype libraries... " >&6; }
50974     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50975 $as_echo "$FREETYPE_LIB_PATH" >&6; }
50976   fi
50977 
50978           fi
50979         else
50980           FREETYPE_BASE_DIR="$SYSROOT/usr"
50981 
50982   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50983   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
50984   METHOD="well-known location"
50985 
50986   # Let's start with an optimistic view of the world :-)
50987   FOUND_FREETYPE=yes
50988 
50989   # First look for the canonical freetype main include file ft2build.h.
50990   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50991     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50992     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50993     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50994       # Fail.
50995       FOUND_FREETYPE=no
50996     fi
50997   fi
50998 
50999   if test "x$FOUND_FREETYPE" = xyes; then
51000     # Include file found, let's continue the sanity check.
51001     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51002 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51003 
51004     # Reset to default value
51005     FREETYPE_BASE_NAME=freetype
51006     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51007     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51008       if test "x$OPENJDK_TARGET_OS" = xmacosx \
51009           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51010         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51011         # for the .6 version explicitly.
51012         FREETYPE_BASE_NAME=freetype.6
51013         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51014         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51015 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51016       else
51017         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51018 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51019         FOUND_FREETYPE=no
51020       fi
51021     else
51022       if test "x$OPENJDK_TARGET_OS" = xwindows; then
51023         # On Windows, we will need both .lib and .dll file.
51024         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51025           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51026 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51027           FOUND_FREETYPE=no
51028         fi
51029       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51030           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51031         # Found lib in isa dir, use that instead.
51032         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51033         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51034 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51035       fi
51036     fi
51037   fi
51038 
51039   if test "x$FOUND_FREETYPE" = xyes; then
51040 
51041   # Only process if variable expands to non-empty
51042 
51043   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51044     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51045 
51046   # Input might be given as Windows format, start by converting to
51047   # unix format.
51048   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51049   new_path=`$CYGPATH -u "$path"`
51050 
51051   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51052   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51053   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51054   # "foo.exe" is OK but "foo" is an error.
51055   #
51056   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51057   # It is also a way to make sure we got the proper file name for the real test later on.
51058   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51059   if test "x$test_shortpath" = x; then
51060     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51061 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51062     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51063   fi
51064 
51065   # Call helper function which possibly converts this using DOS-style short mode.
51066   # If so, the updated path is stored in $new_path.
51067 
51068   input_path="$new_path"
51069   # Check if we need to convert this using DOS-style short mode. If the path
51070   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51071   # take no chances and rewrite it.
51072   # Note: m4 eats our [], so we need to use [ and ] instead.
51073   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51074   if test "x$has_forbidden_chars" != x; then
51075     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51076     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51077     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51078     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51079       # Going to short mode and back again did indeed matter. Since short mode is
51080       # case insensitive, let's make it lowercase to improve readability.
51081       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51082       # Now convert it back to Unix-style (cygpath)
51083       input_path=`$CYGPATH -u "$shortmode_path"`
51084       new_path="$input_path"
51085     fi
51086   fi
51087 
51088   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51089   if test "x$test_cygdrive_prefix" = x; then
51090     # As a simple fix, exclude /usr/bin since it's not a real path.
51091     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51092       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51093       # a path prefixed by /cygdrive for fixpath to work.
51094       new_path="$CYGWIN_ROOT_PATH$input_path"
51095     fi
51096   fi
51097 
51098 
51099   if test "x$path" != "x$new_path"; then
51100     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51101     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51102 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51103   fi
51104 
51105     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51106 
51107   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51108   has_colon=`$ECHO $path | $GREP ^.:`
51109   new_path="$path"
51110   if test "x$has_colon" = x; then
51111     # Not in mixed or Windows style, start by that.
51112     new_path=`cmd //c echo $path`
51113   fi
51114 
51115 
51116   input_path="$new_path"
51117   # Check if we need to convert this using DOS-style short mode. If the path
51118   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51119   # take no chances and rewrite it.
51120   # Note: m4 eats our [], so we need to use [ and ] instead.
51121   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51122   if test "x$has_forbidden_chars" != x; then
51123     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51124     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51125   fi
51126 
51127 
51128   windows_path="$new_path"
51129   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51130     unix_path=`$CYGPATH -u "$windows_path"`
51131     new_path="$unix_path"
51132   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51133     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51134     new_path="$unix_path"
51135   fi
51136 
51137   if test "x$path" != "x$new_path"; then
51138     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51139     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51140 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51141   fi
51142 
51143   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51144   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51145 
51146     else
51147       # We're on a unix platform. Hooray! :)
51148       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51149       has_space=`$ECHO "$path" | $GREP " "`
51150       if test "x$has_space" != x; then
51151         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51152 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51153         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51154       fi
51155 
51156       # Use eval to expand a potential ~
51157       eval path="$path"
51158       if test ! -f "$path" && test ! -d "$path"; then
51159         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51160       fi
51161 
51162       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51163     fi
51164   fi
51165 
51166 
51167   # Only process if variable expands to non-empty
51168 
51169   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51170     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51171 
51172   # Input might be given as Windows format, start by converting to
51173   # unix format.
51174   path="$POTENTIAL_FREETYPE_LIB_PATH"
51175   new_path=`$CYGPATH -u "$path"`
51176 
51177   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51178   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51179   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51180   # "foo.exe" is OK but "foo" is an error.
51181   #
51182   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51183   # It is also a way to make sure we got the proper file name for the real test later on.
51184   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51185   if test "x$test_shortpath" = x; then
51186     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51187 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51188     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51189   fi
51190 
51191   # Call helper function which possibly converts this using DOS-style short mode.
51192   # If so, the updated path is stored in $new_path.
51193 
51194   input_path="$new_path"
51195   # Check if we need to convert this using DOS-style short mode. If the path
51196   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51197   # take no chances and rewrite it.
51198   # Note: m4 eats our [], so we need to use [ and ] instead.
51199   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51200   if test "x$has_forbidden_chars" != x; then
51201     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51202     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51203     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51204     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51205       # Going to short mode and back again did indeed matter. Since short mode is
51206       # case insensitive, let's make it lowercase to improve readability.
51207       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51208       # Now convert it back to Unix-style (cygpath)
51209       input_path=`$CYGPATH -u "$shortmode_path"`
51210       new_path="$input_path"
51211     fi
51212   fi
51213 
51214   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51215   if test "x$test_cygdrive_prefix" = x; then
51216     # As a simple fix, exclude /usr/bin since it's not a real path.
51217     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51218       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51219       # a path prefixed by /cygdrive for fixpath to work.
51220       new_path="$CYGWIN_ROOT_PATH$input_path"
51221     fi
51222   fi
51223 
51224 
51225   if test "x$path" != "x$new_path"; then
51226     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51227     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51228 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51229   fi
51230 
51231     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51232 
51233   path="$POTENTIAL_FREETYPE_LIB_PATH"
51234   has_colon=`$ECHO $path | $GREP ^.:`
51235   new_path="$path"
51236   if test "x$has_colon" = x; then
51237     # Not in mixed or Windows style, start by that.
51238     new_path=`cmd //c echo $path`
51239   fi
51240 
51241 
51242   input_path="$new_path"
51243   # Check if we need to convert this using DOS-style short mode. If the path
51244   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51245   # take no chances and rewrite it.
51246   # Note: m4 eats our [], so we need to use [ and ] instead.
51247   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51248   if test "x$has_forbidden_chars" != x; then
51249     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51250     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51251   fi
51252 
51253 
51254   windows_path="$new_path"
51255   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51256     unix_path=`$CYGPATH -u "$windows_path"`
51257     new_path="$unix_path"
51258   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51259     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51260     new_path="$unix_path"
51261   fi
51262 
51263   if test "x$path" != "x$new_path"; then
51264     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51265     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51266 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51267   fi
51268 
51269   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51270   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51271 
51272     else
51273       # We're on a unix platform. Hooray! :)
51274       path="$POTENTIAL_FREETYPE_LIB_PATH"
51275       has_space=`$ECHO "$path" | $GREP " "`
51276       if test "x$has_space" != x; then
51277         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51278 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51279         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51280       fi
51281 
51282       # Use eval to expand a potential ~
51283       eval path="$path"
51284       if test ! -f "$path" && test ! -d "$path"; then
51285         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51286       fi
51287 
51288       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51289     fi
51290   fi
51291 
51292 
51293     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51294     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51295 $as_echo_n "checking for freetype includes... " >&6; }
51296     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51297 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51298     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51299     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51300 $as_echo_n "checking for freetype libraries... " >&6; }
51301     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51302 $as_echo "$FREETYPE_LIB_PATH" >&6; }
51303   fi
51304 
51305 
51306           if test "x$FOUND_FREETYPE" != xyes; then
51307             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
51308 
51309   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51310   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51311   METHOD="well-known location"
51312 
51313   # Let's start with an optimistic view of the world :-)
51314   FOUND_FREETYPE=yes
51315 
51316   # First look for the canonical freetype main include file ft2build.h.
51317   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51318     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51319     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51320     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51321       # Fail.
51322       FOUND_FREETYPE=no
51323     fi
51324   fi
51325 
51326   if test "x$FOUND_FREETYPE" = xyes; then
51327     # Include file found, let's continue the sanity check.
51328     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51329 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51330 
51331     # Reset to default value
51332     FREETYPE_BASE_NAME=freetype
51333     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51334     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51335       if test "x$OPENJDK_TARGET_OS" = xmacosx \
51336           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51337         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51338         # for the .6 version explicitly.
51339         FREETYPE_BASE_NAME=freetype.6
51340         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51341         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51342 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51343       else
51344         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51345 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51346         FOUND_FREETYPE=no
51347       fi
51348     else
51349       if test "x$OPENJDK_TARGET_OS" = xwindows; then
51350         # On Windows, we will need both .lib and .dll file.
51351         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51352           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51353 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51354           FOUND_FREETYPE=no
51355         fi
51356       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51357           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51358         # Found lib in isa dir, use that instead.
51359         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51360         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51361 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51362       fi
51363     fi
51364   fi
51365 
51366   if test "x$FOUND_FREETYPE" = xyes; then
51367 
51368   # Only process if variable expands to non-empty
51369 
51370   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51371     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51372 
51373   # Input might be given as Windows format, start by converting to
51374   # unix format.
51375   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51376   new_path=`$CYGPATH -u "$path"`
51377 
51378   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51379   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51380   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51381   # "foo.exe" is OK but "foo" is an error.
51382   #
51383   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51384   # It is also a way to make sure we got the proper file name for the real test later on.
51385   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51386   if test "x$test_shortpath" = x; then
51387     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51388 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51389     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51390   fi
51391 
51392   # Call helper function which possibly converts this using DOS-style short mode.
51393   # If so, the updated path is stored in $new_path.
51394 
51395   input_path="$new_path"
51396   # Check if we need to convert this using DOS-style short mode. If the path
51397   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51398   # take no chances and rewrite it.
51399   # Note: m4 eats our [], so we need to use [ and ] instead.
51400   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51401   if test "x$has_forbidden_chars" != x; then
51402     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51403     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51404     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51405     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51406       # Going to short mode and back again did indeed matter. Since short mode is
51407       # case insensitive, let's make it lowercase to improve readability.
51408       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51409       # Now convert it back to Unix-style (cygpath)
51410       input_path=`$CYGPATH -u "$shortmode_path"`
51411       new_path="$input_path"
51412     fi
51413   fi
51414 
51415   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51416   if test "x$test_cygdrive_prefix" = x; then
51417     # As a simple fix, exclude /usr/bin since it's not a real path.
51418     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51419       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51420       # a path prefixed by /cygdrive for fixpath to work.
51421       new_path="$CYGWIN_ROOT_PATH$input_path"
51422     fi
51423   fi
51424 
51425 
51426   if test "x$path" != "x$new_path"; then
51427     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51428     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51429 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51430   fi
51431 
51432     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51433 
51434   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51435   has_colon=`$ECHO $path | $GREP ^.:`
51436   new_path="$path"
51437   if test "x$has_colon" = x; then
51438     # Not in mixed or Windows style, start by that.
51439     new_path=`cmd //c echo $path`
51440   fi
51441 
51442 
51443   input_path="$new_path"
51444   # Check if we need to convert this using DOS-style short mode. If the path
51445   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51446   # take no chances and rewrite it.
51447   # Note: m4 eats our [], so we need to use [ and ] instead.
51448   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51449   if test "x$has_forbidden_chars" != x; then
51450     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51451     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51452   fi
51453 
51454 
51455   windows_path="$new_path"
51456   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51457     unix_path=`$CYGPATH -u "$windows_path"`
51458     new_path="$unix_path"
51459   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51460     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51461     new_path="$unix_path"
51462   fi
51463 
51464   if test "x$path" != "x$new_path"; then
51465     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51466     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51467 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51468   fi
51469 
51470   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51471   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51472 
51473     else
51474       # We're on a unix platform. Hooray! :)
51475       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51476       has_space=`$ECHO "$path" | $GREP " "`
51477       if test "x$has_space" != x; then
51478         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51479 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51480         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51481       fi
51482 
51483       # Use eval to expand a potential ~
51484       eval path="$path"
51485       if test ! -f "$path" && test ! -d "$path"; then
51486         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51487       fi
51488 
51489       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51490     fi
51491   fi
51492 
51493 
51494   # Only process if variable expands to non-empty
51495 
51496   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51497     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51498 
51499   # Input might be given as Windows format, start by converting to
51500   # unix format.
51501   path="$POTENTIAL_FREETYPE_LIB_PATH"
51502   new_path=`$CYGPATH -u "$path"`
51503 
51504   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51505   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51506   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51507   # "foo.exe" is OK but "foo" is an error.
51508   #
51509   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51510   # It is also a way to make sure we got the proper file name for the real test later on.
51511   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51512   if test "x$test_shortpath" = x; then
51513     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51514 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51515     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51516   fi
51517 
51518   # Call helper function which possibly converts this using DOS-style short mode.
51519   # If so, the updated path is stored in $new_path.
51520 
51521   input_path="$new_path"
51522   # Check if we need to convert this using DOS-style short mode. If the path
51523   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51524   # take no chances and rewrite it.
51525   # Note: m4 eats our [], so we need to use [ and ] instead.
51526   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51527   if test "x$has_forbidden_chars" != x; then
51528     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51529     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51530     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51531     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51532       # Going to short mode and back again did indeed matter. Since short mode is
51533       # case insensitive, let's make it lowercase to improve readability.
51534       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51535       # Now convert it back to Unix-style (cygpath)
51536       input_path=`$CYGPATH -u "$shortmode_path"`
51537       new_path="$input_path"
51538     fi
51539   fi
51540 
51541   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51542   if test "x$test_cygdrive_prefix" = x; then
51543     # As a simple fix, exclude /usr/bin since it's not a real path.
51544     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51545       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51546       # a path prefixed by /cygdrive for fixpath to work.
51547       new_path="$CYGWIN_ROOT_PATH$input_path"
51548     fi
51549   fi
51550 
51551 
51552   if test "x$path" != "x$new_path"; then
51553     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51554     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51555 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51556   fi
51557 
51558     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51559 
51560   path="$POTENTIAL_FREETYPE_LIB_PATH"
51561   has_colon=`$ECHO $path | $GREP ^.:`
51562   new_path="$path"
51563   if test "x$has_colon" = x; then
51564     # Not in mixed or Windows style, start by that.
51565     new_path=`cmd //c echo $path`
51566   fi
51567 
51568 
51569   input_path="$new_path"
51570   # Check if we need to convert this using DOS-style short mode. If the path
51571   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51572   # take no chances and rewrite it.
51573   # Note: m4 eats our [], so we need to use [ and ] instead.
51574   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51575   if test "x$has_forbidden_chars" != x; then
51576     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51577     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51578   fi
51579 
51580 
51581   windows_path="$new_path"
51582   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51583     unix_path=`$CYGPATH -u "$windows_path"`
51584     new_path="$unix_path"
51585   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51586     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51587     new_path="$unix_path"
51588   fi
51589 
51590   if test "x$path" != "x$new_path"; then
51591     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51592     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51593 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51594   fi
51595 
51596   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51597   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51598 
51599     else
51600       # We're on a unix platform. Hooray! :)
51601       path="$POTENTIAL_FREETYPE_LIB_PATH"
51602       has_space=`$ECHO "$path" | $GREP " "`
51603       if test "x$has_space" != x; then
51604         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51605 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51606         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51607       fi
51608 
51609       # Use eval to expand a potential ~
51610       eval path="$path"
51611       if test ! -f "$path" && test ! -d "$path"; then
51612         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51613       fi
51614 
51615       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51616     fi
51617   fi
51618 
51619 
51620     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51621     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51622 $as_echo_n "checking for freetype includes... " >&6; }
51623     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51624 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51625     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51626     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51627 $as_echo_n "checking for freetype libraries... " >&6; }
51628     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51629 $as_echo "$FREETYPE_LIB_PATH" >&6; }
51630   fi
51631 
51632           fi
51633 
51634           if test "x$FOUND_FREETYPE" != xyes; then
51635             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
51636 
51637   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51638   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51639   METHOD="well-known location"
51640 
51641   # Let's start with an optimistic view of the world :-)
51642   FOUND_FREETYPE=yes
51643 
51644   # First look for the canonical freetype main include file ft2build.h.
51645   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51646     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51647     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51648     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51649       # Fail.
51650       FOUND_FREETYPE=no
51651     fi
51652   fi
51653 
51654   if test "x$FOUND_FREETYPE" = xyes; then
51655     # Include file found, let's continue the sanity check.
51656     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51657 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51658 
51659     # Reset to default value
51660     FREETYPE_BASE_NAME=freetype
51661     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51662     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51663       if test "x$OPENJDK_TARGET_OS" = xmacosx \
51664           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51665         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51666         # for the .6 version explicitly.
51667         FREETYPE_BASE_NAME=freetype.6
51668         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51669         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51670 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51671       else
51672         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51673 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51674         FOUND_FREETYPE=no
51675       fi
51676     else
51677       if test "x$OPENJDK_TARGET_OS" = xwindows; then
51678         # On Windows, we will need both .lib and .dll file.
51679         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51680           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51681 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51682           FOUND_FREETYPE=no
51683         fi
51684       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51685           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51686         # Found lib in isa dir, use that instead.
51687         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51688         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51689 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51690       fi
51691     fi
51692   fi
51693 
51694   if test "x$FOUND_FREETYPE" = xyes; then
51695 
51696   # Only process if variable expands to non-empty
51697 
51698   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51699     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51700 
51701   # Input might be given as Windows format, start by converting to
51702   # unix format.
51703   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51704   new_path=`$CYGPATH -u "$path"`
51705 
51706   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51707   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51708   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51709   # "foo.exe" is OK but "foo" is an error.
51710   #
51711   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51712   # It is also a way to make sure we got the proper file name for the real test later on.
51713   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51714   if test "x$test_shortpath" = x; then
51715     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51716 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51717     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51718   fi
51719 
51720   # Call helper function which possibly converts this using DOS-style short mode.
51721   # If so, the updated path is stored in $new_path.
51722 
51723   input_path="$new_path"
51724   # Check if we need to convert this using DOS-style short mode. If the path
51725   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51726   # take no chances and rewrite it.
51727   # Note: m4 eats our [], so we need to use [ and ] instead.
51728   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51729   if test "x$has_forbidden_chars" != x; then
51730     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51731     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51732     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51733     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51734       # Going to short mode and back again did indeed matter. Since short mode is
51735       # case insensitive, let's make it lowercase to improve readability.
51736       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51737       # Now convert it back to Unix-style (cygpath)
51738       input_path=`$CYGPATH -u "$shortmode_path"`
51739       new_path="$input_path"
51740     fi
51741   fi
51742 
51743   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51744   if test "x$test_cygdrive_prefix" = x; then
51745     # As a simple fix, exclude /usr/bin since it's not a real path.
51746     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51747       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51748       # a path prefixed by /cygdrive for fixpath to work.
51749       new_path="$CYGWIN_ROOT_PATH$input_path"
51750     fi
51751   fi
51752 
51753 
51754   if test "x$path" != "x$new_path"; then
51755     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51756     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51757 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51758   fi
51759 
51760     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51761 
51762   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51763   has_colon=`$ECHO $path | $GREP ^.:`
51764   new_path="$path"
51765   if test "x$has_colon" = x; then
51766     # Not in mixed or Windows style, start by that.
51767     new_path=`cmd //c echo $path`
51768   fi
51769 
51770 
51771   input_path="$new_path"
51772   # Check if we need to convert this using DOS-style short mode. If the path
51773   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51774   # take no chances and rewrite it.
51775   # Note: m4 eats our [], so we need to use [ and ] instead.
51776   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51777   if test "x$has_forbidden_chars" != x; then
51778     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51779     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51780   fi
51781 
51782 
51783   windows_path="$new_path"
51784   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51785     unix_path=`$CYGPATH -u "$windows_path"`
51786     new_path="$unix_path"
51787   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51788     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51789     new_path="$unix_path"
51790   fi
51791 
51792   if test "x$path" != "x$new_path"; then
51793     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51794     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51795 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51796   fi
51797 
51798   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51799   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51800 
51801     else
51802       # We're on a unix platform. Hooray! :)
51803       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51804       has_space=`$ECHO "$path" | $GREP " "`
51805       if test "x$has_space" != x; then
51806         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51807 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51808         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51809       fi
51810 
51811       # Use eval to expand a potential ~
51812       eval path="$path"
51813       if test ! -f "$path" && test ! -d "$path"; then
51814         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51815       fi
51816 
51817       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51818     fi
51819   fi
51820 
51821 
51822   # Only process if variable expands to non-empty
51823 
51824   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51825     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51826 
51827   # Input might be given as Windows format, start by converting to
51828   # unix format.
51829   path="$POTENTIAL_FREETYPE_LIB_PATH"
51830   new_path=`$CYGPATH -u "$path"`
51831 
51832   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51833   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51834   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51835   # "foo.exe" is OK but "foo" is an error.
51836   #
51837   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51838   # It is also a way to make sure we got the proper file name for the real test later on.
51839   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51840   if test "x$test_shortpath" = x; then
51841     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51842 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51843     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51844   fi
51845 
51846   # Call helper function which possibly converts this using DOS-style short mode.
51847   # If so, the updated path is stored in $new_path.
51848 
51849   input_path="$new_path"
51850   # Check if we need to convert this using DOS-style short mode. If the path
51851   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51852   # take no chances and rewrite it.
51853   # Note: m4 eats our [], so we need to use [ and ] instead.
51854   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51855   if test "x$has_forbidden_chars" != x; then
51856     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51857     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51858     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51859     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51860       # Going to short mode and back again did indeed matter. Since short mode is
51861       # case insensitive, let's make it lowercase to improve readability.
51862       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51863       # Now convert it back to Unix-style (cygpath)
51864       input_path=`$CYGPATH -u "$shortmode_path"`
51865       new_path="$input_path"
51866     fi
51867   fi
51868 
51869   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51870   if test "x$test_cygdrive_prefix" = x; then
51871     # As a simple fix, exclude /usr/bin since it's not a real path.
51872     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51873       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51874       # a path prefixed by /cygdrive for fixpath to work.
51875       new_path="$CYGWIN_ROOT_PATH$input_path"
51876     fi
51877   fi
51878 
51879 
51880   if test "x$path" != "x$new_path"; then
51881     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51882     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51883 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51884   fi
51885 
51886     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51887 
51888   path="$POTENTIAL_FREETYPE_LIB_PATH"
51889   has_colon=`$ECHO $path | $GREP ^.:`
51890   new_path="$path"
51891   if test "x$has_colon" = x; then
51892     # Not in mixed or Windows style, start by that.
51893     new_path=`cmd //c echo $path`
51894   fi
51895 
51896 
51897   input_path="$new_path"
51898   # Check if we need to convert this using DOS-style short mode. If the path
51899   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51900   # take no chances and rewrite it.
51901   # Note: m4 eats our [], so we need to use [ and ] instead.
51902   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51903   if test "x$has_forbidden_chars" != x; then
51904     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51905     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51906   fi
51907 
51908 
51909   windows_path="$new_path"
51910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51911     unix_path=`$CYGPATH -u "$windows_path"`
51912     new_path="$unix_path"
51913   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51914     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51915     new_path="$unix_path"
51916   fi
51917 
51918   if test "x$path" != "x$new_path"; then
51919     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51920     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51921 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51922   fi
51923 
51924   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51925   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51926 
51927     else
51928       # We're on a unix platform. Hooray! :)
51929       path="$POTENTIAL_FREETYPE_LIB_PATH"
51930       has_space=`$ECHO "$path" | $GREP " "`
51931       if test "x$has_space" != x; then
51932         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51933 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51934         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51935       fi
51936 
51937       # Use eval to expand a potential ~
51938       eval path="$path"
51939       if test ! -f "$path" && test ! -d "$path"; then
51940         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51941       fi
51942 
51943       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51944     fi
51945   fi
51946 
51947 
51948     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51949     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51950 $as_echo_n "checking for freetype includes... " >&6; }
51951     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51952 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51953     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51954     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51955 $as_echo_n "checking for freetype libraries... " >&6; }
51956     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51957 $as_echo "$FREETYPE_LIB_PATH" >&6; }
51958   fi
51959 
51960           fi
51961 
51962           if test "x$FOUND_FREETYPE" != xyes; then
51963             FREETYPE_BASE_DIR="$SYSROOT/usr"
51964             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51965 
51966   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51967   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
51968   METHOD="well-known location"
51969 
51970   # Let's start with an optimistic view of the world :-)
51971   FOUND_FREETYPE=yes
51972 
51973   # First look for the canonical freetype main include file ft2build.h.
51974   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51975     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51976     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51977     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51978       # Fail.
51979       FOUND_FREETYPE=no
51980     fi
51981   fi
51982 
51983   if test "x$FOUND_FREETYPE" = xyes; then
51984     # Include file found, let's continue the sanity check.
51985     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51986 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51987 
51988     # Reset to default value
51989     FREETYPE_BASE_NAME=freetype
51990     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51991     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51992       if test "x$OPENJDK_TARGET_OS" = xmacosx \
51993           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51994         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51995         # for the .6 version explicitly.
51996         FREETYPE_BASE_NAME=freetype.6
51997         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51998         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51999 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52000       else
52001         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52002 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52003         FOUND_FREETYPE=no
52004       fi
52005     else
52006       if test "x$OPENJDK_TARGET_OS" = xwindows; then
52007         # On Windows, we will need both .lib and .dll file.
52008         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52009           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52010 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52011           FOUND_FREETYPE=no
52012         fi
52013       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52014           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52015         # Found lib in isa dir, use that instead.
52016         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52017         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52018 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52019       fi
52020     fi
52021   fi
52022 
52023   if test "x$FOUND_FREETYPE" = xyes; then
52024 
52025   # Only process if variable expands to non-empty
52026 
52027   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52028     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52029 
52030   # Input might be given as Windows format, start by converting to
52031   # unix format.
52032   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52033   new_path=`$CYGPATH -u "$path"`
52034 
52035   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52036   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52037   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52038   # "foo.exe" is OK but "foo" is an error.
52039   #
52040   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52041   # It is also a way to make sure we got the proper file name for the real test later on.
52042   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52043   if test "x$test_shortpath" = x; then
52044     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52045 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52046     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52047   fi
52048 
52049   # Call helper function which possibly converts this using DOS-style short mode.
52050   # If so, the updated path is stored in $new_path.
52051 
52052   input_path="$new_path"
52053   # Check if we need to convert this using DOS-style short mode. If the path
52054   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52055   # take no chances and rewrite it.
52056   # Note: m4 eats our [], so we need to use [ and ] instead.
52057   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52058   if test "x$has_forbidden_chars" != x; then
52059     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52060     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52061     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52062     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52063       # Going to short mode and back again did indeed matter. Since short mode is
52064       # case insensitive, let's make it lowercase to improve readability.
52065       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52066       # Now convert it back to Unix-style (cygpath)
52067       input_path=`$CYGPATH -u "$shortmode_path"`
52068       new_path="$input_path"
52069     fi
52070   fi
52071 
52072   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52073   if test "x$test_cygdrive_prefix" = x; then
52074     # As a simple fix, exclude /usr/bin since it's not a real path.
52075     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52076       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52077       # a path prefixed by /cygdrive for fixpath to work.
52078       new_path="$CYGWIN_ROOT_PATH$input_path"
52079     fi
52080   fi
52081 
52082 
52083   if test "x$path" != "x$new_path"; then
52084     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52085     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52086 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52087   fi
52088 
52089     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52090 
52091   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52092   has_colon=`$ECHO $path | $GREP ^.:`
52093   new_path="$path"
52094   if test "x$has_colon" = x; then
52095     # Not in mixed or Windows style, start by that.
52096     new_path=`cmd //c echo $path`
52097   fi
52098 
52099 
52100   input_path="$new_path"
52101   # Check if we need to convert this using DOS-style short mode. If the path
52102   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52103   # take no chances and rewrite it.
52104   # Note: m4 eats our [], so we need to use [ and ] instead.
52105   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52106   if test "x$has_forbidden_chars" != x; then
52107     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52108     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52109   fi
52110 
52111 
52112   windows_path="$new_path"
52113   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52114     unix_path=`$CYGPATH -u "$windows_path"`
52115     new_path="$unix_path"
52116   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52117     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52118     new_path="$unix_path"
52119   fi
52120 
52121   if test "x$path" != "x$new_path"; then
52122     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52123     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52124 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52125   fi
52126 
52127   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52128   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52129 
52130     else
52131       # We're on a unix platform. Hooray! :)
52132       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52133       has_space=`$ECHO "$path" | $GREP " "`
52134       if test "x$has_space" != x; then
52135         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52136 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52137         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52138       fi
52139 
52140       # Use eval to expand a potential ~
52141       eval path="$path"
52142       if test ! -f "$path" && test ! -d "$path"; then
52143         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52144       fi
52145 
52146       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52147     fi
52148   fi
52149 
52150 
52151   # Only process if variable expands to non-empty
52152 
52153   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52154     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52155 
52156   # Input might be given as Windows format, start by converting to
52157   # unix format.
52158   path="$POTENTIAL_FREETYPE_LIB_PATH"
52159   new_path=`$CYGPATH -u "$path"`
52160 
52161   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52162   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52163   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52164   # "foo.exe" is OK but "foo" is an error.
52165   #
52166   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52167   # It is also a way to make sure we got the proper file name for the real test later on.
52168   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52169   if test "x$test_shortpath" = x; then
52170     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52171 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52172     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52173   fi
52174 
52175   # Call helper function which possibly converts this using DOS-style short mode.
52176   # If so, the updated path is stored in $new_path.
52177 
52178   input_path="$new_path"
52179   # Check if we need to convert this using DOS-style short mode. If the path
52180   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52181   # take no chances and rewrite it.
52182   # Note: m4 eats our [], so we need to use [ and ] instead.
52183   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52184   if test "x$has_forbidden_chars" != x; then
52185     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52186     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52187     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52188     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52189       # Going to short mode and back again did indeed matter. Since short mode is
52190       # case insensitive, let's make it lowercase to improve readability.
52191       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52192       # Now convert it back to Unix-style (cygpath)
52193       input_path=`$CYGPATH -u "$shortmode_path"`
52194       new_path="$input_path"
52195     fi
52196   fi
52197 
52198   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52199   if test "x$test_cygdrive_prefix" = x; then
52200     # As a simple fix, exclude /usr/bin since it's not a real path.
52201     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52202       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52203       # a path prefixed by /cygdrive for fixpath to work.
52204       new_path="$CYGWIN_ROOT_PATH$input_path"
52205     fi
52206   fi
52207 
52208 
52209   if test "x$path" != "x$new_path"; then
52210     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52211     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52212 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52213   fi
52214 
52215     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52216 
52217   path="$POTENTIAL_FREETYPE_LIB_PATH"
52218   has_colon=`$ECHO $path | $GREP ^.:`
52219   new_path="$path"
52220   if test "x$has_colon" = x; then
52221     # Not in mixed or Windows style, start by that.
52222     new_path=`cmd //c echo $path`
52223   fi
52224 
52225 
52226   input_path="$new_path"
52227   # Check if we need to convert this using DOS-style short mode. If the path
52228   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52229   # take no chances and rewrite it.
52230   # Note: m4 eats our [], so we need to use [ and ] instead.
52231   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52232   if test "x$has_forbidden_chars" != x; then
52233     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52234     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52235   fi
52236 
52237 
52238   windows_path="$new_path"
52239   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52240     unix_path=`$CYGPATH -u "$windows_path"`
52241     new_path="$unix_path"
52242   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52243     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52244     new_path="$unix_path"
52245   fi
52246 
52247   if test "x$path" != "x$new_path"; then
52248     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52249     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52250 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52251   fi
52252 
52253   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52254   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52255 
52256     else
52257       # We're on a unix platform. Hooray! :)
52258       path="$POTENTIAL_FREETYPE_LIB_PATH"
52259       has_space=`$ECHO "$path" | $GREP " "`
52260       if test "x$has_space" != x; then
52261         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52262 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52263         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52264       fi
52265 
52266       # Use eval to expand a potential ~
52267       eval path="$path"
52268       if test ! -f "$path" && test ! -d "$path"; then
52269         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52270       fi
52271 
52272       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52273     fi
52274   fi
52275 
52276 
52277     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52278     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52279 $as_echo_n "checking for freetype includes... " >&6; }
52280     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52281 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52282     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52283     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52284 $as_echo_n "checking for freetype libraries... " >&6; }
52285     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52286 $as_echo "$FREETYPE_LIB_PATH" >&6; }
52287   fi
52288 
52289             else
52290 
52291   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52292   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
52293   METHOD="well-known location"
52294 
52295   # Let's start with an optimistic view of the world :-)
52296   FOUND_FREETYPE=yes
52297 
52298   # First look for the canonical freetype main include file ft2build.h.
52299   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52300     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52301     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52302     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52303       # Fail.
52304       FOUND_FREETYPE=no
52305     fi
52306   fi
52307 
52308   if test "x$FOUND_FREETYPE" = xyes; then
52309     # Include file found, let's continue the sanity check.
52310     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52311 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52312 
52313     # Reset to default value
52314     FREETYPE_BASE_NAME=freetype
52315     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52316     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52317       if test "x$OPENJDK_TARGET_OS" = xmacosx \
52318           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52319         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52320         # for the .6 version explicitly.
52321         FREETYPE_BASE_NAME=freetype.6
52322         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52323         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52324 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52325       else
52326         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52327 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52328         FOUND_FREETYPE=no
52329       fi
52330     else
52331       if test "x$OPENJDK_TARGET_OS" = xwindows; then
52332         # On Windows, we will need both .lib and .dll file.
52333         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52334           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52335 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52336           FOUND_FREETYPE=no
52337         fi
52338       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52339           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52340         # Found lib in isa dir, use that instead.
52341         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52342         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52343 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52344       fi
52345     fi
52346   fi
52347 
52348   if test "x$FOUND_FREETYPE" = xyes; then
52349 
52350   # Only process if variable expands to non-empty
52351 
52352   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52353     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52354 
52355   # Input might be given as Windows format, start by converting to
52356   # unix format.
52357   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52358   new_path=`$CYGPATH -u "$path"`
52359 
52360   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52361   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52362   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52363   # "foo.exe" is OK but "foo" is an error.
52364   #
52365   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52366   # It is also a way to make sure we got the proper file name for the real test later on.
52367   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52368   if test "x$test_shortpath" = x; then
52369     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52370 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52371     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52372   fi
52373 
52374   # Call helper function which possibly converts this using DOS-style short mode.
52375   # If so, the updated path is stored in $new_path.
52376 
52377   input_path="$new_path"
52378   # Check if we need to convert this using DOS-style short mode. If the path
52379   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52380   # take no chances and rewrite it.
52381   # Note: m4 eats our [], so we need to use [ and ] instead.
52382   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52383   if test "x$has_forbidden_chars" != x; then
52384     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52385     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52386     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52387     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52388       # Going to short mode and back again did indeed matter. Since short mode is
52389       # case insensitive, let's make it lowercase to improve readability.
52390       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52391       # Now convert it back to Unix-style (cygpath)
52392       input_path=`$CYGPATH -u "$shortmode_path"`
52393       new_path="$input_path"
52394     fi
52395   fi
52396 
52397   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52398   if test "x$test_cygdrive_prefix" = x; then
52399     # As a simple fix, exclude /usr/bin since it's not a real path.
52400     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52401       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52402       # a path prefixed by /cygdrive for fixpath to work.
52403       new_path="$CYGWIN_ROOT_PATH$input_path"
52404     fi
52405   fi
52406 
52407 
52408   if test "x$path" != "x$new_path"; then
52409     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52410     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52411 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52412   fi
52413 
52414     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52415 
52416   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52417   has_colon=`$ECHO $path | $GREP ^.:`
52418   new_path="$path"
52419   if test "x$has_colon" = x; then
52420     # Not in mixed or Windows style, start by that.
52421     new_path=`cmd //c echo $path`
52422   fi
52423 
52424 
52425   input_path="$new_path"
52426   # Check if we need to convert this using DOS-style short mode. If the path
52427   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52428   # take no chances and rewrite it.
52429   # Note: m4 eats our [], so we need to use [ and ] instead.
52430   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52431   if test "x$has_forbidden_chars" != x; then
52432     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52433     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52434   fi
52435 
52436 
52437   windows_path="$new_path"
52438   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52439     unix_path=`$CYGPATH -u "$windows_path"`
52440     new_path="$unix_path"
52441   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52442     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52443     new_path="$unix_path"
52444   fi
52445 
52446   if test "x$path" != "x$new_path"; then
52447     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52448     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52449 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52450   fi
52451 
52452   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52453   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52454 
52455     else
52456       # We're on a unix platform. Hooray! :)
52457       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52458       has_space=`$ECHO "$path" | $GREP " "`
52459       if test "x$has_space" != x; then
52460         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52461 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52462         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52463       fi
52464 
52465       # Use eval to expand a potential ~
52466       eval path="$path"
52467       if test ! -f "$path" && test ! -d "$path"; then
52468         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52469       fi
52470 
52471       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52472     fi
52473   fi
52474 
52475 
52476   # Only process if variable expands to non-empty
52477 
52478   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52479     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52480 
52481   # Input might be given as Windows format, start by converting to
52482   # unix format.
52483   path="$POTENTIAL_FREETYPE_LIB_PATH"
52484   new_path=`$CYGPATH -u "$path"`
52485 
52486   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52487   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52488   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52489   # "foo.exe" is OK but "foo" is an error.
52490   #
52491   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52492   # It is also a way to make sure we got the proper file name for the real test later on.
52493   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52494   if test "x$test_shortpath" = x; then
52495     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52496 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52497     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52498   fi
52499 
52500   # Call helper function which possibly converts this using DOS-style short mode.
52501   # If so, the updated path is stored in $new_path.
52502 
52503   input_path="$new_path"
52504   # Check if we need to convert this using DOS-style short mode. If the path
52505   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52506   # take no chances and rewrite it.
52507   # Note: m4 eats our [], so we need to use [ and ] instead.
52508   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52509   if test "x$has_forbidden_chars" != x; then
52510     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52511     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52512     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52513     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52514       # Going to short mode and back again did indeed matter. Since short mode is
52515       # case insensitive, let's make it lowercase to improve readability.
52516       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52517       # Now convert it back to Unix-style (cygpath)
52518       input_path=`$CYGPATH -u "$shortmode_path"`
52519       new_path="$input_path"
52520     fi
52521   fi
52522 
52523   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52524   if test "x$test_cygdrive_prefix" = x; then
52525     # As a simple fix, exclude /usr/bin since it's not a real path.
52526     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52527       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52528       # a path prefixed by /cygdrive for fixpath to work.
52529       new_path="$CYGWIN_ROOT_PATH$input_path"
52530     fi
52531   fi
52532 
52533 
52534   if test "x$path" != "x$new_path"; then
52535     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52536     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52537 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52538   fi
52539 
52540     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52541 
52542   path="$POTENTIAL_FREETYPE_LIB_PATH"
52543   has_colon=`$ECHO $path | $GREP ^.:`
52544   new_path="$path"
52545   if test "x$has_colon" = x; then
52546     # Not in mixed or Windows style, start by that.
52547     new_path=`cmd //c echo $path`
52548   fi
52549 
52550 
52551   input_path="$new_path"
52552   # Check if we need to convert this using DOS-style short mode. If the path
52553   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52554   # take no chances and rewrite it.
52555   # Note: m4 eats our [], so we need to use [ and ] instead.
52556   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52557   if test "x$has_forbidden_chars" != x; then
52558     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52559     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52560   fi
52561 
52562 
52563   windows_path="$new_path"
52564   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52565     unix_path=`$CYGPATH -u "$windows_path"`
52566     new_path="$unix_path"
52567   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52568     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52569     new_path="$unix_path"
52570   fi
52571 
52572   if test "x$path" != "x$new_path"; then
52573     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52574     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52575 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52576   fi
52577 
52578   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52579   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52580 
52581     else
52582       # We're on a unix platform. Hooray! :)
52583       path="$POTENTIAL_FREETYPE_LIB_PATH"
52584       has_space=`$ECHO "$path" | $GREP " "`
52585       if test "x$has_space" != x; then
52586         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52587 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52588         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52589       fi
52590 
52591       # Use eval to expand a potential ~
52592       eval path="$path"
52593       if test ! -f "$path" && test ! -d "$path"; then
52594         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52595       fi
52596 
52597       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52598     fi
52599   fi
52600 
52601 
52602     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52603     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52604 $as_echo_n "checking for freetype includes... " >&6; }
52605     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52606 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52607     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52608     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52609 $as_echo_n "checking for freetype libraries... " >&6; }
52610     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52611 $as_echo "$FREETYPE_LIB_PATH" >&6; }
52612   fi
52613 
52614               if test "x$FOUND_FREETYPE" != xyes; then
52615 
52616   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52617   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
52618   METHOD="well-known location"
52619 
52620   # Let's start with an optimistic view of the world :-)
52621   FOUND_FREETYPE=yes
52622 
52623   # First look for the canonical freetype main include file ft2build.h.
52624   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52625     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52626     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52627     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52628       # Fail.
52629       FOUND_FREETYPE=no
52630     fi
52631   fi
52632 
52633   if test "x$FOUND_FREETYPE" = xyes; then
52634     # Include file found, let's continue the sanity check.
52635     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52636 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52637 
52638     # Reset to default value
52639     FREETYPE_BASE_NAME=freetype
52640     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52641     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52642       if test "x$OPENJDK_TARGET_OS" = xmacosx \
52643           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52644         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52645         # for the .6 version explicitly.
52646         FREETYPE_BASE_NAME=freetype.6
52647         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52648         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52649 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52650       else
52651         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52652 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52653         FOUND_FREETYPE=no
52654       fi
52655     else
52656       if test "x$OPENJDK_TARGET_OS" = xwindows; then
52657         # On Windows, we will need both .lib and .dll file.
52658         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52659           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52660 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52661           FOUND_FREETYPE=no
52662         fi
52663       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52664           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52665         # Found lib in isa dir, use that instead.
52666         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52667         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52668 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52669       fi
52670     fi
52671   fi
52672 
52673   if test "x$FOUND_FREETYPE" = xyes; then
52674 
52675   # Only process if variable expands to non-empty
52676 
52677   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52678     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52679 
52680   # Input might be given as Windows format, start by converting to
52681   # unix format.
52682   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52683   new_path=`$CYGPATH -u "$path"`
52684 
52685   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52686   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52687   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52688   # "foo.exe" is OK but "foo" is an error.
52689   #
52690   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52691   # It is also a way to make sure we got the proper file name for the real test later on.
52692   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52693   if test "x$test_shortpath" = x; then
52694     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52695 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52696     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52697   fi
52698 
52699   # Call helper function which possibly converts this using DOS-style short mode.
52700   # If so, the updated path is stored in $new_path.
52701 
52702   input_path="$new_path"
52703   # Check if we need to convert this using DOS-style short mode. If the path
52704   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52705   # take no chances and rewrite it.
52706   # Note: m4 eats our [], so we need to use [ and ] instead.
52707   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52708   if test "x$has_forbidden_chars" != x; then
52709     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52710     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52711     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52712     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52713       # Going to short mode and back again did indeed matter. Since short mode is
52714       # case insensitive, let's make it lowercase to improve readability.
52715       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52716       # Now convert it back to Unix-style (cygpath)
52717       input_path=`$CYGPATH -u "$shortmode_path"`
52718       new_path="$input_path"
52719     fi
52720   fi
52721 
52722   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52723   if test "x$test_cygdrive_prefix" = x; then
52724     # As a simple fix, exclude /usr/bin since it's not a real path.
52725     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52726       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52727       # a path prefixed by /cygdrive for fixpath to work.
52728       new_path="$CYGWIN_ROOT_PATH$input_path"
52729     fi
52730   fi
52731 
52732 
52733   if test "x$path" != "x$new_path"; then
52734     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52735     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52736 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52737   fi
52738 
52739     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52740 
52741   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52742   has_colon=`$ECHO $path | $GREP ^.:`
52743   new_path="$path"
52744   if test "x$has_colon" = x; then
52745     # Not in mixed or Windows style, start by that.
52746     new_path=`cmd //c echo $path`
52747   fi
52748 
52749 
52750   input_path="$new_path"
52751   # Check if we need to convert this using DOS-style short mode. If the path
52752   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52753   # take no chances and rewrite it.
52754   # Note: m4 eats our [], so we need to use [ and ] instead.
52755   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52756   if test "x$has_forbidden_chars" != x; then
52757     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52758     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52759   fi
52760 
52761 
52762   windows_path="$new_path"
52763   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52764     unix_path=`$CYGPATH -u "$windows_path"`
52765     new_path="$unix_path"
52766   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52767     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52768     new_path="$unix_path"
52769   fi
52770 
52771   if test "x$path" != "x$new_path"; then
52772     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52773     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52774 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52775   fi
52776 
52777   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52778   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52779 
52780     else
52781       # We're on a unix platform. Hooray! :)
52782       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52783       has_space=`$ECHO "$path" | $GREP " "`
52784       if test "x$has_space" != x; then
52785         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52786 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52787         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52788       fi
52789 
52790       # Use eval to expand a potential ~
52791       eval path="$path"
52792       if test ! -f "$path" && test ! -d "$path"; then
52793         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52794       fi
52795 
52796       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52797     fi
52798   fi
52799 
52800 
52801   # Only process if variable expands to non-empty
52802 
52803   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52804     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52805 
52806   # Input might be given as Windows format, start by converting to
52807   # unix format.
52808   path="$POTENTIAL_FREETYPE_LIB_PATH"
52809   new_path=`$CYGPATH -u "$path"`
52810 
52811   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52812   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52813   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52814   # "foo.exe" is OK but "foo" is an error.
52815   #
52816   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52817   # It is also a way to make sure we got the proper file name for the real test later on.
52818   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52819   if test "x$test_shortpath" = x; then
52820     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52821 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52822     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52823   fi
52824 
52825   # Call helper function which possibly converts this using DOS-style short mode.
52826   # If so, the updated path is stored in $new_path.
52827 
52828   input_path="$new_path"
52829   # Check if we need to convert this using DOS-style short mode. If the path
52830   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52831   # take no chances and rewrite it.
52832   # Note: m4 eats our [], so we need to use [ and ] instead.
52833   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52834   if test "x$has_forbidden_chars" != x; then
52835     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52836     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52837     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52838     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52839       # Going to short mode and back again did indeed matter. Since short mode is
52840       # case insensitive, let's make it lowercase to improve readability.
52841       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52842       # Now convert it back to Unix-style (cygpath)
52843       input_path=`$CYGPATH -u "$shortmode_path"`
52844       new_path="$input_path"
52845     fi
52846   fi
52847 
52848   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52849   if test "x$test_cygdrive_prefix" = x; then
52850     # As a simple fix, exclude /usr/bin since it's not a real path.
52851     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52852       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52853       # a path prefixed by /cygdrive for fixpath to work.
52854       new_path="$CYGWIN_ROOT_PATH$input_path"
52855     fi
52856   fi
52857 
52858 
52859   if test "x$path" != "x$new_path"; then
52860     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52861     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52862 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52863   fi
52864 
52865     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52866 
52867   path="$POTENTIAL_FREETYPE_LIB_PATH"
52868   has_colon=`$ECHO $path | $GREP ^.:`
52869   new_path="$path"
52870   if test "x$has_colon" = x; then
52871     # Not in mixed or Windows style, start by that.
52872     new_path=`cmd //c echo $path`
52873   fi
52874 
52875 
52876   input_path="$new_path"
52877   # Check if we need to convert this using DOS-style short mode. If the path
52878   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52879   # take no chances and rewrite it.
52880   # Note: m4 eats our [], so we need to use [ and ] instead.
52881   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52882   if test "x$has_forbidden_chars" != x; then
52883     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52884     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52885   fi
52886 
52887 
52888   windows_path="$new_path"
52889   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52890     unix_path=`$CYGPATH -u "$windows_path"`
52891     new_path="$unix_path"
52892   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52893     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52894     new_path="$unix_path"
52895   fi
52896 
52897   if test "x$path" != "x$new_path"; then
52898     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52899     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52900 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52901   fi
52902 
52903   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52904   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52905 
52906     else
52907       # We're on a unix platform. Hooray! :)
52908       path="$POTENTIAL_FREETYPE_LIB_PATH"
52909       has_space=`$ECHO "$path" | $GREP " "`
52910       if test "x$has_space" != x; then
52911         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52912 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52913         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52914       fi
52915 
52916       # Use eval to expand a potential ~
52917       eval path="$path"
52918       if test ! -f "$path" && test ! -d "$path"; then
52919         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52920       fi
52921 
52922       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52923     fi
52924   fi
52925 
52926 
52927     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52928     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52929 $as_echo_n "checking for freetype includes... " >&6; }
52930     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52931 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52932     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52933     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52934 $as_echo_n "checking for freetype libraries... " >&6; }
52935     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52936 $as_echo "$FREETYPE_LIB_PATH" >&6; }
52937   fi
52938 
52939               fi
52940             fi
52941           fi
52942         fi
52943       fi # end check in well-known locations
52944 
52945       if test "x$FOUND_FREETYPE" != xyes; then
52946 
52947   # Print a helpful message on how to acquire the necessary build dependency.
52948   # freetype is the help tag: freetype, cups, alsa etc
52949   MISSING_DEPENDENCY=freetype
52950 
52951   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52952     cygwin_help $MISSING_DEPENDENCY
52953   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52954     msys_help $MISSING_DEPENDENCY
52955   else
52956     PKGHANDLER_COMMAND=
52957 
52958     case $PKGHANDLER in
52959       apt-get)
52960         apt_help     $MISSING_DEPENDENCY ;;
52961       yum)
52962         yum_help     $MISSING_DEPENDENCY ;;
52963       port)
52964         port_help    $MISSING_DEPENDENCY ;;
52965       pkgutil)
52966         pkgutil_help $MISSING_DEPENDENCY ;;
52967       pkgadd)
52968         pkgadd_help  $MISSING_DEPENDENCY ;;
52969     esac
52970 
52971     if test "x$PKGHANDLER_COMMAND" != x; then
52972       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52973     fi
52974   fi
52975 
52976         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
52977       fi
52978     fi # end user specified settings
52979 
52980     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
52981     if test "x$FREETYPE_CFLAGS" = x; then
52982 
52983   # Only process if variable expands to non-empty
52984 
52985   if test "x$FREETYPE_INCLUDE_PATH" != x; then
52986     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52987 
52988   # Input might be given as Windows format, start by converting to
52989   # unix format.
52990   path="$FREETYPE_INCLUDE_PATH"
52991   new_path=`$CYGPATH -u "$path"`
52992 
52993   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52994   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52995   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52996   # "foo.exe" is OK but "foo" is an error.
52997   #
52998   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52999   # It is also a way to make sure we got the proper file name for the real test later on.
53000   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53001   if test "x$test_shortpath" = x; then
53002     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53003 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53004     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
53005   fi
53006 
53007   # Call helper function which possibly converts this using DOS-style short mode.
53008   # If so, the updated path is stored in $new_path.
53009 
53010   input_path="$new_path"
53011   # Check if we need to convert this using DOS-style short mode. If the path
53012   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53013   # take no chances and rewrite it.
53014   # Note: m4 eats our [], so we need to use [ and ] instead.
53015   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53016   if test "x$has_forbidden_chars" != x; then
53017     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53018     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53019     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53020     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53021       # Going to short mode and back again did indeed matter. Since short mode is
53022       # case insensitive, let's make it lowercase to improve readability.
53023       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53024       # Now convert it back to Unix-style (cygpath)
53025       input_path=`$CYGPATH -u "$shortmode_path"`
53026       new_path="$input_path"
53027     fi
53028   fi
53029 
53030   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53031   if test "x$test_cygdrive_prefix" = x; then
53032     # As a simple fix, exclude /usr/bin since it's not a real path.
53033     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53034       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53035       # a path prefixed by /cygdrive for fixpath to work.
53036       new_path="$CYGWIN_ROOT_PATH$input_path"
53037     fi
53038   fi
53039 
53040 
53041   if test "x$path" != "x$new_path"; then
53042     FREETYPE_INCLUDE_PATH="$new_path"
53043     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53044 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53045   fi
53046 
53047     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53048 
53049   path="$FREETYPE_INCLUDE_PATH"
53050   has_colon=`$ECHO $path | $GREP ^.:`
53051   new_path="$path"
53052   if test "x$has_colon" = x; then
53053     # Not in mixed or Windows style, start by that.
53054     new_path=`cmd //c echo $path`
53055   fi
53056 
53057 
53058   input_path="$new_path"
53059   # Check if we need to convert this using DOS-style short mode. If the path
53060   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53061   # take no chances and rewrite it.
53062   # Note: m4 eats our [], so we need to use [ and ] instead.
53063   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53064   if test "x$has_forbidden_chars" != x; then
53065     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53066     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53067   fi
53068 
53069 
53070   windows_path="$new_path"
53071   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53072     unix_path=`$CYGPATH -u "$windows_path"`
53073     new_path="$unix_path"
53074   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53075     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53076     new_path="$unix_path"
53077   fi
53078 
53079   if test "x$path" != "x$new_path"; then
53080     FREETYPE_INCLUDE_PATH="$new_path"
53081     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53082 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53083   fi
53084 
53085   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53086   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53087 
53088     else
53089       # We're on a unix platform. Hooray! :)
53090       path="$FREETYPE_INCLUDE_PATH"
53091       has_space=`$ECHO "$path" | $GREP " "`
53092       if test "x$has_space" != x; then
53093         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53094 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53095         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53096       fi
53097 
53098       # Use eval to expand a potential ~
53099       eval path="$path"
53100       if test ! -f "$path" && test ! -d "$path"; then
53101         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53102       fi
53103 
53104       FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53105     fi
53106   fi
53107 
53108       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
53109         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
53110       else
53111         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
53112       fi
53113     fi
53114 
53115     if test "x$FREETYPE_LIBS" = x; then
53116 
53117   # Only process if variable expands to non-empty
53118 
53119   if test "x$FREETYPE_LIB_PATH" != x; then
53120     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53121 
53122   # Input might be given as Windows format, start by converting to
53123   # unix format.
53124   path="$FREETYPE_LIB_PATH"
53125   new_path=`$CYGPATH -u "$path"`
53126 
53127   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53128   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53129   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53130   # "foo.exe" is OK but "foo" is an error.
53131   #
53132   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53133   # It is also a way to make sure we got the proper file name for the real test later on.
53134   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53135   if test "x$test_shortpath" = x; then
53136     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53137 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53138     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
53139   fi
53140 
53141   # Call helper function which possibly converts this using DOS-style short mode.
53142   # If so, the updated path is stored in $new_path.
53143 
53144   input_path="$new_path"
53145   # Check if we need to convert this using DOS-style short mode. If the path
53146   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53147   # take no chances and rewrite it.
53148   # Note: m4 eats our [], so we need to use [ and ] instead.
53149   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53150   if test "x$has_forbidden_chars" != x; then
53151     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53152     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53153     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53154     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53155       # Going to short mode and back again did indeed matter. Since short mode is
53156       # case insensitive, let's make it lowercase to improve readability.
53157       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53158       # Now convert it back to Unix-style (cygpath)
53159       input_path=`$CYGPATH -u "$shortmode_path"`
53160       new_path="$input_path"
53161     fi
53162   fi
53163 
53164   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53165   if test "x$test_cygdrive_prefix" = x; then
53166     # As a simple fix, exclude /usr/bin since it's not a real path.
53167     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53168       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53169       # a path prefixed by /cygdrive for fixpath to work.
53170       new_path="$CYGWIN_ROOT_PATH$input_path"
53171     fi
53172   fi
53173 
53174 
53175   if test "x$path" != "x$new_path"; then
53176     FREETYPE_LIB_PATH="$new_path"
53177     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
53178 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53179   fi
53180 
53181     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53182 
53183   path="$FREETYPE_LIB_PATH"
53184   has_colon=`$ECHO $path | $GREP ^.:`
53185   new_path="$path"
53186   if test "x$has_colon" = x; then
53187     # Not in mixed or Windows style, start by that.
53188     new_path=`cmd //c echo $path`
53189   fi
53190 
53191 
53192   input_path="$new_path"
53193   # Check if we need to convert this using DOS-style short mode. If the path
53194   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53195   # take no chances and rewrite it.
53196   # Note: m4 eats our [], so we need to use [ and ] instead.
53197   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53198   if test "x$has_forbidden_chars" != x; then
53199     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53200     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53201   fi
53202 
53203 
53204   windows_path="$new_path"
53205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53206     unix_path=`$CYGPATH -u "$windows_path"`
53207     new_path="$unix_path"
53208   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53209     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53210     new_path="$unix_path"
53211   fi
53212 
53213   if test "x$path" != "x$new_path"; then
53214     FREETYPE_LIB_PATH="$new_path"
53215     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
53216 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53217   fi
53218 
53219   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53220   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53221 
53222     else
53223       # We're on a unix platform. Hooray! :)
53224       path="$FREETYPE_LIB_PATH"
53225       has_space=`$ECHO "$path" | $GREP " "`
53226       if test "x$has_space" != x; then
53227         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53228 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53229         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53230       fi
53231 
53232       # Use eval to expand a potential ~
53233       eval path="$path"
53234       if test ! -f "$path" && test ! -d "$path"; then
53235         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53236       fi
53237 
53238       FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53239     fi
53240   fi
53241 
53242       if test "x$OPENJDK_TARGET_OS" = xwindows; then
53243         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
53244       else
53245         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
53246       fi
53247     fi
53248 
53249     # Try to compile it
53250     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
53251 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
53252     ac_ext=cpp
53253 ac_cpp='$CXXCPP $CPPFLAGS'
53254 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53255 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53256 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53257 
53258     PREV_CXXCFLAGS="$CXXFLAGS"
53259     PREV_LIBS="$LIBS"
53260     PREV_CXX="$CXX"
53261     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
53262     LIBS="$LIBS $FREETYPE_LIBS"
53263     CXX="$FIXPATH $CXX"
53264     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53265 /* end confdefs.h.  */
53266 
53267           #include<ft2build.h>
53268           #include FT_FREETYPE_H
53269           int main () {
53270             FT_Init_FreeType(NULL);
53271             return 0;
53272           }
53273 
53274 _ACEOF
53275 if ac_fn_cxx_try_link "$LINENO"; then :
53276 
53277           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53278 $as_echo "yes" >&6; }
53279 
53280 else
53281 
53282           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53283 $as_echo "no" >&6; }
53284           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
53285 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
53286           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
53287 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
53288 
53289 
53290   # Print a helpful message on how to acquire the necessary build dependency.
53291   # freetype is the help tag: freetype, cups, alsa etc
53292   MISSING_DEPENDENCY=freetype
53293 
53294   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53295     cygwin_help $MISSING_DEPENDENCY
53296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53297     msys_help $MISSING_DEPENDENCY
53298   else
53299     PKGHANDLER_COMMAND=
53300 
53301     case $PKGHANDLER in
53302       apt-get)
53303         apt_help     $MISSING_DEPENDENCY ;;
53304       yum)
53305         yum_help     $MISSING_DEPENDENCY ;;
53306       port)
53307         port_help    $MISSING_DEPENDENCY ;;
53308       pkgutil)
53309         pkgutil_help $MISSING_DEPENDENCY ;;
53310       pkgadd)
53311         pkgadd_help  $MISSING_DEPENDENCY ;;
53312     esac
53313 
53314     if test "x$PKGHANDLER_COMMAND" != x; then
53315       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53316     fi
53317   fi
53318 
53319 
53320           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
53321 
53322 
53323 fi
53324 rm -f core conftest.err conftest.$ac_objext \
53325     conftest$ac_exeext conftest.$ac_ext
53326     CXXCFLAGS="$PREV_CXXFLAGS"
53327     LIBS="$PREV_LIBS"
53328     CXX="$PREV_CXX"
53329     ac_ext=cpp
53330 ac_cpp='$CXXCPP $CPPFLAGS'
53331 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53332 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53333 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53334 
53335 
53336     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
53337 $as_echo_n "checking if we should bundle freetype... " >&6; }
53338     if test "x$BUNDLE_FREETYPE" = xyes; then
53339       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
53340     fi
53341     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
53342 $as_echo "$BUNDLE_FREETYPE" >&6; }
53343 
53344   fi # end freetype needed
53345 
53346 
53347 
53348 
53349 
53350 
53351 
53352 # Check whether --with-alsa was given.
53353 if test "${with_alsa+set}" = set; then :
53354   withval=$with_alsa;
53355 fi
53356 
53357 
53358 # Check whether --with-alsa-include was given.
53359 if test "${with_alsa_include+set}" = set; then :
53360   withval=$with_alsa_include;
53361 fi
53362 
53363 
53364 # Check whether --with-alsa-lib was given.
53365 if test "${with_alsa_lib+set}" = set; then :
53366   withval=$with_alsa_lib;
53367 fi
53368 
53369 
53370   if test "x$NEEDS_LIB_ALSA" = xfalse; then
53371     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
53372         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
53373         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
53374       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
53375 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
53376     fi
53377     ALSA_CFLAGS=
53378     ALSA_LIBS=
53379   else
53380     ALSA_FOUND=no
53381 
53382     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
53383       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
53384     fi
53385 
53386     if test "x${with_alsa}" != x; then
53387       ALSA_LIBS="-L${with_alsa}/lib -lasound"
53388       ALSA_CFLAGS="-I${with_alsa}/include"
53389       ALSA_FOUND=yes
53390     fi
53391     if test "x${with_alsa_include}" != x; then
53392       ALSA_CFLAGS="-I${with_alsa_include}"
53393       ALSA_FOUND=yes
53394     fi
53395     if test "x${with_alsa_lib}" != x; then
53396       ALSA_LIBS="-L${with_alsa_lib} -lasound"
53397       ALSA_FOUND=yes
53398     fi
53399     # Do not try pkg-config if we have a sysroot set.
53400     if test "x$SYSROOT" = x; then
53401       if test "x$ALSA_FOUND" = xno; then
53402 
53403 pkg_failed=no
53404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
53405 $as_echo_n "checking for ALSA... " >&6; }
53406 
53407 if test -n "$ALSA_CFLAGS"; then
53408     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
53409  elif test -n "$PKG_CONFIG"; then
53410     if test -n "$PKG_CONFIG" && \
53411     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
53412   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
53413   ac_status=$?
53414   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53415   test $ac_status = 0; }; then
53416   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
53417 else
53418   pkg_failed=yes
53419 fi
53420  else
53421     pkg_failed=untried
53422 fi
53423 if test -n "$ALSA_LIBS"; then
53424     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
53425  elif test -n "$PKG_CONFIG"; then
53426     if test -n "$PKG_CONFIG" && \
53427     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
53428   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
53429   ac_status=$?
53430   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53431   test $ac_status = 0; }; then
53432   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
53433 else
53434   pkg_failed=yes
53435 fi
53436  else
53437     pkg_failed=untried
53438 fi
53439 
53440 
53441 
53442 if test $pkg_failed = yes; then
53443 
53444 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
53445         _pkg_short_errors_supported=yes
53446 else
53447         _pkg_short_errors_supported=no
53448 fi
53449         if test $_pkg_short_errors_supported = yes; then
53450                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
53451         else
53452                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
53453         fi
53454         # Put the nasty error message in config.log where it belongs
53455         echo "$ALSA_PKG_ERRORS" >&5
53456 
53457         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53458 $as_echo "no" >&6; }
53459                 ALSA_FOUND=no
53460 elif test $pkg_failed = untried; then
53461         ALSA_FOUND=no
53462 else
53463         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
53464         ALSA_LIBS=$pkg_cv_ALSA_LIBS
53465         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53466 $as_echo "yes" >&6; }
53467         ALSA_FOUND=yes
53468 fi
53469       fi
53470     fi
53471     if test "x$ALSA_FOUND" = xno; then
53472       for ac_header in alsa/asoundlib.h
53473 do :
53474   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
53475 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
53476   cat >>confdefs.h <<_ACEOF
53477 #define HAVE_ALSA_ASOUNDLIB_H 1
53478 _ACEOF
53479 
53480             ALSA_FOUND=yes
53481             ALSA_CFLAGS=-Iignoreme
53482             ALSA_LIBS=-lasound
53483             DEFAULT_ALSA=yes
53484 
53485 else
53486   ALSA_FOUND=no
53487 
53488 fi
53489 
53490 done
53491 
53492     fi
53493     if test "x$ALSA_FOUND" = xno; then
53494 
53495   # Print a helpful message on how to acquire the necessary build dependency.
53496   # alsa is the help tag: freetype, cups, alsa etc
53497   MISSING_DEPENDENCY=alsa
53498 
53499   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53500     cygwin_help $MISSING_DEPENDENCY
53501   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53502     msys_help $MISSING_DEPENDENCY
53503   else
53504     PKGHANDLER_COMMAND=
53505 
53506     case $PKGHANDLER in
53507       apt-get)
53508         apt_help     $MISSING_DEPENDENCY ;;
53509       yum)
53510         yum_help     $MISSING_DEPENDENCY ;;
53511       port)
53512         port_help    $MISSING_DEPENDENCY ;;
53513       pkgutil)
53514         pkgutil_help $MISSING_DEPENDENCY ;;
53515       pkgadd)
53516         pkgadd_help  $MISSING_DEPENDENCY ;;
53517     esac
53518 
53519     if test "x$PKGHANDLER_COMMAND" != x; then
53520       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53521     fi
53522   fi
53523 
53524       as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
53525     fi
53526   fi
53527 
53528 
53529 
53530 
53531 
53532 
53533 # Check whether --with-libffi was given.
53534 if test "${with_libffi+set}" = set; then :
53535   withval=$with_libffi;
53536 fi
53537 
53538 
53539 # Check whether --with-libffi-include was given.
53540 if test "${with_libffi_include+set}" = set; then :
53541   withval=$with_libffi_include;
53542 fi
53543 
53544 
53545 # Check whether --with-libffi-lib was given.
53546 if test "${with_libffi_lib+set}" = set; then :
53547   withval=$with_libffi_lib;
53548 fi
53549 
53550 
53551   if test "x$NEEDS_LIB_FFI" = xfalse; then
53552     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
53553         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
53554         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
53555       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
53556 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
53557     fi
53558     LIBFFI_CFLAGS=
53559     LIBFFI_LIBS=
53560   else
53561     LIBFFI_FOUND=no
53562 
53563     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
53564       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
53565     fi
53566 
53567     if test "x${with_libffi}" != x; then
53568       LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
53569       LIBFFI_CFLAGS="-I${with_libffi}/include"
53570       LIBFFI_FOUND=yes
53571     fi
53572     if test "x${with_libffi_include}" != x; then
53573       LIBFFI_CFLAGS="-I${with_libffi_include}"
53574       LIBFFI_FOUND=yes
53575     fi
53576     if test "x${with_libffi_lib}" != x; then
53577       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
53578       LIBFFI_FOUND=yes
53579     fi
53580     # Do not try pkg-config if we have a sysroot set.
53581     if test "x$SYSROOT" = x; then
53582       if test "x$LIBFFI_FOUND" = xno; then
53583         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
53584 
53585 pkg_failed=no
53586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
53587 $as_echo_n "checking for LIBFFI... " >&6; }
53588 
53589 if test -n "$LIBFFI_CFLAGS"; then
53590     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
53591  elif test -n "$PKG_CONFIG"; then
53592     if test -n "$PKG_CONFIG" && \
53593     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
53594   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
53595   ac_status=$?
53596   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53597   test $ac_status = 0; }; then
53598   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
53599 else
53600   pkg_failed=yes
53601 fi
53602  else
53603     pkg_failed=untried
53604 fi
53605 if test -n "$LIBFFI_LIBS"; then
53606     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
53607  elif test -n "$PKG_CONFIG"; then
53608     if test -n "$PKG_CONFIG" && \
53609     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
53610   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
53611   ac_status=$?
53612   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53613   test $ac_status = 0; }; then
53614   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
53615 else
53616   pkg_failed=yes
53617 fi
53618  else
53619     pkg_failed=untried
53620 fi
53621 
53622 
53623 
53624 if test $pkg_failed = yes; then
53625 
53626 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
53627         _pkg_short_errors_supported=yes
53628 else
53629         _pkg_short_errors_supported=no
53630 fi
53631         if test $_pkg_short_errors_supported = yes; then
53632                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
53633         else
53634                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
53635         fi
53636         # Put the nasty error message in config.log where it belongs
53637         echo "$LIBFFI_PKG_ERRORS" >&5
53638 
53639         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53640 $as_echo "no" >&6; }
53641                 LIBFFI_FOUND=no
53642 elif test $pkg_failed = untried; then
53643         LIBFFI_FOUND=no
53644 else
53645         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
53646         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
53647         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53648 $as_echo "yes" >&6; }
53649         LIBFFI_FOUND=yes
53650 fi
53651       fi
53652     fi
53653     if test "x$LIBFFI_FOUND" = xno; then
53654       for ac_header in ffi.h
53655 do :
53656   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
53657 if test "x$ac_cv_header_ffi_h" = xyes; then :
53658   cat >>confdefs.h <<_ACEOF
53659 #define HAVE_FFI_H 1
53660 _ACEOF
53661 
53662             LIBFFI_FOUND=yes
53663             LIBFFI_CFLAGS=
53664             LIBFFI_LIBS=-lffi
53665 
53666 else
53667   LIBFFI_FOUND=no
53668 
53669 fi
53670 
53671 done
53672 
53673     fi
53674     if test "x$LIBFFI_FOUND" = xno; then
53675 
53676   # Print a helpful message on how to acquire the necessary build dependency.
53677   # ffi is the help tag: freetype, cups, alsa etc
53678   MISSING_DEPENDENCY=ffi
53679 
53680   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53681     cygwin_help $MISSING_DEPENDENCY
53682   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53683     msys_help $MISSING_DEPENDENCY
53684   else
53685     PKGHANDLER_COMMAND=
53686 
53687     case $PKGHANDLER in
53688       apt-get)
53689         apt_help     $MISSING_DEPENDENCY ;;
53690       yum)
53691         yum_help     $MISSING_DEPENDENCY ;;
53692       port)
53693         port_help    $MISSING_DEPENDENCY ;;
53694       pkgutil)
53695         pkgutil_help $MISSING_DEPENDENCY ;;
53696       pkgadd)
53697         pkgadd_help  $MISSING_DEPENDENCY ;;
53698     esac
53699 
53700     if test "x$PKGHANDLER_COMMAND" != x; then
53701       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53702     fi
53703   fi
53704 
53705       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
53706     fi
53707 
53708     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
53709 $as_echo_n "checking if libffi works... " >&6; }
53710     ac_ext=c
53711 ac_cpp='$CPP $CPPFLAGS'
53712 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53713 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53714 ac_compiler_gnu=$ac_cv_c_compiler_gnu
53715 
53716     OLD_CFLAGS="$CFLAGS"
53717     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
53718     OLD_LIBS="$LIBS"
53719     LIBS="$LIBS $LIBFFI_LIBS"
53720     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53721 /* end confdefs.h.  */
53722 #include <ffi.h>
53723 int
53724 main ()
53725 {
53726 
53727           ffi_call(NULL, NULL, NULL, NULL);
53728           return 0;
53729 
53730   ;
53731   return 0;
53732 }
53733 _ACEOF
53734 if ac_fn_c_try_link "$LINENO"; then :
53735   LIBFFI_WORKS=yes
53736 else
53737   LIBFFI_WORKS=no
53738 
53739 fi
53740 rm -f core conftest.err conftest.$ac_objext \
53741     conftest$ac_exeext conftest.$ac_ext
53742     CFLAGS="$OLD_CFLAGS"
53743     LIBS="$OLD_LIBS"
53744     ac_ext=cpp
53745 ac_cpp='$CXXCPP $CPPFLAGS'
53746 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53747 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53748 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53749 
53750     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
53751 $as_echo "$LIBFFI_WORKS" >&6; }
53752 
53753     if test "x$LIBFFI_WORKS" = xno; then
53754 
53755   # Print a helpful message on how to acquire the necessary build dependency.
53756   # ffi is the help tag: freetype, cups, alsa etc
53757   MISSING_DEPENDENCY=ffi
53758 
53759   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53760     cygwin_help $MISSING_DEPENDENCY
53761   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53762     msys_help $MISSING_DEPENDENCY
53763   else
53764     PKGHANDLER_COMMAND=
53765 
53766     case $PKGHANDLER in
53767       apt-get)
53768         apt_help     $MISSING_DEPENDENCY ;;
53769       yum)
53770         yum_help     $MISSING_DEPENDENCY ;;
53771       port)
53772         port_help    $MISSING_DEPENDENCY ;;
53773       pkgutil)
53774         pkgutil_help $MISSING_DEPENDENCY ;;
53775       pkgadd)
53776         pkgadd_help  $MISSING_DEPENDENCY ;;
53777     esac
53778 
53779     if test "x$PKGHANDLER_COMMAND" != x; then
53780       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53781     fi
53782   fi
53783 
53784       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
53785     fi
53786   fi
53787 
53788 
53789 
53790 
53791 
53792   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
53793     # Extract the first word of "llvm-config", so it can be a program name with args.
53794 set dummy llvm-config; ac_word=$2
53795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53796 $as_echo_n "checking for $ac_word... " >&6; }
53797 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
53798   $as_echo_n "(cached) " >&6
53799 else
53800   if test -n "$LLVM_CONFIG"; then
53801   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
53802 else
53803 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53804 for as_dir in $PATH
53805 do
53806   IFS=$as_save_IFS
53807   test -z "$as_dir" && as_dir=.
53808     for ac_exec_ext in '' $ac_executable_extensions; do
53809   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53810     ac_cv_prog_LLVM_CONFIG="llvm-config"
53811     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53812     break 2
53813   fi
53814 done
53815   done
53816 IFS=$as_save_IFS
53817 
53818 fi
53819 fi
53820 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
53821 if test -n "$LLVM_CONFIG"; then
53822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
53823 $as_echo "$LLVM_CONFIG" >&6; }
53824 else
53825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53826 $as_echo "no" >&6; }
53827 fi
53828 
53829 
53830 
53831     if test "x$LLVM_CONFIG" != xllvm-config; then
53832       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
53833     fi
53834 
53835     llvm_components="jit mcjit engine nativecodegen native"
53836     unset LLVM_CFLAGS
53837     for flag in $("$LLVM_CONFIG" --cxxflags); do
53838       if echo "${flag}" | grep -q '^-[ID]'; then
53839         if test "${flag}" != "-D_DEBUG" ; then
53840           if test "${LLVM_CFLAGS}" != "" ; then
53841             LLVM_CFLAGS="${LLVM_CFLAGS} "
53842           fi
53843           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
53844         fi
53845       fi
53846     done
53847     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
53848     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
53849 
53850     unset LLVM_LDFLAGS
53851     for flag in $("${LLVM_CONFIG}" --ldflags); do
53852       if echo "${flag}" | grep -q '^-L'; then
53853         if test "${LLVM_LDFLAGS}" != ""; then
53854           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
53855         fi
53856         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
53857       fi
53858     done
53859 
53860     unset LLVM_LIBS
53861     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
53862       if echo "${flag}" | grep -q '^-l'; then
53863         if test "${LLVM_LIBS}" != ""; then
53864           LLVM_LIBS="${LLVM_LIBS} "
53865         fi
53866         LLVM_LIBS="${LLVM_LIBS}${flag}"
53867       fi
53868     done
53869 
53870 
53871 
53872 
53873   fi
53874 
53875 
53876 
53877 # Check whether --with-libjpeg was given.
53878 if test "${with_libjpeg+set}" = set; then :
53879   withval=$with_libjpeg;
53880 fi
53881 
53882 
53883   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
53884 $as_echo_n "checking for which libjpeg to use... " >&6; }
53885   # default is bundled
53886   DEFAULT_LIBJPEG=bundled
53887   # if user didn't specify, use DEFAULT_LIBJPEG
53888   if test "x${with_libjpeg}" = "x"; then
53889     with_libjpeg=${DEFAULT_LIBJPEG}
53890   fi
53891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
53892 $as_echo "${with_libjpeg}" >&6; }
53893 
53894   if test "x${with_libjpeg}" = "xbundled"; then
53895     USE_EXTERNAL_LIBJPEG=false
53896   elif test "x${with_libjpeg}" = "xsystem"; then
53897     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
53898 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
53899 
53900 else
53901    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
53902 fi
53903 
53904 
53905     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
53906 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
53907 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
53908   $as_echo_n "(cached) " >&6
53909 else
53910   ac_check_lib_save_LIBS=$LIBS
53911 LIBS="-ljpeg  $LIBS"
53912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53913 /* end confdefs.h.  */
53914 
53915 /* Override any GCC internal prototype to avoid an error.
53916    Use char because int might match the return type of a GCC
53917    builtin and then its argument prototype would still apply.  */
53918 #ifdef __cplusplus
53919 extern "C"
53920 #endif
53921 char jpeg_CreateDecompress ();
53922 int
53923 main ()
53924 {
53925 return jpeg_CreateDecompress ();
53926   ;
53927   return 0;
53928 }
53929 _ACEOF
53930 if ac_fn_cxx_try_link "$LINENO"; then :
53931   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
53932 else
53933   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
53934 fi
53935 rm -f core conftest.err conftest.$ac_objext \
53936     conftest$ac_exeext conftest.$ac_ext
53937 LIBS=$ac_check_lib_save_LIBS
53938 fi
53939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
53940 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
53941 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
53942   cat >>confdefs.h <<_ACEOF
53943 #define HAVE_LIBJPEG 1
53944 _ACEOF
53945 
53946   LIBS="-ljpeg $LIBS"
53947 
53948 else
53949    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
53950 fi
53951 
53952 
53953     USE_EXTERNAL_LIBJPEG=true
53954   else
53955     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
53956   fi
53957 
53958 
53959 
53960 
53961 
53962 # Check whether --with-giflib was given.
53963 if test "${with_giflib+set}" = set; then :
53964   withval=$with_giflib;
53965 fi
53966 
53967 
53968   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
53969 $as_echo_n "checking for which giflib to use... " >&6; }
53970   # default is bundled
53971   DEFAULT_GIFLIB=bundled
53972   # if user didn't specify, use DEFAULT_GIFLIB
53973   if test "x${with_giflib}" = "x"; then
53974     with_giflib=${DEFAULT_GIFLIB}
53975   fi
53976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
53977 $as_echo "${with_giflib}" >&6; }
53978 
53979   if test "x${with_giflib}" = "xbundled"; then
53980     USE_EXTERNAL_LIBGIF=false
53981   elif test "x${with_giflib}" = "xsystem"; then
53982     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
53983 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
53984 
53985 else
53986    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
53987 fi
53988 
53989 
53990     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
53991 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
53992 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
53993   $as_echo_n "(cached) " >&6
53994 else
53995   ac_check_lib_save_LIBS=$LIBS
53996 LIBS="-lgif  $LIBS"
53997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53998 /* end confdefs.h.  */
53999 
54000 /* Override any GCC internal prototype to avoid an error.
54001    Use char because int might match the return type of a GCC
54002    builtin and then its argument prototype would still apply.  */
54003 #ifdef __cplusplus
54004 extern "C"
54005 #endif
54006 char DGifGetCode ();
54007 int
54008 main ()
54009 {
54010 return DGifGetCode ();
54011   ;
54012   return 0;
54013 }
54014 _ACEOF
54015 if ac_fn_cxx_try_link "$LINENO"; then :
54016   ac_cv_lib_gif_DGifGetCode=yes
54017 else
54018   ac_cv_lib_gif_DGifGetCode=no
54019 fi
54020 rm -f core conftest.err conftest.$ac_objext \
54021     conftest$ac_exeext conftest.$ac_ext
54022 LIBS=$ac_check_lib_save_LIBS
54023 fi
54024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
54025 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
54026 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
54027   cat >>confdefs.h <<_ACEOF
54028 #define HAVE_LIBGIF 1
54029 _ACEOF
54030 
54031   LIBS="-lgif $LIBS"
54032 
54033 else
54034    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
54035 fi
54036 
54037 
54038     USE_EXTERNAL_LIBGIF=true
54039   else
54040     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
54041   fi
54042 
54043 
54044 
54045 
54046 
54047 # Check whether --with-libpng was given.
54048 if test "${with_libpng+set}" = set; then :
54049   withval=$with_libpng;
54050 fi
54051 
54052 
54053   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
54054 $as_echo_n "checking for which libpng to use... " >&6; }
54055 
54056   # default is bundled
54057   DEFAULT_LIBPNG=bundled
54058   # if user didn't specify, use DEFAULT_LIBPNG
54059   if test "x${with_libpng}" = "x"; then
54060       with_libpng=${DEFAULT_LIBPNG}
54061   fi
54062 
54063   if test "x${with_libpng}" = "xbundled"; then
54064       USE_EXTERNAL_LIBPNG=false
54065       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54066 $as_echo "bundled" >&6; }
54067   elif test "x${with_libpng}" = "xsystem"; then
54068 
54069 pkg_failed=no
54070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
54071 $as_echo_n "checking for PNG... " >&6; }
54072 
54073 if test -n "$PNG_CFLAGS"; then
54074     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
54075  elif test -n "$PKG_CONFIG"; then
54076     if test -n "$PKG_CONFIG" && \
54077     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
54078   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
54079   ac_status=$?
54080   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54081   test $ac_status = 0; }; then
54082   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
54083 else
54084   pkg_failed=yes
54085 fi
54086  else
54087     pkg_failed=untried
54088 fi
54089 if test -n "$PNG_LIBS"; then
54090     pkg_cv_PNG_LIBS="$PNG_LIBS"
54091  elif test -n "$PKG_CONFIG"; then
54092     if test -n "$PKG_CONFIG" && \
54093     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
54094   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
54095   ac_status=$?
54096   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54097   test $ac_status = 0; }; then
54098   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
54099 else
54100   pkg_failed=yes
54101 fi
54102  else
54103     pkg_failed=untried
54104 fi
54105 
54106 
54107 
54108 if test $pkg_failed = yes; then
54109 
54110 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
54111         _pkg_short_errors_supported=yes
54112 else
54113         _pkg_short_errors_supported=no
54114 fi
54115         if test $_pkg_short_errors_supported = yes; then
54116                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
54117         else
54118                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
54119         fi
54120         # Put the nasty error message in config.log where it belongs
54121         echo "$PNG_PKG_ERRORS" >&5
54122 
54123         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54124 $as_echo "no" >&6; }
54125                  LIBPNG_FOUND=no
54126 elif test $pkg_failed = untried; then
54127          LIBPNG_FOUND=no
54128 else
54129         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
54130         PNG_LIBS=$pkg_cv_PNG_LIBS
54131         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54132 $as_echo "yes" >&6; }
54133          LIBPNG_FOUND=yes
54134 fi
54135       if test "x${LIBPNG_FOUND}" = "xyes"; then
54136           USE_EXTERNAL_LIBPNG=true
54137           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54138 $as_echo "system" >&6; }
54139       else
54140           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
54141 $as_echo "system not found" >&6; }
54142           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
54143       fi
54144   else
54145       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
54146   fi
54147 
54148 
54149 
54150 
54151 
54152 # Check whether --with-zlib was given.
54153 if test "${with_zlib+set}" = set; then :
54154   withval=$with_zlib;
54155 fi
54156 
54157 
54158   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
54159 $as_echo_n "checking for compress in -lz... " >&6; }
54160 if ${ac_cv_lib_z_compress+:} false; then :
54161   $as_echo_n "(cached) " >&6
54162 else
54163   ac_check_lib_save_LIBS=$LIBS
54164 LIBS="-lz  $LIBS"
54165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54166 /* end confdefs.h.  */
54167 
54168 /* Override any GCC internal prototype to avoid an error.
54169    Use char because int might match the return type of a GCC
54170    builtin and then its argument prototype would still apply.  */
54171 #ifdef __cplusplus
54172 extern "C"
54173 #endif
54174 char compress ();
54175 int
54176 main ()
54177 {
54178 return compress ();
54179   ;
54180   return 0;
54181 }
54182 _ACEOF
54183 if ac_fn_cxx_try_link "$LINENO"; then :
54184   ac_cv_lib_z_compress=yes
54185 else
54186   ac_cv_lib_z_compress=no
54187 fi
54188 rm -f core conftest.err conftest.$ac_objext \
54189     conftest$ac_exeext conftest.$ac_ext
54190 LIBS=$ac_check_lib_save_LIBS
54191 fi
54192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
54193 $as_echo "$ac_cv_lib_z_compress" >&6; }
54194 if test "x$ac_cv_lib_z_compress" = xyes; then :
54195    ZLIB_FOUND=yes
54196 else
54197    ZLIB_FOUND=no
54198 fi
54199 
54200 
54201   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
54202 $as_echo_n "checking for which zlib to use... " >&6; }
54203 
54204   DEFAULT_ZLIB=bundled
54205   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
54206     # On macosx default is system...on others default is bundled
54207     DEFAULT_ZLIB=system
54208   fi
54209 
54210   if test "x${ZLIB_FOUND}" != "xyes"; then
54211     # If we don't find any system...set default to bundled
54212     DEFAULT_ZLIB=bundled
54213   fi
54214 
54215   # If user didn't specify, use DEFAULT_ZLIB
54216   if test "x${with_zlib}" = "x"; then
54217     with_zlib=${DEFAULT_ZLIB}
54218   fi
54219 
54220   if test "x${with_zlib}" = "xbundled"; then
54221     USE_EXTERNAL_LIBZ=false
54222     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54223 $as_echo "bundled" >&6; }
54224   elif test "x${with_zlib}" = "xsystem"; then
54225     if test "x${ZLIB_FOUND}" = "xyes"; then
54226       USE_EXTERNAL_LIBZ=true
54227       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54228 $as_echo "system" >&6; }
54229     else
54230       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
54231 $as_echo "system not found" >&6; }
54232       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
54233     fi
54234   else
54235     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
54236   fi
54237 
54238 
54239 
54240 
54241 
54242 # Check whether --with-lcms was given.
54243 if test "${with_lcms+set}" = set; then :
54244   withval=$with_lcms;
54245 fi
54246 
54247 
54248   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
54249 $as_echo_n "checking for which lcms to use... " >&6; }
54250 
54251   DEFAULT_LCMS=bundled
54252   # If user didn't specify, use DEFAULT_LCMS
54253   if test "x${with_lcms}" = "x"; then
54254       with_lcms=${DEFAULT_LCMS}
54255   fi
54256 
54257   if test "x${with_lcms}" = "xbundled"; then
54258     USE_EXTERNAL_LCMS=false
54259     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54260 $as_echo "bundled" >&6; }
54261   elif test "x${with_lcms}" = "xsystem"; then
54262     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54263 $as_echo "system" >&6; }
54264 
54265 pkg_failed=no
54266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
54267 $as_echo_n "checking for LCMS... " >&6; }
54268 
54269 if test -n "$LCMS_CFLAGS"; then
54270     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
54271  elif test -n "$PKG_CONFIG"; then
54272     if test -n "$PKG_CONFIG" && \
54273     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
54274   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
54275   ac_status=$?
54276   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54277   test $ac_status = 0; }; then
54278   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
54279 else
54280   pkg_failed=yes
54281 fi
54282  else
54283     pkg_failed=untried
54284 fi
54285 if test -n "$LCMS_LIBS"; then
54286     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
54287  elif test -n "$PKG_CONFIG"; then
54288     if test -n "$PKG_CONFIG" && \
54289     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
54290   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
54291   ac_status=$?
54292   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54293   test $ac_status = 0; }; then
54294   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
54295 else
54296   pkg_failed=yes
54297 fi
54298  else
54299     pkg_failed=untried
54300 fi
54301 
54302 
54303 
54304 if test $pkg_failed = yes; then
54305 
54306 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
54307         _pkg_short_errors_supported=yes
54308 else
54309         _pkg_short_errors_supported=no
54310 fi
54311         if test $_pkg_short_errors_supported = yes; then
54312                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
54313         else
54314                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
54315         fi
54316         # Put the nasty error message in config.log where it belongs
54317         echo "$LCMS_PKG_ERRORS" >&5
54318 
54319         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54320 $as_echo "no" >&6; }
54321                 LCMS_FOUND=no
54322 elif test $pkg_failed = untried; then
54323         LCMS_FOUND=no
54324 else
54325         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
54326         LCMS_LIBS=$pkg_cv_LCMS_LIBS
54327         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54328 $as_echo "yes" >&6; }
54329         LCMS_FOUND=yes
54330 fi
54331     if test "x${LCMS_FOUND}" = "xyes"; then
54332       USE_EXTERNAL_LCMS=true
54333     else
54334       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
54335     fi
54336   else
54337     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
54338   fi
54339 
54340 
54341 
54342 
54343 
54344 
54345 
54346 
54347 
54348 
54349 
54350   # Setup libm (the maths library)
54351   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
54352 $as_echo_n "checking for cos in -lm... " >&6; }
54353 if ${ac_cv_lib_m_cos+:} false; then :
54354   $as_echo_n "(cached) " >&6
54355 else
54356   ac_check_lib_save_LIBS=$LIBS
54357 LIBS="-lm  $LIBS"
54358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54359 /* end confdefs.h.  */
54360 
54361 /* Override any GCC internal prototype to avoid an error.
54362    Use char because int might match the return type of a GCC
54363    builtin and then its argument prototype would still apply.  */
54364 #ifdef __cplusplus
54365 extern "C"
54366 #endif
54367 char cos ();
54368 int
54369 main ()
54370 {
54371 return cos ();
54372   ;
54373   return 0;
54374 }
54375 _ACEOF
54376 if ac_fn_cxx_try_link "$LINENO"; then :
54377   ac_cv_lib_m_cos=yes
54378 else
54379   ac_cv_lib_m_cos=no
54380 fi
54381 rm -f core conftest.err conftest.$ac_objext \
54382     conftest$ac_exeext conftest.$ac_ext
54383 LIBS=$ac_check_lib_save_LIBS
54384 fi
54385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
54386 $as_echo "$ac_cv_lib_m_cos" >&6; }
54387 if test "x$ac_cv_lib_m_cos" = xyes; then :
54388   cat >>confdefs.h <<_ACEOF
54389 #define HAVE_LIBM 1
54390 _ACEOF
54391 
54392   LIBS="-lm $LIBS"
54393 
54394 else
54395 
54396       { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
54397 $as_echo "$as_me: Maths library was not found" >&6;}
54398 
54399 fi
54400 
54401   LIBM=-lm
54402 
54403 
54404   # Setup libdl (for dynamic library loading)
54405   save_LIBS="$LIBS"
54406   LIBS=""
54407   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
54408 $as_echo_n "checking for dlopen in -ldl... " >&6; }
54409 if ${ac_cv_lib_dl_dlopen+:} false; then :
54410   $as_echo_n "(cached) " >&6
54411 else
54412   ac_check_lib_save_LIBS=$LIBS
54413 LIBS="-ldl  $LIBS"
54414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54415 /* end confdefs.h.  */
54416 
54417 /* Override any GCC internal prototype to avoid an error.
54418    Use char because int might match the return type of a GCC
54419    builtin and then its argument prototype would still apply.  */
54420 #ifdef __cplusplus
54421 extern "C"
54422 #endif
54423 char dlopen ();
54424 int
54425 main ()
54426 {
54427 return dlopen ();
54428   ;
54429   return 0;
54430 }
54431 _ACEOF
54432 if ac_fn_cxx_try_link "$LINENO"; then :
54433   ac_cv_lib_dl_dlopen=yes
54434 else
54435   ac_cv_lib_dl_dlopen=no
54436 fi
54437 rm -f core conftest.err conftest.$ac_objext \
54438     conftest$ac_exeext conftest.$ac_ext
54439 LIBS=$ac_check_lib_save_LIBS
54440 fi
54441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
54442 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
54443 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
54444   cat >>confdefs.h <<_ACEOF
54445 #define HAVE_LIBDL 1
54446 _ACEOF
54447 
54448   LIBS="-ldl $LIBS"
54449 
54450 fi
54451 
54452   LIBDL="$LIBS"
54453 
54454   LIBS="$save_LIBS"
54455 
54456   # Deprecated libraries, keep the flags for backwards compatibility
54457   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54458 
54459 
54460 # Check whether --with-dxsdk was given.
54461 if test "${with_dxsdk+set}" = set; then :
54462   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
54463 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
54464 fi
54465 
54466 
54467 
54468 
54469 # Check whether --with-dxsdk-lib was given.
54470 if test "${with_dxsdk_lib+set}" = set; then :
54471   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
54472 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
54473 fi
54474 
54475 
54476 
54477 
54478 # Check whether --with-dxsdk-include was given.
54479 if test "${with_dxsdk_include+set}" = set; then :
54480   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
54481 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
54482 fi
54483 
54484 
54485   fi
54486 
54487   # Control if libzip can use mmap. Available for purposes of overriding.
54488   LIBZIP_CAN_USE_MMAP=true
54489 
54490 
54491 
54492 
54493 
54494 
54495 
54496 
54497 
54498 
54499 
54500 
54501 
54502 
54503 ###############################################################################
54504 #
54505 # We need to do some final tweaking, when everything else is done.
54506 #
54507 ###############################################################################
54508 
54509 
54510   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
54511 
54512 
54513   # The name of the Service Agent jar.
54514   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
54515   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54516     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
54517   fi
54518 
54519 
54520 
54521     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
54522 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
54523 
54524     if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
54525       ENABLE_INTREE_EC=yes
54526       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54527 $as_echo "yes" >&6; }
54528     else
54529       ENABLE_INTREE_EC=no
54530       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54531 $as_echo "no" >&6; }
54532     fi
54533 
54534 
54535 
54536 
54537 ###############################################################################
54538 #
54539 # Configure parts of the build that only affect the build performance,
54540 # not the result.
54541 #
54542 ###############################################################################
54543 
54544 
54545   # How many cores do we have on this build system?
54546 
54547 # Check whether --with-num-cores was given.
54548 if test "${with_num_cores+set}" = set; then :
54549   withval=$with_num_cores;
54550 fi
54551 
54552   if test "x$with_num_cores" = x; then
54553     # The number of cores were not specified, try to probe them.
54554 
54555   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
54556 $as_echo_n "checking for number of cores... " >&6; }
54557   NUM_CORES=1
54558   FOUND_CORES=no
54559 
54560   if test -f /proc/cpuinfo; then
54561     # Looks like a Linux (or cygwin) system
54562     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
54563     FOUND_CORES=yes
54564   elif test -x /usr/sbin/psrinfo; then
54565     # Looks like a Solaris system
54566     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
54567     FOUND_CORES=yes
54568   elif test -x /usr/sbin/system_profiler; then
54569     # Looks like a MacOSX system
54570     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
54571     FOUND_CORES=yes
54572   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
54573     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
54574     FOUND_CORES=yes
54575   elif test -n "$NUMBER_OF_PROCESSORS"; then
54576     # On windows, look in the env
54577     NUM_CORES=$NUMBER_OF_PROCESSORS
54578     FOUND_CORES=yes
54579   fi
54580 
54581   if test "x$FOUND_CORES" = xyes; then
54582     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
54583 $as_echo "$NUM_CORES" >&6; }
54584   else
54585     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
54586 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
54587     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
54588 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
54589   fi
54590 
54591   else
54592     NUM_CORES=$with_num_cores
54593   fi
54594 
54595 
54596 
54597   # How much memory do we have on this build system?
54598 
54599 # Check whether --with-memory-size was given.
54600 if test "${with_memory_size+set}" = set; then :
54601   withval=$with_memory_size;
54602 fi
54603 
54604   if test "x$with_memory_size" = x; then
54605     # The memory size was not specified, try to probe it.
54606 
54607   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
54608 $as_echo_n "checking for memory size... " >&6; }
54609   # Default to 1024 MB
54610   MEMORY_SIZE=1024
54611   FOUND_MEM=no
54612 
54613   if test -f /proc/meminfo; then
54614     # Looks like a Linux (or cygwin) system
54615     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
54616     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
54617     FOUND_MEM=yes
54618   elif test -x /usr/sbin/prtconf; then
54619     # Looks like a Solaris or AIX system
54620     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
54621     FOUND_MEM=yes
54622   elif test -x /usr/sbin/system_profiler; then
54623     # Looks like a MacOSX system
54624     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
54625     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
54626     FOUND_MEM=yes
54627   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
54628     # Windows, but without cygwin
54629     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
54630     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
54631     FOUND_MEM=yes
54632   fi
54633 
54634   if test "x$FOUND_MEM" = xyes; then
54635     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
54636 $as_echo "$MEMORY_SIZE MB" >&6; }
54637   else
54638     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
54639 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
54640     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
54641 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
54642   fi
54643 
54644   else
54645     MEMORY_SIZE=$with_memory_size
54646   fi
54647 
54648 
54649 
54650   # Provide a decent default number of parallel jobs for make depending on
54651   # number of cores, amount of memory and machine architecture.
54652 
54653 # Check whether --with-jobs was given.
54654 if test "${with_jobs+set}" = set; then :
54655   withval=$with_jobs;
54656 fi
54657 
54658   if test "x$with_jobs" = x; then
54659     # Number of jobs was not specified, calculate.
54660     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
54661 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
54662     # Approximate memory in GB.
54663     memory_gb=`expr $MEMORY_SIZE / 1024`
54664     # Pick the lowest of memory in gb and number of cores.
54665     if test "$memory_gb" -lt "$NUM_CORES"; then
54666       JOBS="$memory_gb"
54667     else
54668       JOBS="$NUM_CORES"
54669       # On bigger machines, leave some room for other processes to run
54670       if test "$JOBS" -gt "4"; then
54671         JOBS=`expr $JOBS '*' 90 / 100`
54672       fi
54673     fi
54674     # Cap number of jobs to 16
54675     if test "$JOBS" -gt "16"; then
54676       JOBS=16
54677     fi
54678     if test "$JOBS" -eq "0"; then
54679       JOBS=1
54680     fi
54681     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
54682 $as_echo "$JOBS" >&6; }
54683   else
54684     JOBS=$with_jobs
54685   fi
54686 
54687 
54688 
54689 # Setup arguments for the boot jdk (after cores and memory have been setup)
54690 
54691   ##############################################################################
54692   #
54693   # Specify jvm options for anything that is run with the Boot JDK.
54694   # Not all JVM:s accept the same arguments on the command line.
54695   #
54696 
54697 # Check whether --with-boot-jdk-jvmargs was given.
54698 if test "${with_boot_jdk_jvmargs+set}" = set; then :
54699   withval=$with_boot_jdk_jvmargs;
54700 fi
54701 
54702 
54703   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
54704 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
54705 
54706   # Disable special log output when a debug build is used as Boot JDK...
54707 
54708   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
54709   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
54710   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
54711   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54712   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54713   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54714     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
54715     JVM_ARG_OK=true
54716   else
54717     $ECHO "Arg failed:" >&5
54718     $ECHO "$OUTPUT" >&5
54719     JVM_ARG_OK=false
54720   fi
54721 
54722 
54723   # Apply user provided options.
54724 
54725   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
54726   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
54727   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
54728   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54729   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54730   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54731     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
54732     JVM_ARG_OK=true
54733   else
54734     $ECHO "Arg failed:" >&5
54735     $ECHO "$OUTPUT" >&5
54736     JVM_ARG_OK=false
54737   fi
54738 
54739 
54740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
54741 $as_echo "$boot_jdk_jvmargs" >&6; }
54742 
54743   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
54744   JAVA_FLAGS=$boot_jdk_jvmargs
54745 
54746 
54747 
54748   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
54749 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
54750 
54751   # Starting amount of heap memory.
54752 
54753   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
54754   $ECHO "Command: $JAVA -Xms64M -version" >&5
54755   OUTPUT=`$JAVA -Xms64M -version 2>&1`
54756   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54757   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54758   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54759     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
54760     JVM_ARG_OK=true
54761   else
54762     $ECHO "Arg failed:" >&5
54763     $ECHO "$OUTPUT" >&5
54764     JVM_ARG_OK=false
54765   fi
54766 
54767 
54768   # Maximum amount of heap memory.
54769   # Maximum stack size.
54770   JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
54771   if test "x$BOOT_JDK_BITS" = "x32"; then
54772     if test "$JVM_MAX_HEAP" -gt "1100"; then
54773       JVM_MAX_HEAP=1100
54774     elif test "$JVM_MAX_HEAP" -lt "512"; then
54775       JVM_MAX_HEAP=512
54776     fi
54777     STACK_SIZE=768
54778   else
54779     # Running a 64 bit JVM allows for and requires a bigger heap
54780     if test "$JVM_MAX_HEAP" -gt "1600"; then
54781       JVM_MAX_HEAP=1600
54782     elif test "$JVM_MAX_HEAP" -lt "512"; then
54783       JVM_MAX_HEAP=512
54784     fi
54785     STACK_SIZE=1536
54786   fi
54787 
54788   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
54789   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
54790   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
54791   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54792   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54793   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54794     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
54795     JVM_ARG_OK=true
54796   else
54797     $ECHO "Arg failed:" >&5
54798     $ECHO "$OUTPUT" >&5
54799     JVM_ARG_OK=false
54800   fi
54801 
54802 
54803   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
54804   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
54805   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
54806   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54807   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54808   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54809     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
54810     JVM_ARG_OK=true
54811   else
54812     $ECHO "Arg failed:" >&5
54813     $ECHO "$OUTPUT" >&5
54814     JVM_ARG_OK=false
54815   fi
54816 
54817 
54818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
54819 $as_echo "$boot_jdk_jvmargs_big" >&6; }
54820 
54821   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
54822 
54823 
54824 
54825   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
54826 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
54827 
54828   # Use serial gc for small short lived tools if possible
54829 
54830   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
54831   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
54832   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
54833   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54834   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54835   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54836     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
54837     JVM_ARG_OK=true
54838   else
54839     $ECHO "Arg failed:" >&5
54840     $ECHO "$OUTPUT" >&5
54841     JVM_ARG_OK=false
54842   fi
54843 
54844 
54845   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
54846   $ECHO "Command: $JAVA -Xms32M -version" >&5
54847   OUTPUT=`$JAVA -Xms32M -version 2>&1`
54848   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54849   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54850   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54851     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
54852     JVM_ARG_OK=true
54853   else
54854     $ECHO "Arg failed:" >&5
54855     $ECHO "$OUTPUT" >&5
54856     JVM_ARG_OK=false
54857   fi
54858 
54859 
54860   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
54861   $ECHO "Command: $JAVA -Xmx512M -version" >&5
54862   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
54863   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54864   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54865   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54866     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
54867     JVM_ARG_OK=true
54868   else
54869     $ECHO "Arg failed:" >&5
54870     $ECHO "$OUTPUT" >&5
54871     JVM_ARG_OK=false
54872   fi
54873 
54874 
54875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
54876 $as_echo "$boot_jdk_jvmargs_small" >&6; }
54877 
54878   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
54879 
54880 
54881   JAVA_TOOL_FLAGS_SMALL=""
54882   for f in $JAVA_FLAGS_SMALL; do
54883     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
54884   done
54885 
54886 
54887 
54888 # Setup smart javac (after cores and memory have been setup)
54889 
54890 
54891 # Check whether --with-sjavac-server-java was given.
54892 if test "${with_sjavac_server_java+set}" = set; then :
54893   withval=$with_sjavac_server_java;
54894 fi
54895 
54896 
54897   if test "x$with_sjavac_server_java" != x; then
54898     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
54899     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
54900     if test "x$FOUND_VERSION" = x; then
54901       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
54902     fi
54903   else
54904     SJAVAC_SERVER_JAVA="$JAVA"
54905   fi
54906 
54907 
54908   if test "$MEMORY_SIZE" -gt "3000"; then
54909 
54910   $ECHO "Check if jvm arg is ok: -d64" >&5
54911   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
54912   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
54913   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54914   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54915   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54916     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
54917     JVM_ARG_OK=true
54918   else
54919     $ECHO "Arg failed:" >&5
54920     $ECHO "$OUTPUT" >&5
54921     JVM_ARG_OK=false
54922   fi
54923 
54924     if test "$JVM_ARG_OK" = true; then
54925       JVM_64BIT=true
54926       JVM_ARG_OK=false
54927     fi
54928   fi
54929 
54930   MX_VALUE=`expr $MEMORY_SIZE / 2`
54931   if test "$JVM_64BIT" = true; then
54932     # Set ms lower than mx since more than one instance of the server might
54933     # get launched at the same time before they figure out which instance won.
54934     MS_VALUE=512
54935     if test "$MX_VALUE" -gt "2048"; then
54936       MX_VALUE=2048
54937     fi
54938   else
54939     MS_VALUE=256
54940     if test "$MX_VALUE" -gt "1500"; then
54941       MX_VALUE=1500
54942     fi
54943   fi
54944   if test "$MX_VALUE" -lt "512"; then
54945     MX_VALUE=512
54946   fi
54947 
54948   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
54949   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
54950   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
54951   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54952   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54953   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54954     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
54955     JVM_ARG_OK=true
54956   else
54957     $ECHO "Arg failed:" >&5
54958     $ECHO "$OUTPUT" >&5
54959     JVM_ARG_OK=false
54960   fi
54961 
54962 
54963 
54964   # Check whether --enable-sjavac was given.
54965 if test "${enable_sjavac+set}" = set; then :
54966   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
54967 else
54968   ENABLE_SJAVAC="no"
54969 fi
54970 
54971   if test "x$JVM_ARG_OK" = "xfalse"; then
54972     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
54973 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
54974     ENABLE_SJAVAC="no"
54975   fi
54976   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
54977 $as_echo_n "checking whether to use sjavac... " >&6; }
54978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
54979 $as_echo "$ENABLE_SJAVAC" >&6; }
54980 
54981 
54982   # Check whether --enable-javac-server was given.
54983 if test "${enable_javac_server+set}" = set; then :
54984   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
54985 else
54986   ENABLE_JAVAC_SERVER="no"
54987 fi
54988 
54989   if test "x$JVM_ARG_OK" = "xfalse"; then
54990     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
54991 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
54992     ENABLE_JAVAC_SERVER="no"
54993   fi
54994   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
54995 $as_echo_n "checking whether to use javac server... " >&6; }
54996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
54997 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
54998 
54999 
55000 
55001 # Can the C/C++ compiler use precompiled headers?
55002 
55003 
55004   ###############################################################################
55005   #
55006   # Can the C/C++ compiler use precompiled headers?
55007   #
55008   # Check whether --enable-precompiled-headers was given.
55009 if test "${enable_precompiled_headers+set}" = set; then :
55010   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
55011 else
55012   ENABLE_PRECOMPH=yes
55013 fi
55014 
55015 
55016   USE_PRECOMPILED_HEADER=1
55017   if test "x$ENABLE_PRECOMPH" = xno; then
55018     USE_PRECOMPILED_HEADER=0
55019   fi
55020 
55021   if test "x$ENABLE_PRECOMPH" = xyes; then
55022     # Check that the compiler actually supports precomp headers.
55023     if test "x$TOOLCHAIN_TYPE" = xgcc; then
55024       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
55025 $as_echo_n "checking that precompiled headers work... " >&6; }
55026       echo "int alfa();" > conftest.h
55027       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
55028       if test ! -f conftest.hpp.gch; then
55029         USE_PRECOMPILED_HEADER=0
55030         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55031 $as_echo "no" >&6; }
55032       else
55033         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55034 $as_echo "yes" >&6; }
55035       fi
55036       rm -f conftest.h conftest.hpp.gch
55037     fi
55038   fi
55039 
55040 
55041 
55042 
55043 # Setup use of ccache, if available
55044 
55045   # Check whether --enable-ccache was given.
55046 if test "${enable_ccache+set}" = set; then :
55047   enableval=$enable_ccache;
55048 fi
55049 
55050 
55051   CCACHE=
55052   CCACHE_STATUS=
55053   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
55054 $as_echo_n "checking is ccache enabled... " >&6; }
55055   if test "x$enable_ccache" = xyes; then
55056     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
55057       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55058 $as_echo "yes" >&6; }
55059       OLD_PATH="$PATH"
55060       if test "x$TOOLCHAIN_PATH" != x; then
55061         PATH=$TOOLCHAIN_PATH:$PATH
55062       fi
55063 
55064 
55065 
55066   # Publish this variable in the help.
55067 
55068 
55069   if [ -z "${CCACHE+x}" ]; then
55070     # The variable is not set by user, try to locate tool using the code snippet
55071     for ac_prog in ccache
55072 do
55073   # Extract the first word of "$ac_prog", so it can be a program name with args.
55074 set dummy $ac_prog; ac_word=$2
55075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55076 $as_echo_n "checking for $ac_word... " >&6; }
55077 if ${ac_cv_path_CCACHE+:} false; then :
55078   $as_echo_n "(cached) " >&6
55079 else
55080   case $CCACHE in
55081   [\\/]* | ?:[\\/]*)
55082   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55083   ;;
55084   *)
55085   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55086 for as_dir in $PATH
55087 do
55088   IFS=$as_save_IFS
55089   test -z "$as_dir" && as_dir=.
55090     for ac_exec_ext in '' $ac_executable_extensions; do
55091   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55092     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55093     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55094     break 2
55095   fi
55096 done
55097   done
55098 IFS=$as_save_IFS
55099 
55100   ;;
55101 esac
55102 fi
55103 CCACHE=$ac_cv_path_CCACHE
55104 if test -n "$CCACHE"; then
55105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55106 $as_echo "$CCACHE" >&6; }
55107 else
55108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55109 $as_echo "no" >&6; }
55110 fi
55111 
55112 
55113   test -n "$CCACHE" && break
55114 done
55115 
55116   else
55117     # The variable is set, but is it from the command line or the environment?
55118 
55119     # Try to remove the string !CCACHE! from our list.
55120     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
55121     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
55122       # If it failed, the variable was not from the command line. Ignore it,
55123       # but warn the user (except for BASH, which is always set by the calling BASH).
55124       if test "xCCACHE" != xBASH; then
55125         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
55126 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
55127       fi
55128       # Try to locate tool using the code snippet
55129       for ac_prog in ccache
55130 do
55131   # Extract the first word of "$ac_prog", so it can be a program name with args.
55132 set dummy $ac_prog; ac_word=$2
55133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55134 $as_echo_n "checking for $ac_word... " >&6; }
55135 if ${ac_cv_path_CCACHE+:} false; then :
55136   $as_echo_n "(cached) " >&6
55137 else
55138   case $CCACHE in
55139   [\\/]* | ?:[\\/]*)
55140   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55141   ;;
55142   *)
55143   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55144 for as_dir in $PATH
55145 do
55146   IFS=$as_save_IFS
55147   test -z "$as_dir" && as_dir=.
55148     for ac_exec_ext in '' $ac_executable_extensions; do
55149   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55150     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55151     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55152     break 2
55153   fi
55154 done
55155   done
55156 IFS=$as_save_IFS
55157 
55158   ;;
55159 esac
55160 fi
55161 CCACHE=$ac_cv_path_CCACHE
55162 if test -n "$CCACHE"; then
55163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55164 $as_echo "$CCACHE" >&6; }
55165 else
55166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55167 $as_echo "no" >&6; }
55168 fi
55169 
55170 
55171   test -n "$CCACHE" && break
55172 done
55173 
55174     else
55175       # If it succeeded, then it was overridden by the user. We will use it
55176       # for the tool.
55177 
55178       # First remove it from the list of overridden variables, so we can test
55179       # for unknown variables in the end.
55180       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
55181 
55182       # Check if we try to supply an empty value
55183       if test "x$CCACHE" = x; then
55184         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
55185 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
55186         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
55187 $as_echo_n "checking for CCACHE... " >&6; }
55188         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
55189 $as_echo "disabled" >&6; }
55190       else
55191         # Check if the provided tool contains a complete path.
55192         tool_specified="$CCACHE"
55193         tool_basename="${tool_specified##*/}"
55194         if test "x$tool_basename" = "x$tool_specified"; then
55195           # A command without a complete path is provided, search $PATH.
55196           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
55197 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
55198           # Extract the first word of "$tool_basename", so it can be a program name with args.
55199 set dummy $tool_basename; ac_word=$2
55200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55201 $as_echo_n "checking for $ac_word... " >&6; }
55202 if ${ac_cv_path_CCACHE+:} false; then :
55203   $as_echo_n "(cached) " >&6
55204 else
55205   case $CCACHE in
55206   [\\/]* | ?:[\\/]*)
55207   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55208   ;;
55209   *)
55210   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55211 for as_dir in $PATH
55212 do
55213   IFS=$as_save_IFS
55214   test -z "$as_dir" && as_dir=.
55215     for ac_exec_ext in '' $ac_executable_extensions; do
55216   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55217     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55218     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55219     break 2
55220   fi
55221 done
55222   done
55223 IFS=$as_save_IFS
55224 
55225   ;;
55226 esac
55227 fi
55228 CCACHE=$ac_cv_path_CCACHE
55229 if test -n "$CCACHE"; then
55230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55231 $as_echo "$CCACHE" >&6; }
55232 else
55233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55234 $as_echo "no" >&6; }
55235 fi
55236 
55237 
55238           if test "x$CCACHE" = x; then
55239             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
55240           fi
55241         else
55242           # Otherwise we believe it is a complete path. Use it as it is.
55243           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
55244 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
55245           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
55246 $as_echo_n "checking for CCACHE... " >&6; }
55247           if test ! -x "$tool_specified"; then
55248             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
55249 $as_echo "not found" >&6; }
55250             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
55251           fi
55252           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
55253 $as_echo "$tool_specified" >&6; }
55254         fi
55255       fi
55256     fi
55257 
55258   fi
55259 
55260 
55261 
55262   if test "x$CCACHE" = x; then
55263     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
55264   fi
55265 
55266 
55267       PATH="$OLD_PATH"
55268       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
55269       CCACHE_STATUS="Active ($CCACHE_VERSION)"
55270     else
55271       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55272 $as_echo "no" >&6; }
55273       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
55274 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
55275     fi
55276   elif test "x$enable_ccache" = xno; then
55277     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
55278 $as_echo "no, explicitly disabled" >&6; }
55279     CCACHE_STATUS="Disabled"
55280   elif test "x$enable_ccache" = x; then
55281     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55282 $as_echo "no" >&6; }
55283   else
55284     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
55285 $as_echo "unknown" >&6; }
55286     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
55287   fi
55288 
55289 
55290 
55291 # Check whether --with-ccache-dir was given.
55292 if test "${with_ccache_dir+set}" = set; then :
55293   withval=$with_ccache_dir;
55294 fi
55295 
55296 
55297   if test "x$with_ccache_dir" != x; then
55298     # When using a non home ccache directory, assume the use is to share ccache files
55299     # with other users. Thus change the umask.
55300     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
55301     if test "x$CCACHE" = x; then
55302       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
55303 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
55304     fi
55305   fi
55306 
55307   if test "x$CCACHE" != x; then
55308 
55309   if test "x$CCACHE" != x; then
55310     if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
55311       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
55312           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
55313       if test "x$HAS_BAD_CCACHE" != "x"; then
55314         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
55315       fi
55316       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
55317 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
55318       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
55319       PUSHED_FLAGS="$CXXFLAGS"
55320       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
55321       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55322 /* end confdefs.h.  */
55323 
55324 int
55325 main ()
55326 {
55327 
55328   ;
55329   return 0;
55330 }
55331 _ACEOF
55332 if ac_fn_cxx_try_compile "$LINENO"; then :
55333   CC_KNOWS_CCACHE_TRICK=yes
55334 else
55335   CC_KNOWS_CCACHE_TRICK=no
55336 fi
55337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
55338       CXXFLAGS="$PUSHED_FLAGS"
55339       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
55340         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55341 $as_echo "yes" >&6; }
55342         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
55343 
55344         CCACHE_SLOPPINESS=pch_defines,time_macros
55345       else
55346         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55347 $as_echo "no" >&6; }
55348         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
55349       fi
55350     fi
55351 
55352     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
55353         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
55354 
55355     if test "x$SET_CCACHE_DIR" != x; then
55356       mkdir -p $CCACHE_DIR > /dev/null 2>&1
55357       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
55358     fi
55359   fi
55360 
55361   fi
55362 
55363 
55364 ###############################################################################
55365 #
55366 # And now the finish...
55367 #
55368 ###############################################################################
55369 
55370 # Check for some common pitfalls
55371 
55372   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55373     file_to_test="$SRC_ROOT/LICENSE"
55374     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
55375       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
55376     fi
55377   fi
55378 
55379 
55380   # Did user specify any unknown variables?
55381 
55382   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
55383     # Replace the separating ! with spaces before presenting for end user.
55384     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
55385     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
55386 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
55387   fi
55388 
55389 
55390   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
55391 $as_echo_n "checking if build directory is on local disk... " >&6; }
55392 
55393   # df -l lists only local disks; if the given directory is not found then
55394   # a non-zero exit code is given
55395   if test "x$DF" = x; then
55396     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55397       # msys does not have df; use Windows "net use" instead.
55398       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
55399       if test "x$IS_NETWORK_DISK" = x; then
55400         OUTPUT_DIR_IS_LOCAL="yes"
55401       else
55402         OUTPUT_DIR_IS_LOCAL="no"
55403       fi
55404     else
55405       # No df here, say it's local
55406       OUTPUT_DIR_IS_LOCAL="yes"
55407     fi
55408   else
55409     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
55410       OUTPUT_DIR_IS_LOCAL="yes"
55411     else
55412       OUTPUT_DIR_IS_LOCAL="no"
55413     fi
55414   fi
55415 
55416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
55417 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
55418 
55419 
55420 
55421   # Check if the user has any old-style ALT_ variables set.
55422   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
55423 
55424   # Before generating output files, test if they exist. If they do, this is a reconfigure.
55425   # Since we can't properly handle the dependencies for this, warn the user about the situation
55426   if test -e $OUTPUT_ROOT/spec.gmk; then
55427     IS_RECONFIGURE=yes
55428   else
55429     IS_RECONFIGURE=no
55430   fi
55431 
55432 
55433 # At the end, call the custom hook. (Dummy macro if no custom sources available)
55434 
55435 
55436 # We're messing a bit with internal autoconf variables to put the config.status
55437 # in the output directory instead of the current directory.
55438 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
55439 
55440 # Create the actual output files. Now the main work of configure is done.
55441 cat >confcache <<\_ACEOF
55442 # This file is a shell script that caches the results of configure
55443 # tests run on this system so they can be shared between configure
55444 # scripts and configure runs, see configure's option --config-cache.
55445 # It is not useful on other systems.  If it contains results you don't
55446 # want to keep, you may remove or edit it.
55447 #
55448 # config.status only pays attention to the cache file if you give it
55449 # the --recheck option to rerun configure.
55450 #
55451 # `ac_cv_env_foo' variables (set or unset) will be overridden when
55452 # loading this file, other *unset* `ac_cv_foo' will be assigned the
55453 # following values.
55454 
55455 _ACEOF
55456 
55457 # The following way of writing the cache mishandles newlines in values,
55458 # but we know of no workaround that is simple, portable, and efficient.
55459 # So, we kill variables containing newlines.
55460 # Ultrix sh set writes to stderr and can't be redirected directly,
55461 # and sets the high bit in the cache file unless we assign to the vars.
55462 (
55463   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
55464     eval ac_val=\$$ac_var
55465     case $ac_val in #(
55466     *${as_nl}*)
55467       case $ac_var in #(
55468       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
55469 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
55470       esac
55471       case $ac_var in #(
55472       _ | IFS | as_nl) ;; #(
55473       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
55474       *) { eval $ac_var=; unset $ac_var;} ;;
55475       esac ;;
55476     esac
55477   done
55478 
55479   (set) 2>&1 |
55480     case $as_nl`(ac_space=' '; set) 2>&1` in #(
55481     *${as_nl}ac_space=\ *)
55482       # `set' does not quote correctly, so add quotes: double-quote
55483       # substitution turns \\\\ into \\, and sed turns \\ into \.
55484       sed -n \
55485         "s/'/'\\\\''/g;
55486           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
55487       ;; #(
55488     *)
55489       # `set' quotes correctly as required by POSIX, so do not add quotes.
55490       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
55491       ;;
55492     esac |
55493     sort
55494 ) |
55495   sed '
55496      /^ac_cv_env_/b end
55497      t clear
55498      :clear
55499      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
55500      t end
55501      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
55502      :end' >>confcache
55503 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
55504   if test -w "$cache_file"; then
55505     if test "x$cache_file" != "x/dev/null"; then
55506       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
55507 $as_echo "$as_me: updating cache $cache_file" >&6;}
55508       if test ! -f "$cache_file" || test -h "$cache_file"; then
55509         cat confcache >"$cache_file"
55510       else
55511         case $cache_file in #(
55512         */* | ?:*)
55513           mv -f confcache "$cache_file"$$ &&
55514           mv -f "$cache_file"$$ "$cache_file" ;; #(
55515         *)
55516           mv -f confcache "$cache_file" ;;
55517         esac
55518       fi
55519     fi
55520   else
55521     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
55522 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
55523   fi
55524 fi
55525 rm -f confcache
55526 
55527 test "x$prefix" = xNONE && prefix=$ac_default_prefix
55528 # Let make expand exec_prefix.
55529 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
55530 
55531 # Transform confdefs.h into DEFS.
55532 # Protect against shell expansion while executing Makefile rules.
55533 # Protect against Makefile macro expansion.
55534 #
55535 # If the first sed substitution is executed (which looks for macros that
55536 # take arguments), then branch to the quote section.  Otherwise,
55537 # look for a macro that doesn't take arguments.
55538 ac_script='
55539 :mline
55540 /\\$/{
55541  N
55542  s,\\\n,,
55543  b mline
55544 }
55545 t clear
55546 :clear
55547 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
55548 t quote
55549 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
55550 t quote
55551 b any
55552 :quote
55553 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
55554 s/\[/\\&/g
55555 s/\]/\\&/g
55556 s/\$/$$/g
55557 H
55558 :any
55559 ${
55560         g
55561         s/^\n//
55562         s/\n/ /g
55563         p
55564 }
55565 '
55566 DEFS=`sed -n "$ac_script" confdefs.h`
55567 
55568 
55569 ac_libobjs=
55570 ac_ltlibobjs=
55571 U=
55572 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
55573   # 1. Remove the extension, and $U if already installed.
55574   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
55575   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
55576   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
55577   #    will be set to the directory where LIBOBJS objects are built.
55578   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
55579   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
55580 done
55581 LIBOBJS=$ac_libobjs
55582 
55583 LTLIBOBJS=$ac_ltlibobjs
55584 
55585 
55586 
55587 : "${CONFIG_STATUS=./config.status}"
55588 ac_write_fail=0
55589 ac_clean_files_save=$ac_clean_files
55590 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
55591 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
55592 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
55593 as_write_fail=0
55594 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
55595 #! $SHELL
55596 # Generated by $as_me.
55597 # Run this file to recreate the current configuration.
55598 # Compiler output produced by configure, useful for debugging
55599 # configure, is in config.log if it exists.
55600 
55601 debug=false
55602 ac_cs_recheck=false
55603 ac_cs_silent=false
55604 
55605 SHELL=\${CONFIG_SHELL-$SHELL}
55606 export SHELL
55607 _ASEOF
55608 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
55609 ## -------------------- ##
55610 ## M4sh Initialization. ##
55611 ## -------------------- ##
55612 
55613 # Be more Bourne compatible
55614 DUALCASE=1; export DUALCASE # for MKS sh
55615 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
55616   emulate sh
55617   NULLCMD=:
55618   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
55619   # is contrary to our usage.  Disable this feature.
55620   alias -g '${1+"$@"}'='"$@"'
55621   setopt NO_GLOB_SUBST
55622 else
55623   case `(set -o) 2>/dev/null` in #(
55624   *posix*) :
55625     set -o posix ;; #(
55626   *) :
55627      ;;
55628 esac
55629 fi
55630 
55631 
55632 as_nl='
55633 '
55634 export as_nl
55635 # Printing a long string crashes Solaris 7 /usr/bin/printf.
55636 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
55637 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
55638 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
55639 # Prefer a ksh shell builtin over an external printf program on Solaris,
55640 # but without wasting forks for bash or zsh.
55641 if test -z "$BASH_VERSION$ZSH_VERSION" \
55642     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
55643   as_echo='print -r --'
55644   as_echo_n='print -rn --'
55645 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
55646   as_echo='printf %s\n'
55647   as_echo_n='printf %s'
55648 else
55649   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55650     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55651     as_echo_n='/usr/ucb/echo -n'
55652   else
55653     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
55654     as_echo_n_body='eval
55655       arg=$1;
55656       case $arg in #(
55657       *"$as_nl"*)
55658         expr "X$arg" : "X\\(.*\\)$as_nl";
55659         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
55660       esac;
55661       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
55662     '
55663     export as_echo_n_body
55664     as_echo_n='sh -c $as_echo_n_body as_echo'
55665   fi
55666   export as_echo_body
55667   as_echo='sh -c $as_echo_body as_echo'
55668 fi
55669 
55670 # The user is always right.
55671 if test "${PATH_SEPARATOR+set}" != set; then
55672   PATH_SEPARATOR=:
55673   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
55674     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
55675       PATH_SEPARATOR=';'
55676   }
55677 fi
55678 
55679 
55680 # IFS
55681 # We need space, tab and new line, in precisely that order.  Quoting is
55682 # there to prevent editors from complaining about space-tab.
55683 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
55684 # splitting by setting IFS to empty value.)
55685 IFS=" ""        $as_nl"
55686 
55687 # Find who we are.  Look in the path if we contain no directory separator.
55688 as_myself=
55689 case $0 in #((
55690   *[\\/]* ) as_myself=$0 ;;
55691   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55692 for as_dir in $PATH
55693 do
55694   IFS=$as_save_IFS
55695   test -z "$as_dir" && as_dir=.
55696     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
55697   done
55698 IFS=$as_save_IFS
55699 
55700      ;;
55701 esac
55702 # We did not find ourselves, most probably we were run as `sh COMMAND'
55703 # in which case we are not to be found in the path.
55704 if test "x$as_myself" = x; then
55705   as_myself=$0
55706 fi
55707 if test ! -f "$as_myself"; then
55708   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
55709   exit 1
55710 fi
55711 
55712 # Unset variables that we do not need and which cause bugs (e.g. in
55713 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
55714 # suppresses any "Segmentation fault" message there.  '((' could
55715 # trigger a bug in pdksh 5.2.14.
55716 for as_var in BASH_ENV ENV MAIL MAILPATH
55717 do eval test x\${$as_var+set} = xset \
55718   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
55719 done
55720 PS1='$ '
55721 PS2='> '
55722 PS4='+ '
55723 
55724 # NLS nuisances.
55725 LC_ALL=C
55726 export LC_ALL
55727 LANGUAGE=C
55728 export LANGUAGE
55729 
55730 # CDPATH.
55731 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
55732 
55733 
55734 # as_fn_error STATUS ERROR [LINENO LOG_FD]
55735 # ----------------------------------------
55736 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
55737 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
55738 # script with STATUS, using 1 if that was 0.
55739 as_fn_error ()
55740 {
55741   as_status=$1; test $as_status -eq 0 && as_status=1
55742   if test "$4"; then
55743     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
55744     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
55745   fi
55746   $as_echo "$as_me: error: $2" >&2
55747   as_fn_exit $as_status
55748 } # as_fn_error
55749 
55750 
55751 # as_fn_set_status STATUS
55752 # -----------------------
55753 # Set $? to STATUS, without forking.
55754 as_fn_set_status ()
55755 {
55756   return $1
55757 } # as_fn_set_status
55758 
55759 # as_fn_exit STATUS
55760 # -----------------
55761 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
55762 as_fn_exit ()
55763 {
55764   set +e
55765   as_fn_set_status $1
55766   exit $1
55767 } # as_fn_exit
55768 
55769 # as_fn_unset VAR
55770 # ---------------
55771 # Portably unset VAR.
55772 as_fn_unset ()
55773 {
55774   { eval $1=; unset $1;}
55775 }
55776 as_unset=as_fn_unset
55777 # as_fn_append VAR VALUE
55778 # ----------------------
55779 # Append the text in VALUE to the end of the definition contained in VAR. Take
55780 # advantage of any shell optimizations that allow amortized linear growth over
55781 # repeated appends, instead of the typical quadratic growth present in naive
55782 # implementations.
55783 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
55784   eval 'as_fn_append ()
55785   {
55786     eval $1+=\$2
55787   }'
55788 else
55789   as_fn_append ()
55790   {
55791     eval $1=\$$1\$2
55792   }
55793 fi # as_fn_append
55794 
55795 # as_fn_arith ARG...
55796 # ------------------
55797 # Perform arithmetic evaluation on the ARGs, and store the result in the
55798 # global $as_val. Take advantage of shells that can avoid forks. The arguments
55799 # must be portable across $(()) and expr.
55800 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
55801   eval 'as_fn_arith ()
55802   {
55803     as_val=$(( $* ))
55804   }'
55805 else
55806   as_fn_arith ()
55807   {
55808     as_val=`expr "$@" || test $? -eq 1`
55809   }
55810 fi # as_fn_arith
55811 
55812 
55813 if expr a : '\(a\)' >/dev/null 2>&1 &&
55814    test "X`expr 00001 : '.*\(...\)'`" = X001; then
55815   as_expr=expr
55816 else
55817   as_expr=false
55818 fi
55819 
55820 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
55821   as_basename=basename
55822 else
55823   as_basename=false
55824 fi
55825 
55826 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
55827   as_dirname=dirname
55828 else
55829   as_dirname=false
55830 fi
55831 
55832 as_me=`$as_basename -- "$0" ||
55833 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
55834          X"$0" : 'X\(//\)$' \| \
55835          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
55836 $as_echo X/"$0" |
55837     sed '/^.*\/\([^/][^/]*\)\/*$/{
55838             s//\1/
55839             q
55840           }
55841           /^X\/\(\/\/\)$/{
55842             s//\1/
55843             q
55844           }
55845           /^X\/\(\/\).*/{
55846             s//\1/
55847             q
55848           }
55849           s/.*/./; q'`
55850 
55851 # Avoid depending upon Character Ranges.
55852 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
55853 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
55854 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
55855 as_cr_digits='0123456789'
55856 as_cr_alnum=$as_cr_Letters$as_cr_digits
55857 
55858 ECHO_C= ECHO_N= ECHO_T=
55859 case `echo -n x` in #(((((
55860 -n*)
55861   case `echo 'xy\c'` in
55862   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
55863   xy)  ECHO_C='\c';;
55864   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
55865        ECHO_T=' ';;
55866   esac;;
55867 *)
55868   ECHO_N='-n';;
55869 esac
55870 
55871 rm -f conf$$ conf$$.exe conf$$.file
55872 if test -d conf$$.dir; then
55873   rm -f conf$$.dir/conf$$.file
55874 else
55875   rm -f conf$$.dir
55876   mkdir conf$$.dir 2>/dev/null
55877 fi
55878 if (echo >conf$$.file) 2>/dev/null; then
55879   if ln -s conf$$.file conf$$ 2>/dev/null; then
55880     as_ln_s='ln -s'
55881     # ... but there are two gotchas:
55882     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
55883     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
55884     # In both cases, we have to default to `cp -pR'.
55885     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
55886       as_ln_s='cp -pR'
55887   elif ln conf$$.file conf$$ 2>/dev/null; then
55888     as_ln_s=ln
55889   else
55890     as_ln_s='cp -pR'
55891   fi
55892 else
55893   as_ln_s='cp -pR'
55894 fi
55895 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
55896 rmdir conf$$.dir 2>/dev/null
55897 
55898 
55899 # as_fn_mkdir_p
55900 # -------------
55901 # Create "$as_dir" as a directory, including parents if necessary.
55902 as_fn_mkdir_p ()
55903 {
55904 
55905   case $as_dir in #(
55906   -*) as_dir=./$as_dir;;
55907   esac
55908   test -d "$as_dir" || eval $as_mkdir_p || {
55909     as_dirs=
55910     while :; do
55911       case $as_dir in #(
55912       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
55913       *) as_qdir=$as_dir;;
55914       esac
55915       as_dirs="'$as_qdir' $as_dirs"
55916       as_dir=`$as_dirname -- "$as_dir" ||
55917 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
55918          X"$as_dir" : 'X\(//\)[^/]' \| \
55919          X"$as_dir" : 'X\(//\)$' \| \
55920          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
55921 $as_echo X"$as_dir" |
55922     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
55923             s//\1/
55924             q
55925           }
55926           /^X\(\/\/\)[^/].*/{
55927             s//\1/
55928             q
55929           }
55930           /^X\(\/\/\)$/{
55931             s//\1/
55932             q
55933           }
55934           /^X\(\/\).*/{
55935             s//\1/
55936             q
55937           }
55938           s/.*/./; q'`
55939       test -d "$as_dir" && break
55940     done
55941     test -z "$as_dirs" || eval "mkdir $as_dirs"
55942   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
55943 
55944 
55945 } # as_fn_mkdir_p
55946 if mkdir -p . 2>/dev/null; then
55947   as_mkdir_p='mkdir -p "$as_dir"'
55948 else
55949   test -d ./-p && rmdir ./-p
55950   as_mkdir_p=false
55951 fi
55952 
55953 
55954 # as_fn_executable_p FILE
55955 # -----------------------
55956 # Test if FILE is an executable regular file.
55957 as_fn_executable_p ()
55958 {
55959   test -f "$1" && test -x "$1"
55960 } # as_fn_executable_p
55961 as_test_x='test -x'
55962 as_executable_p=as_fn_executable_p
55963 
55964 # Sed expression to map a string onto a valid CPP name.
55965 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
55966 
55967 # Sed expression to map a string onto a valid variable name.
55968 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
55969 
55970 
55971 exec 6>&1
55972 ## ----------------------------------- ##
55973 ## Main body of $CONFIG_STATUS script. ##
55974 ## ----------------------------------- ##
55975 _ASEOF
55976 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
55977 
55978 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
55979 # Save the log message, to keep $0 and so on meaningful, and to
55980 # report actual input values of CONFIG_FILES etc. instead of their
55981 # values after options handling.
55982 ac_log="
55983 This file was extended by OpenJDK $as_me jdk9, which was
55984 generated by GNU Autoconf 2.69.  Invocation command line was
55985 
55986   CONFIG_FILES    = $CONFIG_FILES
55987   CONFIG_HEADERS  = $CONFIG_HEADERS
55988   CONFIG_LINKS    = $CONFIG_LINKS
55989   CONFIG_COMMANDS = $CONFIG_COMMANDS
55990   $ $0 $@
55991 
55992 on `(hostname || uname -n) 2>/dev/null | sed 1q`
55993 "
55994 
55995 _ACEOF
55996 
55997 case $ac_config_files in *"
55998 "*) set x $ac_config_files; shift; ac_config_files=$*;;
55999 esac
56000 
56001 
56002 
56003 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56004 # Files that config.status was made for.
56005 config_files="$ac_config_files"
56006 
56007 _ACEOF
56008 
56009 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56010 ac_cs_usage="\
56011 \`$as_me' instantiates files and other configuration actions
56012 from templates according to the current configuration.  Unless the files
56013 and actions are specified as TAGs, all are instantiated by default.
56014 
56015 Usage: $0 [OPTION]... [TAG]...
56016 
56017   -h, --help       print this help, then exit
56018   -V, --version    print version number and configuration settings, then exit
56019       --config     print configuration, then exit
56020   -q, --quiet, --silent
56021                    do not print progress messages
56022   -d, --debug      don't remove temporary files
56023       --recheck    update $as_me by reconfiguring in the same conditions
56024       --file=FILE[:TEMPLATE]
56025                    instantiate the configuration file FILE
56026 
56027 Configuration files:
56028 $config_files
56029 
56030 Report bugs to <build-dev@openjdk.java.net>.
56031 OpenJDK home page: <http://openjdk.java.net>."
56032 
56033 _ACEOF
56034 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56035 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
56036 ac_cs_version="\\
56037 OpenJDK config.status jdk9
56038 configured by $0, generated by GNU Autoconf 2.69,
56039   with options \\"\$ac_cs_config\\"
56040 
56041 Copyright (C) 2012 Free Software Foundation, Inc.
56042 This config.status script is free software; the Free Software Foundation
56043 gives unlimited permission to copy, distribute and modify it."
56044 
56045 ac_pwd='$ac_pwd'
56046 srcdir='$srcdir'
56047 AWK='$AWK'
56048 test -n "\$AWK" || AWK=awk
56049 _ACEOF
56050 
56051 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56052 # The default lists apply if the user does not specify any file.
56053 ac_need_defaults=:
56054 while test $# != 0
56055 do
56056   case $1 in
56057   --*=?*)
56058     ac_option=`expr "X$1" : 'X\([^=]*\)='`
56059     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
56060     ac_shift=:
56061     ;;
56062   --*=)
56063     ac_option=`expr "X$1" : 'X\([^=]*\)='`
56064     ac_optarg=
56065     ac_shift=:
56066     ;;
56067   *)
56068     ac_option=$1
56069     ac_optarg=$2
56070     ac_shift=shift
56071     ;;
56072   esac
56073 
56074   case $ac_option in
56075   # Handling of the options.
56076   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
56077     ac_cs_recheck=: ;;
56078   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
56079     $as_echo "$ac_cs_version"; exit ;;
56080   --config | --confi | --conf | --con | --co | --c )
56081     $as_echo "$ac_cs_config"; exit ;;
56082   --debug | --debu | --deb | --de | --d | -d )
56083     debug=: ;;
56084   --file | --fil | --fi | --f )
56085     $ac_shift
56086     case $ac_optarg in
56087     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
56088     '') as_fn_error $? "missing file argument" ;;
56089     esac
56090     as_fn_append CONFIG_FILES " '$ac_optarg'"
56091     ac_need_defaults=false;;
56092   --he | --h |  --help | --hel | -h )
56093     $as_echo "$ac_cs_usage"; exit ;;
56094   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
56095   | -silent | --silent | --silen | --sile | --sil | --si | --s)
56096     ac_cs_silent=: ;;
56097 
56098   # This is an error.
56099   -*) as_fn_error $? "unrecognized option: \`$1'
56100 Try \`$0 --help' for more information." ;;
56101 
56102   *) as_fn_append ac_config_targets " $1"
56103      ac_need_defaults=false ;;
56104 
56105   esac
56106   shift
56107 done
56108 
56109 ac_configure_extra_args=
56110 
56111 if $ac_cs_silent; then
56112   exec 6>/dev/null
56113   ac_configure_extra_args="$ac_configure_extra_args --silent"
56114 fi
56115 
56116 _ACEOF
56117 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56118 if \$ac_cs_recheck; then
56119   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
56120   shift
56121   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
56122   CONFIG_SHELL='$SHELL'
56123   export CONFIG_SHELL
56124   exec "\$@"
56125 fi
56126 
56127 _ACEOF
56128 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56129 exec 5>>config.log
56130 {
56131   echo
56132   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
56133 ## Running $as_me. ##
56134 _ASBOX
56135   $as_echo "$ac_log"
56136 } >&5
56137 
56138 _ACEOF
56139 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56140 _ACEOF
56141 
56142 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56143 
56144 # Handling of arguments.
56145 for ac_config_target in $ac_config_targets
56146 do
56147   case $ac_config_target in
56148     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
56149     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
56150     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
56151     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
56152     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
56153 
56154   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
56155   esac
56156 done
56157 
56158 
56159 # If the user did not use the arguments to specify the items to instantiate,
56160 # then the envvar interface is used.  Set only those that are not.
56161 # We use the long form for the default assignment because of an extremely
56162 # bizarre bug on SunOS 4.1.3.
56163 if $ac_need_defaults; then
56164   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
56165 fi
56166 
56167 # Have a temporary directory for convenience.  Make it in the build tree
56168 # simply because there is no reason against having it here, and in addition,
56169 # creating and moving files from /tmp can sometimes cause problems.
56170 # Hook for its removal unless debugging.
56171 # Note that there is a small window in which the directory will not be cleaned:
56172 # after its creation but before its name has been assigned to `$tmp'.
56173 $debug ||
56174 {
56175   tmp= ac_tmp=
56176   trap 'exit_status=$?
56177   : "${ac_tmp:=$tmp}"
56178   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
56179 ' 0
56180   trap 'as_fn_exit 1' 1 2 13 15
56181 }
56182 # Create a (secure) tmp directory for tmp files.
56183 
56184 {
56185   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
56186   test -d "$tmp"
56187 }  ||
56188 {
56189   tmp=./conf$$-$RANDOM
56190   (umask 077 && mkdir "$tmp")
56191 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
56192 ac_tmp=$tmp
56193 
56194 # Set up the scripts for CONFIG_FILES section.
56195 # No need to generate them if there are no CONFIG_FILES.
56196 # This happens for instance with `./config.status config.h'.
56197 if test -n "$CONFIG_FILES"; then
56198 
56199 
56200 ac_cr=`echo X | tr X '\015'`
56201 # On cygwin, bash can eat \r inside `` if the user requested igncr.
56202 # But we know of no other shell where ac_cr would be empty at this
56203 # point, so we can use a bashism as a fallback.
56204 if test "x$ac_cr" = x; then
56205   eval ac_cr=\$\'\\r\'
56206 fi
56207 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
56208 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
56209   ac_cs_awk_cr='\\r'
56210 else
56211   ac_cs_awk_cr=$ac_cr
56212 fi
56213 
56214 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
56215 _ACEOF
56216 
56217 
56218 {
56219   echo "cat >conf$$subs.awk <<_ACEOF" &&
56220   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
56221   echo "_ACEOF"
56222 } >conf$$subs.sh ||
56223   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56224 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
56225 ac_delim='%!_!# '
56226 for ac_last_try in false false false false false :; do
56227   . ./conf$$subs.sh ||
56228     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56229 
56230   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
56231   if test $ac_delim_n = $ac_delim_num; then
56232     break
56233   elif $ac_last_try; then
56234     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56235   else
56236     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
56237   fi
56238 done
56239 rm -f conf$$subs.sh
56240 
56241 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56242 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
56243 _ACEOF
56244 sed -n '
56245 h
56246 s/^/S["/; s/!.*/"]=/
56247 p
56248 g
56249 s/^[^!]*!//
56250 :repl
56251 t repl
56252 s/'"$ac_delim"'$//
56253 t delim
56254 :nl
56255 h
56256 s/\(.\{148\}\)..*/\1/
56257 t more1
56258 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
56259 p
56260 n
56261 b repl
56262 :more1
56263 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
56264 p
56265 g
56266 s/.\{148\}//
56267 t nl
56268 :delim
56269 h
56270 s/\(.\{148\}\)..*/\1/
56271 t more2
56272 s/["\\]/\\&/g; s/^/"/; s/$/"/
56273 p
56274 b
56275 :more2
56276 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
56277 p
56278 g
56279 s/.\{148\}//
56280 t delim
56281 ' <conf$$subs.awk | sed '
56282 /^[^""]/{
56283   N
56284   s/\n//
56285 }
56286 ' >>$CONFIG_STATUS || ac_write_fail=1
56287 rm -f conf$$subs.awk
56288 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56289 _ACAWK
56290 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
56291   for (key in S) S_is_set[key] = 1
56292   FS = ""
56293 
56294 }
56295 {
56296   line = $ 0
56297   nfields = split(line, field, "@")
56298   substed = 0
56299   len = length(field[1])
56300   for (i = 2; i < nfields; i++) {
56301     key = field[i]
56302     keylen = length(key)
56303     if (S_is_set[key]) {
56304       value = S[key]
56305       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
56306       len += length(value) + length(field[++i])
56307       substed = 1
56308     } else
56309       len += 1 + keylen
56310   }
56311 
56312   print line
56313 }
56314 
56315 _ACAWK
56316 _ACEOF
56317 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56318 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
56319   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
56320 else
56321   cat
56322 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
56323   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
56324 _ACEOF
56325 
56326 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
56327 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
56328 # trailing colons and then remove the whole line if VPATH becomes empty
56329 # (actually we leave an empty line to preserve line numbers).
56330 if test "x$srcdir" = x.; then
56331   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
56332 h
56333 s///
56334 s/^/:/
56335 s/[      ]*$/:/
56336 s/:\$(srcdir):/:/g
56337 s/:\${srcdir}:/:/g
56338 s/:@srcdir@:/:/g
56339 s/^:*//
56340 s/:*$//
56341 x
56342 s/\(=[   ]*\).*/\1/
56343 G
56344 s/\n//
56345 s/^[^=]*=[       ]*$//
56346 }'
56347 fi
56348 
56349 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56350 fi # test -n "$CONFIG_FILES"
56351 
56352 
56353 eval set X "  :F $CONFIG_FILES      "
56354 shift
56355 for ac_tag
56356 do
56357   case $ac_tag in
56358   :[FHLC]) ac_mode=$ac_tag; continue;;
56359   esac
56360   case $ac_mode$ac_tag in
56361   :[FHL]*:*);;
56362   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
56363   :[FH]-) ac_tag=-:-;;
56364   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
56365   esac
56366   ac_save_IFS=$IFS
56367   IFS=:
56368   set x $ac_tag
56369   IFS=$ac_save_IFS
56370   shift
56371   ac_file=$1
56372   shift
56373 
56374   case $ac_mode in
56375   :L) ac_source=$1;;
56376   :[FH])
56377     ac_file_inputs=
56378     for ac_f
56379     do
56380       case $ac_f in
56381       -) ac_f="$ac_tmp/stdin";;
56382       *) # Look for the file first in the build tree, then in the source tree
56383          # (if the path is not absolute).  The absolute path cannot be DOS-style,
56384          # because $ac_f cannot contain `:'.
56385          test -f "$ac_f" ||
56386            case $ac_f in
56387            [\\/$]*) false;;
56388            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
56389            esac ||
56390            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
56391       esac
56392       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
56393       as_fn_append ac_file_inputs " '$ac_f'"
56394     done
56395 
56396     # Let's still pretend it is `configure' which instantiates (i.e., don't
56397     # use $as_me), people would be surprised to read:
56398     #    /* config.h.  Generated by config.status.  */
56399     configure_input='Generated from '`
56400           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
56401         `' by configure.'
56402     if test x"$ac_file" != x-; then
56403       configure_input="$ac_file.  $configure_input"
56404       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
56405 $as_echo "$as_me: creating $ac_file" >&6;}
56406     fi
56407     # Neutralize special characters interpreted by sed in replacement strings.
56408     case $configure_input in #(
56409     *\&* | *\|* | *\\* )
56410        ac_sed_conf_input=`$as_echo "$configure_input" |
56411        sed 's/[\\\\&|]/\\\\&/g'`;; #(
56412     *) ac_sed_conf_input=$configure_input;;
56413     esac
56414 
56415     case $ac_tag in
56416     *:-:* | *:-) cat >"$ac_tmp/stdin" \
56417       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
56418     esac
56419     ;;
56420   esac
56421 
56422   ac_dir=`$as_dirname -- "$ac_file" ||
56423 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
56424          X"$ac_file" : 'X\(//\)[^/]' \| \
56425          X"$ac_file" : 'X\(//\)$' \| \
56426          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
56427 $as_echo X"$ac_file" |
56428     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
56429             s//\1/
56430             q
56431           }
56432           /^X\(\/\/\)[^/].*/{
56433             s//\1/
56434             q
56435           }
56436           /^X\(\/\/\)$/{
56437             s//\1/
56438             q
56439           }
56440           /^X\(\/\).*/{
56441             s//\1/
56442             q
56443           }
56444           s/.*/./; q'`
56445   as_dir="$ac_dir"; as_fn_mkdir_p
56446   ac_builddir=.
56447 
56448 case "$ac_dir" in
56449 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
56450 *)
56451   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
56452   # A ".." for each directory in $ac_dir_suffix.
56453   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
56454   case $ac_top_builddir_sub in
56455   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
56456   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
56457   esac ;;
56458 esac
56459 ac_abs_top_builddir=$ac_pwd
56460 ac_abs_builddir=$ac_pwd$ac_dir_suffix
56461 # for backward compatibility:
56462 ac_top_builddir=$ac_top_build_prefix
56463 
56464 case $srcdir in
56465   .)  # We are building in place.
56466     ac_srcdir=.
56467     ac_top_srcdir=$ac_top_builddir_sub
56468     ac_abs_top_srcdir=$ac_pwd ;;
56469   [\\/]* | ?:[\\/]* )  # Absolute name.
56470     ac_srcdir=$srcdir$ac_dir_suffix;
56471     ac_top_srcdir=$srcdir
56472     ac_abs_top_srcdir=$srcdir ;;
56473   *) # Relative name.
56474     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
56475     ac_top_srcdir=$ac_top_build_prefix$srcdir
56476     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
56477 esac
56478 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
56479 
56480 
56481   case $ac_mode in
56482   :F)
56483   #
56484   # CONFIG_FILE
56485   #
56486 
56487 _ACEOF
56488 
56489 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56490 # If the template does not know about datarootdir, expand it.
56491 # FIXME: This hack should be removed a few years after 2.60.
56492 ac_datarootdir_hack=; ac_datarootdir_seen=
56493 ac_sed_dataroot='
56494 /datarootdir/ {
56495   p
56496   q
56497 }
56498 /@datadir@/p
56499 /@docdir@/p
56500 /@infodir@/p
56501 /@localedir@/p
56502 /@mandir@/p'
56503 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
56504 *datarootdir*) ac_datarootdir_seen=yes;;
56505 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
56506   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
56507 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
56508 _ACEOF
56509 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56510   ac_datarootdir_hack='
56511   s&@datadir@&$datadir&g
56512   s&@docdir@&$docdir&g
56513   s&@infodir@&$infodir&g
56514   s&@localedir@&$localedir&g
56515   s&@mandir@&$mandir&g
56516   s&\\\${datarootdir}&$datarootdir&g' ;;
56517 esac
56518 _ACEOF
56519 
56520 # Neutralize VPATH when `$srcdir' = `.'.
56521 # Shell code in configure.ac might set extrasub.
56522 # FIXME: do we really want to maintain this feature?
56523 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56524 ac_sed_extra="$ac_vpsub
56525 $extrasub
56526 _ACEOF
56527 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56528 :t
56529 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
56530 s|@configure_input@|$ac_sed_conf_input|;t t
56531 s&@top_builddir@&$ac_top_builddir_sub&;t t
56532 s&@top_build_prefix@&$ac_top_build_prefix&;t t
56533 s&@srcdir@&$ac_srcdir&;t t
56534 s&@abs_srcdir@&$ac_abs_srcdir&;t t
56535 s&@top_srcdir@&$ac_top_srcdir&;t t
56536 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
56537 s&@builddir@&$ac_builddir&;t t
56538 s&@abs_builddir@&$ac_abs_builddir&;t t
56539 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
56540 $ac_datarootdir_hack
56541 "
56542 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
56543   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
56544 
56545 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
56546   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
56547   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
56548       "$ac_tmp/out"`; test -z "$ac_out"; } &&
56549   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
56550 which seems to be undefined.  Please make sure it is defined" >&5
56551 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
56552 which seems to be undefined.  Please make sure it is defined" >&2;}
56553 
56554   rm -f "$ac_tmp/stdin"
56555   case $ac_file in
56556   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
56557   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
56558   esac \
56559   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
56560  ;;
56561 
56562 
56563 
56564   esac
56565 
56566 done # for ac_tag
56567 
56568 
56569 as_fn_exit 0
56570 _ACEOF
56571 ac_clean_files=$ac_clean_files_save
56572 
56573 test $ac_write_fail = 0 ||
56574   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
56575 
56576 
56577 # configure is writing to config.log, and then calls config.status.
56578 # config.status does its own redirection, appending to config.log.
56579 # Unfortunately, on DOS this fails, as config.log is still kept open
56580 # by configure, so config.status won't be able to write to it; its
56581 # output is simply discarded.  So we exec the FD to /dev/null,
56582 # effectively closing config.log, so it can be properly (re)opened and
56583 # appended to by config.status.  When coming back to configure, we
56584 # need to make the FD available again.
56585 if test "$no_create" != yes; then
56586   ac_cs_success=:
56587   ac_config_status_args=
56588   test "$silent" = yes &&
56589     ac_config_status_args="$ac_config_status_args --quiet"
56590   exec 5>/dev/null
56591   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
56592   exec 5>>config.log
56593   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
56594   # would make configure fail if this is the last instruction.
56595   $ac_cs_success || as_fn_exit 1
56596 fi
56597 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
56598   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
56599 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
56600 fi
56601 
56602 
56603 # After AC_OUTPUT, we need to do final work
56604 
56605 
56606   # Try to move config.log (generated by autoconf) to the configure-support directory.
56607   if test -e ./config.log; then
56608     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
56609   fi
56610 
56611   # Rotate our log file (configure.log)
56612   if test -e "$OUTPUT_ROOT/configure.log.old"; then
56613     $RM -f "$OUTPUT_ROOT/configure.log.old"
56614   fi
56615   if test -e "$OUTPUT_ROOT/configure.log"; then
56616     $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
56617   fi
56618 
56619   # Move configure.log from current directory to the build output root
56620   if test -e ./configure.log; then
56621     echo found it
56622     $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
56623   fi
56624 
56625   # Make the compare script executable
56626   $CHMOD +x $OUTPUT_ROOT/compare.sh
56627 
56628 
56629 # Finally output some useful information to the user
56630 
56631   # Finally output some useful information to the user
56632 
56633   printf "\n"
56634   printf "====================================================\n"
56635   if test "x$no_create" != "xyes"; then
56636     if test "x$IS_RECONFIGURE" != "xyes"; then
56637       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
56638     else
56639       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
56640     fi
56641   else
56642     if test "x$IS_RECONFIGURE" != "xyes"; then
56643       printf "A configuration has been successfully checked but not created\n"
56644     else
56645       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
56646     fi
56647   fi
56648   if test "x$CONFIGURE_COMMAND_LINE" != x; then
56649     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
56650   else
56651     printf "using default settings.\n"
56652   fi
56653 
56654   printf "\n"
56655   printf "Configuration summary:\n"
56656   printf "* Debug level:    $DEBUG_LEVEL\n"
56657   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
56658   printf "* JDK variant:    $JDK_VARIANT\n"
56659   printf "* JVM variants:   $with_jvm_variants\n"
56660   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
56661 
56662   printf "\n"
56663   printf "Tools summary:\n"
56664   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
56665     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
56666   fi
56667   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
56668   if test "x$TOOLCHAIN_VERSION" != "x"; then
56669     print_version=" $TOOLCHAIN_VERSION"
56670   fi
56671   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
56672   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
56673   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
56674 
56675   printf "\n"
56676   printf "Build performance summary:\n"
56677   printf "* Cores to use:   $JOBS\n"
56678   printf "* Memory limit:   $MEMORY_SIZE MB\n"
56679   if test "x$CCACHE_STATUS" != "x"; then
56680     printf "* ccache status:  $CCACHE_STATUS\n"
56681   fi
56682   printf "\n"
56683 
56684   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
56685     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
56686     printf "will result in longer build times.\n"
56687     printf "\n"
56688   fi
56689 
56690   if test "x$FOUND_ALT_VARIABLES" != "x"; then
56691     printf "WARNING: You have old-style ALT_ environment variables set.\n"
56692     printf "These are not respected, and will be ignored. It is recommended\n"
56693     printf "that you clean your environment. The following variables are set:\n"
56694     printf "$FOUND_ALT_VARIABLES\n"
56695     printf "\n"
56696   fi
56697 
56698   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
56699     printf "WARNING: Your build output directory is not on a local disk.\n"
56700     printf "This will severely degrade build performance!\n"
56701     printf "It is recommended that you create an output directory on a local disk,\n"
56702     printf "and run the configure script again from that directory.\n"
56703     printf "\n"
56704   fi
56705 
56706   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
56707     printf "WARNING: The result of this configuration has overridden an older\n"
56708     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
56709     printf "proper build. Failure to do so might result in strange build problems.\n"
56710     printf "\n"
56711   fi
56712 
56713   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
56714     printf "WARNING: The result of this configuration was not saved.\n"
56715     printf "You should run without '--no-create | -n' to create the configuration.\n"
56716     printf "\n"
56717   fi
56718 
56719 
56720 
56721   # Locate config.log.
56722   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
56723     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
56724   elif test -e "./config.log"; then
56725     CONFIG_LOG_PATH="."
56726   fi
56727 
56728   if test -e "$CONFIG_LOG_PATH/config.log"; then
56729     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
56730     if test $? -eq 0; then
56731       printf "The following warnings were produced. Repeated here for convenience:\n"
56732       # We must quote sed expression (using []) to stop m4 from eating the [].
56733       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
56734       printf "\n"
56735     fi
56736   fi
56737