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 ZIP_DEBUGINFO_FILES
 685 ENABLE_DEBUG_SYMBOLS
 686 CFLAGS_WARNINGS_ARE_ERRORS
 687 DISABLE_WARNING_PREFIX
 688 HOTSPOT_SET_WARNINGS_AS_ERRORS
 689 WARNINGS_AS_ERRORS
 690 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 691 ZERO_ARCHFLAG
 692 LDFLAGS_TESTEXE
 693 LDFLAGS_TESTLIB
 694 LDFLAGS_CXX_JDK
 695 JDKEXE_LIBS
 696 JDKLIB_LIBS
 697 LDFLAGS_JDKEXE
 698 LDFLAGS_JDKLIB
 699 CXXFLAGS_TESTEXE
 700 CXXFLAGS_TESTLIB
 701 CFLAGS_TESTEXE
 702 CFLAGS_TESTLIB
 703 CXXFLAGS_JDKEXE
 704 CXXFLAGS_JDKLIB
 705 CFLAGS_JDKEXE
 706 CFLAGS_JDKLIB
 707 MACOSX_VERSION_MIN
 708 CXX_O_FLAG_NONE
 709 CXX_O_FLAG_DEBUG
 710 CXX_O_FLAG_NORM
 711 CXX_O_FLAG_HI
 712 CXX_O_FLAG_HIGHEST
 713 C_O_FLAG_NONE
 714 C_O_FLAG_DEBUG
 715 C_O_FLAG_NORM
 716 C_O_FLAG_HI
 717 C_O_FLAG_HIGHEST
 718 CXXFLAGS_DEBUG_SYMBOLS
 719 CFLAGS_DEBUG_SYMBOLS
 720 CXX_FLAG_DEPS
 721 C_FLAG_DEPS
 722 SET_SHARED_LIBRARY_MAPFILE
 723 SET_SHARED_LIBRARY_NAME
 724 SET_SHARED_LIBRARY_ORIGIN
 725 SET_EXECUTABLE_ORIGIN
 726 CXX_FLAG_REORDER
 727 C_FLAG_REORDER
 728 RC_FLAGS
 729 AR_OUT_OPTION
 730 LD_OUT_OPTION
 731 EXE_OUT_OPTION
 732 CC_OUT_OPTION
 733 STRIPFLAGS
 734 ARFLAGS
 735 COMPILER_TARGET_BITS_FLAG
 736 JT_HOME
 737 JTREGEXE
 738 USING_BROKEN_SUSE_LD
 739 PACKAGE_PATH
 740 USE_CLANG
 741 HOTSPOT_LD
 742 HOTSPOT_CXX
 743 HOTSPOT_RC
 744 HOTSPOT_MT
 745 BUILD_LD
 746 BUILD_CXX
 747 BUILD_CC
 748 BUILD_SYSROOT_LDFLAGS
 749 BUILD_SYSROOT_CFLAGS
 750 ac_ct_OBJDUMP
 751 OBJDUMP
 752 ac_ct_OBJCOPY
 753 OBJCOPY
 754 ac_ct_NM
 755 ac_ct_STRIP
 756 GNM
 757 NM
 758 STRIP
 759 MSBUILD
 760 DUMPBIN
 761 RC
 762 MT
 763 LIPO
 764 ac_ct_AR
 765 AR
 766 AS
 767 LDCXX
 768 LD
 769 CXXCPP
 770 CPP
 771 ac_ct_CXX
 772 CXXFLAGS
 773 CXX
 774 ac_ct_PROPER_COMPILER_CXX
 775 PROPER_COMPILER_CXX
 776 TOOLCHAIN_PATH_CXX
 777 POTENTIAL_CXX
 778 OBJEXT
 779 EXEEXT
 780 ac_ct_CC
 781 CPPFLAGS
 782 LDFLAGS
 783 CFLAGS
 784 CC
 785 ac_ct_PROPER_COMPILER_CC
 786 PROPER_COMPILER_CC
 787 TOOLCHAIN_PATH_CC
 788 POTENTIAL_CC
 789 VS_LIB
 790 VS_INCLUDE
 791 VS_PATH
 792 CYGWIN_LINK
 793 SYSROOT_LDFLAGS
 794 SYSROOT_CFLAGS
 795 LEGACY_EXTRA_LDFLAGS
 796 LEGACY_EXTRA_CXXFLAGS
 797 LEGACY_EXTRA_CFLAGS
 798 EXE_SUFFIX
 799 OBJ_SUFFIX
 800 STATIC_LIBRARY
 801 SHARED_LIBRARY
 802 STATIC_LIBRARY_SUFFIX
 803 SHARED_LIBRARY_SUFFIX
 804 LIBRARY_PREFIX
 805 TOOLCHAIN_TYPE
 806 STATIC_BUILD
 807 BUILD_HOTSPOT
 808 HOTSPOT_DIST
 809 BUILD_OUTPUT
 810 JDK_TOPDIR
 811 NASHORN_TOPDIR
 812 HOTSPOT_TOPDIR
 813 JAXWS_TOPDIR
 814 JAXP_TOPDIR
 815 CORBA_TOPDIR
 816 LANGTOOLS_TOPDIR
 817 BOOT_JDK_BITS
 818 JAVAC_FLAGS
 819 BOOT_JDK_SOURCETARGET
 820 JARSIGNER
 821 JAR
 822 JAVAH
 823 JAVAC
 824 JAVA
 825 BOOT_JDK
 826 JAVA_CHECK
 827 JAVAC_CHECK
 828 COOKED_BUILD_NUMBER
 829 JDK_VERSION
 830 COPYRIGHT_YEAR
 831 MACOSX_BUNDLE_ID_BASE
 832 MACOSX_BUNDLE_NAME_BASE
 833 COMPANY_NAME
 834 JDK_RC_PLATFORM_NAME
 835 PRODUCT_SUFFIX
 836 PRODUCT_NAME
 837 LAUNCHER_NAME
 838 MILESTONE
 839 JDK_BUILD_NUMBER
 840 JDK_UPDATE_VERSION
 841 JDK_MICRO_VERSION
 842 JDK_MINOR_VERSION
 843 JDK_MAJOR_VERSION
 844 USER_RELEASE_SUFFIX
 845 COMPRESS_JARS
 846 UNLIMITED_CRYPTO
 847 CACERTS_FILE
 848 TEST_IN_BUILD
 849 BUILD_HEADLESS
 850 SUPPORT_HEADFUL
 851 SUPPORT_HEADLESS
 852 OS_VERSION_MICRO
 853 OS_VERSION_MINOR
 854 OS_VERSION_MAJOR
 855 PKG_CONFIG
 856 BASH_ARGS
 857 SETFILE
 858 CODESIGN
 859 XATTR
 860 DSYMUTIL
 861 IS_GNU_TIME
 862 PATCH
 863 TIME
 864 STAT
 865 HG
 866 READELF
 867 OTOOL
 868 LDD
 869 ZIP
 870 UNZIP
 871 FIND_DELETE
 872 OUTPUT_SYNC
 873 OUTPUT_SYNC_SUPPORTED
 874 CHECK_TOOLSDIR_MAKE
 875 CHECK_TOOLSDIR_GMAKE
 876 CHECK_MAKE
 877 CHECK_GMAKE
 878 MAKE
 879 PKGHANDLER
 880 CONFIGURESUPPORT_OUTPUTDIR
 881 OUTPUT_ROOT
 882 CONF_NAME
 883 SPEC
 884 SDKROOT
 885 XCODEBUILD
 886 BUILD_VARIANT_RELEASE
 887 DEBUG_CLASSFILES
 888 FASTDEBUG
 889 VARIANT
 890 DEBUG_LEVEL
 891 MACOSX_UNIVERSAL
 892 INCLUDE_SA
 893 JVM_VARIANT_CORE
 894 JVM_VARIANT_ZEROSHARK
 895 JVM_VARIANT_ZERO
 896 JVM_VARIANT_KERNEL
 897 JVM_VARIANT_MINIMAL1
 898 JVM_VARIANT_CLIENT
 899 JVM_VARIANT_SERVER
 900 JVM_VARIANTS
 901 JVM_INTERPRETER
 902 JDK_VARIANT
 903 SET_OPENJDK
 904 CANONICAL_TOPDIR
 905 ORIGINAL_TOPDIR
 906 TOPDIR
 907 PATH_SEP
 908 ZERO_ARCHDEF
 909 DEFINE_CROSS_COMPILE_ARCH
 910 LP64
 911 OPENJDK_TARGET_OS_EXPORT_DIR
 912 OPENJDK_TARGET_CPU_JLI_CFLAGS
 913 OPENJDK_TARGET_CPU_OSARCH
 914 OPENJDK_TARGET_CPU_ISADIR
 915 OPENJDK_TARGET_CPU_LIBDIR
 916 OPENJDK_TARGET_CPU_LEGACY_LIB
 917 OPENJDK_TARGET_CPU_LEGACY
 918 REQUIRED_OS_VERSION
 919 REQUIRED_OS_NAME
 920 COMPILE_TYPE
 921 OPENJDK_TARGET_CPU_ENDIAN
 922 OPENJDK_TARGET_CPU_BITS
 923 OPENJDK_TARGET_CPU_ARCH
 924 OPENJDK_TARGET_CPU
 925 OPENJDK_TARGET_OS_ENV
 926 OPENJDK_TARGET_OS_TYPE
 927 OPENJDK_TARGET_OS
 928 OPENJDK_BUILD_CPU_ENDIAN
 929 OPENJDK_BUILD_CPU_BITS
 930 OPENJDK_BUILD_CPU_ARCH
 931 OPENJDK_BUILD_CPU
 932 OPENJDK_BUILD_OS_ENV
 933 OPENJDK_BUILD_OS_TYPE
 934 OPENJDK_BUILD_OS
 935 OPENJDK_BUILD_AUTOCONF_NAME
 936 OPENJDK_TARGET_AUTOCONF_NAME
 937 target_os
 938 target_vendor
 939 target_cpu
 940 target
 941 host_os
 942 host_vendor
 943 host_cpu
 944 host
 945 build_os
 946 build_vendor
 947 build_cpu
 948 build
 949 NICE
 950 CPIO
 951 DF
 952 READLINK
 953 CYGPATH
 954 SED
 955 FGREP
 956 EGREP
 957 GREP
 958 AWK
 959 XARGS
 960 WHICH
 961 WC
 962 UNIQ
 963 UNAME
 964 TR
 965 TOUCH
 966 TEE
 967 TAR
 968 TAIL
 969 SORT
 970 SH
 971 RMDIR
 972 RM
 973 PRINTF
 974 NAWK
 975 MV
 976 MKTEMP
 977 MKDIR
 978 LS
 979 LN
 980 HEAD
 981 FIND
 982 FILE
 983 EXPR
 984 ECHO
 985 DIRNAME
 986 DIFF
 987 DATE
 988 CUT
 989 CP
 990 COMM
 991 CMP
 992 CHMOD
 993 CAT
 994 BASH
 995 BASENAME
 996 DATE_WHEN_CONFIGURED
 997 ORIGINAL_PATH
 998 CONFIGURE_COMMAND_LINE
 999 target_alias
1000 host_alias
1001 build_alias
1002 LIBS
1003 ECHO_T
1004 ECHO_N
1005 ECHO_C
1006 DEFS
1007 mandir
1008 localedir
1009 libdir
1010 psdir
1011 pdfdir
1012 dvidir
1013 htmldir
1014 infodir
1015 docdir
1016 oldincludedir
1017 includedir
1018 localstatedir
1019 sharedstatedir
1020 sysconfdir
1021 datadir
1022 datarootdir
1023 libexecdir
1024 sbindir
1025 bindir
1026 program_transform_name
1027 prefix
1028 exec_prefix
1029 PACKAGE_URL
1030 PACKAGE_BUGREPORT
1031 PACKAGE_STRING
1032 PACKAGE_VERSION
1033 PACKAGE_TARNAME
1034 PACKAGE_NAME
1035 PATH_SEPARATOR
1036 SHELL'
1037 ac_subst_files=''
1038 ac_user_opts='
1039 enable_option_checking
1040 with_target_bits
1041 enable_openjdk_only
1042 with_custom_make_dir
1043 with_jdk_variant
1044 with_jvm_interpreter
1045 with_jvm_variants
1046 enable_debug
1047 with_debug_level
1048 with_devkit
1049 with_sys_root
1050 with_sysroot
1051 with_tools_dir
1052 with_toolchain_path
1053 with_extra_path
1054 with_sdk_name
1055 with_conf_name
1056 with_output_sync
1057 enable_headful
1058 enable_hotspot_test_in_build
1059 with_cacerts_file
1060 enable_unlimited_crypto
1061 with_milestone
1062 with_update_version
1063 with_user_release_suffix
1064 with_build_number
1065 with_copyright_year
1066 with_boot_jdk
1067 with_add_source_root
1068 with_override_source_root
1069 with_adds_and_overrides
1070 with_override_langtools
1071 with_override_corba
1072 with_override_jaxp
1073 with_override_jaxws
1074 with_override_hotspot
1075 with_override_nashorn
1076 with_override_jdk
1077 with_import_hotspot
1078 enable_static_build
1079 with_toolchain_type
1080 with_extra_cflags
1081 with_extra_cxxflags
1082 with_extra_ldflags
1083 with_toolchain_version
1084 with_build_devkit
1085 with_jtreg
1086 enable_warnings_as_errors
1087 enable_debug_symbols
1088 enable_zip_debug_info
1089 enable_native_coverage
1090 with_stdc__lib
1091 with_msvcr_dll
1092 with_msvcp_dll
1093 with_x
1094 with_cups
1095 with_cups_include
1096 with_freetype
1097 with_freetype_include
1098 with_freetype_lib
1099 with_freetype_src
1100 enable_freetype_bundling
1101 with_alsa
1102 with_alsa_include
1103 with_alsa_lib
1104 with_libffi
1105 with_libffi_include
1106 with_libffi_lib
1107 with_libjpeg
1108 with_giflib
1109 with_libpng
1110 with_zlib
1111 with_lcms
1112 with_dxsdk
1113 with_dxsdk_lib
1114 with_dxsdk_include
1115 with_num_cores
1116 with_memory_size
1117 with_jobs
1118 with_boot_jdk_jvmargs
1119 with_sjavac_server_java
1120 enable_sjavac
1121 enable_javac_server
1122 enable_precompiled_headers
1123 enable_ccache
1124 with_ccache_dir
1125 '
1126       ac_precious_vars='build_alias
1127 host_alias
1128 target_alias
1129 BASENAME
1130 BASH
1131 CAT
1132 CHMOD
1133 CMP
1134 COMM
1135 CP
1136 CUT
1137 DATE
1138 DIFF
1139 DIRNAME
1140 ECHO
1141 EXPR
1142 FILE
1143 FIND
1144 HEAD
1145 LN
1146 LS
1147 MKDIR
1148 MKTEMP
1149 MV
1150 NAWK
1151 PRINTF
1152 RM
1153 RMDIR
1154 SH
1155 SORT
1156 TAIL
1157 TAR
1158 TEE
1159 TOUCH
1160 TR
1161 UNAME
1162 UNIQ
1163 WC
1164 WHICH
1165 XARGS
1166 AWK
1167 GREP
1168 EGREP
1169 FGREP
1170 SED
1171 CYGPATH
1172 READLINK
1173 DF
1174 CPIO
1175 NICE
1176 MAKE
1177 UNZIP
1178 ZIP
1179 LDD
1180 OTOOL
1181 READELF
1182 HG
1183 STAT
1184 TIME
1185 PATCH
1186 DSYMUTIL
1187 XATTR
1188 CODESIGN
1189 SETFILE
1190 PKG_CONFIG
1191 JAVA
1192 JAVAC
1193 JAVAH
1194 JAR
1195 JARSIGNER
1196 CC
1197 CFLAGS
1198 LDFLAGS
1199 LIBS
1200 CPPFLAGS
1201 CXX
1202 CXXFLAGS
1203 CCC
1204 CPP
1205 CXXCPP
1206 AS
1207 AR
1208 LIPO
1209 STRIP
1210 NM
1211 GNM
1212 OBJCOPY
1213 OBJDUMP
1214 BUILD_CC
1215 BUILD_CXX
1216 JTREGEXE
1217 XMKMF
1218 FREETYPE_CFLAGS
1219 FREETYPE_LIBS
1220 ALSA_CFLAGS
1221 ALSA_LIBS
1222 LIBFFI_CFLAGS
1223 LIBFFI_LIBS
1224 PNG_CFLAGS
1225 PNG_LIBS
1226 LCMS_CFLAGS
1227 LCMS_LIBS
1228 CCACHE'
1229 
1230 
1231 # Initialize some variables set by options.
1232 ac_init_help=
1233 ac_init_version=false
1234 ac_unrecognized_opts=
1235 ac_unrecognized_sep=
1236 # The variables have the same names as the options, with
1237 # dashes changed to underlines.
1238 cache_file=/dev/null
1239 exec_prefix=NONE
1240 no_create=
1241 no_recursion=
1242 prefix=NONE
1243 program_prefix=NONE
1244 program_suffix=NONE
1245 program_transform_name=s,x,x,
1246 silent=
1247 site=
1248 srcdir=
1249 verbose=
1250 x_includes=NONE
1251 x_libraries=NONE
1252 
1253 # Installation directory options.
1254 # These are left unexpanded so users can "make install exec_prefix=/foo"
1255 # and all the variables that are supposed to be based on exec_prefix
1256 # by default will actually change.
1257 # Use braces instead of parens because sh, perl, etc. also accept them.
1258 # (The list follows the same order as the GNU Coding Standards.)
1259 bindir='${exec_prefix}/bin'
1260 sbindir='${exec_prefix}/sbin'
1261 libexecdir='${exec_prefix}/libexec'
1262 datarootdir='${prefix}/share'
1263 datadir='${datarootdir}'
1264 sysconfdir='${prefix}/etc'
1265 sharedstatedir='${prefix}/com'
1266 localstatedir='${prefix}/var'
1267 includedir='${prefix}/include'
1268 oldincludedir='/usr/include'
1269 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1270 infodir='${datarootdir}/info'
1271 htmldir='${docdir}'
1272 dvidir='${docdir}'
1273 pdfdir='${docdir}'
1274 psdir='${docdir}'
1275 libdir='${exec_prefix}/lib'
1276 localedir='${datarootdir}/locale'
1277 mandir='${datarootdir}/man'
1278 
1279 ac_prev=
1280 ac_dashdash=
1281 for ac_option
1282 do
1283   # If the previous option needs an argument, assign it.
1284   if test -n "$ac_prev"; then
1285     eval $ac_prev=\$ac_option
1286     ac_prev=
1287     continue
1288   fi
1289 
1290   case $ac_option in
1291   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1292   *=)   ac_optarg= ;;
1293   *)    ac_optarg=yes ;;
1294   esac
1295 
1296   # Accept the important Cygnus configure options, so we can diagnose typos.
1297 
1298   case $ac_dashdash$ac_option in
1299   --)
1300     ac_dashdash=yes ;;
1301 
1302   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1303     ac_prev=bindir ;;
1304   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1305     bindir=$ac_optarg ;;
1306 
1307   -build | --build | --buil | --bui | --bu)
1308     ac_prev=build_alias ;;
1309   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1310     build_alias=$ac_optarg ;;
1311 
1312   -cache-file | --cache-file | --cache-fil | --cache-fi \
1313   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1314     ac_prev=cache_file ;;
1315   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1316   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1317     cache_file=$ac_optarg ;;
1318 
1319   --config-cache | -C)
1320     cache_file=config.cache ;;
1321 
1322   -datadir | --datadir | --datadi | --datad)
1323     ac_prev=datadir ;;
1324   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1325     datadir=$ac_optarg ;;
1326 
1327   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1328   | --dataroo | --dataro | --datar)
1329     ac_prev=datarootdir ;;
1330   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1331   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1332     datarootdir=$ac_optarg ;;
1333 
1334   -disable-* | --disable-*)
1335     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1336     # Reject names that are not valid shell variable names.
1337     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1338       as_fn_error $? "invalid feature name: $ac_useropt"
1339     ac_useropt_orig=$ac_useropt
1340     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1341     case $ac_user_opts in
1342       *"
1343 "enable_$ac_useropt"
1344 "*) ;;
1345       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1346          ac_unrecognized_sep=', ';;
1347     esac
1348     eval enable_$ac_useropt=no ;;
1349 
1350   -docdir | --docdir | --docdi | --doc | --do)
1351     ac_prev=docdir ;;
1352   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1353     docdir=$ac_optarg ;;
1354 
1355   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1356     ac_prev=dvidir ;;
1357   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1358     dvidir=$ac_optarg ;;
1359 
1360   -enable-* | --enable-*)
1361     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1362     # Reject names that are not valid shell variable names.
1363     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1364       as_fn_error $? "invalid feature name: $ac_useropt"
1365     ac_useropt_orig=$ac_useropt
1366     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1367     case $ac_user_opts in
1368       *"
1369 "enable_$ac_useropt"
1370 "*) ;;
1371       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1372          ac_unrecognized_sep=', ';;
1373     esac
1374     eval enable_$ac_useropt=\$ac_optarg ;;
1375 
1376   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1377   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1378   | --exec | --exe | --ex)
1379     ac_prev=exec_prefix ;;
1380   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1381   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1382   | --exec=* | --exe=* | --ex=*)
1383     exec_prefix=$ac_optarg ;;
1384 
1385   -gas | --gas | --ga | --g)
1386     # Obsolete; use --with-gas.
1387     with_gas=yes ;;
1388 
1389   -help | --help | --hel | --he | -h)
1390     ac_init_help=long ;;
1391   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1392     ac_init_help=recursive ;;
1393   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1394     ac_init_help=short ;;
1395 
1396   -host | --host | --hos | --ho)
1397     ac_prev=host_alias ;;
1398   -host=* | --host=* | --hos=* | --ho=*)
1399     host_alias=$ac_optarg ;;
1400 
1401   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1402     ac_prev=htmldir ;;
1403   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1404   | --ht=*)
1405     htmldir=$ac_optarg ;;
1406 
1407   -includedir | --includedir | --includedi | --included | --include \
1408   | --includ | --inclu | --incl | --inc)
1409     ac_prev=includedir ;;
1410   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1411   | --includ=* | --inclu=* | --incl=* | --inc=*)
1412     includedir=$ac_optarg ;;
1413 
1414   -infodir | --infodir | --infodi | --infod | --info | --inf)
1415     ac_prev=infodir ;;
1416   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1417     infodir=$ac_optarg ;;
1418 
1419   -libdir | --libdir | --libdi | --libd)
1420     ac_prev=libdir ;;
1421   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1422     libdir=$ac_optarg ;;
1423 
1424   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1425   | --libexe | --libex | --libe)
1426     ac_prev=libexecdir ;;
1427   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1428   | --libexe=* | --libex=* | --libe=*)
1429     libexecdir=$ac_optarg ;;
1430 
1431   -localedir | --localedir | --localedi | --localed | --locale)
1432     ac_prev=localedir ;;
1433   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1434     localedir=$ac_optarg ;;
1435 
1436   -localstatedir | --localstatedir | --localstatedi | --localstated \
1437   | --localstate | --localstat | --localsta | --localst | --locals)
1438     ac_prev=localstatedir ;;
1439   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1440   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1441     localstatedir=$ac_optarg ;;
1442 
1443   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1444     ac_prev=mandir ;;
1445   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1446     mandir=$ac_optarg ;;
1447 
1448   -nfp | --nfp | --nf)
1449     # Obsolete; use --without-fp.
1450     with_fp=no ;;
1451 
1452   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1453   | --no-cr | --no-c | -n)
1454     no_create=yes ;;
1455 
1456   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1457   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1458     no_recursion=yes ;;
1459 
1460   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1461   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1462   | --oldin | --oldi | --old | --ol | --o)
1463     ac_prev=oldincludedir ;;
1464   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1465   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1466   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1467     oldincludedir=$ac_optarg ;;
1468 
1469   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1470     ac_prev=prefix ;;
1471   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1472     prefix=$ac_optarg ;;
1473 
1474   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1475   | --program-pre | --program-pr | --program-p)
1476     ac_prev=program_prefix ;;
1477   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1478   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1479     program_prefix=$ac_optarg ;;
1480 
1481   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1482   | --program-suf | --program-su | --program-s)
1483     ac_prev=program_suffix ;;
1484   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1485   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1486     program_suffix=$ac_optarg ;;
1487 
1488   -program-transform-name | --program-transform-name \
1489   | --program-transform-nam | --program-transform-na \
1490   | --program-transform-n | --program-transform- \
1491   | --program-transform | --program-transfor \
1492   | --program-transfo | --program-transf \
1493   | --program-trans | --program-tran \
1494   | --progr-tra | --program-tr | --program-t)
1495     ac_prev=program_transform_name ;;
1496   -program-transform-name=* | --program-transform-name=* \
1497   | --program-transform-nam=* | --program-transform-na=* \
1498   | --program-transform-n=* | --program-transform-=* \
1499   | --program-transform=* | --program-transfor=* \
1500   | --program-transfo=* | --program-transf=* \
1501   | --program-trans=* | --program-tran=* \
1502   | --progr-tra=* | --program-tr=* | --program-t=*)
1503     program_transform_name=$ac_optarg ;;
1504 
1505   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1506     ac_prev=pdfdir ;;
1507   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1508     pdfdir=$ac_optarg ;;
1509 
1510   -psdir | --psdir | --psdi | --psd | --ps)
1511     ac_prev=psdir ;;
1512   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1513     psdir=$ac_optarg ;;
1514 
1515   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1516   | -silent | --silent | --silen | --sile | --sil)
1517     silent=yes ;;
1518 
1519   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1520     ac_prev=sbindir ;;
1521   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1522   | --sbi=* | --sb=*)
1523     sbindir=$ac_optarg ;;
1524 
1525   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1526   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1527   | --sharedst | --shareds | --shared | --share | --shar \
1528   | --sha | --sh)
1529     ac_prev=sharedstatedir ;;
1530   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1531   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1532   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1533   | --sha=* | --sh=*)
1534     sharedstatedir=$ac_optarg ;;
1535 
1536   -site | --site | --sit)
1537     ac_prev=site ;;
1538   -site=* | --site=* | --sit=*)
1539     site=$ac_optarg ;;
1540 
1541   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1542     ac_prev=srcdir ;;
1543   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1544     srcdir=$ac_optarg ;;
1545 
1546   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1547   | --syscon | --sysco | --sysc | --sys | --sy)
1548     ac_prev=sysconfdir ;;
1549   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1550   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1551     sysconfdir=$ac_optarg ;;
1552 
1553   -target | --target | --targe | --targ | --tar | --ta | --t)
1554     ac_prev=target_alias ;;
1555   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1556     target_alias=$ac_optarg ;;
1557 
1558   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1559     verbose=yes ;;
1560 
1561   -version | --version | --versio | --versi | --vers | -V)
1562     ac_init_version=: ;;
1563 
1564   -with-* | --with-*)
1565     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1566     # Reject names that are not valid shell variable names.
1567     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1568       as_fn_error $? "invalid package name: $ac_useropt"
1569     ac_useropt_orig=$ac_useropt
1570     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1571     case $ac_user_opts in
1572       *"
1573 "with_$ac_useropt"
1574 "*) ;;
1575       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1576          ac_unrecognized_sep=', ';;
1577     esac
1578     eval with_$ac_useropt=\$ac_optarg ;;
1579 
1580   -without-* | --without-*)
1581     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1582     # Reject names that are not valid shell variable names.
1583     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1584       as_fn_error $? "invalid package name: $ac_useropt"
1585     ac_useropt_orig=$ac_useropt
1586     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1587     case $ac_user_opts in
1588       *"
1589 "with_$ac_useropt"
1590 "*) ;;
1591       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1592          ac_unrecognized_sep=', ';;
1593     esac
1594     eval with_$ac_useropt=no ;;
1595 
1596   --x)
1597     # Obsolete; use --with-x.
1598     with_x=yes ;;
1599 
1600   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1601   | --x-incl | --x-inc | --x-in | --x-i)
1602     ac_prev=x_includes ;;
1603   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1604   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1605     x_includes=$ac_optarg ;;
1606 
1607   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1608   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1609     ac_prev=x_libraries ;;
1610   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1611   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1612     x_libraries=$ac_optarg ;;
1613 
1614   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1615 Try \`$0 --help' for more information"
1616     ;;
1617 
1618   *=*)
1619     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1620     # Reject names that are not valid shell variable names.
1621     case $ac_envvar in #(
1622       '' | [0-9]* | *[!_$as_cr_alnum]* )
1623       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1624     esac
1625     eval $ac_envvar=\$ac_optarg
1626     export $ac_envvar ;;
1627 
1628   *)
1629     # FIXME: should be removed in autoconf 3.0.
1630     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1631     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1632       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1633     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1634     ;;
1635 
1636   esac
1637 done
1638 
1639 if test -n "$ac_prev"; then
1640   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1641   as_fn_error $? "missing argument to $ac_option"
1642 fi
1643 
1644 if test -n "$ac_unrecognized_opts"; then
1645   case $enable_option_checking in
1646     no) ;;
1647     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1648     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1649   esac
1650 fi
1651 
1652 # Check all directory arguments for consistency.
1653 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1654                 datadir sysconfdir sharedstatedir localstatedir includedir \
1655                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1656                 libdir localedir mandir
1657 do
1658   eval ac_val=\$$ac_var
1659   # Remove trailing slashes.
1660   case $ac_val in
1661     */ )
1662       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1663       eval $ac_var=\$ac_val;;
1664   esac
1665   # Be sure to have absolute directory names.
1666   case $ac_val in
1667     [\\/$]* | ?:[\\/]* )  continue;;
1668     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1669   esac
1670   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1671 done
1672 
1673 # There might be people who depend on the old broken behavior: `$host'
1674 # used to hold the argument of --host etc.
1675 # FIXME: To remove some day.
1676 build=$build_alias
1677 host=$host_alias
1678 target=$target_alias
1679 
1680 # FIXME: To remove some day.
1681 if test "x$host_alias" != x; then
1682   if test "x$build_alias" = x; then
1683     cross_compiling=maybe
1684   elif test "x$build_alias" != "x$host_alias"; then
1685     cross_compiling=yes
1686   fi
1687 fi
1688 
1689 ac_tool_prefix=
1690 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1691 
1692 test "$silent" = yes && exec 6>/dev/null
1693 
1694 
1695 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1696 ac_ls_di=`ls -di .` &&
1697 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1698   as_fn_error $? "working directory cannot be determined"
1699 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1700   as_fn_error $? "pwd does not report name of working directory"
1701 
1702 
1703 # Find the source files, if location was not specified.
1704 if test -z "$srcdir"; then
1705   ac_srcdir_defaulted=yes
1706   # Try the directory containing this script, then the parent directory.
1707   ac_confdir=`$as_dirname -- "$as_myself" ||
1708 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1709          X"$as_myself" : 'X\(//\)[^/]' \| \
1710          X"$as_myself" : 'X\(//\)$' \| \
1711          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1712 $as_echo X"$as_myself" |
1713     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1714             s//\1/
1715             q
1716           }
1717           /^X\(\/\/\)[^/].*/{
1718             s//\1/
1719             q
1720           }
1721           /^X\(\/\/\)$/{
1722             s//\1/
1723             q
1724           }
1725           /^X\(\/\).*/{
1726             s//\1/
1727             q
1728           }
1729           s/.*/./; q'`
1730   srcdir=$ac_confdir
1731   if test ! -r "$srcdir/$ac_unique_file"; then
1732     srcdir=..
1733   fi
1734 else
1735   ac_srcdir_defaulted=no
1736 fi
1737 if test ! -r "$srcdir/$ac_unique_file"; then
1738   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1739   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1740 fi
1741 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1742 ac_abs_confdir=`(
1743         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1744         pwd)`
1745 # When building in place, set srcdir=.
1746 if test "$ac_abs_confdir" = "$ac_pwd"; then
1747   srcdir=.
1748 fi
1749 # Remove unnecessary trailing slashes from srcdir.
1750 # Double slashes in file names in object file debugging info
1751 # mess up M-x gdb in Emacs.
1752 case $srcdir in
1753 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1754 esac
1755 for ac_var in $ac_precious_vars; do
1756   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1757   eval ac_env_${ac_var}_value=\$${ac_var}
1758   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1759   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1760 done
1761 
1762 #
1763 # Report the --help message.
1764 #
1765 if test "$ac_init_help" = "long"; then
1766   # Omit some internal or obsolete options to make the list less imposing.
1767   # This message is too long to be a string in the A/UX 3.1 sh.
1768   cat <<_ACEOF
1769 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1770 
1771 Usage: $0 [OPTION]... [VAR=VALUE]...
1772 
1773 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1774 VAR=VALUE.  See below for descriptions of some of the useful variables.
1775 
1776 Defaults for the options are specified in brackets.
1777 
1778 Configuration:
1779   -h, --help              display this help and exit
1780       --help=short        display options specific to this package
1781       --help=recursive    display the short help of all the included packages
1782   -V, --version           display version information and exit
1783   -q, --quiet, --silent   do not print \`checking ...' messages
1784       --cache-file=FILE   cache test results in FILE [disabled]
1785   -C, --config-cache      alias for \`--cache-file=config.cache'
1786   -n, --no-create         do not create output files
1787       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1788 
1789 Installation directories:
1790   --prefix=PREFIX         install architecture-independent files in PREFIX
1791                           [$ac_default_prefix]
1792   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1793                           [PREFIX]
1794 
1795 By default, \`make install' will install all the files in
1796 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1797 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1798 for instance \`--prefix=\$HOME'.
1799 
1800 For better control, use the options below.
1801 
1802 Fine tuning of the installation directories:
1803   --bindir=DIR            user executables [EPREFIX/bin]
1804   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1805   --libexecdir=DIR        program executables [EPREFIX/libexec]
1806   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1807   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1808   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1809   --libdir=DIR            object code libraries [EPREFIX/lib]
1810   --includedir=DIR        C header files [PREFIX/include]
1811   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1812   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1813   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1814   --infodir=DIR           info documentation [DATAROOTDIR/info]
1815   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1816   --mandir=DIR            man documentation [DATAROOTDIR/man]
1817   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1818   --htmldir=DIR           html documentation [DOCDIR]
1819   --dvidir=DIR            dvi documentation [DOCDIR]
1820   --pdfdir=DIR            pdf documentation [DOCDIR]
1821   --psdir=DIR             ps documentation [DOCDIR]
1822 _ACEOF
1823 
1824   cat <<\_ACEOF
1825 
1826 X features:
1827   --x-includes=DIR    X include files are in DIR
1828   --x-libraries=DIR   X library files are in DIR
1829 
1830 System types:
1831   --build=BUILD     configure for building on BUILD [guessed]
1832   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1833   --target=TARGET   configure for building compilers for TARGET [HOST]
1834 _ACEOF
1835 fi
1836 
1837 if test -n "$ac_init_help"; then
1838   case $ac_init_help in
1839      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1840    esac
1841   cat <<\_ACEOF
1842 
1843 Optional Features:
1844   --disable-option-checking  ignore unrecognized --enable/--with options
1845   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1846   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1847   --enable-openjdk-only   suppress building custom source even if present
1848                           [disabled]
1849   --enable-debug          set the debug level to fastdebug (shorthand for
1850                           --with-debug-level=fastdebug) [disabled]
1851   --disable-headful       disable building headful support (graphical UI
1852                           support) [enabled]
1853   --enable-hotspot-test-in-build
1854                           run the Queens test after Hotspot build [disabled]
1855   --enable-unlimited-crypto
1856                           Enable unlimited crypto policy [disabled]
1857   --enable-static-build   enable static library build [disabled]
1858   --disable-warnings-as-errors
1859                           do not consider native warnings to be an error
1860                           [enabled]
1861   --disable-debug-symbols disable generation of debug symbols [enabled]
1862   --disable-zip-debug-info
1863                           disable zipping of debug-info files [enabled]
1864   --enable-native-coverage
1865                           enable native compilation with code coverage
1866                           data[disabled]
1867   --disable-freetype-bundling
1868                           disable bundling of the freetype library with the
1869                           build result [enabled on Windows or when using
1870                           --with-freetype, disabled otherwise]
1871   --enable-sjavac         use sjavac to do fast incremental compiles
1872                           [disabled]
1873   --enable-javac-server   use only the server part of sjavac for faster javac
1874                           compiles [disabled]
1875   --disable-precompiled-headers
1876                           disable using precompiled headers when compiling C++
1877                           [enabled]
1878   --enable-ccache         enable using ccache to speed up recompilations
1879                           [disabled]
1880 
1881 Optional Packages:
1882   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1883   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1884   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1885                           support it), e.g. --with-target-bits=32 [guessed]
1886   --with-custom-make-dir  Deprecated. Option is kept for backwards
1887                           compatibility and is ignored
1888   --with-jdk-variant      JDK variant to build (normal) [normal]
1889   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1890   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1891                           client, minimal1, kernel, zero, zeroshark, core)
1892                           [server]
1893   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1894                           optimized (HotSpot build only)) [release]
1895   --with-devkit           use this devkit for compilers, tools and resources
1896   --with-sys-root         alias for --with-sysroot for backwards compatability
1897   --with-sysroot          use this directory as sysroot
1898   --with-tools-dir        alias for --with-toolchain-path for backwards
1899                           compatibility
1900   --with-toolchain-path   prepend these directories when searching for
1901                           toolchain binaries (compilers etc)
1902   --with-extra-path       prepend these directories to the default path
1903   --with-sdk-name         use the platform SDK of the given name. [macosx]
1904   --with-conf-name        use this as the name of the configuration [generated
1905                           from important configuration options]
1906   --with-output-sync      set make output sync type if supported by make.
1907                           [recurse]
1908   --with-cacerts-file     specify alternative cacerts file
1909   --with-milestone        Set milestone value for build [internal]
1910   --with-update-version   Set update version value for build [b00]
1911   --with-user-release-suffix
1912                           Add a custom string to the version string if build
1913                           number is not set.[username_builddateb00]
1914   --with-build-number     Set build number value for build [b00]
1915   --with-copyright-year   Set copyright year value for build [current year]
1916   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1917   --with-add-source-root  Deprecated. Option is kept for backwards
1918                           compatibility and is ignored
1919   --with-override-source-root
1920                           Deprecated. Option is kept for backwards
1921                           compatibility and is ignored
1922   --with-adds-and-overrides
1923                           Deprecated. Option is kept for backwards
1924                           compatibility and is ignored
1925   --with-override-langtools
1926                           Deprecated. Option is kept for backwards
1927                           compatibility and is ignored
1928   --with-override-corba   Deprecated. Option is kept for backwards
1929                           compatibility and is ignored
1930   --with-override-jaxp    Deprecated. Option is kept for backwards
1931                           compatibility and is ignored
1932   --with-override-jaxws   Deprecated. Option is kept for backwards
1933                           compatibility and is ignored
1934   --with-override-hotspot Deprecated. Option is kept for backwards
1935                           compatibility and is ignored
1936   --with-override-nashorn Deprecated. Option is kept for backwards
1937                           compatibility and is ignored
1938   --with-override-jdk     Deprecated. Option is kept for backwards
1939                           compatibility and is ignored
1940   --with-import-hotspot   import hotspot binaries from this jdk image or
1941                           hotspot build dist dir instead of building from
1942                           source
1943   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1944                           to show possible values [platform dependent]
1945   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1946   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1947   --with-extra-ldflags    extra flags to be used when linking jdk
1948   --with-toolchain-version
1949                           the version of the toolchain to look for, use
1950                           '--help' to show possible values [platform
1951                           dependent]
1952   --with-build-devkit     Devkit to use for the build platform toolchain
1953   --with-jtreg            Regression Test Harness [probed]
1954   --with-stdc++lib=<static>,<dynamic>,<default>
1955                           force linking of the C++ runtime on Linux to either
1956                           static or dynamic, default is static with dynamic as
1957                           fallback
1958   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1959                           (Windows only) [probed]
1960   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1961                           (Windows only) [probed]
1962   --with-x                use the X Window System
1963   --with-cups             specify prefix directory for the cups package
1964                           (expecting the headers under PATH/include)
1965   --with-cups-include     specify directory for the cups include files
1966   --with-freetype         specify prefix directory for the freetype package
1967                           (expecting the libraries under PATH/lib and the
1968                           headers under PATH/include)
1969   --with-freetype-include specify directory for the freetype include files
1970   --with-freetype-lib     specify directory for the freetype library
1971   --with-freetype-src     specify directory with freetype sources to
1972                           automatically build the library (experimental,
1973                           Windows-only)
1974   --with-alsa             specify prefix directory for the alsa package
1975                           (expecting the libraries under PATH/lib and the
1976                           headers under PATH/include)
1977   --with-alsa-include     specify directory for the alsa include files
1978   --with-alsa-lib         specify directory for the alsa library
1979   --with-libffi           specify prefix directory for the libffi package
1980                           (expecting the libraries under PATH/lib and the
1981                           headers under PATH/include)
1982   --with-libffi-include   specify directory for the libffi include files
1983   --with-libffi-lib       specify directory for the libffi library
1984   --with-libjpeg          use libjpeg from build system or OpenJDK source
1985                           (system, bundled) [bundled]
1986   --with-giflib           use giflib from build system or OpenJDK source
1987                           (system, bundled) [bundled]
1988   --with-libpng           use libpng from build system or OpenJDK source
1989                           (system, bundled) [bundled]
1990   --with-zlib             use zlib from build system or OpenJDK source
1991                           (system, bundled) [bundled]
1992   --with-lcms             use lcms2 from build system or OpenJDK source
1993                           (system, bundled) [bundled]
1994   --with-dxsdk            Deprecated. Option is kept for backwards
1995                           compatibility and is ignored
1996   --with-dxsdk-lib        Deprecated. Option is kept for backwards
1997                           compatibility and is ignored
1998   --with-dxsdk-include    Deprecated. Option is kept for backwards
1999                           compatibility and is ignored
2000   --with-num-cores        number of cores in the build system, e.g.
2001                           --with-num-cores=8 [probed]
2002   --with-memory-size      memory (in MB) available in the build system, e.g.
2003                           --with-memory-size=1024 [probed]
2004   --with-jobs             number of parallel jobs to let make run [calculated
2005                           based on cores and memory]
2006   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2007                           invocations of boot JDK, overriding the default
2008                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2009                           -enableassertions"
2010   --with-sjavac-server-java
2011                           use this java binary for running the sjavac
2012                           background server [Boot JDK java]
2013   --with-ccache-dir       where to store ccache files [~/.ccache]
2014 
2015 Some influential environment variables:
2016   BASENAME    Override default value for BASENAME
2017   BASH        Override default value for BASH
2018   CAT         Override default value for CAT
2019   CHMOD       Override default value for CHMOD
2020   CMP         Override default value for CMP
2021   COMM        Override default value for COMM
2022   CP          Override default value for CP
2023   CUT         Override default value for CUT
2024   DATE        Override default value for DATE
2025   DIFF        Override default value for DIFF
2026   DIRNAME     Override default value for DIRNAME
2027   ECHO        Override default value for ECHO
2028   EXPR        Override default value for EXPR
2029   FILE        Override default value for FILE
2030   FIND        Override default value for FIND
2031   HEAD        Override default value for HEAD
2032   LN          Override default value for LN
2033   LS          Override default value for LS
2034   MKDIR       Override default value for MKDIR
2035   MKTEMP      Override default value for MKTEMP
2036   MV          Override default value for MV
2037   NAWK        Override default value for NAWK
2038   PRINTF      Override default value for PRINTF
2039   RM          Override default value for RM
2040   RMDIR       Override default value for RMDIR
2041   SH          Override default value for SH
2042   SORT        Override default value for SORT
2043   TAIL        Override default value for TAIL
2044   TAR         Override default value for TAR
2045   TEE         Override default value for TEE
2046   TOUCH       Override default value for TOUCH
2047   TR          Override default value for TR
2048   UNAME       Override default value for UNAME
2049   UNIQ        Override default value for UNIQ
2050   WC          Override default value for WC
2051   WHICH       Override default value for WHICH
2052   XARGS       Override default value for XARGS
2053   AWK         Override default value for AWK
2054   GREP        Override default value for GREP
2055   EGREP       Override default value for EGREP
2056   FGREP       Override default value for FGREP
2057   SED         Override default value for SED
2058   CYGPATH     Override default value for CYGPATH
2059   READLINK    Override default value for READLINK
2060   DF          Override default value for DF
2061   CPIO        Override default value for CPIO
2062   NICE        Override default value for NICE
2063   MAKE        Override default value for MAKE
2064   UNZIP       Override default value for UNZIP
2065   ZIP         Override default value for ZIP
2066   LDD         Override default value for LDD
2067   OTOOL       Override default value for OTOOL
2068   READELF     Override default value for READELF
2069   HG          Override default value for HG
2070   STAT        Override default value for STAT
2071   TIME        Override default value for TIME
2072   PATCH       Override default value for PATCH
2073   DSYMUTIL    Override default value for DSYMUTIL
2074   XATTR       Override default value for XATTR
2075   CODESIGN    Override default value for CODESIGN
2076   SETFILE     Override default value for SETFILE
2077   PKG_CONFIG  path to pkg-config utility
2078   JAVA        Override default value for JAVA
2079   JAVAC       Override default value for JAVAC
2080   JAVAH       Override default value for JAVAH
2081   JAR         Override default value for JAR
2082   JARSIGNER   Override default value for JARSIGNER
2083   CC          C compiler command
2084   CFLAGS      C compiler flags
2085   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2086               nonstandard directory <lib dir>
2087   LIBS        libraries to pass to the linker, e.g. -l<library>
2088   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2089               you have headers in a nonstandard directory <include dir>
2090   CXX         C++ compiler command
2091   CXXFLAGS    C++ compiler flags
2092   CPP         C preprocessor
2093   CXXCPP      C++ preprocessor
2094   AS          Override default value for AS
2095   AR          Override default value for AR
2096   LIPO        Override default value for LIPO
2097   STRIP       Override default value for STRIP
2098   NM          Override default value for NM
2099   GNM         Override default value for GNM
2100   OBJCOPY     Override default value for OBJCOPY
2101   OBJDUMP     Override default value for OBJDUMP
2102   BUILD_CC    Override default value for BUILD_CC
2103   BUILD_CXX   Override default value for BUILD_CXX
2104   JTREGEXE    Override default value for JTREGEXE
2105   XMKMF       Path to xmkmf, Makefile generator for X Window System
2106   FREETYPE_CFLAGS
2107               C compiler flags for FREETYPE, overriding pkg-config
2108   FREETYPE_LIBS
2109               linker flags for FREETYPE, overriding pkg-config
2110   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2111   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2112   LIBFFI_CFLAGS
2113               C compiler flags for LIBFFI, overriding pkg-config
2114   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2115   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2116   PNG_LIBS    linker flags for PNG, overriding pkg-config
2117   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2118   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2119   CCACHE      Override default value for CCACHE
2120 
2121 Use these variables to override the choices made by `configure' or to help
2122 it to find libraries and programs with nonstandard names/locations.
2123 
2124 Report bugs to <build-dev@openjdk.java.net>.
2125 OpenJDK home page: <http://openjdk.java.net>.
2126 _ACEOF
2127 ac_status=$?
2128 fi
2129 
2130 if test "$ac_init_help" = "recursive"; then
2131   # If there are subdirs, report their specific --help.
2132   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2133     test -d "$ac_dir" ||
2134       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2135       continue
2136     ac_builddir=.
2137 
2138 case "$ac_dir" in
2139 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2140 *)
2141   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2142   # A ".." for each directory in $ac_dir_suffix.
2143   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2144   case $ac_top_builddir_sub in
2145   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2146   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2147   esac ;;
2148 esac
2149 ac_abs_top_builddir=$ac_pwd
2150 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2151 # for backward compatibility:
2152 ac_top_builddir=$ac_top_build_prefix
2153 
2154 case $srcdir in
2155   .)  # We are building in place.
2156     ac_srcdir=.
2157     ac_top_srcdir=$ac_top_builddir_sub
2158     ac_abs_top_srcdir=$ac_pwd ;;
2159   [\\/]* | ?:[\\/]* )  # Absolute name.
2160     ac_srcdir=$srcdir$ac_dir_suffix;
2161     ac_top_srcdir=$srcdir
2162     ac_abs_top_srcdir=$srcdir ;;
2163   *) # Relative name.
2164     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2165     ac_top_srcdir=$ac_top_build_prefix$srcdir
2166     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2167 esac
2168 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2169 
2170     cd "$ac_dir" || { ac_status=$?; continue; }
2171     # Check for guested configure.
2172     if test -f "$ac_srcdir/configure.gnu"; then
2173       echo &&
2174       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2175     elif test -f "$ac_srcdir/configure"; then
2176       echo &&
2177       $SHELL "$ac_srcdir/configure" --help=recursive
2178     else
2179       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2180     fi || ac_status=$?
2181     cd "$ac_pwd" || { ac_status=$?; break; }
2182   done
2183 fi
2184 
2185 test -n "$ac_init_help" && exit $ac_status
2186 if $ac_init_version; then
2187   cat <<\_ACEOF
2188 OpenJDK configure jdk9
2189 generated by GNU Autoconf 2.69
2190 
2191 Copyright (C) 2012 Free Software Foundation, Inc.
2192 This configure script is free software; the Free Software Foundation
2193 gives unlimited permission to copy, distribute and modify it.
2194 _ACEOF
2195   exit
2196 fi
2197 
2198 ## ------------------------ ##
2199 ## Autoconf initialization. ##
2200 ## ------------------------ ##
2201 
2202 # ac_fn_c_try_compile LINENO
2203 # --------------------------
2204 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2205 ac_fn_c_try_compile ()
2206 {
2207   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2208   rm -f conftest.$ac_objext
2209   if { { ac_try="$ac_compile"
2210 case "(($ac_try" in
2211   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2212   *) ac_try_echo=$ac_try;;
2213 esac
2214 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2215 $as_echo "$ac_try_echo"; } >&5
2216   (eval "$ac_compile") 2>conftest.err
2217   ac_status=$?
2218   if test -s conftest.err; then
2219     grep -v '^ *+' conftest.err >conftest.er1
2220     cat conftest.er1 >&5
2221     mv -f conftest.er1 conftest.err
2222   fi
2223   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2224   test $ac_status = 0; } && {
2225          test -z "$ac_c_werror_flag" ||
2226          test ! -s conftest.err
2227        } && test -s conftest.$ac_objext; then :
2228   ac_retval=0
2229 else
2230   $as_echo "$as_me: failed program was:" >&5
2231 sed 's/^/| /' conftest.$ac_ext >&5
2232 
2233         ac_retval=1
2234 fi
2235   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2236   as_fn_set_status $ac_retval
2237 
2238 } # ac_fn_c_try_compile
2239 
2240 # ac_fn_cxx_try_compile LINENO
2241 # ----------------------------
2242 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2243 ac_fn_cxx_try_compile ()
2244 {
2245   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2246   rm -f conftest.$ac_objext
2247   if { { ac_try="$ac_compile"
2248 case "(($ac_try" in
2249   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2250   *) ac_try_echo=$ac_try;;
2251 esac
2252 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2253 $as_echo "$ac_try_echo"; } >&5
2254   (eval "$ac_compile") 2>conftest.err
2255   ac_status=$?
2256   if test -s conftest.err; then
2257     grep -v '^ *+' conftest.err >conftest.er1
2258     cat conftest.er1 >&5
2259     mv -f conftest.er1 conftest.err
2260   fi
2261   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2262   test $ac_status = 0; } && {
2263          test -z "$ac_cxx_werror_flag" ||
2264          test ! -s conftest.err
2265        } && test -s conftest.$ac_objext; then :
2266   ac_retval=0
2267 else
2268   $as_echo "$as_me: failed program was:" >&5
2269 sed 's/^/| /' conftest.$ac_ext >&5
2270 
2271         ac_retval=1
2272 fi
2273   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2274   as_fn_set_status $ac_retval
2275 
2276 } # ac_fn_cxx_try_compile
2277 
2278 # ac_fn_c_try_cpp LINENO
2279 # ----------------------
2280 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2281 ac_fn_c_try_cpp ()
2282 {
2283   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2284   if { { ac_try="$ac_cpp conftest.$ac_ext"
2285 case "(($ac_try" in
2286   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2287   *) ac_try_echo=$ac_try;;
2288 esac
2289 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2290 $as_echo "$ac_try_echo"; } >&5
2291   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2292   ac_status=$?
2293   if test -s conftest.err; then
2294     grep -v '^ *+' conftest.err >conftest.er1
2295     cat conftest.er1 >&5
2296     mv -f conftest.er1 conftest.err
2297   fi
2298   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2299   test $ac_status = 0; } > conftest.i && {
2300          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2301          test ! -s conftest.err
2302        }; then :
2303   ac_retval=0
2304 else
2305   $as_echo "$as_me: failed program was:" >&5
2306 sed 's/^/| /' conftest.$ac_ext >&5
2307 
2308     ac_retval=1
2309 fi
2310   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2311   as_fn_set_status $ac_retval
2312 
2313 } # ac_fn_c_try_cpp
2314 
2315 # ac_fn_cxx_try_cpp LINENO
2316 # ------------------------
2317 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2318 ac_fn_cxx_try_cpp ()
2319 {
2320   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2321   if { { ac_try="$ac_cpp conftest.$ac_ext"
2322 case "(($ac_try" in
2323   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2324   *) ac_try_echo=$ac_try;;
2325 esac
2326 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2327 $as_echo "$ac_try_echo"; } >&5
2328   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2329   ac_status=$?
2330   if test -s conftest.err; then
2331     grep -v '^ *+' conftest.err >conftest.er1
2332     cat conftest.er1 >&5
2333     mv -f conftest.er1 conftest.err
2334   fi
2335   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2336   test $ac_status = 0; } > conftest.i && {
2337          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2338          test ! -s conftest.err
2339        }; then :
2340   ac_retval=0
2341 else
2342   $as_echo "$as_me: failed program was:" >&5
2343 sed 's/^/| /' conftest.$ac_ext >&5
2344 
2345     ac_retval=1
2346 fi
2347   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2348   as_fn_set_status $ac_retval
2349 
2350 } # ac_fn_cxx_try_cpp
2351 
2352 # ac_fn_c_try_link LINENO
2353 # -----------------------
2354 # Try to link conftest.$ac_ext, and return whether this succeeded.
2355 ac_fn_c_try_link ()
2356 {
2357   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2358   rm -f conftest.$ac_objext conftest$ac_exeext
2359   if { { ac_try="$ac_link"
2360 case "(($ac_try" in
2361   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2362   *) ac_try_echo=$ac_try;;
2363 esac
2364 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2365 $as_echo "$ac_try_echo"; } >&5
2366   (eval "$ac_link") 2>conftest.err
2367   ac_status=$?
2368   if test -s conftest.err; then
2369     grep -v '^ *+' conftest.err >conftest.er1
2370     cat conftest.er1 >&5
2371     mv -f conftest.er1 conftest.err
2372   fi
2373   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2374   test $ac_status = 0; } && {
2375          test -z "$ac_c_werror_flag" ||
2376          test ! -s conftest.err
2377        } && test -s conftest$ac_exeext && {
2378          test "$cross_compiling" = yes ||
2379          test -x conftest$ac_exeext
2380        }; then :
2381   ac_retval=0
2382 else
2383   $as_echo "$as_me: failed program was:" >&5
2384 sed 's/^/| /' conftest.$ac_ext >&5
2385 
2386         ac_retval=1
2387 fi
2388   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2389   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2390   # interfere with the next link command; also delete a directory that is
2391   # left behind by Apple's compiler.  We do this before executing the actions.
2392   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2393   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2394   as_fn_set_status $ac_retval
2395 
2396 } # ac_fn_c_try_link
2397 
2398 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2399 # ---------------------------------------------------------
2400 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2401 # the include files in INCLUDES and setting the cache variable VAR
2402 # accordingly.
2403 ac_fn_cxx_check_header_mongrel ()
2404 {
2405   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2406   if eval \${$3+:} false; then :
2407   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2408 $as_echo_n "checking for $2... " >&6; }
2409 if eval \${$3+:} false; then :
2410   $as_echo_n "(cached) " >&6
2411 fi
2412 eval ac_res=\$$3
2413                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2414 $as_echo "$ac_res" >&6; }
2415 else
2416   # Is the header compilable?
2417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2418 $as_echo_n "checking $2 usability... " >&6; }
2419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2420 /* end confdefs.h.  */
2421 $4
2422 #include <$2>
2423 _ACEOF
2424 if ac_fn_cxx_try_compile "$LINENO"; then :
2425   ac_header_compiler=yes
2426 else
2427   ac_header_compiler=no
2428 fi
2429 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2431 $as_echo "$ac_header_compiler" >&6; }
2432 
2433 # Is the header present?
2434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2435 $as_echo_n "checking $2 presence... " >&6; }
2436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2437 /* end confdefs.h.  */
2438 #include <$2>
2439 _ACEOF
2440 if ac_fn_cxx_try_cpp "$LINENO"; then :
2441   ac_header_preproc=yes
2442 else
2443   ac_header_preproc=no
2444 fi
2445 rm -f conftest.err conftest.i conftest.$ac_ext
2446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2447 $as_echo "$ac_header_preproc" >&6; }
2448 
2449 # So?  What about this header?
2450 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2451   yes:no: )
2452     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2453 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2454     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2455 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2456     ;;
2457   no:yes:* )
2458     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2459 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2460     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2461 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2462     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2463 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2464     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2465 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2466     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2467 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2468 ( $as_echo "## ----------------------------------------- ##
2469 ## Report this to build-dev@openjdk.java.net ##
2470 ## ----------------------------------------- ##"
2471      ) | sed "s/^/$as_me: WARNING:     /" >&2
2472     ;;
2473 esac
2474   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2475 $as_echo_n "checking for $2... " >&6; }
2476 if eval \${$3+:} false; then :
2477   $as_echo_n "(cached) " >&6
2478 else
2479   eval "$3=\$ac_header_compiler"
2480 fi
2481 eval ac_res=\$$3
2482                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2483 $as_echo "$ac_res" >&6; }
2484 fi
2485   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2486 
2487 } # ac_fn_cxx_check_header_mongrel
2488 
2489 # ac_fn_cxx_try_run LINENO
2490 # ------------------------
2491 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2492 # that executables *can* be run.
2493 ac_fn_cxx_try_run ()
2494 {
2495   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2496   if { { ac_try="$ac_link"
2497 case "(($ac_try" in
2498   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2499   *) ac_try_echo=$ac_try;;
2500 esac
2501 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2502 $as_echo "$ac_try_echo"; } >&5
2503   (eval "$ac_link") 2>&5
2504   ac_status=$?
2505   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2506   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2507   { { case "(($ac_try" in
2508   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2509   *) ac_try_echo=$ac_try;;
2510 esac
2511 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2512 $as_echo "$ac_try_echo"; } >&5
2513   (eval "$ac_try") 2>&5
2514   ac_status=$?
2515   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2516   test $ac_status = 0; }; }; then :
2517   ac_retval=0
2518 else
2519   $as_echo "$as_me: program exited with status $ac_status" >&5
2520        $as_echo "$as_me: failed program was:" >&5
2521 sed 's/^/| /' conftest.$ac_ext >&5
2522 
2523        ac_retval=$ac_status
2524 fi
2525   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2526   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2527   as_fn_set_status $ac_retval
2528 
2529 } # ac_fn_cxx_try_run
2530 
2531 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2532 # ---------------------------------------------------------
2533 # Tests whether HEADER exists and can be compiled using the include files in
2534 # INCLUDES, setting the cache variable VAR accordingly.
2535 ac_fn_cxx_check_header_compile ()
2536 {
2537   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2538   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2539 $as_echo_n "checking for $2... " >&6; }
2540 if eval \${$3+:} false; then :
2541   $as_echo_n "(cached) " >&6
2542 else
2543   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2544 /* end confdefs.h.  */
2545 $4
2546 #include <$2>
2547 _ACEOF
2548 if ac_fn_cxx_try_compile "$LINENO"; then :
2549   eval "$3=yes"
2550 else
2551   eval "$3=no"
2552 fi
2553 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2554 fi
2555 eval ac_res=\$$3
2556                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2557 $as_echo "$ac_res" >&6; }
2558   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2559 
2560 } # ac_fn_cxx_check_header_compile
2561 
2562 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2563 # ----------------------------------------------
2564 # Tries to find the compile-time value of EXPR in a program that includes
2565 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2566 # computed
2567 ac_fn_cxx_compute_int ()
2568 {
2569   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2570   if test "$cross_compiling" = yes; then
2571     # Depending upon the size, compute the lo and hi bounds.
2572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2573 /* end confdefs.h.  */
2574 $4
2575 int
2576 main ()
2577 {
2578 static int test_array [1 - 2 * !(($2) >= 0)];
2579 test_array [0] = 0;
2580 return test_array [0];
2581 
2582   ;
2583   return 0;
2584 }
2585 _ACEOF
2586 if ac_fn_cxx_try_compile "$LINENO"; then :
2587   ac_lo=0 ac_mid=0
2588   while :; do
2589     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2590 /* end confdefs.h.  */
2591 $4
2592 int
2593 main ()
2594 {
2595 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2596 test_array [0] = 0;
2597 return test_array [0];
2598 
2599   ;
2600   return 0;
2601 }
2602 _ACEOF
2603 if ac_fn_cxx_try_compile "$LINENO"; then :
2604   ac_hi=$ac_mid; break
2605 else
2606   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2607                         if test $ac_lo -le $ac_mid; then
2608                           ac_lo= ac_hi=
2609                           break
2610                         fi
2611                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2612 fi
2613 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2614   done
2615 else
2616   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2617 /* end confdefs.h.  */
2618 $4
2619 int
2620 main ()
2621 {
2622 static int test_array [1 - 2 * !(($2) < 0)];
2623 test_array [0] = 0;
2624 return test_array [0];
2625 
2626   ;
2627   return 0;
2628 }
2629 _ACEOF
2630 if ac_fn_cxx_try_compile "$LINENO"; then :
2631   ac_hi=-1 ac_mid=-1
2632   while :; do
2633     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2634 /* end confdefs.h.  */
2635 $4
2636 int
2637 main ()
2638 {
2639 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2640 test_array [0] = 0;
2641 return test_array [0];
2642 
2643   ;
2644   return 0;
2645 }
2646 _ACEOF
2647 if ac_fn_cxx_try_compile "$LINENO"; then :
2648   ac_lo=$ac_mid; break
2649 else
2650   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2651                         if test $ac_mid -le $ac_hi; then
2652                           ac_lo= ac_hi=
2653                           break
2654                         fi
2655                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2656 fi
2657 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2658   done
2659 else
2660   ac_lo= ac_hi=
2661 fi
2662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2663 fi
2664 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2665 # Binary search between lo and hi bounds.
2666 while test "x$ac_lo" != "x$ac_hi"; do
2667   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2668   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2669 /* end confdefs.h.  */
2670 $4
2671 int
2672 main ()
2673 {
2674 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2675 test_array [0] = 0;
2676 return test_array [0];
2677 
2678   ;
2679   return 0;
2680 }
2681 _ACEOF
2682 if ac_fn_cxx_try_compile "$LINENO"; then :
2683   ac_hi=$ac_mid
2684 else
2685   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2686 fi
2687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2688 done
2689 case $ac_lo in #((
2690 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2691 '') ac_retval=1 ;;
2692 esac
2693   else
2694     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2695 /* end confdefs.h.  */
2696 $4
2697 static long int longval () { return $2; }
2698 static unsigned long int ulongval () { return $2; }
2699 #include <stdio.h>
2700 #include <stdlib.h>
2701 int
2702 main ()
2703 {
2704 
2705   FILE *f = fopen ("conftest.val", "w");
2706   if (! f)
2707     return 1;
2708   if (($2) < 0)
2709     {
2710       long int i = longval ();
2711       if (i != ($2))
2712         return 1;
2713       fprintf (f, "%ld", i);
2714     }
2715   else
2716     {
2717       unsigned long int i = ulongval ();
2718       if (i != ($2))
2719         return 1;
2720       fprintf (f, "%lu", i);
2721     }
2722   /* Do not output a trailing newline, as this causes \r\n confusion
2723      on some platforms.  */
2724   return ferror (f) || fclose (f) != 0;
2725 
2726   ;
2727   return 0;
2728 }
2729 _ACEOF
2730 if ac_fn_cxx_try_run "$LINENO"; then :
2731   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2732 else
2733   ac_retval=1
2734 fi
2735 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2736   conftest.$ac_objext conftest.beam conftest.$ac_ext
2737 rm -f conftest.val
2738 
2739   fi
2740   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2741   as_fn_set_status $ac_retval
2742 
2743 } # ac_fn_cxx_compute_int
2744 
2745 # ac_fn_cxx_try_link LINENO
2746 # -------------------------
2747 # Try to link conftest.$ac_ext, and return whether this succeeded.
2748 ac_fn_cxx_try_link ()
2749 {
2750   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2751   rm -f conftest.$ac_objext conftest$ac_exeext
2752   if { { ac_try="$ac_link"
2753 case "(($ac_try" in
2754   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2755   *) ac_try_echo=$ac_try;;
2756 esac
2757 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2758 $as_echo "$ac_try_echo"; } >&5
2759   (eval "$ac_link") 2>conftest.err
2760   ac_status=$?
2761   if test -s conftest.err; then
2762     grep -v '^ *+' conftest.err >conftest.er1
2763     cat conftest.er1 >&5
2764     mv -f conftest.er1 conftest.err
2765   fi
2766   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2767   test $ac_status = 0; } && {
2768          test -z "$ac_cxx_werror_flag" ||
2769          test ! -s conftest.err
2770        } && test -s conftest$ac_exeext && {
2771          test "$cross_compiling" = yes ||
2772          test -x conftest$ac_exeext
2773        }; then :
2774   ac_retval=0
2775 else
2776   $as_echo "$as_me: failed program was:" >&5
2777 sed 's/^/| /' conftest.$ac_ext >&5
2778 
2779         ac_retval=1
2780 fi
2781   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2782   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2783   # interfere with the next link command; also delete a directory that is
2784   # left behind by Apple's compiler.  We do this before executing the actions.
2785   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2786   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2787   as_fn_set_status $ac_retval
2788 
2789 } # ac_fn_cxx_try_link
2790 
2791 # ac_fn_cxx_check_func LINENO FUNC VAR
2792 # ------------------------------------
2793 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2794 ac_fn_cxx_check_func ()
2795 {
2796   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2797   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2798 $as_echo_n "checking for $2... " >&6; }
2799 if eval \${$3+:} false; then :
2800   $as_echo_n "(cached) " >&6
2801 else
2802   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2803 /* end confdefs.h.  */
2804 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2805    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2806 #define $2 innocuous_$2
2807 
2808 /* System header to define __stub macros and hopefully few prototypes,
2809     which can conflict with char $2 (); below.
2810     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2811     <limits.h> exists even on freestanding compilers.  */
2812 
2813 #ifdef __STDC__
2814 # include <limits.h>
2815 #else
2816 # include <assert.h>
2817 #endif
2818 
2819 #undef $2
2820 
2821 /* Override any GCC internal prototype to avoid an error.
2822    Use char because int might match the return type of a GCC
2823    builtin and then its argument prototype would still apply.  */
2824 #ifdef __cplusplus
2825 extern "C"
2826 #endif
2827 char $2 ();
2828 /* The GNU C library defines this for functions which it implements
2829     to always fail with ENOSYS.  Some functions are actually named
2830     something starting with __ and the normal name is an alias.  */
2831 #if defined __stub_$2 || defined __stub___$2
2832 choke me
2833 #endif
2834 
2835 int
2836 main ()
2837 {
2838 return $2 ();
2839   ;
2840   return 0;
2841 }
2842 _ACEOF
2843 if ac_fn_cxx_try_link "$LINENO"; then :
2844   eval "$3=yes"
2845 else
2846   eval "$3=no"
2847 fi
2848 rm -f core conftest.err conftest.$ac_objext \
2849     conftest$ac_exeext conftest.$ac_ext
2850 fi
2851 eval ac_res=\$$3
2852                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2853 $as_echo "$ac_res" >&6; }
2854   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2855 
2856 } # ac_fn_cxx_check_func
2857 
2858 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2859 # -------------------------------------------------------
2860 # Tests whether HEADER exists and can be compiled using the include files in
2861 # INCLUDES, setting the cache variable VAR accordingly.
2862 ac_fn_c_check_header_compile ()
2863 {
2864   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2865   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2866 $as_echo_n "checking for $2... " >&6; }
2867 if eval \${$3+:} false; then :
2868   $as_echo_n "(cached) " >&6
2869 else
2870   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2871 /* end confdefs.h.  */
2872 $4
2873 #include <$2>
2874 _ACEOF
2875 if ac_fn_c_try_compile "$LINENO"; then :
2876   eval "$3=yes"
2877 else
2878   eval "$3=no"
2879 fi
2880 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2881 fi
2882 eval ac_res=\$$3
2883                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2884 $as_echo "$ac_res" >&6; }
2885   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2886 
2887 } # ac_fn_c_check_header_compile
2888 cat >config.log <<_ACEOF
2889 This file contains any messages produced by compilers while
2890 running configure, to aid debugging if configure makes a mistake.
2891 
2892 It was created by OpenJDK $as_me jdk9, which was
2893 generated by GNU Autoconf 2.69.  Invocation command line was
2894 
2895   $ $0 $@
2896 
2897 _ACEOF
2898 exec 5>>config.log
2899 {
2900 cat <<_ASUNAME
2901 ## --------- ##
2902 ## Platform. ##
2903 ## --------- ##
2904 
2905 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2906 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2907 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2908 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2909 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2910 
2911 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2912 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2913 
2914 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2915 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2916 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2917 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2918 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2919 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2920 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2921 
2922 _ASUNAME
2923 
2924 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2925 for as_dir in $PATH
2926 do
2927   IFS=$as_save_IFS
2928   test -z "$as_dir" && as_dir=.
2929     $as_echo "PATH: $as_dir"
2930   done
2931 IFS=$as_save_IFS
2932 
2933 } >&5
2934 
2935 cat >&5 <<_ACEOF
2936 
2937 
2938 ## ----------- ##
2939 ## Core tests. ##
2940 ## ----------- ##
2941 
2942 _ACEOF
2943 
2944 
2945 # Keep a trace of the command line.
2946 # Strip out --no-create and --no-recursion so they do not pile up.
2947 # Strip out --silent because we don't want to record it for future runs.
2948 # Also quote any args containing shell meta-characters.
2949 # Make two passes to allow for proper duplicate-argument suppression.
2950 ac_configure_args=
2951 ac_configure_args0=
2952 ac_configure_args1=
2953 ac_must_keep_next=false
2954 for ac_pass in 1 2
2955 do
2956   for ac_arg
2957   do
2958     case $ac_arg in
2959     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2960     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2961     | -silent | --silent | --silen | --sile | --sil)
2962       continue ;;
2963     *\'*)
2964       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2965     esac
2966     case $ac_pass in
2967     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2968     2)
2969       as_fn_append ac_configure_args1 " '$ac_arg'"
2970       if test $ac_must_keep_next = true; then
2971         ac_must_keep_next=false # Got value, back to normal.
2972       else
2973         case $ac_arg in
2974           *=* | --config-cache | -C | -disable-* | --disable-* \
2975           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2976           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2977           | -with-* | --with-* | -without-* | --without-* | --x)
2978             case "$ac_configure_args0 " in
2979               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2980             esac
2981             ;;
2982           -* ) ac_must_keep_next=true ;;
2983         esac
2984       fi
2985       as_fn_append ac_configure_args " '$ac_arg'"
2986       ;;
2987     esac
2988   done
2989 done
2990 { ac_configure_args0=; unset ac_configure_args0;}
2991 { ac_configure_args1=; unset ac_configure_args1;}
2992 
2993 # When interrupted or exit'd, cleanup temporary files, and complete
2994 # config.log.  We remove comments because anyway the quotes in there
2995 # would cause problems or look ugly.
2996 # WARNING: Use '\'' to represent an apostrophe within the trap.
2997 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2998 trap 'exit_status=$?
2999   # Save into config.log some information that might help in debugging.
3000   {
3001     echo
3002 
3003     $as_echo "## ---------------- ##
3004 ## Cache variables. ##
3005 ## ---------------- ##"
3006     echo
3007     # The following way of writing the cache mishandles newlines in values,
3008 (
3009   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3010     eval ac_val=\$$ac_var
3011     case $ac_val in #(
3012     *${as_nl}*)
3013       case $ac_var in #(
3014       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3015 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3016       esac
3017       case $ac_var in #(
3018       _ | IFS | as_nl) ;; #(
3019       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3020       *) { eval $ac_var=; unset $ac_var;} ;;
3021       esac ;;
3022     esac
3023   done
3024   (set) 2>&1 |
3025     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3026     *${as_nl}ac_space=\ *)
3027       sed -n \
3028         "s/'\''/'\''\\\\'\'''\''/g;
3029           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3030       ;; #(
3031     *)
3032       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3033       ;;
3034     esac |
3035     sort
3036 )
3037     echo
3038 
3039     $as_echo "## ----------------- ##
3040 ## Output variables. ##
3041 ## ----------------- ##"
3042     echo
3043     for ac_var in $ac_subst_vars
3044     do
3045       eval ac_val=\$$ac_var
3046       case $ac_val in
3047       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3048       esac
3049       $as_echo "$ac_var='\''$ac_val'\''"
3050     done | sort
3051     echo
3052 
3053     if test -n "$ac_subst_files"; then
3054       $as_echo "## ------------------- ##
3055 ## File substitutions. ##
3056 ## ------------------- ##"
3057       echo
3058       for ac_var in $ac_subst_files
3059       do
3060         eval ac_val=\$$ac_var
3061         case $ac_val in
3062         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3063         esac
3064         $as_echo "$ac_var='\''$ac_val'\''"
3065       done | sort
3066       echo
3067     fi
3068 
3069     if test -s confdefs.h; then
3070       $as_echo "## ----------- ##
3071 ## confdefs.h. ##
3072 ## ----------- ##"
3073       echo
3074       cat confdefs.h
3075       echo
3076     fi
3077     test "$ac_signal" != 0 &&
3078       $as_echo "$as_me: caught signal $ac_signal"
3079     $as_echo "$as_me: exit $exit_status"
3080   } >&5
3081   rm -f core *.core core.conftest.* &&
3082     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3083     exit $exit_status
3084 ' 0
3085 for ac_signal in 1 2 13 15; do
3086   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3087 done
3088 ac_signal=0
3089 
3090 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3091 rm -f -r conftest* confdefs.h
3092 
3093 $as_echo "/* confdefs.h */" > confdefs.h
3094 
3095 # Predefined preprocessor variables.
3096 
3097 cat >>confdefs.h <<_ACEOF
3098 #define PACKAGE_NAME "$PACKAGE_NAME"
3099 _ACEOF
3100 
3101 cat >>confdefs.h <<_ACEOF
3102 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3103 _ACEOF
3104 
3105 cat >>confdefs.h <<_ACEOF
3106 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3107 _ACEOF
3108 
3109 cat >>confdefs.h <<_ACEOF
3110 #define PACKAGE_STRING "$PACKAGE_STRING"
3111 _ACEOF
3112 
3113 cat >>confdefs.h <<_ACEOF
3114 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3115 _ACEOF
3116 
3117 cat >>confdefs.h <<_ACEOF
3118 #define PACKAGE_URL "$PACKAGE_URL"
3119 _ACEOF
3120 
3121 
3122 # Let the site file select an alternate cache file if it wants to.
3123 # Prefer an explicitly selected file to automatically selected ones.
3124 ac_site_file1=NONE
3125 ac_site_file2=NONE
3126 if test -n "$CONFIG_SITE"; then
3127   # We do not want a PATH search for config.site.
3128   case $CONFIG_SITE in #((
3129     -*)  ac_site_file1=./$CONFIG_SITE;;
3130     */*) ac_site_file1=$CONFIG_SITE;;
3131     *)   ac_site_file1=./$CONFIG_SITE;;
3132   esac
3133 elif test "x$prefix" != xNONE; then
3134   ac_site_file1=$prefix/share/config.site
3135   ac_site_file2=$prefix/etc/config.site
3136 else
3137   ac_site_file1=$ac_default_prefix/share/config.site
3138   ac_site_file2=$ac_default_prefix/etc/config.site
3139 fi
3140 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3141 do
3142   test "x$ac_site_file" = xNONE && continue
3143   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3144     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3145 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3146     sed 's/^/| /' "$ac_site_file" >&5
3147     . "$ac_site_file" \
3148       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3149 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3150 as_fn_error $? "failed to load site script $ac_site_file
3151 See \`config.log' for more details" "$LINENO" 5; }
3152   fi
3153 done
3154 
3155 if test -r "$cache_file"; then
3156   # Some versions of bash will fail to source /dev/null (special files
3157   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3158   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3159     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3160 $as_echo "$as_me: loading cache $cache_file" >&6;}
3161     case $cache_file in
3162       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3163       *)                      . "./$cache_file";;
3164     esac
3165   fi
3166 else
3167   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3168 $as_echo "$as_me: creating cache $cache_file" >&6;}
3169   >$cache_file
3170 fi
3171 
3172 # Check that the precious variables saved in the cache have kept the same
3173 # value.
3174 ac_cache_corrupted=false
3175 for ac_var in $ac_precious_vars; do
3176   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3177   eval ac_new_set=\$ac_env_${ac_var}_set
3178   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3179   eval ac_new_val=\$ac_env_${ac_var}_value
3180   case $ac_old_set,$ac_new_set in
3181     set,)
3182       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3183 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3184       ac_cache_corrupted=: ;;
3185     ,set)
3186       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3187 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3188       ac_cache_corrupted=: ;;
3189     ,);;
3190     *)
3191       if test "x$ac_old_val" != "x$ac_new_val"; then
3192         # differences in whitespace do not lead to failure.
3193         ac_old_val_w=`echo x $ac_old_val`
3194         ac_new_val_w=`echo x $ac_new_val`
3195         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3196           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3197 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3198           ac_cache_corrupted=:
3199         else
3200           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3201 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3202           eval $ac_var=\$ac_old_val
3203         fi
3204         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3205 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3206         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3207 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3208       fi;;
3209   esac
3210   # Pass precious variables to config.status.
3211   if test "$ac_new_set" = set; then
3212     case $ac_new_val in
3213     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3214     *) ac_arg=$ac_var=$ac_new_val ;;
3215     esac
3216     case " $ac_configure_args " in
3217       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3218       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3219     esac
3220   fi
3221 done
3222 if $ac_cache_corrupted; then
3223   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3224 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3225   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3226 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3227   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3228 fi
3229 ## -------------------- ##
3230 ## Main body of script. ##
3231 ## -------------------- ##
3232 
3233 ac_ext=c
3234 ac_cpp='$CPP $CPPFLAGS'
3235 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3236 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3237 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3238 
3239 
3240 
3241 ac_aux_dir=
3242 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3243   if test -f "$ac_dir/install-sh"; then
3244     ac_aux_dir=$ac_dir
3245     ac_install_sh="$ac_aux_dir/install-sh -c"
3246     break
3247   elif 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/shtool"; then
3252     ac_aux_dir=$ac_dir
3253     ac_install_sh="$ac_aux_dir/shtool install -c"
3254     break
3255   fi
3256 done
3257 if test -z "$ac_aux_dir"; then
3258   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
3259 fi
3260 
3261 # These three variables are undocumented and unsupported,
3262 # and are intended to be withdrawn in a future Autoconf release.
3263 # They can cause serious problems if a builder's source tree is in a directory
3264 # whose full name contains unusual characters.
3265 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3266 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3267 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3268 
3269 
3270 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3271 
3272 #
3273 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3274 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3275 #
3276 # This code is free software; you can redistribute it and/or modify it
3277 # under the terms of the GNU General Public License version 2 only, as
3278 # published by the Free Software Foundation.  Oracle designates this
3279 # particular file as subject to the "Classpath" exception as provided
3280 # by Oracle in the LICENSE file that accompanied this code.
3281 #
3282 # This code is distributed in the hope that it will be useful, but WITHOUT
3283 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3284 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3285 # version 2 for more details (a copy is included in the LICENSE file that
3286 # accompanied this code).
3287 #
3288 # You should have received a copy of the GNU General Public License version
3289 # 2 along with this work; if not, write to the Free Software Foundation,
3290 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3291 #
3292 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3293 # or visit www.oracle.com if you need additional information or have any
3294 # questions.
3295 #
3296 
3297 #
3298 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3299 #
3300 # This program is free software; you can redistribute it and/or modify
3301 # it under the terms of the GNU General Public License as published by
3302 # the Free Software Foundation; either version 2 of the License, or
3303 # (at your option) any later version.
3304 #
3305 # This program is distributed in the hope that it will be useful, but
3306 # WITHOUT ANY WARRANTY; without even the implied warranty of
3307 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3308 # General Public License for more details.
3309 #
3310 # You should have received a copy of the GNU General Public License
3311 # along with this program; if not, write to the Free Software
3312 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3313 #
3314 # As a special exception to the GNU General Public License, if you
3315 # distribute this file as part of a program that contains a
3316 # configuration script generated by Autoconf, you may include it under
3317 # the same distribution terms that you use for the rest of that program.
3318 
3319 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3320 # ----------------------------------
3321 # PKG_PROG_PKG_CONFIG
3322 
3323 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3324 #
3325 # Check to see whether a particular set of modules exists.  Similar
3326 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3327 #
3328 #
3329 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3330 # this or PKG_CHECK_MODULES is called, or make sure to call
3331 # PKG_CHECK_EXISTS manually
3332 # --------------------------------------------------------------
3333 
3334 
3335 
3336 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3337 # ---------------------------------------------
3338 # _PKG_CONFIG
3339 
3340 # _PKG_SHORT_ERRORS_SUPPORTED
3341 # -----------------------------
3342 # _PKG_SHORT_ERRORS_SUPPORTED
3343 
3344 
3345 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3346 # [ACTION-IF-NOT-FOUND])
3347 #
3348 #
3349 # Note that if there is a possibility the first call to
3350 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3351 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3352 #
3353 #
3354 # --------------------------------------------------------------
3355 # PKG_CHECK_MODULES
3356 
3357 
3358 # Include these first...
3359 #
3360 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3361 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3362 #
3363 # This code is free software; you can redistribute it and/or modify it
3364 # under the terms of the GNU General Public License version 2 only, as
3365 # published by the Free Software Foundation.  Oracle designates this
3366 # particular file as subject to the "Classpath" exception as provided
3367 # by Oracle in the LICENSE file that accompanied this code.
3368 #
3369 # This code is distributed in the hope that it will be useful, but WITHOUT
3370 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3371 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3372 # version 2 for more details (a copy is included in the LICENSE file that
3373 # accompanied this code).
3374 #
3375 # You should have received a copy of the GNU General Public License version
3376 # 2 along with this work; if not, write to the Free Software Foundation,
3377 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3378 #
3379 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3380 # or visit www.oracle.com if you need additional information or have any
3381 # questions.
3382 #
3383 
3384 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3385 # If so, then append $1 to $2 \
3386 # Also set JVM_ARG_OK to true/false depending on outcome.
3387 
3388 
3389 # Appends a string to a path variable, only adding the : when needed.
3390 
3391 
3392 # Prepends a string to a path variable, only adding the : when needed.
3393 
3394 
3395 # This will make sure the given variable points to a full and proper
3396 # path. This means:
3397 # 1) There will be no spaces in the path. On unix platforms,
3398 #    spaces in the path will result in an error. On Windows,
3399 #    the path will be rewritten using short-style to be space-free.
3400 # 2) The path will be absolute, and it will be in unix-style (on
3401 #     cygwin).
3402 # $1: The name of the variable to fix
3403 
3404 
3405 # This will make sure the given variable points to a executable
3406 # with a full and proper path. This means:
3407 # 1) There will be no spaces in the path. On unix platforms,
3408 #    spaces in the path will result in an error. On Windows,
3409 #    the path will be rewritten using short-style to be space-free.
3410 # 2) The path will be absolute, and it will be in unix-style (on
3411 #     cygwin).
3412 # Any arguments given to the executable is preserved.
3413 # If the input variable does not have a directory specification, then
3414 # it need to be in the PATH.
3415 # $1: The name of the variable to fix
3416 
3417 
3418 
3419 
3420 # Register a --with argument but mark it as deprecated
3421 # $1: The name of the with argument to deprecate, not including --with-
3422 
3423 
3424 # Register a --enable argument but mark it as deprecated
3425 # $1: The name of the with argument to deprecate, not including --enable-
3426 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3427 
3428 
3429 
3430 
3431 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3432 # $1: variable to check
3433 
3434 
3435 # Check that there are no unprocessed overridden variables left.
3436 # If so, they are an incorrect argument and we will exit with an error.
3437 
3438 
3439 # Setup a tool for the given variable. If correctly specified by the user,
3440 # use that value, otherwise search for the tool using the supplied code snippet.
3441 # $1: variable to set
3442 # $2: code snippet to call to look for the tool
3443 # $3: code snippet to call if variable was used to find tool
3444 
3445 
3446 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3447 # $1: variable to set
3448 # $2: executable name (or list of names) to look for
3449 
3450 
3451 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3452 # $1: variable to set
3453 # $2: executable name (or list of names) to look for
3454 
3455 
3456 # Like BASIC_PATH_PROGS but fails if no tool was found.
3457 # $1: variable to set
3458 # $2: executable name (or list of names) to look for
3459 
3460 
3461 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3462 # $1: variable to set
3463 # $2: autoconf macro to call to look for the special tool
3464 
3465 
3466 # Setup the most fundamental tools that relies on not much else to set up,
3467 # but is used by much of the early bootstrap code.
3468 
3469 
3470 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3471 
3472 
3473 # Evaluates platform specific overrides for devkit variables.
3474 # $1: Name of variable
3475 
3476 
3477 
3478 
3479 
3480 
3481 #%%% Simple tools %%%
3482 
3483 # Check if we have found a usable version of make
3484 # $1: the path to a potential make binary (or empty)
3485 # $2: the description on how we found this
3486 
3487 
3488 
3489 
3490 # Goes looking for a usable version of GNU make.
3491 
3492 
3493 
3494 
3495 
3496 
3497 # Check if build directory is on local disk. If not possible to determine,
3498 # we prefer to claim it's local.
3499 # Argument 1: directory to test
3500 # Argument 2: what to do if it is on local disk
3501 # Argument 3: what to do otherwise (remote disk or failure)
3502 
3503 
3504 # Check that source files have basic read permissions set. This might
3505 # not be the case in cygwin in certain conditions.
3506 
3507 
3508 
3509 
3510 # Check for support for specific options in bash
3511 
3512 
3513 # Code to run after AC_OUTPUT
3514 
3515 
3516 #
3517 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3518 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3519 #
3520 # This code is free software; you can redistribute it and/or modify it
3521 # under the terms of the GNU General Public License version 2 only, as
3522 # published by the Free Software Foundation.  Oracle designates this
3523 # particular file as subject to the "Classpath" exception as provided
3524 # by Oracle in the LICENSE file that accompanied this code.
3525 #
3526 # This code is distributed in the hope that it will be useful, but WITHOUT
3527 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3528 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3529 # version 2 for more details (a copy is included in the LICENSE file that
3530 # accompanied this code).
3531 #
3532 # You should have received a copy of the GNU General Public License version
3533 # 2 along with this work; if not, write to the Free Software Foundation,
3534 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3535 #
3536 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3537 # or visit www.oracle.com if you need additional information or have any
3538 # questions.
3539 #
3540 
3541 
3542 
3543 
3544 
3545 # Helper function which possibly converts a path using DOS-style short mode.
3546 # If so, the updated path is stored in $new_path.
3547 # $1: The path to check
3548 
3549 
3550 # Helper function which possibly converts a path using DOS-style short mode.
3551 # If so, the updated path is stored in $new_path.
3552 # $1: The path to check
3553 
3554 
3555 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3556 # and could probably be heavily simplified. However, all changes in this
3557 # area tend to need lot of testing in different scenarios, and in lack of
3558 # proper unit testing, cleaning this up has not been deemed worth the effort
3559 # at the moment.
3560 
3561 
3562 
3563 
3564 
3565 
3566 
3567 
3568 
3569 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3570 
3571 
3572 
3573 
3574 # ... then the rest
3575 #
3576 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3577 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3578 #
3579 # This code is free software; you can redistribute it and/or modify it
3580 # under the terms of the GNU General Public License version 2 only, as
3581 # published by the Free Software Foundation.  Oracle designates this
3582 # particular file as subject to the "Classpath" exception as provided
3583 # by Oracle in the LICENSE file that accompanied this code.
3584 #
3585 # This code is distributed in the hope that it will be useful, but WITHOUT
3586 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3587 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3588 # version 2 for more details (a copy is included in the LICENSE file that
3589 # accompanied this code).
3590 #
3591 # You should have received a copy of the GNU General Public License version
3592 # 2 along with this work; if not, write to the Free Software Foundation,
3593 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3594 #
3595 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3596 # or visit www.oracle.com if you need additional information or have any
3597 # questions.
3598 #
3599 
3600 ########################################################################
3601 # This file handles detection of the Boot JDK. The Boot JDK detection
3602 # process has been developed as a response to solve a complex real-world
3603 # problem. Initially, it was simple, but it has grown as platform after
3604 # platform, idiosyncracy after idiosyncracy has been supported.
3605 #
3606 # The basic idea is this:
3607 # 1) You need an acceptable *) JDK to use as a Boot JDK
3608 # 2) There are several ways to locate a JDK, that are mostly platform
3609 #    dependent **)
3610 # 3) You can have multiple JDKs installed
3611 # 4) If possible, configure should try to dig out an acceptable JDK
3612 #    automatically, without having to resort to command-line options
3613 #
3614 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3615 #     javac) and not a JRE, etc.
3616 #
3617 # **) On Windows we typically use a well-known path.
3618 #     On MacOSX we typically use the tool java_home.
3619 #     On Linux we typically find javac in the $PATH, and then follow a
3620 #     chain of symlinks that often ends up in a real JDK.
3621 #
3622 # This leads to the code where we check in different ways to locate a
3623 # JDK, and if one is found, check if it is acceptable. If not, we print
3624 # our reasons for rejecting it (useful when debugging non-working
3625 # configure situations) and continue checking the next one.
3626 ########################################################################
3627 
3628 # Execute the check given as argument, and verify the result
3629 # If the Boot JDK was previously found, do nothing
3630 # $1 A command line (typically autoconf macro) to execute
3631 
3632 
3633 # Test: Is bootjdk explicitely set by command line arguments?
3634 
3635 
3636 # Test: Is $JAVA_HOME set?
3637 
3638 
3639 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3640 
3641 
3642 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3643 # $1: Argument to the java_home binary (optional)
3644 
3645 
3646 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3647 
3648 
3649 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3650 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3651 # $1 = Path to directory containing jdk installations.
3652 # $2 = String to append to the found JDK directory to get the proper JDK home
3653 
3654 
3655 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3656 # environmental variable as base for where to look.
3657 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3658 
3659 
3660 # Test: Is there a JDK installed in default, well-known locations?
3661 
3662 
3663 # Check that a command-line tool in the Boot JDK is correct
3664 # $1 = name of variable to assign
3665 # $2 = name of binary
3666 
3667 
3668 ###############################################################################
3669 #
3670 # We need a Boot JDK to bootstrap the build.
3671 #
3672 
3673 
3674 
3675 
3676 
3677 #
3678 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3679 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3680 #
3681 # This code is free software; you can redistribute it and/or modify it
3682 # under the terms of the GNU General Public License version 2 only, as
3683 # published by the Free Software Foundation.  Oracle designates this
3684 # particular file as subject to the "Classpath" exception as provided
3685 # by Oracle in the LICENSE file that accompanied this code.
3686 #
3687 # This code is distributed in the hope that it will be useful, but WITHOUT
3688 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3689 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3690 # version 2 for more details (a copy is included in the LICENSE file that
3691 # accompanied this code).
3692 #
3693 # You should have received a copy of the GNU General Public License version
3694 # 2 along with this work; if not, write to the Free Software Foundation,
3695 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3696 #
3697 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3698 # or visit www.oracle.com if you need additional information or have any
3699 # questions.
3700 #
3701 
3702 
3703 
3704 
3705 
3706 
3707 
3708 
3709 
3710 
3711 
3712 
3713 
3714 
3715 
3716 
3717 
3718 
3719 
3720 
3721 #
3722 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3723 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3724 #
3725 # This code is free software; you can redistribute it and/or modify it
3726 # under the terms of the GNU General Public License version 2 only, as
3727 # published by the Free Software Foundation.  Oracle designates this
3728 # particular file as subject to the "Classpath" exception as provided
3729 # by Oracle in the LICENSE file that accompanied this code.
3730 #
3731 # This code is distributed in the hope that it will be useful, but WITHOUT
3732 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3733 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3734 # version 2 for more details (a copy is included in the LICENSE file that
3735 # accompanied this code).
3736 #
3737 # You should have received a copy of the GNU General Public License version
3738 # 2 along with this work; if not, write to the Free Software Foundation,
3739 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3740 #
3741 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3742 # or visit www.oracle.com if you need additional information or have any
3743 # questions.
3744 #
3745 
3746 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3747 # corresponding configure arguments instead
3748 
3749 
3750 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3751 # that configure can use them while detecting compilers.
3752 # TOOLCHAIN_TYPE is available here.
3753 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
3754 
3755 
3756 
3757 
3758 
3759 
3760 # Documentation on common flags used for solstudio in HIGHEST.
3761 #
3762 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3763 #          done with care, there are some assumptions below that need to
3764 #          be understood about the use of pointers, and IEEE behavior.
3765 #
3766 # -fns: Use non-standard floating point mode (not IEEE 754)
3767 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3768 # -fsingle: Use single precision floating point with 'float'
3769 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
3770 #   (Source with excessing pointer casting and data access with mixed
3771 #    pointer types are not recommended)
3772 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3773 #   (If you expect perfect errno behavior, do not use this)
3774 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3775 # -xrestrict: Pointer parameters to functions do not overlap
3776 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3777 #    If you pass in multiple pointers to the same data, do not use this)
3778 # -xlibmil: Inline some library routines
3779 #   (If you expect perfect errno behavior, do not use this)
3780 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3781 #   (If you expect perfect errno behavior, do not use this)
3782 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3783 
3784     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3785     # Bug?
3786     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3787     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3788     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3789     #fi
3790 
3791 
3792 
3793 
3794 
3795 # FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3796 #                                   [RUN-IF-FALSE])
3797 # ------------------------------------------------------------
3798 # Check that the c and c++ compilers support an argument
3799 
3800 
3801 # FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3802 #                                    [RUN-IF-FALSE])
3803 # ------------------------------------------------------------
3804 # Check that the linker support an argument
3805 
3806 
3807 
3808 
3809 #
3810 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3811 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3812 #
3813 # This code is free software; you can redistribute it and/or modify it
3814 # under the terms of the GNU General Public License version 2 only, as
3815 # published by the Free Software Foundation.  Oracle designates this
3816 # particular file as subject to the "Classpath" exception as provided
3817 # by Oracle in the LICENSE file that accompanied this code.
3818 #
3819 # This code is distributed in the hope that it will be useful, but WITHOUT
3820 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3821 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3822 # version 2 for more details (a copy is included in the LICENSE file that
3823 # accompanied this code).
3824 #
3825 # You should have received a copy of the GNU General Public License version
3826 # 2 along with this work; if not, write to the Free Software Foundation,
3827 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3828 #
3829 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3830 # or visit www.oracle.com if you need additional information or have any
3831 # questions.
3832 #
3833 
3834 
3835 
3836 
3837 
3838 cygwin_help() {
3839   case $1 in
3840     unzip)
3841       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3842       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3843       ;;
3844     zip)
3845       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3846       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3847       ;;
3848     make)
3849       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3850       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3851       ;;
3852     freetype)
3853       HELP_MSG="
3854 The freetype library can now be build during the configure process.
3855 Download the freetype sources and unpack them into an arbitrary directory:
3856 
3857 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3858 tar -xzf freetype-2.5.3.tar.gz
3859 
3860 Then run configure with '--with-freetype-src=<freetype_src>'. This will
3861 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3862 builds or into '<freetype_src>/lib32' for 32-bit builds.
3863 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3864 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3865       ;;
3866   esac
3867 }
3868 
3869 msys_help() {
3870   PKGHANDLER_COMMAND=""
3871 }
3872 
3873 apt_help() {
3874   case $1 in
3875     reduced)
3876       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3877     devkit)
3878       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3879     openjdk)
3880       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3881     alsa)
3882       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3883     cups)
3884       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3885     freetype)
3886       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3887     ffi)
3888       PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3889     x11)
3890       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3891     ccache)
3892       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3893   esac
3894 }
3895 
3896 yum_help() {
3897   case $1 in
3898     devkit)
3899       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3900     openjdk)
3901       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3902     alsa)
3903       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3904     cups)
3905       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3906     freetype)
3907       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3908     x11)
3909       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3910     ccache)
3911       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3912   esac
3913 }
3914 
3915 port_help() {
3916   PKGHANDLER_COMMAND=""
3917 }
3918 
3919 pkgutil_help() {
3920   PKGHANDLER_COMMAND=""
3921 }
3922 
3923 pkgadd_help() {
3924   PKGHANDLER_COMMAND=""
3925 }
3926 
3927 # This function will check if we're called from the "configure" wrapper while
3928 # printing --help. If so, we will print out additional information that can
3929 # only be extracted within the autoconf script, and then exit. This must be
3930 # called at the very beginning in configure.ac.
3931 
3932 
3933 
3934 
3935 
3936 
3937 #
3938 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3939 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3940 #
3941 # This code is free software; you can redistribute it and/or modify it
3942 # under the terms of the GNU General Public License version 2 only, as
3943 # published by the Free Software Foundation.  Oracle designates this
3944 # particular file as subject to the "Classpath" exception as provided
3945 # by Oracle in the LICENSE file that accompanied this code.
3946 #
3947 # This code is distributed in the hope that it will be useful, but WITHOUT
3948 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3949 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3950 # version 2 for more details (a copy is included in the LICENSE file that
3951 # accompanied this code).
3952 #
3953 # You should have received a copy of the GNU General Public License version
3954 # 2 along with this work; if not, write to the Free Software Foundation,
3955 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3956 #
3957 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3958 # or visit www.oracle.com if you need additional information or have any
3959 # questions.
3960 #
3961 
3962 
3963 
3964 
3965 
3966 
3967 
3968 
3969 
3970 
3971 ###############################################################################
3972 #
3973 # Should we build only OpenJDK even if closed sources are present?
3974 #
3975 
3976 
3977 
3978 
3979 ###############################################################################
3980 #
3981 # Setup version numbers
3982 #
3983 
3984 
3985 
3986 
3987 
3988 
3989 ################################################################################
3990 #
3991 # Gcov coverage data for hotspot
3992 #
3993 
3994 
3995 ################################################################################
3996 #
3997 # Static build support.  When enabled will generate static
3998 # libraries instead of shared libraries for all JDK libs.
3999 #
4000 
4001 
4002 
4003 
4004 #
4005 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4006 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4007 #
4008 # This code is free software; you can redistribute it and/or modify it
4009 # under the terms of the GNU General Public License version 2 only, as
4010 # published by the Free Software Foundation.  Oracle designates this
4011 # particular file as subject to the "Classpath" exception as provided
4012 # by Oracle in the LICENSE file that accompanied this code.
4013 #
4014 # This code is distributed in the hope that it will be useful, but WITHOUT
4015 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4016 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4017 # version 2 for more details (a copy is included in the LICENSE file that
4018 # accompanied this code).
4019 #
4020 # You should have received a copy of the GNU General Public License version
4021 # 2 along with this work; if not, write to the Free Software Foundation,
4022 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4023 #
4024 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4025 # or visit www.oracle.com if you need additional information or have any
4026 # questions.
4027 #
4028 
4029 # Major library component reside in separate files.
4030 #
4031 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4032 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4033 #
4034 # This code is free software; you can redistribute it and/or modify it
4035 # under the terms of the GNU General Public License version 2 only, as
4036 # published by the Free Software Foundation.  Oracle designates this
4037 # particular file as subject to the "Classpath" exception as provided
4038 # by Oracle in the LICENSE file that accompanied this code.
4039 #
4040 # This code is distributed in the hope that it will be useful, but WITHOUT
4041 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4042 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4043 # version 2 for more details (a copy is included in the LICENSE file that
4044 # accompanied this code).
4045 #
4046 # You should have received a copy of the GNU General Public License version
4047 # 2 along with this work; if not, write to the Free Software Foundation,
4048 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4049 #
4050 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4051 # or visit www.oracle.com if you need additional information or have any
4052 # questions.
4053 #
4054 
4055 ################################################################################
4056 # Setup alsa (Advanced Linux Sound Architecture)
4057 ################################################################################
4058 
4059 
4060 #
4061 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4062 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4063 #
4064 # This code is free software; you can redistribute it and/or modify it
4065 # under the terms of the GNU General Public License version 2 only, as
4066 # published by the Free Software Foundation.  Oracle designates this
4067 # particular file as subject to the "Classpath" exception as provided
4068 # by Oracle in the LICENSE file that accompanied this code.
4069 #
4070 # This code is distributed in the hope that it will be useful, but WITHOUT
4071 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4072 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4073 # version 2 for more details (a copy is included in the LICENSE file that
4074 # accompanied this code).
4075 #
4076 # You should have received a copy of the GNU General Public License version
4077 # 2 along with this work; if not, write to the Free Software Foundation,
4078 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4079 #
4080 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4081 # or visit www.oracle.com if you need additional information or have any
4082 # questions.
4083 #
4084 
4085 ################################################################################
4086 # Setup bundled libraries.
4087 #
4088 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4089 # OpenJDK repository. Default is to use these libraries as bundled, but they
4090 # might be replaced by en external version by the user.
4091 ################################################################################
4092 
4093 
4094 ################################################################################
4095 # Setup libjpeg
4096 ################################################################################
4097 
4098 
4099 ################################################################################
4100 # Setup giflib
4101 ################################################################################
4102 
4103 
4104 ################################################################################
4105 # Setup libpng
4106 ################################################################################
4107 
4108 
4109 ################################################################################
4110 # Setup zlib
4111 ################################################################################
4112 
4113 
4114 ################################################################################
4115 # Setup lcms (Little CMS)
4116 ################################################################################
4117 
4118 
4119 #
4120 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4121 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4122 #
4123 # This code is free software; you can redistribute it and/or modify it
4124 # under the terms of the GNU General Public License version 2 only, as
4125 # published by the Free Software Foundation.  Oracle designates this
4126 # particular file as subject to the "Classpath" exception as provided
4127 # by Oracle in the LICENSE file that accompanied this code.
4128 #
4129 # This code is distributed in the hope that it will be useful, but WITHOUT
4130 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4131 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4132 # version 2 for more details (a copy is included in the LICENSE file that
4133 # accompanied this code).
4134 #
4135 # You should have received a copy of the GNU General Public License version
4136 # 2 along with this work; if not, write to the Free Software Foundation,
4137 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4138 #
4139 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4140 # or visit www.oracle.com if you need additional information or have any
4141 # questions.
4142 #
4143 
4144 ################################################################################
4145 # Setup cups (Common Unix Printing System)
4146 ################################################################################
4147 
4148 
4149 #
4150 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4151 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4152 #
4153 # This code is free software; you can redistribute it and/or modify it
4154 # under the terms of the GNU General Public License version 2 only, as
4155 # published by the Free Software Foundation.  Oracle designates this
4156 # particular file as subject to the "Classpath" exception as provided
4157 # by Oracle in the LICENSE file that accompanied this code.
4158 #
4159 # This code is distributed in the hope that it will be useful, but WITHOUT
4160 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4161 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4162 # version 2 for more details (a copy is included in the LICENSE file that
4163 # accompanied this code).
4164 #
4165 # You should have received a copy of the GNU General Public License version
4166 # 2 along with this work; if not, write to the Free Software Foundation,
4167 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4168 #
4169 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4170 # or visit www.oracle.com if you need additional information or have any
4171 # questions.
4172 #
4173 
4174 ################################################################################
4175 # Setup libffi (Foreign Function Interface)
4176 ################################################################################
4177 
4178 
4179 #
4180 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4181 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4182 #
4183 # This code is free software; you can redistribute it and/or modify it
4184 # under the terms of the GNU General Public License version 2 only, as
4185 # published by the Free Software Foundation.  Oracle designates this
4186 # particular file as subject to the "Classpath" exception as provided
4187 # by Oracle in the LICENSE file that accompanied this code.
4188 #
4189 # This code is distributed in the hope that it will be useful, but WITHOUT
4190 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4191 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4192 # version 2 for more details (a copy is included in the LICENSE file that
4193 # accompanied this code).
4194 #
4195 # You should have received a copy of the GNU General Public License version
4196 # 2 along with this work; if not, write to the Free Software Foundation,
4197 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4198 #
4199 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4200 # or visit www.oracle.com if you need additional information or have any
4201 # questions.
4202 #
4203 
4204 ################################################################################
4205 # Build the freetype lib from source
4206 ################################################################################
4207 
4208 
4209 ################################################################################
4210 # Check if a potential freeype library match is correct and usable
4211 ################################################################################
4212 
4213 
4214 ################################################################################
4215 # Setup freetype (The FreeType2 font rendering library)
4216 ################################################################################
4217 
4218 
4219 #
4220 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4221 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4222 #
4223 # This code is free software; you can redistribute it and/or modify it
4224 # under the terms of the GNU General Public License version 2 only, as
4225 # published by the Free Software Foundation.  Oracle designates this
4226 # particular file as subject to the "Classpath" exception as provided
4227 # by Oracle in the LICENSE file that accompanied this code.
4228 #
4229 # This code is distributed in the hope that it will be useful, but WITHOUT
4230 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4231 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4232 # version 2 for more details (a copy is included in the LICENSE file that
4233 # accompanied this code).
4234 #
4235 # You should have received a copy of the GNU General Public License version
4236 # 2 along with this work; if not, write to the Free Software Foundation,
4237 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4238 #
4239 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4240 # or visit www.oracle.com if you need additional information or have any
4241 # questions.
4242 #
4243 
4244 ################################################################################
4245 # Setup the standard C/C++ runtime libraries.
4246 #
4247 # Most importantly, determine if stdc++ should be linked statically or
4248 # dynamically.
4249 ################################################################################
4250 
4251 
4252 #
4253 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4254 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4255 #
4256 # This code is free software; you can redistribute it and/or modify it
4257 # under the terms of the GNU General Public License version 2 only, as
4258 # published by the Free Software Foundation.  Oracle designates this
4259 # particular file as subject to the "Classpath" exception as provided
4260 # by Oracle in the LICENSE file that accompanied this code.
4261 #
4262 # This code is distributed in the hope that it will be useful, but WITHOUT
4263 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4264 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4265 # version 2 for more details (a copy is included in the LICENSE file that
4266 # accompanied this code).
4267 #
4268 # You should have received a copy of the GNU General Public License version
4269 # 2 along with this work; if not, write to the Free Software Foundation,
4270 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4271 #
4272 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4273 # or visit www.oracle.com if you need additional information or have any
4274 # questions.
4275 #
4276 
4277 ################################################################################
4278 # Setup X11 Windows system
4279 ################################################################################
4280 
4281 
4282 
4283 ################################################################################
4284 # Determine which libraries are needed for this configuration
4285 ################################################################################
4286 
4287 
4288 ################################################################################
4289 # Parse library options, and setup needed libraries
4290 ################################################################################
4291 
4292 
4293 ################################################################################
4294 # Setup llvm (Low-Level VM)
4295 ################################################################################
4296 
4297 
4298 ################################################################################
4299 # Setup various libraries, typically small system libraries
4300 ################################################################################
4301 
4302 
4303 #
4304 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4305 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4306 #
4307 # This code is free software; you can redistribute it and/or modify it
4308 # under the terms of the GNU General Public License version 2 only, as
4309 # published by the Free Software Foundation.  Oracle designates this
4310 # particular file as subject to the "Classpath" exception as provided
4311 # by Oracle in the LICENSE file that accompanied this code.
4312 #
4313 # This code is distributed in the hope that it will be useful, but WITHOUT
4314 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4315 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4316 # version 2 for more details (a copy is included in the LICENSE file that
4317 # accompanied this code).
4318 #
4319 # You should have received a copy of the GNU General Public License version
4320 # 2 along with this work; if not, write to the Free Software Foundation,
4321 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4322 #
4323 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4324 # or visit www.oracle.com if you need additional information or have any
4325 # questions.
4326 #
4327 
4328 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4329 # Converts autoconf style CPU name to OpenJDK style, into
4330 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4331 
4332 
4333 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4334 # Converts autoconf style OS name to OpenJDK style, into
4335 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4336 
4337 
4338 # Expects $host_os $host_cpu $build_os and $build_cpu
4339 # and $with_target_bits to have been setup!
4340 #
4341 # Translate the standard triplet(quadruplet) definition
4342 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4343 # OPENJDK_BUILD_OS, etc.
4344 
4345 
4346 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4347 # accordingly. Must be done after setting up build and target system, but before
4348 # doing anything else with these values.
4349 
4350 
4351 # Setup the legacy variables, for controlling the old makefiles.
4352 #
4353 
4354 
4355 
4356 
4357 #%%% Build and target systems %%%
4358 
4359 
4360 
4361 
4362 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4363 # Add -mX to various FLAGS variables.
4364 
4365 
4366 
4367 
4368 
4369 
4370 #
4371 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4372 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4373 #
4374 # This code is free software; you can redistribute it and/or modify it
4375 # under the terms of the GNU General Public License version 2 only, as
4376 # published by the Free Software Foundation.  Oracle designates this
4377 # particular file as subject to the "Classpath" exception as provided
4378 # by Oracle in the LICENSE file that accompanied this code.
4379 #
4380 # This code is distributed in the hope that it will be useful, but WITHOUT
4381 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4382 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4383 # version 2 for more details (a copy is included in the LICENSE file that
4384 # accompanied this code).
4385 #
4386 # You should have received a copy of the GNU General Public License version
4387 # 2 along with this work; if not, write to the Free Software Foundation,
4388 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4389 #
4390 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4391 # or visit www.oracle.com if you need additional information or have any
4392 # questions.
4393 #
4394 
4395 
4396 
4397 
4398 
4399 
4400 
4401 #
4402 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4403 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4404 #
4405 # This code is free software; you can redistribute it and/or modify it
4406 # under the terms of the GNU General Public License version 2 only, as
4407 # published by the Free Software Foundation.  Oracle designates this
4408 # particular file as subject to the "Classpath" exception as provided
4409 # by Oracle in the LICENSE file that accompanied this code.
4410 #
4411 # This code is distributed in the hope that it will be useful, but WITHOUT
4412 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4413 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4414 # version 2 for more details (a copy is included in the LICENSE file that
4415 # accompanied this code).
4416 #
4417 # You should have received a copy of the GNU General Public License version
4418 # 2 along with this work; if not, write to the Free Software Foundation,
4419 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4420 #
4421 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4422 # or visit www.oracle.com if you need additional information or have any
4423 # questions.
4424 #
4425 
4426 ########################################################################
4427 # This file is responsible for detecting, verifying and setting up the
4428 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4429 # proper paths to the binaries, but it will not setup any flags.
4430 #
4431 # The binaries used is determined by the toolchain type, which is the family of
4432 # compilers and related tools that are used.
4433 ########################################################################
4434 
4435 
4436 # All valid toolchains, regardless of platform (used by help.m4)
4437 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4438 
4439 # These toolchains are valid on different platforms
4440 VALID_TOOLCHAINS_linux="gcc clang"
4441 VALID_TOOLCHAINS_solaris="solstudio"
4442 VALID_TOOLCHAINS_macosx="gcc clang"
4443 VALID_TOOLCHAINS_aix="xlc"
4444 VALID_TOOLCHAINS_windows="microsoft"
4445 
4446 # Toolchain descriptions
4447 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4448 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4449 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4450 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4451 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4452 
4453 # Setup a number of variables describing how native output files are
4454 # named on this platform/toolchain.
4455 
4456 
4457 # Determine which toolchain type to use, and make sure it is valid for this
4458 # platform. Setup various information about the selected toolchain.
4459 
4460 
4461 # Before we start detecting the toolchain executables, we might need some
4462 # special setup, e.g. additional paths etc.
4463 
4464 
4465 # Restore path, etc
4466 
4467 
4468 # Check if a compiler is of the toolchain type we expect, and save the version
4469 # information from it. If the compiler does not match the expected type,
4470 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4471 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4472 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4473 #
4474 # $1 = compiler to test (CC or CXX)
4475 # $2 = human readable name of compiler (C or C++)
4476 
4477 
4478 # Try to locate the given C or C++ compiler in the path, or otherwise.
4479 #
4480 # $1 = compiler to test (CC or CXX)
4481 # $2 = human readable name of compiler (C or C++)
4482 # $3 = list of compiler names to search for
4483 
4484 
4485 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4486 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4487 # archiver (AR). Verify that the compilers are correct according to the
4488 # toolchain type.
4489 
4490 
4491 # Setup additional tools that is considered a part of the toolchain, but not the
4492 # core part. Many of these are highly platform-specific and do not exist,
4493 # and/or are not needed on all platforms.
4494 
4495 
4496 # Setup the build tools (i.e, the compiler and linker used to build programs
4497 # that should be run on the build platform, not the target platform, as a build
4498 # helper). Since the non-cross-compile case uses the normal, target compilers
4499 # for this, we can only do this after these have been setup.
4500 
4501 
4502 # Setup legacy variables that are still needed as alternative ways to refer to
4503 # parts of the toolchain.
4504 
4505 
4506 # Do some additional checks on the detected tools.
4507 
4508 
4509 # Setup the JTReg Regression Test Harness.
4510 
4511 
4512 #
4513 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4514 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4515 #
4516 # This code is free software; you can redistribute it and/or modify it
4517 # under the terms of the GNU General Public License version 2 only, as
4518 # published by the Free Software Foundation.  Oracle designates this
4519 # particular file as subject to the "Classpath" exception as provided
4520 # by Oracle in the LICENSE file that accompanied this code.
4521 #
4522 # This code is distributed in the hope that it will be useful, but WITHOUT
4523 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4524 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4525 # version 2 for more details (a copy is included in the LICENSE file that
4526 # accompanied this code).
4527 #
4528 # You should have received a copy of the GNU General Public License version
4529 # 2 along with this work; if not, write to the Free Software Foundation,
4530 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4531 #
4532 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4533 # or visit www.oracle.com if you need additional information or have any
4534 # questions.
4535 #
4536 
4537 ################################################################################
4538 # The order of these defines the priority by which we try to find them.
4539 VALID_VS_VERSIONS="2013 2012 2010"
4540 
4541 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4542 VS_VERSION_INTERNAL_2010=100
4543 VS_MSVCR_2010=msvcr100.dll
4544 # We don't use msvcp on Visual Studio 2010
4545 #VS_MSVCP_2010=msvcp100.dll
4546 VS_ENVVAR_2010="VS100COMNTOOLS"
4547 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4548 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4549 VS_VS_PLATFORM_NAME_2010="v100"
4550 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4551 
4552 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4553 VS_VERSION_INTERNAL_2012=110
4554 VS_MSVCR_2012=msvcr110.dll
4555 VS_MSVCP_2012=msvcp110.dll
4556 VS_ENVVAR_2012="VS110COMNTOOLS"
4557 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4558 VS_SDK_INSTALLDIR_2012=
4559 VS_VS_PLATFORM_NAME_2012="v110"
4560 VS_SDK_PLATFORM_NAME_2012=
4561 
4562 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4563 VS_VERSION_INTERNAL_2013=120
4564 VS_MSVCR_2013=msvcr120.dll
4565 VS_MSVCP_2013=msvcp120.dll
4566 VS_ENVVAR_2013="VS120COMNTOOLS"
4567 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4568 VS_SDK_INSTALLDIR_2013=
4569 VS_VS_PLATFORM_NAME_2013="v120"
4570 VS_SDK_PLATFORM_NAME_2013=
4571 
4572 ################################################################################
4573 
4574 
4575 
4576 ################################################################################
4577 
4578 
4579 
4580 ################################################################################
4581 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4582 # build environment and assigns it to VS_ENV_CMD
4583 
4584 
4585 ################################################################################
4586 
4587 
4588 
4589 ################################################################################
4590 # Check if the VS env variables were setup prior to running configure.
4591 # If not, then find vcvarsall.bat and run it automatically, and integrate
4592 # the set env variables into the spec file.
4593 
4594 
4595 
4596 
4597 
4598 
4599 
4600 
4601 
4602 
4603 
4604 
4605 
4606 
4607 # This line needs to be here, verbatim, after all includes and the dummy hook
4608 # definitions. It is replaced with custom functionality when building
4609 # custom sources.
4610 #CUSTOM_AUTOCONF_INCLUDE
4611 
4612 # Do not change or remove the following line, it is needed for consistency checks:
4613 DATE_WHEN_GENERATED=1446762265
4614 
4615 ###############################################################################
4616 #
4617 # Initialization / Boot-strapping
4618 #
4619 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4620 # thus it jumps back and forth, each time gaining something needed later on.
4621 #
4622 ###############################################################################
4623 
4624 # If we are requested to print additional help, do that and then exit.
4625 # This must be the very first call.
4626 
4627   if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4628     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4629     $PRINTF "Which are valid to use depends on the build platform.\n"
4630     for toolchain in $VALID_TOOLCHAINS_all; do
4631       # Use indirect variable referencing
4632       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4633       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4634       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4635     done
4636 
4637     # And now exit directly
4638     exit 0
4639   fi
4640 
4641 
4642 # Basic initialization that must happen first of all in the normal process.
4643 
4644   # Save the original command line. This is passed to us by the wrapper configure script.
4645 
4646   # Save the path variable before it gets changed
4647   ORIGINAL_PATH="$PATH"
4648 
4649   DATE_WHEN_CONFIGURED=`LANG=C date`
4650 
4651   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4652 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4653   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4654 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4655 
4656 
4657   # Start with tools that do not need have cross compilation support
4658   # and can be expected to be found in the default PATH. These tools are
4659   # used by configure.
4660 
4661   # First are all the simple required tools.
4662 
4663 
4664 
4665   # Publish this variable in the help.
4666 
4667 
4668   if [ -z "${BASENAME+x}" ]; then
4669     # The variable is not set by user, try to locate tool using the code snippet
4670     for ac_prog in basename
4671 do
4672   # Extract the first word of "$ac_prog", so it can be a program name with args.
4673 set dummy $ac_prog; ac_word=$2
4674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4675 $as_echo_n "checking for $ac_word... " >&6; }
4676 if ${ac_cv_path_BASENAME+:} false; then :
4677   $as_echo_n "(cached) " >&6
4678 else
4679   case $BASENAME in
4680   [\\/]* | ?:[\\/]*)
4681   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4682   ;;
4683   *)
4684   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4685 for as_dir in $PATH
4686 do
4687   IFS=$as_save_IFS
4688   test -z "$as_dir" && as_dir=.
4689     for ac_exec_ext in '' $ac_executable_extensions; do
4690   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4691     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4692     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4693     break 2
4694   fi
4695 done
4696   done
4697 IFS=$as_save_IFS
4698 
4699   ;;
4700 esac
4701 fi
4702 BASENAME=$ac_cv_path_BASENAME
4703 if test -n "$BASENAME"; then
4704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4705 $as_echo "$BASENAME" >&6; }
4706 else
4707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4708 $as_echo "no" >&6; }
4709 fi
4710 
4711 
4712   test -n "$BASENAME" && break
4713 done
4714 
4715   else
4716     # The variable is set, but is it from the command line or the environment?
4717 
4718     # Try to remove the string !BASENAME! from our list.
4719     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4720     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4721       # If it failed, the variable was not from the command line. Ignore it,
4722       # but warn the user (except for BASH, which is always set by the calling BASH).
4723       if test "xBASENAME" != xBASH; then
4724         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4725 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4726       fi
4727       # Try to locate tool using the code snippet
4728       for ac_prog in basename
4729 do
4730   # Extract the first word of "$ac_prog", so it can be a program name with args.
4731 set dummy $ac_prog; ac_word=$2
4732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4733 $as_echo_n "checking for $ac_word... " >&6; }
4734 if ${ac_cv_path_BASENAME+:} false; then :
4735   $as_echo_n "(cached) " >&6
4736 else
4737   case $BASENAME in
4738   [\\/]* | ?:[\\/]*)
4739   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4740   ;;
4741   *)
4742   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4743 for as_dir in $PATH
4744 do
4745   IFS=$as_save_IFS
4746   test -z "$as_dir" && as_dir=.
4747     for ac_exec_ext in '' $ac_executable_extensions; do
4748   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4749     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4750     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4751     break 2
4752   fi
4753 done
4754   done
4755 IFS=$as_save_IFS
4756 
4757   ;;
4758 esac
4759 fi
4760 BASENAME=$ac_cv_path_BASENAME
4761 if test -n "$BASENAME"; then
4762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4763 $as_echo "$BASENAME" >&6; }
4764 else
4765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4766 $as_echo "no" >&6; }
4767 fi
4768 
4769 
4770   test -n "$BASENAME" && break
4771 done
4772 
4773     else
4774       # If it succeeded, then it was overridden by the user. We will use it
4775       # for the tool.
4776 
4777       # First remove it from the list of overridden variables, so we can test
4778       # for unknown variables in the end.
4779       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4780 
4781       # Check if we try to supply an empty value
4782       if test "x$BASENAME" = x; then
4783         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4784 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4785         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4786 $as_echo_n "checking for BASENAME... " >&6; }
4787         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4788 $as_echo "disabled" >&6; }
4789       else
4790         # Check if the provided tool contains a complete path.
4791         tool_specified="$BASENAME"
4792         tool_basename="${tool_specified##*/}"
4793         if test "x$tool_basename" = "x$tool_specified"; then
4794           # A command without a complete path is provided, search $PATH.
4795           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4796 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4797           # Extract the first word of "$tool_basename", so it can be a program name with args.
4798 set dummy $tool_basename; ac_word=$2
4799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4800 $as_echo_n "checking for $ac_word... " >&6; }
4801 if ${ac_cv_path_BASENAME+:} false; then :
4802   $as_echo_n "(cached) " >&6
4803 else
4804   case $BASENAME in
4805   [\\/]* | ?:[\\/]*)
4806   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4807   ;;
4808   *)
4809   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4810 for as_dir in $PATH
4811 do
4812   IFS=$as_save_IFS
4813   test -z "$as_dir" && as_dir=.
4814     for ac_exec_ext in '' $ac_executable_extensions; do
4815   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4816     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4817     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4818     break 2
4819   fi
4820 done
4821   done
4822 IFS=$as_save_IFS
4823 
4824   ;;
4825 esac
4826 fi
4827 BASENAME=$ac_cv_path_BASENAME
4828 if test -n "$BASENAME"; then
4829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4830 $as_echo "$BASENAME" >&6; }
4831 else
4832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4833 $as_echo "no" >&6; }
4834 fi
4835 
4836 
4837           if test "x$BASENAME" = x; then
4838             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4839           fi
4840         else
4841           # Otherwise we believe it is a complete path. Use it as it is.
4842           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4843 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4844           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4845 $as_echo_n "checking for BASENAME... " >&6; }
4846           if test ! -x "$tool_specified"; then
4847             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4848 $as_echo "not found" >&6; }
4849             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4850           fi
4851           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4852 $as_echo "$tool_specified" >&6; }
4853         fi
4854       fi
4855     fi
4856 
4857   fi
4858 
4859 
4860 
4861   if test "x$BASENAME" = x; then
4862     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4863   fi
4864 
4865 
4866 
4867 
4868 
4869   # Publish this variable in the help.
4870 
4871 
4872   if [ -z "${BASH+x}" ]; then
4873     # The variable is not set by user, try to locate tool using the code snippet
4874     for ac_prog in bash
4875 do
4876   # Extract the first word of "$ac_prog", so it can be a program name with args.
4877 set dummy $ac_prog; ac_word=$2
4878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4879 $as_echo_n "checking for $ac_word... " >&6; }
4880 if ${ac_cv_path_BASH+:} false; then :
4881   $as_echo_n "(cached) " >&6
4882 else
4883   case $BASH in
4884   [\\/]* | ?:[\\/]*)
4885   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4886   ;;
4887   *)
4888   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4889 for as_dir in $PATH
4890 do
4891   IFS=$as_save_IFS
4892   test -z "$as_dir" && as_dir=.
4893     for ac_exec_ext in '' $ac_executable_extensions; do
4894   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4895     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4896     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4897     break 2
4898   fi
4899 done
4900   done
4901 IFS=$as_save_IFS
4902 
4903   ;;
4904 esac
4905 fi
4906 BASH=$ac_cv_path_BASH
4907 if test -n "$BASH"; then
4908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4909 $as_echo "$BASH" >&6; }
4910 else
4911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4912 $as_echo "no" >&6; }
4913 fi
4914 
4915 
4916   test -n "$BASH" && break
4917 done
4918 
4919   else
4920     # The variable is set, but is it from the command line or the environment?
4921 
4922     # Try to remove the string !BASH! from our list.
4923     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4924     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4925       # If it failed, the variable was not from the command line. Ignore it,
4926       # but warn the user (except for BASH, which is always set by the calling BASH).
4927       if test "xBASH" != xBASH; then
4928         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4929 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4930       fi
4931       # Try to locate tool using the code snippet
4932       for ac_prog in bash
4933 do
4934   # Extract the first word of "$ac_prog", so it can be a program name with args.
4935 set dummy $ac_prog; ac_word=$2
4936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4937 $as_echo_n "checking for $ac_word... " >&6; }
4938 if ${ac_cv_path_BASH+:} false; then :
4939   $as_echo_n "(cached) " >&6
4940 else
4941   case $BASH in
4942   [\\/]* | ?:[\\/]*)
4943   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4944   ;;
4945   *)
4946   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4947 for as_dir in $PATH
4948 do
4949   IFS=$as_save_IFS
4950   test -z "$as_dir" && as_dir=.
4951     for ac_exec_ext in '' $ac_executable_extensions; do
4952   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4953     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4954     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4955     break 2
4956   fi
4957 done
4958   done
4959 IFS=$as_save_IFS
4960 
4961   ;;
4962 esac
4963 fi
4964 BASH=$ac_cv_path_BASH
4965 if test -n "$BASH"; then
4966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4967 $as_echo "$BASH" >&6; }
4968 else
4969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4970 $as_echo "no" >&6; }
4971 fi
4972 
4973 
4974   test -n "$BASH" && break
4975 done
4976 
4977     else
4978       # If it succeeded, then it was overridden by the user. We will use it
4979       # for the tool.
4980 
4981       # First remove it from the list of overridden variables, so we can test
4982       # for unknown variables in the end.
4983       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4984 
4985       # Check if we try to supply an empty value
4986       if test "x$BASH" = x; then
4987         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
4988 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
4989         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4990 $as_echo_n "checking for BASH... " >&6; }
4991         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4992 $as_echo "disabled" >&6; }
4993       else
4994         # Check if the provided tool contains a complete path.
4995         tool_specified="$BASH"
4996         tool_basename="${tool_specified##*/}"
4997         if test "x$tool_basename" = "x$tool_specified"; then
4998           # A command without a complete path is provided, search $PATH.
4999           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5000 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5001           # Extract the first word of "$tool_basename", so it can be a program name with args.
5002 set dummy $tool_basename; ac_word=$2
5003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5004 $as_echo_n "checking for $ac_word... " >&6; }
5005 if ${ac_cv_path_BASH+:} false; then :
5006   $as_echo_n "(cached) " >&6
5007 else
5008   case $BASH in
5009   [\\/]* | ?:[\\/]*)
5010   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5011   ;;
5012   *)
5013   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5014 for as_dir in $PATH
5015 do
5016   IFS=$as_save_IFS
5017   test -z "$as_dir" && as_dir=.
5018     for ac_exec_ext in '' $ac_executable_extensions; do
5019   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5020     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5021     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5022     break 2
5023   fi
5024 done
5025   done
5026 IFS=$as_save_IFS
5027 
5028   ;;
5029 esac
5030 fi
5031 BASH=$ac_cv_path_BASH
5032 if test -n "$BASH"; then
5033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5034 $as_echo "$BASH" >&6; }
5035 else
5036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5037 $as_echo "no" >&6; }
5038 fi
5039 
5040 
5041           if test "x$BASH" = x; then
5042             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5043           fi
5044         else
5045           # Otherwise we believe it is a complete path. Use it as it is.
5046           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5047 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5048           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5049 $as_echo_n "checking for BASH... " >&6; }
5050           if test ! -x "$tool_specified"; then
5051             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5052 $as_echo "not found" >&6; }
5053             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5054           fi
5055           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5056 $as_echo "$tool_specified" >&6; }
5057         fi
5058       fi
5059     fi
5060 
5061   fi
5062 
5063 
5064 
5065   if test "x$BASH" = x; then
5066     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5067   fi
5068 
5069 
5070 
5071 
5072 
5073   # Publish this variable in the help.
5074 
5075 
5076   if [ -z "${CAT+x}" ]; then
5077     # The variable is not set by user, try to locate tool using the code snippet
5078     for ac_prog in cat
5079 do
5080   # Extract the first word of "$ac_prog", so it can be a program name with args.
5081 set dummy $ac_prog; ac_word=$2
5082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5083 $as_echo_n "checking for $ac_word... " >&6; }
5084 if ${ac_cv_path_CAT+:} false; then :
5085   $as_echo_n "(cached) " >&6
5086 else
5087   case $CAT in
5088   [\\/]* | ?:[\\/]*)
5089   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5090   ;;
5091   *)
5092   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5093 for as_dir in $PATH
5094 do
5095   IFS=$as_save_IFS
5096   test -z "$as_dir" && as_dir=.
5097     for ac_exec_ext in '' $ac_executable_extensions; do
5098   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5099     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5100     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5101     break 2
5102   fi
5103 done
5104   done
5105 IFS=$as_save_IFS
5106 
5107   ;;
5108 esac
5109 fi
5110 CAT=$ac_cv_path_CAT
5111 if test -n "$CAT"; then
5112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5113 $as_echo "$CAT" >&6; }
5114 else
5115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5116 $as_echo "no" >&6; }
5117 fi
5118 
5119 
5120   test -n "$CAT" && break
5121 done
5122 
5123   else
5124     # The variable is set, but is it from the command line or the environment?
5125 
5126     # Try to remove the string !CAT! from our list.
5127     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5128     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5129       # If it failed, the variable was not from the command line. Ignore it,
5130       # but warn the user (except for BASH, which is always set by the calling BASH).
5131       if test "xCAT" != xBASH; then
5132         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5133 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5134       fi
5135       # Try to locate tool using the code snippet
5136       for ac_prog in cat
5137 do
5138   # Extract the first word of "$ac_prog", so it can be a program name with args.
5139 set dummy $ac_prog; ac_word=$2
5140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5141 $as_echo_n "checking for $ac_word... " >&6; }
5142 if ${ac_cv_path_CAT+:} false; then :
5143   $as_echo_n "(cached) " >&6
5144 else
5145   case $CAT in
5146   [\\/]* | ?:[\\/]*)
5147   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5148   ;;
5149   *)
5150   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5151 for as_dir in $PATH
5152 do
5153   IFS=$as_save_IFS
5154   test -z "$as_dir" && as_dir=.
5155     for ac_exec_ext in '' $ac_executable_extensions; do
5156   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5157     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5158     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5159     break 2
5160   fi
5161 done
5162   done
5163 IFS=$as_save_IFS
5164 
5165   ;;
5166 esac
5167 fi
5168 CAT=$ac_cv_path_CAT
5169 if test -n "$CAT"; then
5170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5171 $as_echo "$CAT" >&6; }
5172 else
5173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5174 $as_echo "no" >&6; }
5175 fi
5176 
5177 
5178   test -n "$CAT" && break
5179 done
5180 
5181     else
5182       # If it succeeded, then it was overridden by the user. We will use it
5183       # for the tool.
5184 
5185       # First remove it from the list of overridden variables, so we can test
5186       # for unknown variables in the end.
5187       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5188 
5189       # Check if we try to supply an empty value
5190       if test "x$CAT" = x; then
5191         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5192 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5193         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5194 $as_echo_n "checking for CAT... " >&6; }
5195         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5196 $as_echo "disabled" >&6; }
5197       else
5198         # Check if the provided tool contains a complete path.
5199         tool_specified="$CAT"
5200         tool_basename="${tool_specified##*/}"
5201         if test "x$tool_basename" = "x$tool_specified"; then
5202           # A command without a complete path is provided, search $PATH.
5203           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5204 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5205           # Extract the first word of "$tool_basename", so it can be a program name with args.
5206 set dummy $tool_basename; ac_word=$2
5207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5208 $as_echo_n "checking for $ac_word... " >&6; }
5209 if ${ac_cv_path_CAT+:} false; then :
5210   $as_echo_n "(cached) " >&6
5211 else
5212   case $CAT in
5213   [\\/]* | ?:[\\/]*)
5214   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5215   ;;
5216   *)
5217   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5218 for as_dir in $PATH
5219 do
5220   IFS=$as_save_IFS
5221   test -z "$as_dir" && as_dir=.
5222     for ac_exec_ext in '' $ac_executable_extensions; do
5223   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5224     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5225     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5226     break 2
5227   fi
5228 done
5229   done
5230 IFS=$as_save_IFS
5231 
5232   ;;
5233 esac
5234 fi
5235 CAT=$ac_cv_path_CAT
5236 if test -n "$CAT"; then
5237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5238 $as_echo "$CAT" >&6; }
5239 else
5240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5241 $as_echo "no" >&6; }
5242 fi
5243 
5244 
5245           if test "x$CAT" = x; then
5246             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5247           fi
5248         else
5249           # Otherwise we believe it is a complete path. Use it as it is.
5250           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5251 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5252           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5253 $as_echo_n "checking for CAT... " >&6; }
5254           if test ! -x "$tool_specified"; then
5255             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5256 $as_echo "not found" >&6; }
5257             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5258           fi
5259           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5260 $as_echo "$tool_specified" >&6; }
5261         fi
5262       fi
5263     fi
5264 
5265   fi
5266 
5267 
5268 
5269   if test "x$CAT" = x; then
5270     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5271   fi
5272 
5273 
5274 
5275 
5276 
5277   # Publish this variable in the help.
5278 
5279 
5280   if [ -z "${CHMOD+x}" ]; then
5281     # The variable is not set by user, try to locate tool using the code snippet
5282     for ac_prog in chmod
5283 do
5284   # Extract the first word of "$ac_prog", so it can be a program name with args.
5285 set dummy $ac_prog; ac_word=$2
5286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5287 $as_echo_n "checking for $ac_word... " >&6; }
5288 if ${ac_cv_path_CHMOD+:} false; then :
5289   $as_echo_n "(cached) " >&6
5290 else
5291   case $CHMOD in
5292   [\\/]* | ?:[\\/]*)
5293   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5294   ;;
5295   *)
5296   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5297 for as_dir in $PATH
5298 do
5299   IFS=$as_save_IFS
5300   test -z "$as_dir" && as_dir=.
5301     for ac_exec_ext in '' $ac_executable_extensions; do
5302   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5303     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5304     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5305     break 2
5306   fi
5307 done
5308   done
5309 IFS=$as_save_IFS
5310 
5311   ;;
5312 esac
5313 fi
5314 CHMOD=$ac_cv_path_CHMOD
5315 if test -n "$CHMOD"; then
5316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5317 $as_echo "$CHMOD" >&6; }
5318 else
5319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5320 $as_echo "no" >&6; }
5321 fi
5322 
5323 
5324   test -n "$CHMOD" && break
5325 done
5326 
5327   else
5328     # The variable is set, but is it from the command line or the environment?
5329 
5330     # Try to remove the string !CHMOD! from our list.
5331     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5332     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5333       # If it failed, the variable was not from the command line. Ignore it,
5334       # but warn the user (except for BASH, which is always set by the calling BASH).
5335       if test "xCHMOD" != xBASH; then
5336         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5337 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5338       fi
5339       # Try to locate tool using the code snippet
5340       for ac_prog in chmod
5341 do
5342   # Extract the first word of "$ac_prog", so it can be a program name with args.
5343 set dummy $ac_prog; ac_word=$2
5344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5345 $as_echo_n "checking for $ac_word... " >&6; }
5346 if ${ac_cv_path_CHMOD+:} false; then :
5347   $as_echo_n "(cached) " >&6
5348 else
5349   case $CHMOD in
5350   [\\/]* | ?:[\\/]*)
5351   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5352   ;;
5353   *)
5354   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5355 for as_dir in $PATH
5356 do
5357   IFS=$as_save_IFS
5358   test -z "$as_dir" && as_dir=.
5359     for ac_exec_ext in '' $ac_executable_extensions; do
5360   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5361     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5362     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5363     break 2
5364   fi
5365 done
5366   done
5367 IFS=$as_save_IFS
5368 
5369   ;;
5370 esac
5371 fi
5372 CHMOD=$ac_cv_path_CHMOD
5373 if test -n "$CHMOD"; then
5374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5375 $as_echo "$CHMOD" >&6; }
5376 else
5377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5378 $as_echo "no" >&6; }
5379 fi
5380 
5381 
5382   test -n "$CHMOD" && break
5383 done
5384 
5385     else
5386       # If it succeeded, then it was overridden by the user. We will use it
5387       # for the tool.
5388 
5389       # First remove it from the list of overridden variables, so we can test
5390       # for unknown variables in the end.
5391       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5392 
5393       # Check if we try to supply an empty value
5394       if test "x$CHMOD" = x; then
5395         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5396 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5397         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5398 $as_echo_n "checking for CHMOD... " >&6; }
5399         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5400 $as_echo "disabled" >&6; }
5401       else
5402         # Check if the provided tool contains a complete path.
5403         tool_specified="$CHMOD"
5404         tool_basename="${tool_specified##*/}"
5405         if test "x$tool_basename" = "x$tool_specified"; then
5406           # A command without a complete path is provided, search $PATH.
5407           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5408 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5409           # Extract the first word of "$tool_basename", so it can be a program name with args.
5410 set dummy $tool_basename; ac_word=$2
5411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5412 $as_echo_n "checking for $ac_word... " >&6; }
5413 if ${ac_cv_path_CHMOD+:} false; then :
5414   $as_echo_n "(cached) " >&6
5415 else
5416   case $CHMOD in
5417   [\\/]* | ?:[\\/]*)
5418   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5419   ;;
5420   *)
5421   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5422 for as_dir in $PATH
5423 do
5424   IFS=$as_save_IFS
5425   test -z "$as_dir" && as_dir=.
5426     for ac_exec_ext in '' $ac_executable_extensions; do
5427   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5428     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5429     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5430     break 2
5431   fi
5432 done
5433   done
5434 IFS=$as_save_IFS
5435 
5436   ;;
5437 esac
5438 fi
5439 CHMOD=$ac_cv_path_CHMOD
5440 if test -n "$CHMOD"; then
5441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5442 $as_echo "$CHMOD" >&6; }
5443 else
5444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5445 $as_echo "no" >&6; }
5446 fi
5447 
5448 
5449           if test "x$CHMOD" = x; then
5450             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5451           fi
5452         else
5453           # Otherwise we believe it is a complete path. Use it as it is.
5454           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5455 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5456           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5457 $as_echo_n "checking for CHMOD... " >&6; }
5458           if test ! -x "$tool_specified"; then
5459             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5460 $as_echo "not found" >&6; }
5461             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5462           fi
5463           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5464 $as_echo "$tool_specified" >&6; }
5465         fi
5466       fi
5467     fi
5468 
5469   fi
5470 
5471 
5472 
5473   if test "x$CHMOD" = x; then
5474     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5475   fi
5476 
5477 
5478 
5479 
5480 
5481   # Publish this variable in the help.
5482 
5483 
5484   if [ -z "${CMP+x}" ]; then
5485     # The variable is not set by user, try to locate tool using the code snippet
5486     for ac_prog in cmp
5487 do
5488   # Extract the first word of "$ac_prog", so it can be a program name with args.
5489 set dummy $ac_prog; ac_word=$2
5490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5491 $as_echo_n "checking for $ac_word... " >&6; }
5492 if ${ac_cv_path_CMP+:} false; then :
5493   $as_echo_n "(cached) " >&6
5494 else
5495   case $CMP in
5496   [\\/]* | ?:[\\/]*)
5497   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5498   ;;
5499   *)
5500   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5501 for as_dir in $PATH
5502 do
5503   IFS=$as_save_IFS
5504   test -z "$as_dir" && as_dir=.
5505     for ac_exec_ext in '' $ac_executable_extensions; do
5506   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5507     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5508     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5509     break 2
5510   fi
5511 done
5512   done
5513 IFS=$as_save_IFS
5514 
5515   ;;
5516 esac
5517 fi
5518 CMP=$ac_cv_path_CMP
5519 if test -n "$CMP"; then
5520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5521 $as_echo "$CMP" >&6; }
5522 else
5523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5524 $as_echo "no" >&6; }
5525 fi
5526 
5527 
5528   test -n "$CMP" && break
5529 done
5530 
5531   else
5532     # The variable is set, but is it from the command line or the environment?
5533 
5534     # Try to remove the string !CMP! from our list.
5535     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5536     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5537       # If it failed, the variable was not from the command line. Ignore it,
5538       # but warn the user (except for BASH, which is always set by the calling BASH).
5539       if test "xCMP" != xBASH; then
5540         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5541 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5542       fi
5543       # Try to locate tool using the code snippet
5544       for ac_prog in cmp
5545 do
5546   # Extract the first word of "$ac_prog", so it can be a program name with args.
5547 set dummy $ac_prog; ac_word=$2
5548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5549 $as_echo_n "checking for $ac_word... " >&6; }
5550 if ${ac_cv_path_CMP+:} false; then :
5551   $as_echo_n "(cached) " >&6
5552 else
5553   case $CMP in
5554   [\\/]* | ?:[\\/]*)
5555   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5556   ;;
5557   *)
5558   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5559 for as_dir in $PATH
5560 do
5561   IFS=$as_save_IFS
5562   test -z "$as_dir" && as_dir=.
5563     for ac_exec_ext in '' $ac_executable_extensions; do
5564   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5565     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5566     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5567     break 2
5568   fi
5569 done
5570   done
5571 IFS=$as_save_IFS
5572 
5573   ;;
5574 esac
5575 fi
5576 CMP=$ac_cv_path_CMP
5577 if test -n "$CMP"; then
5578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5579 $as_echo "$CMP" >&6; }
5580 else
5581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5582 $as_echo "no" >&6; }
5583 fi
5584 
5585 
5586   test -n "$CMP" && break
5587 done
5588 
5589     else
5590       # If it succeeded, then it was overridden by the user. We will use it
5591       # for the tool.
5592 
5593       # First remove it from the list of overridden variables, so we can test
5594       # for unknown variables in the end.
5595       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5596 
5597       # Check if we try to supply an empty value
5598       if test "x$CMP" = x; then
5599         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5600 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5601         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5602 $as_echo_n "checking for CMP... " >&6; }
5603         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5604 $as_echo "disabled" >&6; }
5605       else
5606         # Check if the provided tool contains a complete path.
5607         tool_specified="$CMP"
5608         tool_basename="${tool_specified##*/}"
5609         if test "x$tool_basename" = "x$tool_specified"; then
5610           # A command without a complete path is provided, search $PATH.
5611           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5612 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5613           # Extract the first word of "$tool_basename", so it can be a program name with args.
5614 set dummy $tool_basename; ac_word=$2
5615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5616 $as_echo_n "checking for $ac_word... " >&6; }
5617 if ${ac_cv_path_CMP+:} false; then :
5618   $as_echo_n "(cached) " >&6
5619 else
5620   case $CMP in
5621   [\\/]* | ?:[\\/]*)
5622   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5623   ;;
5624   *)
5625   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5626 for as_dir in $PATH
5627 do
5628   IFS=$as_save_IFS
5629   test -z "$as_dir" && as_dir=.
5630     for ac_exec_ext in '' $ac_executable_extensions; do
5631   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5632     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5633     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5634     break 2
5635   fi
5636 done
5637   done
5638 IFS=$as_save_IFS
5639 
5640   ;;
5641 esac
5642 fi
5643 CMP=$ac_cv_path_CMP
5644 if test -n "$CMP"; then
5645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5646 $as_echo "$CMP" >&6; }
5647 else
5648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5649 $as_echo "no" >&6; }
5650 fi
5651 
5652 
5653           if test "x$CMP" = x; then
5654             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5655           fi
5656         else
5657           # Otherwise we believe it is a complete path. Use it as it is.
5658           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5659 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5660           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5661 $as_echo_n "checking for CMP... " >&6; }
5662           if test ! -x "$tool_specified"; then
5663             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5664 $as_echo "not found" >&6; }
5665             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5666           fi
5667           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5668 $as_echo "$tool_specified" >&6; }
5669         fi
5670       fi
5671     fi
5672 
5673   fi
5674 
5675 
5676 
5677   if test "x$CMP" = x; then
5678     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5679   fi
5680 
5681 
5682 
5683 
5684 
5685   # Publish this variable in the help.
5686 
5687 
5688   if [ -z "${COMM+x}" ]; then
5689     # The variable is not set by user, try to locate tool using the code snippet
5690     for ac_prog in comm
5691 do
5692   # Extract the first word of "$ac_prog", so it can be a program name with args.
5693 set dummy $ac_prog; ac_word=$2
5694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5695 $as_echo_n "checking for $ac_word... " >&6; }
5696 if ${ac_cv_path_COMM+:} false; then :
5697   $as_echo_n "(cached) " >&6
5698 else
5699   case $COMM in
5700   [\\/]* | ?:[\\/]*)
5701   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5702   ;;
5703   *)
5704   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5705 for as_dir in $PATH
5706 do
5707   IFS=$as_save_IFS
5708   test -z "$as_dir" && as_dir=.
5709     for ac_exec_ext in '' $ac_executable_extensions; do
5710   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5711     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5712     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5713     break 2
5714   fi
5715 done
5716   done
5717 IFS=$as_save_IFS
5718 
5719   ;;
5720 esac
5721 fi
5722 COMM=$ac_cv_path_COMM
5723 if test -n "$COMM"; then
5724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5725 $as_echo "$COMM" >&6; }
5726 else
5727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5728 $as_echo "no" >&6; }
5729 fi
5730 
5731 
5732   test -n "$COMM" && break
5733 done
5734 
5735   else
5736     # The variable is set, but is it from the command line or the environment?
5737 
5738     # Try to remove the string !COMM! from our list.
5739     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5740     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5741       # If it failed, the variable was not from the command line. Ignore it,
5742       # but warn the user (except for BASH, which is always set by the calling BASH).
5743       if test "xCOMM" != xBASH; then
5744         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5745 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5746       fi
5747       # Try to locate tool using the code snippet
5748       for ac_prog in comm
5749 do
5750   # Extract the first word of "$ac_prog", so it can be a program name with args.
5751 set dummy $ac_prog; ac_word=$2
5752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5753 $as_echo_n "checking for $ac_word... " >&6; }
5754 if ${ac_cv_path_COMM+:} false; then :
5755   $as_echo_n "(cached) " >&6
5756 else
5757   case $COMM in
5758   [\\/]* | ?:[\\/]*)
5759   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5760   ;;
5761   *)
5762   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5763 for as_dir in $PATH
5764 do
5765   IFS=$as_save_IFS
5766   test -z "$as_dir" && as_dir=.
5767     for ac_exec_ext in '' $ac_executable_extensions; do
5768   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5769     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5770     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5771     break 2
5772   fi
5773 done
5774   done
5775 IFS=$as_save_IFS
5776 
5777   ;;
5778 esac
5779 fi
5780 COMM=$ac_cv_path_COMM
5781 if test -n "$COMM"; then
5782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5783 $as_echo "$COMM" >&6; }
5784 else
5785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5786 $as_echo "no" >&6; }
5787 fi
5788 
5789 
5790   test -n "$COMM" && break
5791 done
5792 
5793     else
5794       # If it succeeded, then it was overridden by the user. We will use it
5795       # for the tool.
5796 
5797       # First remove it from the list of overridden variables, so we can test
5798       # for unknown variables in the end.
5799       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5800 
5801       # Check if we try to supply an empty value
5802       if test "x$COMM" = x; then
5803         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5804 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5805         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5806 $as_echo_n "checking for COMM... " >&6; }
5807         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5808 $as_echo "disabled" >&6; }
5809       else
5810         # Check if the provided tool contains a complete path.
5811         tool_specified="$COMM"
5812         tool_basename="${tool_specified##*/}"
5813         if test "x$tool_basename" = "x$tool_specified"; then
5814           # A command without a complete path is provided, search $PATH.
5815           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5816 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5817           # Extract the first word of "$tool_basename", so it can be a program name with args.
5818 set dummy $tool_basename; ac_word=$2
5819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5820 $as_echo_n "checking for $ac_word... " >&6; }
5821 if ${ac_cv_path_COMM+:} false; then :
5822   $as_echo_n "(cached) " >&6
5823 else
5824   case $COMM in
5825   [\\/]* | ?:[\\/]*)
5826   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5827   ;;
5828   *)
5829   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5830 for as_dir in $PATH
5831 do
5832   IFS=$as_save_IFS
5833   test -z "$as_dir" && as_dir=.
5834     for ac_exec_ext in '' $ac_executable_extensions; do
5835   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5836     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5837     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5838     break 2
5839   fi
5840 done
5841   done
5842 IFS=$as_save_IFS
5843 
5844   ;;
5845 esac
5846 fi
5847 COMM=$ac_cv_path_COMM
5848 if test -n "$COMM"; then
5849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5850 $as_echo "$COMM" >&6; }
5851 else
5852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5853 $as_echo "no" >&6; }
5854 fi
5855 
5856 
5857           if test "x$COMM" = x; then
5858             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5859           fi
5860         else
5861           # Otherwise we believe it is a complete path. Use it as it is.
5862           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5863 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5864           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5865 $as_echo_n "checking for COMM... " >&6; }
5866           if test ! -x "$tool_specified"; then
5867             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5868 $as_echo "not found" >&6; }
5869             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5870           fi
5871           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5872 $as_echo "$tool_specified" >&6; }
5873         fi
5874       fi
5875     fi
5876 
5877   fi
5878 
5879 
5880 
5881   if test "x$COMM" = x; then
5882     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5883   fi
5884 
5885 
5886 
5887 
5888 
5889   # Publish this variable in the help.
5890 
5891 
5892   if [ -z "${CP+x}" ]; then
5893     # The variable is not set by user, try to locate tool using the code snippet
5894     for ac_prog in cp
5895 do
5896   # Extract the first word of "$ac_prog", so it can be a program name with args.
5897 set dummy $ac_prog; ac_word=$2
5898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5899 $as_echo_n "checking for $ac_word... " >&6; }
5900 if ${ac_cv_path_CP+:} false; then :
5901   $as_echo_n "(cached) " >&6
5902 else
5903   case $CP in
5904   [\\/]* | ?:[\\/]*)
5905   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5906   ;;
5907   *)
5908   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5909 for as_dir in $PATH
5910 do
5911   IFS=$as_save_IFS
5912   test -z "$as_dir" && as_dir=.
5913     for ac_exec_ext in '' $ac_executable_extensions; do
5914   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5915     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5916     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5917     break 2
5918   fi
5919 done
5920   done
5921 IFS=$as_save_IFS
5922 
5923   ;;
5924 esac
5925 fi
5926 CP=$ac_cv_path_CP
5927 if test -n "$CP"; then
5928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5929 $as_echo "$CP" >&6; }
5930 else
5931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5932 $as_echo "no" >&6; }
5933 fi
5934 
5935 
5936   test -n "$CP" && break
5937 done
5938 
5939   else
5940     # The variable is set, but is it from the command line or the environment?
5941 
5942     # Try to remove the string !CP! from our list.
5943     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5944     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5945       # If it failed, the variable was not from the command line. Ignore it,
5946       # but warn the user (except for BASH, which is always set by the calling BASH).
5947       if test "xCP" != xBASH; then
5948         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5949 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5950       fi
5951       # Try to locate tool using the code snippet
5952       for ac_prog in cp
5953 do
5954   # Extract the first word of "$ac_prog", so it can be a program name with args.
5955 set dummy $ac_prog; ac_word=$2
5956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5957 $as_echo_n "checking for $ac_word... " >&6; }
5958 if ${ac_cv_path_CP+:} false; then :
5959   $as_echo_n "(cached) " >&6
5960 else
5961   case $CP in
5962   [\\/]* | ?:[\\/]*)
5963   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5964   ;;
5965   *)
5966   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5967 for as_dir in $PATH
5968 do
5969   IFS=$as_save_IFS
5970   test -z "$as_dir" && as_dir=.
5971     for ac_exec_ext in '' $ac_executable_extensions; do
5972   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5973     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5974     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5975     break 2
5976   fi
5977 done
5978   done
5979 IFS=$as_save_IFS
5980 
5981   ;;
5982 esac
5983 fi
5984 CP=$ac_cv_path_CP
5985 if test -n "$CP"; then
5986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5987 $as_echo "$CP" >&6; }
5988 else
5989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5990 $as_echo "no" >&6; }
5991 fi
5992 
5993 
5994   test -n "$CP" && break
5995 done
5996 
5997     else
5998       # If it succeeded, then it was overridden by the user. We will use it
5999       # for the tool.
6000 
6001       # First remove it from the list of overridden variables, so we can test
6002       # for unknown variables in the end.
6003       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6004 
6005       # Check if we try to supply an empty value
6006       if test "x$CP" = x; then
6007         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6008 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6009         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6010 $as_echo_n "checking for CP... " >&6; }
6011         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6012 $as_echo "disabled" >&6; }
6013       else
6014         # Check if the provided tool contains a complete path.
6015         tool_specified="$CP"
6016         tool_basename="${tool_specified##*/}"
6017         if test "x$tool_basename" = "x$tool_specified"; then
6018           # A command without a complete path is provided, search $PATH.
6019           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6020 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6021           # Extract the first word of "$tool_basename", so it can be a program name with args.
6022 set dummy $tool_basename; ac_word=$2
6023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6024 $as_echo_n "checking for $ac_word... " >&6; }
6025 if ${ac_cv_path_CP+:} false; then :
6026   $as_echo_n "(cached) " >&6
6027 else
6028   case $CP in
6029   [\\/]* | ?:[\\/]*)
6030   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6031   ;;
6032   *)
6033   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6034 for as_dir in $PATH
6035 do
6036   IFS=$as_save_IFS
6037   test -z "$as_dir" && as_dir=.
6038     for ac_exec_ext in '' $ac_executable_extensions; do
6039   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6040     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6041     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6042     break 2
6043   fi
6044 done
6045   done
6046 IFS=$as_save_IFS
6047 
6048   ;;
6049 esac
6050 fi
6051 CP=$ac_cv_path_CP
6052 if test -n "$CP"; then
6053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6054 $as_echo "$CP" >&6; }
6055 else
6056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6057 $as_echo "no" >&6; }
6058 fi
6059 
6060 
6061           if test "x$CP" = x; then
6062             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6063           fi
6064         else
6065           # Otherwise we believe it is a complete path. Use it as it is.
6066           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6067 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6068           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6069 $as_echo_n "checking for CP... " >&6; }
6070           if test ! -x "$tool_specified"; then
6071             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6072 $as_echo "not found" >&6; }
6073             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6074           fi
6075           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6076 $as_echo "$tool_specified" >&6; }
6077         fi
6078       fi
6079     fi
6080 
6081   fi
6082 
6083 
6084 
6085   if test "x$CP" = x; then
6086     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6087   fi
6088 
6089 
6090 
6091 
6092 
6093   # Publish this variable in the help.
6094 
6095 
6096   if [ -z "${CUT+x}" ]; then
6097     # The variable is not set by user, try to locate tool using the code snippet
6098     for ac_prog in cut
6099 do
6100   # Extract the first word of "$ac_prog", so it can be a program name with args.
6101 set dummy $ac_prog; ac_word=$2
6102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6103 $as_echo_n "checking for $ac_word... " >&6; }
6104 if ${ac_cv_path_CUT+:} false; then :
6105   $as_echo_n "(cached) " >&6
6106 else
6107   case $CUT in
6108   [\\/]* | ?:[\\/]*)
6109   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6110   ;;
6111   *)
6112   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6113 for as_dir in $PATH
6114 do
6115   IFS=$as_save_IFS
6116   test -z "$as_dir" && as_dir=.
6117     for ac_exec_ext in '' $ac_executable_extensions; do
6118   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6119     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6120     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6121     break 2
6122   fi
6123 done
6124   done
6125 IFS=$as_save_IFS
6126 
6127   ;;
6128 esac
6129 fi
6130 CUT=$ac_cv_path_CUT
6131 if test -n "$CUT"; then
6132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6133 $as_echo "$CUT" >&6; }
6134 else
6135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6136 $as_echo "no" >&6; }
6137 fi
6138 
6139 
6140   test -n "$CUT" && break
6141 done
6142 
6143   else
6144     # The variable is set, but is it from the command line or the environment?
6145 
6146     # Try to remove the string !CUT! from our list.
6147     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6148     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6149       # If it failed, the variable was not from the command line. Ignore it,
6150       # but warn the user (except for BASH, which is always set by the calling BASH).
6151       if test "xCUT" != xBASH; then
6152         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6153 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6154       fi
6155       # Try to locate tool using the code snippet
6156       for ac_prog in cut
6157 do
6158   # Extract the first word of "$ac_prog", so it can be a program name with args.
6159 set dummy $ac_prog; ac_word=$2
6160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6161 $as_echo_n "checking for $ac_word... " >&6; }
6162 if ${ac_cv_path_CUT+:} false; then :
6163   $as_echo_n "(cached) " >&6
6164 else
6165   case $CUT in
6166   [\\/]* | ?:[\\/]*)
6167   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6168   ;;
6169   *)
6170   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6171 for as_dir in $PATH
6172 do
6173   IFS=$as_save_IFS
6174   test -z "$as_dir" && as_dir=.
6175     for ac_exec_ext in '' $ac_executable_extensions; do
6176   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6177     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6178     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6179     break 2
6180   fi
6181 done
6182   done
6183 IFS=$as_save_IFS
6184 
6185   ;;
6186 esac
6187 fi
6188 CUT=$ac_cv_path_CUT
6189 if test -n "$CUT"; then
6190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6191 $as_echo "$CUT" >&6; }
6192 else
6193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6194 $as_echo "no" >&6; }
6195 fi
6196 
6197 
6198   test -n "$CUT" && break
6199 done
6200 
6201     else
6202       # If it succeeded, then it was overridden by the user. We will use it
6203       # for the tool.
6204 
6205       # First remove it from the list of overridden variables, so we can test
6206       # for unknown variables in the end.
6207       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6208 
6209       # Check if we try to supply an empty value
6210       if test "x$CUT" = x; then
6211         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6212 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6213         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6214 $as_echo_n "checking for CUT... " >&6; }
6215         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6216 $as_echo "disabled" >&6; }
6217       else
6218         # Check if the provided tool contains a complete path.
6219         tool_specified="$CUT"
6220         tool_basename="${tool_specified##*/}"
6221         if test "x$tool_basename" = "x$tool_specified"; then
6222           # A command without a complete path is provided, search $PATH.
6223           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6224 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6225           # Extract the first word of "$tool_basename", so it can be a program name with args.
6226 set dummy $tool_basename; ac_word=$2
6227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6228 $as_echo_n "checking for $ac_word... " >&6; }
6229 if ${ac_cv_path_CUT+:} false; then :
6230   $as_echo_n "(cached) " >&6
6231 else
6232   case $CUT in
6233   [\\/]* | ?:[\\/]*)
6234   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6235   ;;
6236   *)
6237   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6238 for as_dir in $PATH
6239 do
6240   IFS=$as_save_IFS
6241   test -z "$as_dir" && as_dir=.
6242     for ac_exec_ext in '' $ac_executable_extensions; do
6243   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6244     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6245     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6246     break 2
6247   fi
6248 done
6249   done
6250 IFS=$as_save_IFS
6251 
6252   ;;
6253 esac
6254 fi
6255 CUT=$ac_cv_path_CUT
6256 if test -n "$CUT"; then
6257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6258 $as_echo "$CUT" >&6; }
6259 else
6260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6261 $as_echo "no" >&6; }
6262 fi
6263 
6264 
6265           if test "x$CUT" = x; then
6266             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6267           fi
6268         else
6269           # Otherwise we believe it is a complete path. Use it as it is.
6270           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6271 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6272           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6273 $as_echo_n "checking for CUT... " >&6; }
6274           if test ! -x "$tool_specified"; then
6275             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6276 $as_echo "not found" >&6; }
6277             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6278           fi
6279           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6280 $as_echo "$tool_specified" >&6; }
6281         fi
6282       fi
6283     fi
6284 
6285   fi
6286 
6287 
6288 
6289   if test "x$CUT" = x; then
6290     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6291   fi
6292 
6293 
6294 
6295 
6296 
6297   # Publish this variable in the help.
6298 
6299 
6300   if [ -z "${DATE+x}" ]; then
6301     # The variable is not set by user, try to locate tool using the code snippet
6302     for ac_prog in date
6303 do
6304   # Extract the first word of "$ac_prog", so it can be a program name with args.
6305 set dummy $ac_prog; ac_word=$2
6306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6307 $as_echo_n "checking for $ac_word... " >&6; }
6308 if ${ac_cv_path_DATE+:} false; then :
6309   $as_echo_n "(cached) " >&6
6310 else
6311   case $DATE in
6312   [\\/]* | ?:[\\/]*)
6313   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6314   ;;
6315   *)
6316   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6317 for as_dir in $PATH
6318 do
6319   IFS=$as_save_IFS
6320   test -z "$as_dir" && as_dir=.
6321     for ac_exec_ext in '' $ac_executable_extensions; do
6322   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6323     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6324     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6325     break 2
6326   fi
6327 done
6328   done
6329 IFS=$as_save_IFS
6330 
6331   ;;
6332 esac
6333 fi
6334 DATE=$ac_cv_path_DATE
6335 if test -n "$DATE"; then
6336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6337 $as_echo "$DATE" >&6; }
6338 else
6339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6340 $as_echo "no" >&6; }
6341 fi
6342 
6343 
6344   test -n "$DATE" && break
6345 done
6346 
6347   else
6348     # The variable is set, but is it from the command line or the environment?
6349 
6350     # Try to remove the string !DATE! from our list.
6351     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6352     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6353       # If it failed, the variable was not from the command line. Ignore it,
6354       # but warn the user (except for BASH, which is always set by the calling BASH).
6355       if test "xDATE" != xBASH; then
6356         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6357 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6358       fi
6359       # Try to locate tool using the code snippet
6360       for ac_prog in date
6361 do
6362   # Extract the first word of "$ac_prog", so it can be a program name with args.
6363 set dummy $ac_prog; ac_word=$2
6364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6365 $as_echo_n "checking for $ac_word... " >&6; }
6366 if ${ac_cv_path_DATE+:} false; then :
6367   $as_echo_n "(cached) " >&6
6368 else
6369   case $DATE in
6370   [\\/]* | ?:[\\/]*)
6371   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6372   ;;
6373   *)
6374   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6375 for as_dir in $PATH
6376 do
6377   IFS=$as_save_IFS
6378   test -z "$as_dir" && as_dir=.
6379     for ac_exec_ext in '' $ac_executable_extensions; do
6380   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6381     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6383     break 2
6384   fi
6385 done
6386   done
6387 IFS=$as_save_IFS
6388 
6389   ;;
6390 esac
6391 fi
6392 DATE=$ac_cv_path_DATE
6393 if test -n "$DATE"; then
6394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6395 $as_echo "$DATE" >&6; }
6396 else
6397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6398 $as_echo "no" >&6; }
6399 fi
6400 
6401 
6402   test -n "$DATE" && break
6403 done
6404 
6405     else
6406       # If it succeeded, then it was overridden by the user. We will use it
6407       # for the tool.
6408 
6409       # First remove it from the list of overridden variables, so we can test
6410       # for unknown variables in the end.
6411       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6412 
6413       # Check if we try to supply an empty value
6414       if test "x$DATE" = x; then
6415         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6416 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6417         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6418 $as_echo_n "checking for DATE... " >&6; }
6419         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6420 $as_echo "disabled" >&6; }
6421       else
6422         # Check if the provided tool contains a complete path.
6423         tool_specified="$DATE"
6424         tool_basename="${tool_specified##*/}"
6425         if test "x$tool_basename" = "x$tool_specified"; then
6426           # A command without a complete path is provided, search $PATH.
6427           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6428 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6429           # Extract the first word of "$tool_basename", so it can be a program name with args.
6430 set dummy $tool_basename; ac_word=$2
6431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6432 $as_echo_n "checking for $ac_word... " >&6; }
6433 if ${ac_cv_path_DATE+:} false; then :
6434   $as_echo_n "(cached) " >&6
6435 else
6436   case $DATE in
6437   [\\/]* | ?:[\\/]*)
6438   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6439   ;;
6440   *)
6441   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6442 for as_dir in $PATH
6443 do
6444   IFS=$as_save_IFS
6445   test -z "$as_dir" && as_dir=.
6446     for ac_exec_ext in '' $ac_executable_extensions; do
6447   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6448     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6449     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6450     break 2
6451   fi
6452 done
6453   done
6454 IFS=$as_save_IFS
6455 
6456   ;;
6457 esac
6458 fi
6459 DATE=$ac_cv_path_DATE
6460 if test -n "$DATE"; then
6461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6462 $as_echo "$DATE" >&6; }
6463 else
6464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6465 $as_echo "no" >&6; }
6466 fi
6467 
6468 
6469           if test "x$DATE" = x; then
6470             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6471           fi
6472         else
6473           # Otherwise we believe it is a complete path. Use it as it is.
6474           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6475 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6476           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6477 $as_echo_n "checking for DATE... " >&6; }
6478           if test ! -x "$tool_specified"; then
6479             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6480 $as_echo "not found" >&6; }
6481             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6482           fi
6483           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6484 $as_echo "$tool_specified" >&6; }
6485         fi
6486       fi
6487     fi
6488 
6489   fi
6490 
6491 
6492 
6493   if test "x$DATE" = x; then
6494     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6495   fi
6496 
6497 
6498 
6499 
6500 
6501   # Publish this variable in the help.
6502 
6503 
6504   if [ -z "${DIFF+x}" ]; then
6505     # The variable is not set by user, try to locate tool using the code snippet
6506     for ac_prog in gdiff diff
6507 do
6508   # Extract the first word of "$ac_prog", so it can be a program name with args.
6509 set dummy $ac_prog; ac_word=$2
6510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6511 $as_echo_n "checking for $ac_word... " >&6; }
6512 if ${ac_cv_path_DIFF+:} false; then :
6513   $as_echo_n "(cached) " >&6
6514 else
6515   case $DIFF in
6516   [\\/]* | ?:[\\/]*)
6517   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6518   ;;
6519   *)
6520   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6521 for as_dir in $PATH
6522 do
6523   IFS=$as_save_IFS
6524   test -z "$as_dir" && as_dir=.
6525     for ac_exec_ext in '' $ac_executable_extensions; do
6526   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6527     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6528     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6529     break 2
6530   fi
6531 done
6532   done
6533 IFS=$as_save_IFS
6534 
6535   ;;
6536 esac
6537 fi
6538 DIFF=$ac_cv_path_DIFF
6539 if test -n "$DIFF"; then
6540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6541 $as_echo "$DIFF" >&6; }
6542 else
6543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6544 $as_echo "no" >&6; }
6545 fi
6546 
6547 
6548   test -n "$DIFF" && break
6549 done
6550 
6551   else
6552     # The variable is set, but is it from the command line or the environment?
6553 
6554     # Try to remove the string !DIFF! from our list.
6555     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6556     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6557       # If it failed, the variable was not from the command line. Ignore it,
6558       # but warn the user (except for BASH, which is always set by the calling BASH).
6559       if test "xDIFF" != xBASH; then
6560         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6561 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6562       fi
6563       # Try to locate tool using the code snippet
6564       for ac_prog in gdiff diff
6565 do
6566   # Extract the first word of "$ac_prog", so it can be a program name with args.
6567 set dummy $ac_prog; ac_word=$2
6568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6569 $as_echo_n "checking for $ac_word... " >&6; }
6570 if ${ac_cv_path_DIFF+:} false; then :
6571   $as_echo_n "(cached) " >&6
6572 else
6573   case $DIFF in
6574   [\\/]* | ?:[\\/]*)
6575   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6576   ;;
6577   *)
6578   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6579 for as_dir in $PATH
6580 do
6581   IFS=$as_save_IFS
6582   test -z "$as_dir" && as_dir=.
6583     for ac_exec_ext in '' $ac_executable_extensions; do
6584   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6585     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6586     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6587     break 2
6588   fi
6589 done
6590   done
6591 IFS=$as_save_IFS
6592 
6593   ;;
6594 esac
6595 fi
6596 DIFF=$ac_cv_path_DIFF
6597 if test -n "$DIFF"; then
6598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6599 $as_echo "$DIFF" >&6; }
6600 else
6601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6602 $as_echo "no" >&6; }
6603 fi
6604 
6605 
6606   test -n "$DIFF" && break
6607 done
6608 
6609     else
6610       # If it succeeded, then it was overridden by the user. We will use it
6611       # for the tool.
6612 
6613       # First remove it from the list of overridden variables, so we can test
6614       # for unknown variables in the end.
6615       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6616 
6617       # Check if we try to supply an empty value
6618       if test "x$DIFF" = x; then
6619         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6620 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6621         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6622 $as_echo_n "checking for DIFF... " >&6; }
6623         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6624 $as_echo "disabled" >&6; }
6625       else
6626         # Check if the provided tool contains a complete path.
6627         tool_specified="$DIFF"
6628         tool_basename="${tool_specified##*/}"
6629         if test "x$tool_basename" = "x$tool_specified"; then
6630           # A command without a complete path is provided, search $PATH.
6631           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6632 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6633           # Extract the first word of "$tool_basename", so it can be a program name with args.
6634 set dummy $tool_basename; ac_word=$2
6635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6636 $as_echo_n "checking for $ac_word... " >&6; }
6637 if ${ac_cv_path_DIFF+:} false; then :
6638   $as_echo_n "(cached) " >&6
6639 else
6640   case $DIFF in
6641   [\\/]* | ?:[\\/]*)
6642   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6643   ;;
6644   *)
6645   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6646 for as_dir in $PATH
6647 do
6648   IFS=$as_save_IFS
6649   test -z "$as_dir" && as_dir=.
6650     for ac_exec_ext in '' $ac_executable_extensions; do
6651   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6652     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6653     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6654     break 2
6655   fi
6656 done
6657   done
6658 IFS=$as_save_IFS
6659 
6660   ;;
6661 esac
6662 fi
6663 DIFF=$ac_cv_path_DIFF
6664 if test -n "$DIFF"; then
6665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6666 $as_echo "$DIFF" >&6; }
6667 else
6668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6669 $as_echo "no" >&6; }
6670 fi
6671 
6672 
6673           if test "x$DIFF" = x; then
6674             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6675           fi
6676         else
6677           # Otherwise we believe it is a complete path. Use it as it is.
6678           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6679 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6680           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6681 $as_echo_n "checking for DIFF... " >&6; }
6682           if test ! -x "$tool_specified"; then
6683             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6684 $as_echo "not found" >&6; }
6685             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6686           fi
6687           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6688 $as_echo "$tool_specified" >&6; }
6689         fi
6690       fi
6691     fi
6692 
6693   fi
6694 
6695 
6696 
6697   if test "x$DIFF" = x; then
6698     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6699   fi
6700 
6701 
6702 
6703 
6704 
6705   # Publish this variable in the help.
6706 
6707 
6708   if [ -z "${DIRNAME+x}" ]; then
6709     # The variable is not set by user, try to locate tool using the code snippet
6710     for ac_prog in dirname
6711 do
6712   # Extract the first word of "$ac_prog", so it can be a program name with args.
6713 set dummy $ac_prog; ac_word=$2
6714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6715 $as_echo_n "checking for $ac_word... " >&6; }
6716 if ${ac_cv_path_DIRNAME+:} false; then :
6717   $as_echo_n "(cached) " >&6
6718 else
6719   case $DIRNAME in
6720   [\\/]* | ?:[\\/]*)
6721   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6722   ;;
6723   *)
6724   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6725 for as_dir in $PATH
6726 do
6727   IFS=$as_save_IFS
6728   test -z "$as_dir" && as_dir=.
6729     for ac_exec_ext in '' $ac_executable_extensions; do
6730   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6731     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6732     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6733     break 2
6734   fi
6735 done
6736   done
6737 IFS=$as_save_IFS
6738 
6739   ;;
6740 esac
6741 fi
6742 DIRNAME=$ac_cv_path_DIRNAME
6743 if test -n "$DIRNAME"; then
6744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6745 $as_echo "$DIRNAME" >&6; }
6746 else
6747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6748 $as_echo "no" >&6; }
6749 fi
6750 
6751 
6752   test -n "$DIRNAME" && break
6753 done
6754 
6755   else
6756     # The variable is set, but is it from the command line or the environment?
6757 
6758     # Try to remove the string !DIRNAME! from our list.
6759     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6760     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6761       # If it failed, the variable was not from the command line. Ignore it,
6762       # but warn the user (except for BASH, which is always set by the calling BASH).
6763       if test "xDIRNAME" != xBASH; then
6764         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6765 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6766       fi
6767       # Try to locate tool using the code snippet
6768       for ac_prog in dirname
6769 do
6770   # Extract the first word of "$ac_prog", so it can be a program name with args.
6771 set dummy $ac_prog; ac_word=$2
6772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6773 $as_echo_n "checking for $ac_word... " >&6; }
6774 if ${ac_cv_path_DIRNAME+:} false; then :
6775   $as_echo_n "(cached) " >&6
6776 else
6777   case $DIRNAME in
6778   [\\/]* | ?:[\\/]*)
6779   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6780   ;;
6781   *)
6782   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6783 for as_dir in $PATH
6784 do
6785   IFS=$as_save_IFS
6786   test -z "$as_dir" && as_dir=.
6787     for ac_exec_ext in '' $ac_executable_extensions; do
6788   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6789     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6790     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6791     break 2
6792   fi
6793 done
6794   done
6795 IFS=$as_save_IFS
6796 
6797   ;;
6798 esac
6799 fi
6800 DIRNAME=$ac_cv_path_DIRNAME
6801 if test -n "$DIRNAME"; then
6802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6803 $as_echo "$DIRNAME" >&6; }
6804 else
6805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6806 $as_echo "no" >&6; }
6807 fi
6808 
6809 
6810   test -n "$DIRNAME" && break
6811 done
6812 
6813     else
6814       # If it succeeded, then it was overridden by the user. We will use it
6815       # for the tool.
6816 
6817       # First remove it from the list of overridden variables, so we can test
6818       # for unknown variables in the end.
6819       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6820 
6821       # Check if we try to supply an empty value
6822       if test "x$DIRNAME" = x; then
6823         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
6824 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
6825         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6826 $as_echo_n "checking for DIRNAME... " >&6; }
6827         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6828 $as_echo "disabled" >&6; }
6829       else
6830         # Check if the provided tool contains a complete path.
6831         tool_specified="$DIRNAME"
6832         tool_basename="${tool_specified##*/}"
6833         if test "x$tool_basename" = "x$tool_specified"; then
6834           # A command without a complete path is provided, search $PATH.
6835           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6836 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6837           # Extract the first word of "$tool_basename", so it can be a program name with args.
6838 set dummy $tool_basename; ac_word=$2
6839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6840 $as_echo_n "checking for $ac_word... " >&6; }
6841 if ${ac_cv_path_DIRNAME+:} false; then :
6842   $as_echo_n "(cached) " >&6
6843 else
6844   case $DIRNAME in
6845   [\\/]* | ?:[\\/]*)
6846   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6847   ;;
6848   *)
6849   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6850 for as_dir in $PATH
6851 do
6852   IFS=$as_save_IFS
6853   test -z "$as_dir" && as_dir=.
6854     for ac_exec_ext in '' $ac_executable_extensions; do
6855   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6856     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6857     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6858     break 2
6859   fi
6860 done
6861   done
6862 IFS=$as_save_IFS
6863 
6864   ;;
6865 esac
6866 fi
6867 DIRNAME=$ac_cv_path_DIRNAME
6868 if test -n "$DIRNAME"; then
6869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6870 $as_echo "$DIRNAME" >&6; }
6871 else
6872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6873 $as_echo "no" >&6; }
6874 fi
6875 
6876 
6877           if test "x$DIRNAME" = x; then
6878             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6879           fi
6880         else
6881           # Otherwise we believe it is a complete path. Use it as it is.
6882           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6883 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6884           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6885 $as_echo_n "checking for DIRNAME... " >&6; }
6886           if test ! -x "$tool_specified"; then
6887             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6888 $as_echo "not found" >&6; }
6889             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6890           fi
6891           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6892 $as_echo "$tool_specified" >&6; }
6893         fi
6894       fi
6895     fi
6896 
6897   fi
6898 
6899 
6900 
6901   if test "x$DIRNAME" = x; then
6902     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6903   fi
6904 
6905 
6906 
6907 
6908 
6909   # Publish this variable in the help.
6910 
6911 
6912   if [ -z "${ECHO+x}" ]; then
6913     # The variable is not set by user, try to locate tool using the code snippet
6914     for ac_prog in echo
6915 do
6916   # Extract the first word of "$ac_prog", so it can be a program name with args.
6917 set dummy $ac_prog; ac_word=$2
6918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6919 $as_echo_n "checking for $ac_word... " >&6; }
6920 if ${ac_cv_path_ECHO+:} false; then :
6921   $as_echo_n "(cached) " >&6
6922 else
6923   case $ECHO in
6924   [\\/]* | ?:[\\/]*)
6925   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6926   ;;
6927   *)
6928   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6929 for as_dir in $PATH
6930 do
6931   IFS=$as_save_IFS
6932   test -z "$as_dir" && as_dir=.
6933     for ac_exec_ext in '' $ac_executable_extensions; do
6934   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6935     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6936     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6937     break 2
6938   fi
6939 done
6940   done
6941 IFS=$as_save_IFS
6942 
6943   ;;
6944 esac
6945 fi
6946 ECHO=$ac_cv_path_ECHO
6947 if test -n "$ECHO"; then
6948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6949 $as_echo "$ECHO" >&6; }
6950 else
6951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6952 $as_echo "no" >&6; }
6953 fi
6954 
6955 
6956   test -n "$ECHO" && break
6957 done
6958 
6959   else
6960     # The variable is set, but is it from the command line or the environment?
6961 
6962     # Try to remove the string !ECHO! from our list.
6963     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6964     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6965       # If it failed, the variable was not from the command line. Ignore it,
6966       # but warn the user (except for BASH, which is always set by the calling BASH).
6967       if test "xECHO" != xBASH; then
6968         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6969 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6970       fi
6971       # Try to locate tool using the code snippet
6972       for ac_prog in echo
6973 do
6974   # Extract the first word of "$ac_prog", so it can be a program name with args.
6975 set dummy $ac_prog; ac_word=$2
6976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6977 $as_echo_n "checking for $ac_word... " >&6; }
6978 if ${ac_cv_path_ECHO+:} false; then :
6979   $as_echo_n "(cached) " >&6
6980 else
6981   case $ECHO in
6982   [\\/]* | ?:[\\/]*)
6983   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6984   ;;
6985   *)
6986   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6987 for as_dir in $PATH
6988 do
6989   IFS=$as_save_IFS
6990   test -z "$as_dir" && as_dir=.
6991     for ac_exec_ext in '' $ac_executable_extensions; do
6992   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6993     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6994     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6995     break 2
6996   fi
6997 done
6998   done
6999 IFS=$as_save_IFS
7000 
7001   ;;
7002 esac
7003 fi
7004 ECHO=$ac_cv_path_ECHO
7005 if test -n "$ECHO"; then
7006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7007 $as_echo "$ECHO" >&6; }
7008 else
7009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7010 $as_echo "no" >&6; }
7011 fi
7012 
7013 
7014   test -n "$ECHO" && break
7015 done
7016 
7017     else
7018       # If it succeeded, then it was overridden by the user. We will use it
7019       # for the tool.
7020 
7021       # First remove it from the list of overridden variables, so we can test
7022       # for unknown variables in the end.
7023       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7024 
7025       # Check if we try to supply an empty value
7026       if test "x$ECHO" = x; then
7027         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7028 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7029         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7030 $as_echo_n "checking for ECHO... " >&6; }
7031         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7032 $as_echo "disabled" >&6; }
7033       else
7034         # Check if the provided tool contains a complete path.
7035         tool_specified="$ECHO"
7036         tool_basename="${tool_specified##*/}"
7037         if test "x$tool_basename" = "x$tool_specified"; then
7038           # A command without a complete path is provided, search $PATH.
7039           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7040 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7041           # Extract the first word of "$tool_basename", so it can be a program name with args.
7042 set dummy $tool_basename; ac_word=$2
7043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7044 $as_echo_n "checking for $ac_word... " >&6; }
7045 if ${ac_cv_path_ECHO+:} false; then :
7046   $as_echo_n "(cached) " >&6
7047 else
7048   case $ECHO in
7049   [\\/]* | ?:[\\/]*)
7050   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7051   ;;
7052   *)
7053   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7054 for as_dir in $PATH
7055 do
7056   IFS=$as_save_IFS
7057   test -z "$as_dir" && as_dir=.
7058     for ac_exec_ext in '' $ac_executable_extensions; do
7059   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7060     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7061     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7062     break 2
7063   fi
7064 done
7065   done
7066 IFS=$as_save_IFS
7067 
7068   ;;
7069 esac
7070 fi
7071 ECHO=$ac_cv_path_ECHO
7072 if test -n "$ECHO"; then
7073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7074 $as_echo "$ECHO" >&6; }
7075 else
7076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7077 $as_echo "no" >&6; }
7078 fi
7079 
7080 
7081           if test "x$ECHO" = x; then
7082             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7083           fi
7084         else
7085           # Otherwise we believe it is a complete path. Use it as it is.
7086           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7087 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7088           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7089 $as_echo_n "checking for ECHO... " >&6; }
7090           if test ! -x "$tool_specified"; then
7091             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7092 $as_echo "not found" >&6; }
7093             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7094           fi
7095           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7096 $as_echo "$tool_specified" >&6; }
7097         fi
7098       fi
7099     fi
7100 
7101   fi
7102 
7103 
7104 
7105   if test "x$ECHO" = x; then
7106     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7107   fi
7108 
7109 
7110 
7111 
7112 
7113   # Publish this variable in the help.
7114 
7115 
7116   if [ -z "${EXPR+x}" ]; then
7117     # The variable is not set by user, try to locate tool using the code snippet
7118     for ac_prog in expr
7119 do
7120   # Extract the first word of "$ac_prog", so it can be a program name with args.
7121 set dummy $ac_prog; ac_word=$2
7122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7123 $as_echo_n "checking for $ac_word... " >&6; }
7124 if ${ac_cv_path_EXPR+:} false; then :
7125   $as_echo_n "(cached) " >&6
7126 else
7127   case $EXPR in
7128   [\\/]* | ?:[\\/]*)
7129   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7130   ;;
7131   *)
7132   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7133 for as_dir in $PATH
7134 do
7135   IFS=$as_save_IFS
7136   test -z "$as_dir" && as_dir=.
7137     for ac_exec_ext in '' $ac_executable_extensions; do
7138   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7139     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7140     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7141     break 2
7142   fi
7143 done
7144   done
7145 IFS=$as_save_IFS
7146 
7147   ;;
7148 esac
7149 fi
7150 EXPR=$ac_cv_path_EXPR
7151 if test -n "$EXPR"; then
7152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7153 $as_echo "$EXPR" >&6; }
7154 else
7155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7156 $as_echo "no" >&6; }
7157 fi
7158 
7159 
7160   test -n "$EXPR" && break
7161 done
7162 
7163   else
7164     # The variable is set, but is it from the command line or the environment?
7165 
7166     # Try to remove the string !EXPR! from our list.
7167     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7168     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7169       # If it failed, the variable was not from the command line. Ignore it,
7170       # but warn the user (except for BASH, which is always set by the calling BASH).
7171       if test "xEXPR" != xBASH; then
7172         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7173 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7174       fi
7175       # Try to locate tool using the code snippet
7176       for ac_prog in expr
7177 do
7178   # Extract the first word of "$ac_prog", so it can be a program name with args.
7179 set dummy $ac_prog; ac_word=$2
7180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7181 $as_echo_n "checking for $ac_word... " >&6; }
7182 if ${ac_cv_path_EXPR+:} false; then :
7183   $as_echo_n "(cached) " >&6
7184 else
7185   case $EXPR in
7186   [\\/]* | ?:[\\/]*)
7187   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7188   ;;
7189   *)
7190   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7191 for as_dir in $PATH
7192 do
7193   IFS=$as_save_IFS
7194   test -z "$as_dir" && as_dir=.
7195     for ac_exec_ext in '' $ac_executable_extensions; do
7196   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7197     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7198     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7199     break 2
7200   fi
7201 done
7202   done
7203 IFS=$as_save_IFS
7204 
7205   ;;
7206 esac
7207 fi
7208 EXPR=$ac_cv_path_EXPR
7209 if test -n "$EXPR"; then
7210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7211 $as_echo "$EXPR" >&6; }
7212 else
7213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7214 $as_echo "no" >&6; }
7215 fi
7216 
7217 
7218   test -n "$EXPR" && break
7219 done
7220 
7221     else
7222       # If it succeeded, then it was overridden by the user. We will use it
7223       # for the tool.
7224 
7225       # First remove it from the list of overridden variables, so we can test
7226       # for unknown variables in the end.
7227       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7228 
7229       # Check if we try to supply an empty value
7230       if test "x$EXPR" = x; then
7231         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7232 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7233         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7234 $as_echo_n "checking for EXPR... " >&6; }
7235         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7236 $as_echo "disabled" >&6; }
7237       else
7238         # Check if the provided tool contains a complete path.
7239         tool_specified="$EXPR"
7240         tool_basename="${tool_specified##*/}"
7241         if test "x$tool_basename" = "x$tool_specified"; then
7242           # A command without a complete path is provided, search $PATH.
7243           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7244 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7245           # Extract the first word of "$tool_basename", so it can be a program name with args.
7246 set dummy $tool_basename; ac_word=$2
7247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7248 $as_echo_n "checking for $ac_word... " >&6; }
7249 if ${ac_cv_path_EXPR+:} false; then :
7250   $as_echo_n "(cached) " >&6
7251 else
7252   case $EXPR in
7253   [\\/]* | ?:[\\/]*)
7254   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7255   ;;
7256   *)
7257   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7258 for as_dir in $PATH
7259 do
7260   IFS=$as_save_IFS
7261   test -z "$as_dir" && as_dir=.
7262     for ac_exec_ext in '' $ac_executable_extensions; do
7263   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7264     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7265     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7266     break 2
7267   fi
7268 done
7269   done
7270 IFS=$as_save_IFS
7271 
7272   ;;
7273 esac
7274 fi
7275 EXPR=$ac_cv_path_EXPR
7276 if test -n "$EXPR"; then
7277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7278 $as_echo "$EXPR" >&6; }
7279 else
7280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7281 $as_echo "no" >&6; }
7282 fi
7283 
7284 
7285           if test "x$EXPR" = x; then
7286             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7287           fi
7288         else
7289           # Otherwise we believe it is a complete path. Use it as it is.
7290           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7291 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7292           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7293 $as_echo_n "checking for EXPR... " >&6; }
7294           if test ! -x "$tool_specified"; then
7295             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7296 $as_echo "not found" >&6; }
7297             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7298           fi
7299           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7300 $as_echo "$tool_specified" >&6; }
7301         fi
7302       fi
7303     fi
7304 
7305   fi
7306 
7307 
7308 
7309   if test "x$EXPR" = x; then
7310     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7311   fi
7312 
7313 
7314 
7315 
7316 
7317   # Publish this variable in the help.
7318 
7319 
7320   if [ -z "${FILE+x}" ]; then
7321     # The variable is not set by user, try to locate tool using the code snippet
7322     for ac_prog in file
7323 do
7324   # Extract the first word of "$ac_prog", so it can be a program name with args.
7325 set dummy $ac_prog; ac_word=$2
7326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7327 $as_echo_n "checking for $ac_word... " >&6; }
7328 if ${ac_cv_path_FILE+:} false; then :
7329   $as_echo_n "(cached) " >&6
7330 else
7331   case $FILE in
7332   [\\/]* | ?:[\\/]*)
7333   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7334   ;;
7335   *)
7336   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7337 for as_dir in $PATH
7338 do
7339   IFS=$as_save_IFS
7340   test -z "$as_dir" && as_dir=.
7341     for ac_exec_ext in '' $ac_executable_extensions; do
7342   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7343     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7344     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7345     break 2
7346   fi
7347 done
7348   done
7349 IFS=$as_save_IFS
7350 
7351   ;;
7352 esac
7353 fi
7354 FILE=$ac_cv_path_FILE
7355 if test -n "$FILE"; then
7356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7357 $as_echo "$FILE" >&6; }
7358 else
7359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7360 $as_echo "no" >&6; }
7361 fi
7362 
7363 
7364   test -n "$FILE" && break
7365 done
7366 
7367   else
7368     # The variable is set, but is it from the command line or the environment?
7369 
7370     # Try to remove the string !FILE! from our list.
7371     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7372     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7373       # If it failed, the variable was not from the command line. Ignore it,
7374       # but warn the user (except for BASH, which is always set by the calling BASH).
7375       if test "xFILE" != xBASH; then
7376         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7377 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7378       fi
7379       # Try to locate tool using the code snippet
7380       for ac_prog in file
7381 do
7382   # Extract the first word of "$ac_prog", so it can be a program name with args.
7383 set dummy $ac_prog; ac_word=$2
7384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7385 $as_echo_n "checking for $ac_word... " >&6; }
7386 if ${ac_cv_path_FILE+:} false; then :
7387   $as_echo_n "(cached) " >&6
7388 else
7389   case $FILE in
7390   [\\/]* | ?:[\\/]*)
7391   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7392   ;;
7393   *)
7394   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7395 for as_dir in $PATH
7396 do
7397   IFS=$as_save_IFS
7398   test -z "$as_dir" && as_dir=.
7399     for ac_exec_ext in '' $ac_executable_extensions; do
7400   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7401     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7402     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7403     break 2
7404   fi
7405 done
7406   done
7407 IFS=$as_save_IFS
7408 
7409   ;;
7410 esac
7411 fi
7412 FILE=$ac_cv_path_FILE
7413 if test -n "$FILE"; then
7414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7415 $as_echo "$FILE" >&6; }
7416 else
7417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7418 $as_echo "no" >&6; }
7419 fi
7420 
7421 
7422   test -n "$FILE" && break
7423 done
7424 
7425     else
7426       # If it succeeded, then it was overridden by the user. We will use it
7427       # for the tool.
7428 
7429       # First remove it from the list of overridden variables, so we can test
7430       # for unknown variables in the end.
7431       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7432 
7433       # Check if we try to supply an empty value
7434       if test "x$FILE" = x; then
7435         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7436 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7437         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7438 $as_echo_n "checking for FILE... " >&6; }
7439         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7440 $as_echo "disabled" >&6; }
7441       else
7442         # Check if the provided tool contains a complete path.
7443         tool_specified="$FILE"
7444         tool_basename="${tool_specified##*/}"
7445         if test "x$tool_basename" = "x$tool_specified"; then
7446           # A command without a complete path is provided, search $PATH.
7447           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7448 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7449           # Extract the first word of "$tool_basename", so it can be a program name with args.
7450 set dummy $tool_basename; ac_word=$2
7451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7452 $as_echo_n "checking for $ac_word... " >&6; }
7453 if ${ac_cv_path_FILE+:} false; then :
7454   $as_echo_n "(cached) " >&6
7455 else
7456   case $FILE in
7457   [\\/]* | ?:[\\/]*)
7458   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7459   ;;
7460   *)
7461   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7462 for as_dir in $PATH
7463 do
7464   IFS=$as_save_IFS
7465   test -z "$as_dir" && as_dir=.
7466     for ac_exec_ext in '' $ac_executable_extensions; do
7467   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7468     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7469     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7470     break 2
7471   fi
7472 done
7473   done
7474 IFS=$as_save_IFS
7475 
7476   ;;
7477 esac
7478 fi
7479 FILE=$ac_cv_path_FILE
7480 if test -n "$FILE"; then
7481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7482 $as_echo "$FILE" >&6; }
7483 else
7484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7485 $as_echo "no" >&6; }
7486 fi
7487 
7488 
7489           if test "x$FILE" = x; then
7490             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7491           fi
7492         else
7493           # Otherwise we believe it is a complete path. Use it as it is.
7494           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7495 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7496           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7497 $as_echo_n "checking for FILE... " >&6; }
7498           if test ! -x "$tool_specified"; then
7499             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7500 $as_echo "not found" >&6; }
7501             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7502           fi
7503           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7504 $as_echo "$tool_specified" >&6; }
7505         fi
7506       fi
7507     fi
7508 
7509   fi
7510 
7511 
7512 
7513   if test "x$FILE" = x; then
7514     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7515   fi
7516 
7517 
7518 
7519 
7520 
7521   # Publish this variable in the help.
7522 
7523 
7524   if [ -z "${FIND+x}" ]; then
7525     # The variable is not set by user, try to locate tool using the code snippet
7526     for ac_prog in find
7527 do
7528   # Extract the first word of "$ac_prog", so it can be a program name with args.
7529 set dummy $ac_prog; ac_word=$2
7530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7531 $as_echo_n "checking for $ac_word... " >&6; }
7532 if ${ac_cv_path_FIND+:} false; then :
7533   $as_echo_n "(cached) " >&6
7534 else
7535   case $FIND in
7536   [\\/]* | ?:[\\/]*)
7537   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7538   ;;
7539   *)
7540   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7541 for as_dir in $PATH
7542 do
7543   IFS=$as_save_IFS
7544   test -z "$as_dir" && as_dir=.
7545     for ac_exec_ext in '' $ac_executable_extensions; do
7546   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7547     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7548     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7549     break 2
7550   fi
7551 done
7552   done
7553 IFS=$as_save_IFS
7554 
7555   ;;
7556 esac
7557 fi
7558 FIND=$ac_cv_path_FIND
7559 if test -n "$FIND"; then
7560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7561 $as_echo "$FIND" >&6; }
7562 else
7563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7564 $as_echo "no" >&6; }
7565 fi
7566 
7567 
7568   test -n "$FIND" && break
7569 done
7570 
7571   else
7572     # The variable is set, but is it from the command line or the environment?
7573 
7574     # Try to remove the string !FIND! from our list.
7575     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7576     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7577       # If it failed, the variable was not from the command line. Ignore it,
7578       # but warn the user (except for BASH, which is always set by the calling BASH).
7579       if test "xFIND" != xBASH; then
7580         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7581 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7582       fi
7583       # Try to locate tool using the code snippet
7584       for ac_prog in find
7585 do
7586   # Extract the first word of "$ac_prog", so it can be a program name with args.
7587 set dummy $ac_prog; ac_word=$2
7588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7589 $as_echo_n "checking for $ac_word... " >&6; }
7590 if ${ac_cv_path_FIND+:} false; then :
7591   $as_echo_n "(cached) " >&6
7592 else
7593   case $FIND in
7594   [\\/]* | ?:[\\/]*)
7595   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7596   ;;
7597   *)
7598   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7599 for as_dir in $PATH
7600 do
7601   IFS=$as_save_IFS
7602   test -z "$as_dir" && as_dir=.
7603     for ac_exec_ext in '' $ac_executable_extensions; do
7604   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7605     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7606     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7607     break 2
7608   fi
7609 done
7610   done
7611 IFS=$as_save_IFS
7612 
7613   ;;
7614 esac
7615 fi
7616 FIND=$ac_cv_path_FIND
7617 if test -n "$FIND"; then
7618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7619 $as_echo "$FIND" >&6; }
7620 else
7621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7622 $as_echo "no" >&6; }
7623 fi
7624 
7625 
7626   test -n "$FIND" && break
7627 done
7628 
7629     else
7630       # If it succeeded, then it was overridden by the user. We will use it
7631       # for the tool.
7632 
7633       # First remove it from the list of overridden variables, so we can test
7634       # for unknown variables in the end.
7635       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7636 
7637       # Check if we try to supply an empty value
7638       if test "x$FIND" = x; then
7639         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7640 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7641         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7642 $as_echo_n "checking for FIND... " >&6; }
7643         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7644 $as_echo "disabled" >&6; }
7645       else
7646         # Check if the provided tool contains a complete path.
7647         tool_specified="$FIND"
7648         tool_basename="${tool_specified##*/}"
7649         if test "x$tool_basename" = "x$tool_specified"; then
7650           # A command without a complete path is provided, search $PATH.
7651           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7652 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7653           # Extract the first word of "$tool_basename", so it can be a program name with args.
7654 set dummy $tool_basename; ac_word=$2
7655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7656 $as_echo_n "checking for $ac_word... " >&6; }
7657 if ${ac_cv_path_FIND+:} false; then :
7658   $as_echo_n "(cached) " >&6
7659 else
7660   case $FIND in
7661   [\\/]* | ?:[\\/]*)
7662   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7663   ;;
7664   *)
7665   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7666 for as_dir in $PATH
7667 do
7668   IFS=$as_save_IFS
7669   test -z "$as_dir" && as_dir=.
7670     for ac_exec_ext in '' $ac_executable_extensions; do
7671   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7672     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7673     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7674     break 2
7675   fi
7676 done
7677   done
7678 IFS=$as_save_IFS
7679 
7680   ;;
7681 esac
7682 fi
7683 FIND=$ac_cv_path_FIND
7684 if test -n "$FIND"; then
7685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7686 $as_echo "$FIND" >&6; }
7687 else
7688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7689 $as_echo "no" >&6; }
7690 fi
7691 
7692 
7693           if test "x$FIND" = x; then
7694             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7695           fi
7696         else
7697           # Otherwise we believe it is a complete path. Use it as it is.
7698           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7699 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7700           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7701 $as_echo_n "checking for FIND... " >&6; }
7702           if test ! -x "$tool_specified"; then
7703             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7704 $as_echo "not found" >&6; }
7705             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7706           fi
7707           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7708 $as_echo "$tool_specified" >&6; }
7709         fi
7710       fi
7711     fi
7712 
7713   fi
7714 
7715 
7716 
7717   if test "x$FIND" = x; then
7718     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7719   fi
7720 
7721 
7722 
7723 
7724 
7725   # Publish this variable in the help.
7726 
7727 
7728   if [ -z "${HEAD+x}" ]; then
7729     # The variable is not set by user, try to locate tool using the code snippet
7730     for ac_prog in head
7731 do
7732   # Extract the first word of "$ac_prog", so it can be a program name with args.
7733 set dummy $ac_prog; ac_word=$2
7734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7735 $as_echo_n "checking for $ac_word... " >&6; }
7736 if ${ac_cv_path_HEAD+:} false; then :
7737   $as_echo_n "(cached) " >&6
7738 else
7739   case $HEAD in
7740   [\\/]* | ?:[\\/]*)
7741   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7742   ;;
7743   *)
7744   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7745 for as_dir in $PATH
7746 do
7747   IFS=$as_save_IFS
7748   test -z "$as_dir" && as_dir=.
7749     for ac_exec_ext in '' $ac_executable_extensions; do
7750   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7751     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7752     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7753     break 2
7754   fi
7755 done
7756   done
7757 IFS=$as_save_IFS
7758 
7759   ;;
7760 esac
7761 fi
7762 HEAD=$ac_cv_path_HEAD
7763 if test -n "$HEAD"; then
7764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7765 $as_echo "$HEAD" >&6; }
7766 else
7767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7768 $as_echo "no" >&6; }
7769 fi
7770 
7771 
7772   test -n "$HEAD" && break
7773 done
7774 
7775   else
7776     # The variable is set, but is it from the command line or the environment?
7777 
7778     # Try to remove the string !HEAD! from our list.
7779     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7780     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7781       # If it failed, the variable was not from the command line. Ignore it,
7782       # but warn the user (except for BASH, which is always set by the calling BASH).
7783       if test "xHEAD" != xBASH; then
7784         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7785 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7786       fi
7787       # Try to locate tool using the code snippet
7788       for ac_prog in head
7789 do
7790   # Extract the first word of "$ac_prog", so it can be a program name with args.
7791 set dummy $ac_prog; ac_word=$2
7792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7793 $as_echo_n "checking for $ac_word... " >&6; }
7794 if ${ac_cv_path_HEAD+:} false; then :
7795   $as_echo_n "(cached) " >&6
7796 else
7797   case $HEAD in
7798   [\\/]* | ?:[\\/]*)
7799   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7800   ;;
7801   *)
7802   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7803 for as_dir in $PATH
7804 do
7805   IFS=$as_save_IFS
7806   test -z "$as_dir" && as_dir=.
7807     for ac_exec_ext in '' $ac_executable_extensions; do
7808   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7809     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7810     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7811     break 2
7812   fi
7813 done
7814   done
7815 IFS=$as_save_IFS
7816 
7817   ;;
7818 esac
7819 fi
7820 HEAD=$ac_cv_path_HEAD
7821 if test -n "$HEAD"; then
7822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7823 $as_echo "$HEAD" >&6; }
7824 else
7825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7826 $as_echo "no" >&6; }
7827 fi
7828 
7829 
7830   test -n "$HEAD" && break
7831 done
7832 
7833     else
7834       # If it succeeded, then it was overridden by the user. We will use it
7835       # for the tool.
7836 
7837       # First remove it from the list of overridden variables, so we can test
7838       # for unknown variables in the end.
7839       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7840 
7841       # Check if we try to supply an empty value
7842       if test "x$HEAD" = x; then
7843         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
7844 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
7845         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7846 $as_echo_n "checking for HEAD... " >&6; }
7847         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7848 $as_echo "disabled" >&6; }
7849       else
7850         # Check if the provided tool contains a complete path.
7851         tool_specified="$HEAD"
7852         tool_basename="${tool_specified##*/}"
7853         if test "x$tool_basename" = "x$tool_specified"; then
7854           # A command without a complete path is provided, search $PATH.
7855           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7856 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7857           # Extract the first word of "$tool_basename", so it can be a program name with args.
7858 set dummy $tool_basename; ac_word=$2
7859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7860 $as_echo_n "checking for $ac_word... " >&6; }
7861 if ${ac_cv_path_HEAD+:} false; then :
7862   $as_echo_n "(cached) " >&6
7863 else
7864   case $HEAD in
7865   [\\/]* | ?:[\\/]*)
7866   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7867   ;;
7868   *)
7869   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7870 for as_dir in $PATH
7871 do
7872   IFS=$as_save_IFS
7873   test -z "$as_dir" && as_dir=.
7874     for ac_exec_ext in '' $ac_executable_extensions; do
7875   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7876     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7877     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7878     break 2
7879   fi
7880 done
7881   done
7882 IFS=$as_save_IFS
7883 
7884   ;;
7885 esac
7886 fi
7887 HEAD=$ac_cv_path_HEAD
7888 if test -n "$HEAD"; then
7889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7890 $as_echo "$HEAD" >&6; }
7891 else
7892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7893 $as_echo "no" >&6; }
7894 fi
7895 
7896 
7897           if test "x$HEAD" = x; then
7898             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7899           fi
7900         else
7901           # Otherwise we believe it is a complete path. Use it as it is.
7902           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7903 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7904           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7905 $as_echo_n "checking for HEAD... " >&6; }
7906           if test ! -x "$tool_specified"; then
7907             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7908 $as_echo "not found" >&6; }
7909             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7910           fi
7911           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7912 $as_echo "$tool_specified" >&6; }
7913         fi
7914       fi
7915     fi
7916 
7917   fi
7918 
7919 
7920 
7921   if test "x$HEAD" = x; then
7922     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7923   fi
7924 
7925 
7926 
7927 
7928 
7929   # Publish this variable in the help.
7930 
7931 
7932   if [ -z "${LN+x}" ]; then
7933     # The variable is not set by user, try to locate tool using the code snippet
7934     for ac_prog in ln
7935 do
7936   # Extract the first word of "$ac_prog", so it can be a program name with args.
7937 set dummy $ac_prog; ac_word=$2
7938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7939 $as_echo_n "checking for $ac_word... " >&6; }
7940 if ${ac_cv_path_LN+:} false; then :
7941   $as_echo_n "(cached) " >&6
7942 else
7943   case $LN in
7944   [\\/]* | ?:[\\/]*)
7945   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7946   ;;
7947   *)
7948   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7949 for as_dir in $PATH
7950 do
7951   IFS=$as_save_IFS
7952   test -z "$as_dir" && as_dir=.
7953     for ac_exec_ext in '' $ac_executable_extensions; do
7954   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7955     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7956     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7957     break 2
7958   fi
7959 done
7960   done
7961 IFS=$as_save_IFS
7962 
7963   ;;
7964 esac
7965 fi
7966 LN=$ac_cv_path_LN
7967 if test -n "$LN"; then
7968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7969 $as_echo "$LN" >&6; }
7970 else
7971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7972 $as_echo "no" >&6; }
7973 fi
7974 
7975 
7976   test -n "$LN" && break
7977 done
7978 
7979   else
7980     # The variable is set, but is it from the command line or the environment?
7981 
7982     # Try to remove the string !LN! from our list.
7983     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7984     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7985       # If it failed, the variable was not from the command line. Ignore it,
7986       # but warn the user (except for BASH, which is always set by the calling BASH).
7987       if test "xLN" != xBASH; then
7988         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7989 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7990       fi
7991       # Try to locate tool using the code snippet
7992       for ac_prog in ln
7993 do
7994   # Extract the first word of "$ac_prog", so it can be a program name with args.
7995 set dummy $ac_prog; ac_word=$2
7996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7997 $as_echo_n "checking for $ac_word... " >&6; }
7998 if ${ac_cv_path_LN+:} false; then :
7999   $as_echo_n "(cached) " >&6
8000 else
8001   case $LN in
8002   [\\/]* | ?:[\\/]*)
8003   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8004   ;;
8005   *)
8006   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8007 for as_dir in $PATH
8008 do
8009   IFS=$as_save_IFS
8010   test -z "$as_dir" && as_dir=.
8011     for ac_exec_ext in '' $ac_executable_extensions; do
8012   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8013     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8014     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8015     break 2
8016   fi
8017 done
8018   done
8019 IFS=$as_save_IFS
8020 
8021   ;;
8022 esac
8023 fi
8024 LN=$ac_cv_path_LN
8025 if test -n "$LN"; then
8026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8027 $as_echo "$LN" >&6; }
8028 else
8029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8030 $as_echo "no" >&6; }
8031 fi
8032 
8033 
8034   test -n "$LN" && break
8035 done
8036 
8037     else
8038       # If it succeeded, then it was overridden by the user. We will use it
8039       # for the tool.
8040 
8041       # First remove it from the list of overridden variables, so we can test
8042       # for unknown variables in the end.
8043       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8044 
8045       # Check if we try to supply an empty value
8046       if test "x$LN" = x; then
8047         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8048 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8049         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8050 $as_echo_n "checking for LN... " >&6; }
8051         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8052 $as_echo "disabled" >&6; }
8053       else
8054         # Check if the provided tool contains a complete path.
8055         tool_specified="$LN"
8056         tool_basename="${tool_specified##*/}"
8057         if test "x$tool_basename" = "x$tool_specified"; then
8058           # A command without a complete path is provided, search $PATH.
8059           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8060 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8061           # Extract the first word of "$tool_basename", so it can be a program name with args.
8062 set dummy $tool_basename; ac_word=$2
8063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8064 $as_echo_n "checking for $ac_word... " >&6; }
8065 if ${ac_cv_path_LN+:} false; then :
8066   $as_echo_n "(cached) " >&6
8067 else
8068   case $LN in
8069   [\\/]* | ?:[\\/]*)
8070   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8071   ;;
8072   *)
8073   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8074 for as_dir in $PATH
8075 do
8076   IFS=$as_save_IFS
8077   test -z "$as_dir" && as_dir=.
8078     for ac_exec_ext in '' $ac_executable_extensions; do
8079   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8080     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8081     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8082     break 2
8083   fi
8084 done
8085   done
8086 IFS=$as_save_IFS
8087 
8088   ;;
8089 esac
8090 fi
8091 LN=$ac_cv_path_LN
8092 if test -n "$LN"; then
8093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8094 $as_echo "$LN" >&6; }
8095 else
8096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8097 $as_echo "no" >&6; }
8098 fi
8099 
8100 
8101           if test "x$LN" = x; then
8102             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8103           fi
8104         else
8105           # Otherwise we believe it is a complete path. Use it as it is.
8106           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8107 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8108           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8109 $as_echo_n "checking for LN... " >&6; }
8110           if test ! -x "$tool_specified"; then
8111             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8112 $as_echo "not found" >&6; }
8113             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8114           fi
8115           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8116 $as_echo "$tool_specified" >&6; }
8117         fi
8118       fi
8119     fi
8120 
8121   fi
8122 
8123 
8124 
8125   if test "x$LN" = x; then
8126     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8127   fi
8128 
8129 
8130 
8131 
8132 
8133   # Publish this variable in the help.
8134 
8135 
8136   if [ -z "${LS+x}" ]; then
8137     # The variable is not set by user, try to locate tool using the code snippet
8138     for ac_prog in ls
8139 do
8140   # Extract the first word of "$ac_prog", so it can be a program name with args.
8141 set dummy $ac_prog; ac_word=$2
8142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8143 $as_echo_n "checking for $ac_word... " >&6; }
8144 if ${ac_cv_path_LS+:} false; then :
8145   $as_echo_n "(cached) " >&6
8146 else
8147   case $LS in
8148   [\\/]* | ?:[\\/]*)
8149   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8150   ;;
8151   *)
8152   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8153 for as_dir in $PATH
8154 do
8155   IFS=$as_save_IFS
8156   test -z "$as_dir" && as_dir=.
8157     for ac_exec_ext in '' $ac_executable_extensions; do
8158   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8159     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8160     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8161     break 2
8162   fi
8163 done
8164   done
8165 IFS=$as_save_IFS
8166 
8167   ;;
8168 esac
8169 fi
8170 LS=$ac_cv_path_LS
8171 if test -n "$LS"; then
8172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8173 $as_echo "$LS" >&6; }
8174 else
8175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8176 $as_echo "no" >&6; }
8177 fi
8178 
8179 
8180   test -n "$LS" && break
8181 done
8182 
8183   else
8184     # The variable is set, but is it from the command line or the environment?
8185 
8186     # Try to remove the string !LS! from our list.
8187     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8188     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8189       # If it failed, the variable was not from the command line. Ignore it,
8190       # but warn the user (except for BASH, which is always set by the calling BASH).
8191       if test "xLS" != xBASH; then
8192         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8193 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8194       fi
8195       # Try to locate tool using the code snippet
8196       for ac_prog in ls
8197 do
8198   # Extract the first word of "$ac_prog", so it can be a program name with args.
8199 set dummy $ac_prog; ac_word=$2
8200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8201 $as_echo_n "checking for $ac_word... " >&6; }
8202 if ${ac_cv_path_LS+:} false; then :
8203   $as_echo_n "(cached) " >&6
8204 else
8205   case $LS in
8206   [\\/]* | ?:[\\/]*)
8207   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8208   ;;
8209   *)
8210   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8211 for as_dir in $PATH
8212 do
8213   IFS=$as_save_IFS
8214   test -z "$as_dir" && as_dir=.
8215     for ac_exec_ext in '' $ac_executable_extensions; do
8216   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8217     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8218     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8219     break 2
8220   fi
8221 done
8222   done
8223 IFS=$as_save_IFS
8224 
8225   ;;
8226 esac
8227 fi
8228 LS=$ac_cv_path_LS
8229 if test -n "$LS"; then
8230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8231 $as_echo "$LS" >&6; }
8232 else
8233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8234 $as_echo "no" >&6; }
8235 fi
8236 
8237 
8238   test -n "$LS" && break
8239 done
8240 
8241     else
8242       # If it succeeded, then it was overridden by the user. We will use it
8243       # for the tool.
8244 
8245       # First remove it from the list of overridden variables, so we can test
8246       # for unknown variables in the end.
8247       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8248 
8249       # Check if we try to supply an empty value
8250       if test "x$LS" = x; then
8251         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8252 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8253         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8254 $as_echo_n "checking for LS... " >&6; }
8255         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8256 $as_echo "disabled" >&6; }
8257       else
8258         # Check if the provided tool contains a complete path.
8259         tool_specified="$LS"
8260         tool_basename="${tool_specified##*/}"
8261         if test "x$tool_basename" = "x$tool_specified"; then
8262           # A command without a complete path is provided, search $PATH.
8263           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8264 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8265           # Extract the first word of "$tool_basename", so it can be a program name with args.
8266 set dummy $tool_basename; ac_word=$2
8267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8268 $as_echo_n "checking for $ac_word... " >&6; }
8269 if ${ac_cv_path_LS+:} false; then :
8270   $as_echo_n "(cached) " >&6
8271 else
8272   case $LS in
8273   [\\/]* | ?:[\\/]*)
8274   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8275   ;;
8276   *)
8277   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8278 for as_dir in $PATH
8279 do
8280   IFS=$as_save_IFS
8281   test -z "$as_dir" && as_dir=.
8282     for ac_exec_ext in '' $ac_executable_extensions; do
8283   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8284     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8285     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8286     break 2
8287   fi
8288 done
8289   done
8290 IFS=$as_save_IFS
8291 
8292   ;;
8293 esac
8294 fi
8295 LS=$ac_cv_path_LS
8296 if test -n "$LS"; then
8297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8298 $as_echo "$LS" >&6; }
8299 else
8300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8301 $as_echo "no" >&6; }
8302 fi
8303 
8304 
8305           if test "x$LS" = x; then
8306             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8307           fi
8308         else
8309           # Otherwise we believe it is a complete path. Use it as it is.
8310           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8311 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8312           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8313 $as_echo_n "checking for LS... " >&6; }
8314           if test ! -x "$tool_specified"; then
8315             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8316 $as_echo "not found" >&6; }
8317             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8318           fi
8319           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8320 $as_echo "$tool_specified" >&6; }
8321         fi
8322       fi
8323     fi
8324 
8325   fi
8326 
8327 
8328 
8329   if test "x$LS" = x; then
8330     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8331   fi
8332 
8333 
8334 
8335 
8336 
8337   # Publish this variable in the help.
8338 
8339 
8340   if [ -z "${MKDIR+x}" ]; then
8341     # The variable is not set by user, try to locate tool using the code snippet
8342     for ac_prog in mkdir
8343 do
8344   # Extract the first word of "$ac_prog", so it can be a program name with args.
8345 set dummy $ac_prog; ac_word=$2
8346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8347 $as_echo_n "checking for $ac_word... " >&6; }
8348 if ${ac_cv_path_MKDIR+:} false; then :
8349   $as_echo_n "(cached) " >&6
8350 else
8351   case $MKDIR in
8352   [\\/]* | ?:[\\/]*)
8353   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8354   ;;
8355   *)
8356   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8357 for as_dir in $PATH
8358 do
8359   IFS=$as_save_IFS
8360   test -z "$as_dir" && as_dir=.
8361     for ac_exec_ext in '' $ac_executable_extensions; do
8362   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8363     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8364     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8365     break 2
8366   fi
8367 done
8368   done
8369 IFS=$as_save_IFS
8370 
8371   ;;
8372 esac
8373 fi
8374 MKDIR=$ac_cv_path_MKDIR
8375 if test -n "$MKDIR"; then
8376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8377 $as_echo "$MKDIR" >&6; }
8378 else
8379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8380 $as_echo "no" >&6; }
8381 fi
8382 
8383 
8384   test -n "$MKDIR" && break
8385 done
8386 
8387   else
8388     # The variable is set, but is it from the command line or the environment?
8389 
8390     # Try to remove the string !MKDIR! from our list.
8391     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8392     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8393       # If it failed, the variable was not from the command line. Ignore it,
8394       # but warn the user (except for BASH, which is always set by the calling BASH).
8395       if test "xMKDIR" != xBASH; then
8396         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8397 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8398       fi
8399       # Try to locate tool using the code snippet
8400       for ac_prog in mkdir
8401 do
8402   # Extract the first word of "$ac_prog", so it can be a program name with args.
8403 set dummy $ac_prog; ac_word=$2
8404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8405 $as_echo_n "checking for $ac_word... " >&6; }
8406 if ${ac_cv_path_MKDIR+:} false; then :
8407   $as_echo_n "(cached) " >&6
8408 else
8409   case $MKDIR in
8410   [\\/]* | ?:[\\/]*)
8411   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8412   ;;
8413   *)
8414   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8415 for as_dir in $PATH
8416 do
8417   IFS=$as_save_IFS
8418   test -z "$as_dir" && as_dir=.
8419     for ac_exec_ext in '' $ac_executable_extensions; do
8420   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8421     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8422     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8423     break 2
8424   fi
8425 done
8426   done
8427 IFS=$as_save_IFS
8428 
8429   ;;
8430 esac
8431 fi
8432 MKDIR=$ac_cv_path_MKDIR
8433 if test -n "$MKDIR"; then
8434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8435 $as_echo "$MKDIR" >&6; }
8436 else
8437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8438 $as_echo "no" >&6; }
8439 fi
8440 
8441 
8442   test -n "$MKDIR" && break
8443 done
8444 
8445     else
8446       # If it succeeded, then it was overridden by the user. We will use it
8447       # for the tool.
8448 
8449       # First remove it from the list of overridden variables, so we can test
8450       # for unknown variables in the end.
8451       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8452 
8453       # Check if we try to supply an empty value
8454       if test "x$MKDIR" = x; then
8455         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8456 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8457         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8458 $as_echo_n "checking for MKDIR... " >&6; }
8459         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8460 $as_echo "disabled" >&6; }
8461       else
8462         # Check if the provided tool contains a complete path.
8463         tool_specified="$MKDIR"
8464         tool_basename="${tool_specified##*/}"
8465         if test "x$tool_basename" = "x$tool_specified"; then
8466           # A command without a complete path is provided, search $PATH.
8467           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8468 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8469           # Extract the first word of "$tool_basename", so it can be a program name with args.
8470 set dummy $tool_basename; ac_word=$2
8471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8472 $as_echo_n "checking for $ac_word... " >&6; }
8473 if ${ac_cv_path_MKDIR+:} false; then :
8474   $as_echo_n "(cached) " >&6
8475 else
8476   case $MKDIR in
8477   [\\/]* | ?:[\\/]*)
8478   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8479   ;;
8480   *)
8481   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8482 for as_dir in $PATH
8483 do
8484   IFS=$as_save_IFS
8485   test -z "$as_dir" && as_dir=.
8486     for ac_exec_ext in '' $ac_executable_extensions; do
8487   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8488     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8489     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8490     break 2
8491   fi
8492 done
8493   done
8494 IFS=$as_save_IFS
8495 
8496   ;;
8497 esac
8498 fi
8499 MKDIR=$ac_cv_path_MKDIR
8500 if test -n "$MKDIR"; then
8501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8502 $as_echo "$MKDIR" >&6; }
8503 else
8504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8505 $as_echo "no" >&6; }
8506 fi
8507 
8508 
8509           if test "x$MKDIR" = x; then
8510             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8511           fi
8512         else
8513           # Otherwise we believe it is a complete path. Use it as it is.
8514           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8515 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8516           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8517 $as_echo_n "checking for MKDIR... " >&6; }
8518           if test ! -x "$tool_specified"; then
8519             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8520 $as_echo "not found" >&6; }
8521             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8522           fi
8523           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8524 $as_echo "$tool_specified" >&6; }
8525         fi
8526       fi
8527     fi
8528 
8529   fi
8530 
8531 
8532 
8533   if test "x$MKDIR" = x; then
8534     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8535   fi
8536 
8537 
8538 
8539 
8540 
8541   # Publish this variable in the help.
8542 
8543 
8544   if [ -z "${MKTEMP+x}" ]; then
8545     # The variable is not set by user, try to locate tool using the code snippet
8546     for ac_prog in mktemp
8547 do
8548   # Extract the first word of "$ac_prog", so it can be a program name with args.
8549 set dummy $ac_prog; ac_word=$2
8550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8551 $as_echo_n "checking for $ac_word... " >&6; }
8552 if ${ac_cv_path_MKTEMP+:} false; then :
8553   $as_echo_n "(cached) " >&6
8554 else
8555   case $MKTEMP in
8556   [\\/]* | ?:[\\/]*)
8557   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8558   ;;
8559   *)
8560   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8561 for as_dir in $PATH
8562 do
8563   IFS=$as_save_IFS
8564   test -z "$as_dir" && as_dir=.
8565     for ac_exec_ext in '' $ac_executable_extensions; do
8566   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8567     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8569     break 2
8570   fi
8571 done
8572   done
8573 IFS=$as_save_IFS
8574 
8575   ;;
8576 esac
8577 fi
8578 MKTEMP=$ac_cv_path_MKTEMP
8579 if test -n "$MKTEMP"; then
8580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8581 $as_echo "$MKTEMP" >&6; }
8582 else
8583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8584 $as_echo "no" >&6; }
8585 fi
8586 
8587 
8588   test -n "$MKTEMP" && break
8589 done
8590 
8591   else
8592     # The variable is set, but is it from the command line or the environment?
8593 
8594     # Try to remove the string !MKTEMP! from our list.
8595     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8596     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8597       # If it failed, the variable was not from the command line. Ignore it,
8598       # but warn the user (except for BASH, which is always set by the calling BASH).
8599       if test "xMKTEMP" != xBASH; then
8600         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8601 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8602       fi
8603       # Try to locate tool using the code snippet
8604       for ac_prog in mktemp
8605 do
8606   # Extract the first word of "$ac_prog", so it can be a program name with args.
8607 set dummy $ac_prog; ac_word=$2
8608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8609 $as_echo_n "checking for $ac_word... " >&6; }
8610 if ${ac_cv_path_MKTEMP+:} false; then :
8611   $as_echo_n "(cached) " >&6
8612 else
8613   case $MKTEMP in
8614   [\\/]* | ?:[\\/]*)
8615   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8616   ;;
8617   *)
8618   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8619 for as_dir in $PATH
8620 do
8621   IFS=$as_save_IFS
8622   test -z "$as_dir" && as_dir=.
8623     for ac_exec_ext in '' $ac_executable_extensions; do
8624   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8625     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8626     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8627     break 2
8628   fi
8629 done
8630   done
8631 IFS=$as_save_IFS
8632 
8633   ;;
8634 esac
8635 fi
8636 MKTEMP=$ac_cv_path_MKTEMP
8637 if test -n "$MKTEMP"; then
8638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8639 $as_echo "$MKTEMP" >&6; }
8640 else
8641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8642 $as_echo "no" >&6; }
8643 fi
8644 
8645 
8646   test -n "$MKTEMP" && break
8647 done
8648 
8649     else
8650       # If it succeeded, then it was overridden by the user. We will use it
8651       # for the tool.
8652 
8653       # First remove it from the list of overridden variables, so we can test
8654       # for unknown variables in the end.
8655       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8656 
8657       # Check if we try to supply an empty value
8658       if test "x$MKTEMP" = x; then
8659         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8660 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8661         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8662 $as_echo_n "checking for MKTEMP... " >&6; }
8663         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8664 $as_echo "disabled" >&6; }
8665       else
8666         # Check if the provided tool contains a complete path.
8667         tool_specified="$MKTEMP"
8668         tool_basename="${tool_specified##*/}"
8669         if test "x$tool_basename" = "x$tool_specified"; then
8670           # A command without a complete path is provided, search $PATH.
8671           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8672 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8673           # Extract the first word of "$tool_basename", so it can be a program name with args.
8674 set dummy $tool_basename; ac_word=$2
8675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8676 $as_echo_n "checking for $ac_word... " >&6; }
8677 if ${ac_cv_path_MKTEMP+:} false; then :
8678   $as_echo_n "(cached) " >&6
8679 else
8680   case $MKTEMP in
8681   [\\/]* | ?:[\\/]*)
8682   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8683   ;;
8684   *)
8685   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8686 for as_dir in $PATH
8687 do
8688   IFS=$as_save_IFS
8689   test -z "$as_dir" && as_dir=.
8690     for ac_exec_ext in '' $ac_executable_extensions; do
8691   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8692     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8693     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8694     break 2
8695   fi
8696 done
8697   done
8698 IFS=$as_save_IFS
8699 
8700   ;;
8701 esac
8702 fi
8703 MKTEMP=$ac_cv_path_MKTEMP
8704 if test -n "$MKTEMP"; then
8705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8706 $as_echo "$MKTEMP" >&6; }
8707 else
8708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8709 $as_echo "no" >&6; }
8710 fi
8711 
8712 
8713           if test "x$MKTEMP" = x; then
8714             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8715           fi
8716         else
8717           # Otherwise we believe it is a complete path. Use it as it is.
8718           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8719 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8720           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8721 $as_echo_n "checking for MKTEMP... " >&6; }
8722           if test ! -x "$tool_specified"; then
8723             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8724 $as_echo "not found" >&6; }
8725             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8726           fi
8727           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8728 $as_echo "$tool_specified" >&6; }
8729         fi
8730       fi
8731     fi
8732 
8733   fi
8734 
8735 
8736 
8737   if test "x$MKTEMP" = x; then
8738     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8739   fi
8740 
8741 
8742 
8743 
8744 
8745   # Publish this variable in the help.
8746 
8747 
8748   if [ -z "${MV+x}" ]; then
8749     # The variable is not set by user, try to locate tool using the code snippet
8750     for ac_prog in mv
8751 do
8752   # Extract the first word of "$ac_prog", so it can be a program name with args.
8753 set dummy $ac_prog; ac_word=$2
8754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8755 $as_echo_n "checking for $ac_word... " >&6; }
8756 if ${ac_cv_path_MV+:} false; then :
8757   $as_echo_n "(cached) " >&6
8758 else
8759   case $MV in
8760   [\\/]* | ?:[\\/]*)
8761   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8762   ;;
8763   *)
8764   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8765 for as_dir in $PATH
8766 do
8767   IFS=$as_save_IFS
8768   test -z "$as_dir" && as_dir=.
8769     for ac_exec_ext in '' $ac_executable_extensions; do
8770   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8771     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8772     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8773     break 2
8774   fi
8775 done
8776   done
8777 IFS=$as_save_IFS
8778 
8779   ;;
8780 esac
8781 fi
8782 MV=$ac_cv_path_MV
8783 if test -n "$MV"; then
8784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8785 $as_echo "$MV" >&6; }
8786 else
8787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8788 $as_echo "no" >&6; }
8789 fi
8790 
8791 
8792   test -n "$MV" && break
8793 done
8794 
8795   else
8796     # The variable is set, but is it from the command line or the environment?
8797 
8798     # Try to remove the string !MV! from our list.
8799     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8800     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8801       # If it failed, the variable was not from the command line. Ignore it,
8802       # but warn the user (except for BASH, which is always set by the calling BASH).
8803       if test "xMV" != xBASH; then
8804         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8805 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8806       fi
8807       # Try to locate tool using the code snippet
8808       for ac_prog in mv
8809 do
8810   # Extract the first word of "$ac_prog", so it can be a program name with args.
8811 set dummy $ac_prog; ac_word=$2
8812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8813 $as_echo_n "checking for $ac_word... " >&6; }
8814 if ${ac_cv_path_MV+:} false; then :
8815   $as_echo_n "(cached) " >&6
8816 else
8817   case $MV in
8818   [\\/]* | ?:[\\/]*)
8819   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8820   ;;
8821   *)
8822   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8823 for as_dir in $PATH
8824 do
8825   IFS=$as_save_IFS
8826   test -z "$as_dir" && as_dir=.
8827     for ac_exec_ext in '' $ac_executable_extensions; do
8828   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8829     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8830     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8831     break 2
8832   fi
8833 done
8834   done
8835 IFS=$as_save_IFS
8836 
8837   ;;
8838 esac
8839 fi
8840 MV=$ac_cv_path_MV
8841 if test -n "$MV"; then
8842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8843 $as_echo "$MV" >&6; }
8844 else
8845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8846 $as_echo "no" >&6; }
8847 fi
8848 
8849 
8850   test -n "$MV" && break
8851 done
8852 
8853     else
8854       # If it succeeded, then it was overridden by the user. We will use it
8855       # for the tool.
8856 
8857       # First remove it from the list of overridden variables, so we can test
8858       # for unknown variables in the end.
8859       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8860 
8861       # Check if we try to supply an empty value
8862       if test "x$MV" = x; then
8863         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
8864 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
8865         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8866 $as_echo_n "checking for MV... " >&6; }
8867         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8868 $as_echo "disabled" >&6; }
8869       else
8870         # Check if the provided tool contains a complete path.
8871         tool_specified="$MV"
8872         tool_basename="${tool_specified##*/}"
8873         if test "x$tool_basename" = "x$tool_specified"; then
8874           # A command without a complete path is provided, search $PATH.
8875           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8876 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8877           # Extract the first word of "$tool_basename", so it can be a program name with args.
8878 set dummy $tool_basename; ac_word=$2
8879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8880 $as_echo_n "checking for $ac_word... " >&6; }
8881 if ${ac_cv_path_MV+:} false; then :
8882   $as_echo_n "(cached) " >&6
8883 else
8884   case $MV in
8885   [\\/]* | ?:[\\/]*)
8886   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8887   ;;
8888   *)
8889   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8890 for as_dir in $PATH
8891 do
8892   IFS=$as_save_IFS
8893   test -z "$as_dir" && as_dir=.
8894     for ac_exec_ext in '' $ac_executable_extensions; do
8895   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8896     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8897     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8898     break 2
8899   fi
8900 done
8901   done
8902 IFS=$as_save_IFS
8903 
8904   ;;
8905 esac
8906 fi
8907 MV=$ac_cv_path_MV
8908 if test -n "$MV"; then
8909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8910 $as_echo "$MV" >&6; }
8911 else
8912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8913 $as_echo "no" >&6; }
8914 fi
8915 
8916 
8917           if test "x$MV" = x; then
8918             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8919           fi
8920         else
8921           # Otherwise we believe it is a complete path. Use it as it is.
8922           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8923 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8924           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8925 $as_echo_n "checking for MV... " >&6; }
8926           if test ! -x "$tool_specified"; then
8927             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8928 $as_echo "not found" >&6; }
8929             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8930           fi
8931           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8932 $as_echo "$tool_specified" >&6; }
8933         fi
8934       fi
8935     fi
8936 
8937   fi
8938 
8939 
8940 
8941   if test "x$MV" = x; then
8942     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8943   fi
8944 
8945 
8946 
8947 
8948 
8949   # Publish this variable in the help.
8950 
8951 
8952   if [ -z "${NAWK+x}" ]; then
8953     # The variable is not set by user, try to locate tool using the code snippet
8954     for ac_prog in nawk gawk awk
8955 do
8956   # Extract the first word of "$ac_prog", so it can be a program name with args.
8957 set dummy $ac_prog; ac_word=$2
8958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8959 $as_echo_n "checking for $ac_word... " >&6; }
8960 if ${ac_cv_path_NAWK+:} false; then :
8961   $as_echo_n "(cached) " >&6
8962 else
8963   case $NAWK in
8964   [\\/]* | ?:[\\/]*)
8965   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8966   ;;
8967   *)
8968   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8969 for as_dir in $PATH
8970 do
8971   IFS=$as_save_IFS
8972   test -z "$as_dir" && as_dir=.
8973     for ac_exec_ext in '' $ac_executable_extensions; do
8974   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8975     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8976     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8977     break 2
8978   fi
8979 done
8980   done
8981 IFS=$as_save_IFS
8982 
8983   ;;
8984 esac
8985 fi
8986 NAWK=$ac_cv_path_NAWK
8987 if test -n "$NAWK"; then
8988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8989 $as_echo "$NAWK" >&6; }
8990 else
8991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8992 $as_echo "no" >&6; }
8993 fi
8994 
8995 
8996   test -n "$NAWK" && break
8997 done
8998 
8999   else
9000     # The variable is set, but is it from the command line or the environment?
9001 
9002     # Try to remove the string !NAWK! from our list.
9003     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9004     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9005       # If it failed, the variable was not from the command line. Ignore it,
9006       # but warn the user (except for BASH, which is always set by the calling BASH).
9007       if test "xNAWK" != xBASH; then
9008         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9009 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9010       fi
9011       # Try to locate tool using the code snippet
9012       for ac_prog in nawk gawk awk
9013 do
9014   # Extract the first word of "$ac_prog", so it can be a program name with args.
9015 set dummy $ac_prog; ac_word=$2
9016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9017 $as_echo_n "checking for $ac_word... " >&6; }
9018 if ${ac_cv_path_NAWK+:} false; then :
9019   $as_echo_n "(cached) " >&6
9020 else
9021   case $NAWK in
9022   [\\/]* | ?:[\\/]*)
9023   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9024   ;;
9025   *)
9026   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9027 for as_dir in $PATH
9028 do
9029   IFS=$as_save_IFS
9030   test -z "$as_dir" && as_dir=.
9031     for ac_exec_ext in '' $ac_executable_extensions; do
9032   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9033     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9034     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9035     break 2
9036   fi
9037 done
9038   done
9039 IFS=$as_save_IFS
9040 
9041   ;;
9042 esac
9043 fi
9044 NAWK=$ac_cv_path_NAWK
9045 if test -n "$NAWK"; then
9046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9047 $as_echo "$NAWK" >&6; }
9048 else
9049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9050 $as_echo "no" >&6; }
9051 fi
9052 
9053 
9054   test -n "$NAWK" && break
9055 done
9056 
9057     else
9058       # If it succeeded, then it was overridden by the user. We will use it
9059       # for the tool.
9060 
9061       # First remove it from the list of overridden variables, so we can test
9062       # for unknown variables in the end.
9063       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9064 
9065       # Check if we try to supply an empty value
9066       if test "x$NAWK" = x; then
9067         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9068 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9069         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9070 $as_echo_n "checking for NAWK... " >&6; }
9071         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9072 $as_echo "disabled" >&6; }
9073       else
9074         # Check if the provided tool contains a complete path.
9075         tool_specified="$NAWK"
9076         tool_basename="${tool_specified##*/}"
9077         if test "x$tool_basename" = "x$tool_specified"; then
9078           # A command without a complete path is provided, search $PATH.
9079           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9080 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9081           # Extract the first word of "$tool_basename", so it can be a program name with args.
9082 set dummy $tool_basename; ac_word=$2
9083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9084 $as_echo_n "checking for $ac_word... " >&6; }
9085 if ${ac_cv_path_NAWK+:} false; then :
9086   $as_echo_n "(cached) " >&6
9087 else
9088   case $NAWK in
9089   [\\/]* | ?:[\\/]*)
9090   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9091   ;;
9092   *)
9093   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9094 for as_dir in $PATH
9095 do
9096   IFS=$as_save_IFS
9097   test -z "$as_dir" && as_dir=.
9098     for ac_exec_ext in '' $ac_executable_extensions; do
9099   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9100     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9101     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9102     break 2
9103   fi
9104 done
9105   done
9106 IFS=$as_save_IFS
9107 
9108   ;;
9109 esac
9110 fi
9111 NAWK=$ac_cv_path_NAWK
9112 if test -n "$NAWK"; then
9113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9114 $as_echo "$NAWK" >&6; }
9115 else
9116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9117 $as_echo "no" >&6; }
9118 fi
9119 
9120 
9121           if test "x$NAWK" = x; then
9122             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9123           fi
9124         else
9125           # Otherwise we believe it is a complete path. Use it as it is.
9126           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9127 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9128           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9129 $as_echo_n "checking for NAWK... " >&6; }
9130           if test ! -x "$tool_specified"; then
9131             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9132 $as_echo "not found" >&6; }
9133             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9134           fi
9135           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9136 $as_echo "$tool_specified" >&6; }
9137         fi
9138       fi
9139     fi
9140 
9141   fi
9142 
9143 
9144 
9145   if test "x$NAWK" = x; then
9146     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9147   fi
9148 
9149 
9150 
9151 
9152 
9153   # Publish this variable in the help.
9154 
9155 
9156   if [ -z "${PRINTF+x}" ]; then
9157     # The variable is not set by user, try to locate tool using the code snippet
9158     for ac_prog in printf
9159 do
9160   # Extract the first word of "$ac_prog", so it can be a program name with args.
9161 set dummy $ac_prog; ac_word=$2
9162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9163 $as_echo_n "checking for $ac_word... " >&6; }
9164 if ${ac_cv_path_PRINTF+:} false; then :
9165   $as_echo_n "(cached) " >&6
9166 else
9167   case $PRINTF in
9168   [\\/]* | ?:[\\/]*)
9169   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9170   ;;
9171   *)
9172   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9173 for as_dir in $PATH
9174 do
9175   IFS=$as_save_IFS
9176   test -z "$as_dir" && as_dir=.
9177     for ac_exec_ext in '' $ac_executable_extensions; do
9178   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9179     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9180     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9181     break 2
9182   fi
9183 done
9184   done
9185 IFS=$as_save_IFS
9186 
9187   ;;
9188 esac
9189 fi
9190 PRINTF=$ac_cv_path_PRINTF
9191 if test -n "$PRINTF"; then
9192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9193 $as_echo "$PRINTF" >&6; }
9194 else
9195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9196 $as_echo "no" >&6; }
9197 fi
9198 
9199 
9200   test -n "$PRINTF" && break
9201 done
9202 
9203   else
9204     # The variable is set, but is it from the command line or the environment?
9205 
9206     # Try to remove the string !PRINTF! from our list.
9207     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9208     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9209       # If it failed, the variable was not from the command line. Ignore it,
9210       # but warn the user (except for BASH, which is always set by the calling BASH).
9211       if test "xPRINTF" != xBASH; then
9212         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9213 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9214       fi
9215       # Try to locate tool using the code snippet
9216       for ac_prog in printf
9217 do
9218   # Extract the first word of "$ac_prog", so it can be a program name with args.
9219 set dummy $ac_prog; ac_word=$2
9220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9221 $as_echo_n "checking for $ac_word... " >&6; }
9222 if ${ac_cv_path_PRINTF+:} false; then :
9223   $as_echo_n "(cached) " >&6
9224 else
9225   case $PRINTF in
9226   [\\/]* | ?:[\\/]*)
9227   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9228   ;;
9229   *)
9230   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9231 for as_dir in $PATH
9232 do
9233   IFS=$as_save_IFS
9234   test -z "$as_dir" && as_dir=.
9235     for ac_exec_ext in '' $ac_executable_extensions; do
9236   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9237     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9238     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9239     break 2
9240   fi
9241 done
9242   done
9243 IFS=$as_save_IFS
9244 
9245   ;;
9246 esac
9247 fi
9248 PRINTF=$ac_cv_path_PRINTF
9249 if test -n "$PRINTF"; then
9250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9251 $as_echo "$PRINTF" >&6; }
9252 else
9253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9254 $as_echo "no" >&6; }
9255 fi
9256 
9257 
9258   test -n "$PRINTF" && break
9259 done
9260 
9261     else
9262       # If it succeeded, then it was overridden by the user. We will use it
9263       # for the tool.
9264 
9265       # First remove it from the list of overridden variables, so we can test
9266       # for unknown variables in the end.
9267       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9268 
9269       # Check if we try to supply an empty value
9270       if test "x$PRINTF" = x; then
9271         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9272 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9273         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9274 $as_echo_n "checking for PRINTF... " >&6; }
9275         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9276 $as_echo "disabled" >&6; }
9277       else
9278         # Check if the provided tool contains a complete path.
9279         tool_specified="$PRINTF"
9280         tool_basename="${tool_specified##*/}"
9281         if test "x$tool_basename" = "x$tool_specified"; then
9282           # A command without a complete path is provided, search $PATH.
9283           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9284 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9285           # Extract the first word of "$tool_basename", so it can be a program name with args.
9286 set dummy $tool_basename; ac_word=$2
9287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9288 $as_echo_n "checking for $ac_word... " >&6; }
9289 if ${ac_cv_path_PRINTF+:} false; then :
9290   $as_echo_n "(cached) " >&6
9291 else
9292   case $PRINTF in
9293   [\\/]* | ?:[\\/]*)
9294   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9295   ;;
9296   *)
9297   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9298 for as_dir in $PATH
9299 do
9300   IFS=$as_save_IFS
9301   test -z "$as_dir" && as_dir=.
9302     for ac_exec_ext in '' $ac_executable_extensions; do
9303   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9304     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9305     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9306     break 2
9307   fi
9308 done
9309   done
9310 IFS=$as_save_IFS
9311 
9312   ;;
9313 esac
9314 fi
9315 PRINTF=$ac_cv_path_PRINTF
9316 if test -n "$PRINTF"; then
9317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9318 $as_echo "$PRINTF" >&6; }
9319 else
9320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9321 $as_echo "no" >&6; }
9322 fi
9323 
9324 
9325           if test "x$PRINTF" = x; then
9326             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9327           fi
9328         else
9329           # Otherwise we believe it is a complete path. Use it as it is.
9330           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9331 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9332           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9333 $as_echo_n "checking for PRINTF... " >&6; }
9334           if test ! -x "$tool_specified"; then
9335             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9336 $as_echo "not found" >&6; }
9337             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9338           fi
9339           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9340 $as_echo "$tool_specified" >&6; }
9341         fi
9342       fi
9343     fi
9344 
9345   fi
9346 
9347 
9348 
9349   if test "x$PRINTF" = x; then
9350     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9351   fi
9352 
9353 
9354 
9355 
9356 
9357   # Publish this variable in the help.
9358 
9359 
9360   if [ -z "${RM+x}" ]; then
9361     # The variable is not set by user, try to locate tool using the code snippet
9362     for ac_prog in rm
9363 do
9364   # Extract the first word of "$ac_prog", so it can be a program name with args.
9365 set dummy $ac_prog; ac_word=$2
9366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9367 $as_echo_n "checking for $ac_word... " >&6; }
9368 if ${ac_cv_path_RM+:} false; then :
9369   $as_echo_n "(cached) " >&6
9370 else
9371   case $RM in
9372   [\\/]* | ?:[\\/]*)
9373   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9374   ;;
9375   *)
9376   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9377 for as_dir in $PATH
9378 do
9379   IFS=$as_save_IFS
9380   test -z "$as_dir" && as_dir=.
9381     for ac_exec_ext in '' $ac_executable_extensions; do
9382   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9383     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9384     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9385     break 2
9386   fi
9387 done
9388   done
9389 IFS=$as_save_IFS
9390 
9391   ;;
9392 esac
9393 fi
9394 RM=$ac_cv_path_RM
9395 if test -n "$RM"; then
9396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9397 $as_echo "$RM" >&6; }
9398 else
9399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9400 $as_echo "no" >&6; }
9401 fi
9402 
9403 
9404   test -n "$RM" && break
9405 done
9406 
9407   else
9408     # The variable is set, but is it from the command line or the environment?
9409 
9410     # Try to remove the string !RM! from our list.
9411     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9412     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9413       # If it failed, the variable was not from the command line. Ignore it,
9414       # but warn the user (except for BASH, which is always set by the calling BASH).
9415       if test "xRM" != xBASH; then
9416         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9417 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9418       fi
9419       # Try to locate tool using the code snippet
9420       for ac_prog in rm
9421 do
9422   # Extract the first word of "$ac_prog", so it can be a program name with args.
9423 set dummy $ac_prog; ac_word=$2
9424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9425 $as_echo_n "checking for $ac_word... " >&6; }
9426 if ${ac_cv_path_RM+:} false; then :
9427   $as_echo_n "(cached) " >&6
9428 else
9429   case $RM in
9430   [\\/]* | ?:[\\/]*)
9431   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9432   ;;
9433   *)
9434   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9435 for as_dir in $PATH
9436 do
9437   IFS=$as_save_IFS
9438   test -z "$as_dir" && as_dir=.
9439     for ac_exec_ext in '' $ac_executable_extensions; do
9440   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9441     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9442     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9443     break 2
9444   fi
9445 done
9446   done
9447 IFS=$as_save_IFS
9448 
9449   ;;
9450 esac
9451 fi
9452 RM=$ac_cv_path_RM
9453 if test -n "$RM"; then
9454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9455 $as_echo "$RM" >&6; }
9456 else
9457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9458 $as_echo "no" >&6; }
9459 fi
9460 
9461 
9462   test -n "$RM" && break
9463 done
9464 
9465     else
9466       # If it succeeded, then it was overridden by the user. We will use it
9467       # for the tool.
9468 
9469       # First remove it from the list of overridden variables, so we can test
9470       # for unknown variables in the end.
9471       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9472 
9473       # Check if we try to supply an empty value
9474       if test "x$RM" = x; then
9475         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9476 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9477         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9478 $as_echo_n "checking for RM... " >&6; }
9479         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9480 $as_echo "disabled" >&6; }
9481       else
9482         # Check if the provided tool contains a complete path.
9483         tool_specified="$RM"
9484         tool_basename="${tool_specified##*/}"
9485         if test "x$tool_basename" = "x$tool_specified"; then
9486           # A command without a complete path is provided, search $PATH.
9487           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9488 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9489           # Extract the first word of "$tool_basename", so it can be a program name with args.
9490 set dummy $tool_basename; ac_word=$2
9491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9492 $as_echo_n "checking for $ac_word... " >&6; }
9493 if ${ac_cv_path_RM+:} false; then :
9494   $as_echo_n "(cached) " >&6
9495 else
9496   case $RM in
9497   [\\/]* | ?:[\\/]*)
9498   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9499   ;;
9500   *)
9501   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9502 for as_dir in $PATH
9503 do
9504   IFS=$as_save_IFS
9505   test -z "$as_dir" && as_dir=.
9506     for ac_exec_ext in '' $ac_executable_extensions; do
9507   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9508     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9510     break 2
9511   fi
9512 done
9513   done
9514 IFS=$as_save_IFS
9515 
9516   ;;
9517 esac
9518 fi
9519 RM=$ac_cv_path_RM
9520 if test -n "$RM"; then
9521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9522 $as_echo "$RM" >&6; }
9523 else
9524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9525 $as_echo "no" >&6; }
9526 fi
9527 
9528 
9529           if test "x$RM" = x; then
9530             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9531           fi
9532         else
9533           # Otherwise we believe it is a complete path. Use it as it is.
9534           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9535 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9536           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9537 $as_echo_n "checking for RM... " >&6; }
9538           if test ! -x "$tool_specified"; then
9539             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9540 $as_echo "not found" >&6; }
9541             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9542           fi
9543           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9544 $as_echo "$tool_specified" >&6; }
9545         fi
9546       fi
9547     fi
9548 
9549   fi
9550 
9551 
9552 
9553   if test "x$RM" = x; then
9554     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9555   fi
9556 
9557 
9558 
9559 
9560 
9561   # Publish this variable in the help.
9562 
9563 
9564   if [ -z "${RMDIR+x}" ]; then
9565     # The variable is not set by user, try to locate tool using the code snippet
9566     for ac_prog in rmdir
9567 do
9568   # Extract the first word of "$ac_prog", so it can be a program name with args.
9569 set dummy $ac_prog; ac_word=$2
9570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9571 $as_echo_n "checking for $ac_word... " >&6; }
9572 if ${ac_cv_path_RMDIR+:} false; then :
9573   $as_echo_n "(cached) " >&6
9574 else
9575   case $RMDIR in
9576   [\\/]* | ?:[\\/]*)
9577   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9578   ;;
9579   *)
9580   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9581 for as_dir in $PATH
9582 do
9583   IFS=$as_save_IFS
9584   test -z "$as_dir" && as_dir=.
9585     for ac_exec_ext in '' $ac_executable_extensions; do
9586   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9587     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9588     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9589     break 2
9590   fi
9591 done
9592   done
9593 IFS=$as_save_IFS
9594 
9595   ;;
9596 esac
9597 fi
9598 RMDIR=$ac_cv_path_RMDIR
9599 if test -n "$RMDIR"; then
9600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9601 $as_echo "$RMDIR" >&6; }
9602 else
9603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9604 $as_echo "no" >&6; }
9605 fi
9606 
9607 
9608   test -n "$RMDIR" && break
9609 done
9610 
9611   else
9612     # The variable is set, but is it from the command line or the environment?
9613 
9614     # Try to remove the string !RMDIR! from our list.
9615     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9616     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9617       # If it failed, the variable was not from the command line. Ignore it,
9618       # but warn the user (except for BASH, which is always set by the calling BASH).
9619       if test "xRMDIR" != xBASH; then
9620         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9621 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9622       fi
9623       # Try to locate tool using the code snippet
9624       for ac_prog in rmdir
9625 do
9626   # Extract the first word of "$ac_prog", so it can be a program name with args.
9627 set dummy $ac_prog; ac_word=$2
9628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9629 $as_echo_n "checking for $ac_word... " >&6; }
9630 if ${ac_cv_path_RMDIR+:} false; then :
9631   $as_echo_n "(cached) " >&6
9632 else
9633   case $RMDIR in
9634   [\\/]* | ?:[\\/]*)
9635   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9636   ;;
9637   *)
9638   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9639 for as_dir in $PATH
9640 do
9641   IFS=$as_save_IFS
9642   test -z "$as_dir" && as_dir=.
9643     for ac_exec_ext in '' $ac_executable_extensions; do
9644   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9645     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9646     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9647     break 2
9648   fi
9649 done
9650   done
9651 IFS=$as_save_IFS
9652 
9653   ;;
9654 esac
9655 fi
9656 RMDIR=$ac_cv_path_RMDIR
9657 if test -n "$RMDIR"; then
9658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9659 $as_echo "$RMDIR" >&6; }
9660 else
9661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9662 $as_echo "no" >&6; }
9663 fi
9664 
9665 
9666   test -n "$RMDIR" && break
9667 done
9668 
9669     else
9670       # If it succeeded, then it was overridden by the user. We will use it
9671       # for the tool.
9672 
9673       # First remove it from the list of overridden variables, so we can test
9674       # for unknown variables in the end.
9675       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9676 
9677       # Check if we try to supply an empty value
9678       if test "x$RMDIR" = x; then
9679         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9680 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9681         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9682 $as_echo_n "checking for RMDIR... " >&6; }
9683         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9684 $as_echo "disabled" >&6; }
9685       else
9686         # Check if the provided tool contains a complete path.
9687         tool_specified="$RMDIR"
9688         tool_basename="${tool_specified##*/}"
9689         if test "x$tool_basename" = "x$tool_specified"; then
9690           # A command without a complete path is provided, search $PATH.
9691           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9692 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9693           # Extract the first word of "$tool_basename", so it can be a program name with args.
9694 set dummy $tool_basename; ac_word=$2
9695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9696 $as_echo_n "checking for $ac_word... " >&6; }
9697 if ${ac_cv_path_RMDIR+:} false; then :
9698   $as_echo_n "(cached) " >&6
9699 else
9700   case $RMDIR in
9701   [\\/]* | ?:[\\/]*)
9702   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9703   ;;
9704   *)
9705   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9706 for as_dir in $PATH
9707 do
9708   IFS=$as_save_IFS
9709   test -z "$as_dir" && as_dir=.
9710     for ac_exec_ext in '' $ac_executable_extensions; do
9711   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9712     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9713     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9714     break 2
9715   fi
9716 done
9717   done
9718 IFS=$as_save_IFS
9719 
9720   ;;
9721 esac
9722 fi
9723 RMDIR=$ac_cv_path_RMDIR
9724 if test -n "$RMDIR"; then
9725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9726 $as_echo "$RMDIR" >&6; }
9727 else
9728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9729 $as_echo "no" >&6; }
9730 fi
9731 
9732 
9733           if test "x$RMDIR" = x; then
9734             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9735           fi
9736         else
9737           # Otherwise we believe it is a complete path. Use it as it is.
9738           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9739 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9740           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9741 $as_echo_n "checking for RMDIR... " >&6; }
9742           if test ! -x "$tool_specified"; then
9743             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9744 $as_echo "not found" >&6; }
9745             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9746           fi
9747           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9748 $as_echo "$tool_specified" >&6; }
9749         fi
9750       fi
9751     fi
9752 
9753   fi
9754 
9755 
9756 
9757   if test "x$RMDIR" = x; then
9758     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9759   fi
9760 
9761 
9762 
9763 
9764 
9765   # Publish this variable in the help.
9766 
9767 
9768   if [ -z "${SH+x}" ]; then
9769     # The variable is not set by user, try to locate tool using the code snippet
9770     for ac_prog in sh
9771 do
9772   # Extract the first word of "$ac_prog", so it can be a program name with args.
9773 set dummy $ac_prog; ac_word=$2
9774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9775 $as_echo_n "checking for $ac_word... " >&6; }
9776 if ${ac_cv_path_SH+:} false; then :
9777   $as_echo_n "(cached) " >&6
9778 else
9779   case $SH in
9780   [\\/]* | ?:[\\/]*)
9781   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9782   ;;
9783   *)
9784   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9785 for as_dir in $PATH
9786 do
9787   IFS=$as_save_IFS
9788   test -z "$as_dir" && as_dir=.
9789     for ac_exec_ext in '' $ac_executable_extensions; do
9790   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9791     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9792     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9793     break 2
9794   fi
9795 done
9796   done
9797 IFS=$as_save_IFS
9798 
9799   ;;
9800 esac
9801 fi
9802 SH=$ac_cv_path_SH
9803 if test -n "$SH"; then
9804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9805 $as_echo "$SH" >&6; }
9806 else
9807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9808 $as_echo "no" >&6; }
9809 fi
9810 
9811 
9812   test -n "$SH" && break
9813 done
9814 
9815   else
9816     # The variable is set, but is it from the command line or the environment?
9817 
9818     # Try to remove the string !SH! from our list.
9819     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9820     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9821       # If it failed, the variable was not from the command line. Ignore it,
9822       # but warn the user (except for BASH, which is always set by the calling BASH).
9823       if test "xSH" != xBASH; then
9824         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9825 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9826       fi
9827       # Try to locate tool using the code snippet
9828       for ac_prog in sh
9829 do
9830   # Extract the first word of "$ac_prog", so it can be a program name with args.
9831 set dummy $ac_prog; ac_word=$2
9832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9833 $as_echo_n "checking for $ac_word... " >&6; }
9834 if ${ac_cv_path_SH+:} false; then :
9835   $as_echo_n "(cached) " >&6
9836 else
9837   case $SH in
9838   [\\/]* | ?:[\\/]*)
9839   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9840   ;;
9841   *)
9842   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9843 for as_dir in $PATH
9844 do
9845   IFS=$as_save_IFS
9846   test -z "$as_dir" && as_dir=.
9847     for ac_exec_ext in '' $ac_executable_extensions; do
9848   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9849     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9850     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9851     break 2
9852   fi
9853 done
9854   done
9855 IFS=$as_save_IFS
9856 
9857   ;;
9858 esac
9859 fi
9860 SH=$ac_cv_path_SH
9861 if test -n "$SH"; then
9862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9863 $as_echo "$SH" >&6; }
9864 else
9865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9866 $as_echo "no" >&6; }
9867 fi
9868 
9869 
9870   test -n "$SH" && break
9871 done
9872 
9873     else
9874       # If it succeeded, then it was overridden by the user. We will use it
9875       # for the tool.
9876 
9877       # First remove it from the list of overridden variables, so we can test
9878       # for unknown variables in the end.
9879       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9880 
9881       # Check if we try to supply an empty value
9882       if test "x$SH" = x; then
9883         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
9884 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
9885         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9886 $as_echo_n "checking for SH... " >&6; }
9887         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9888 $as_echo "disabled" >&6; }
9889       else
9890         # Check if the provided tool contains a complete path.
9891         tool_specified="$SH"
9892         tool_basename="${tool_specified##*/}"
9893         if test "x$tool_basename" = "x$tool_specified"; then
9894           # A command without a complete path is provided, search $PATH.
9895           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9896 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9897           # Extract the first word of "$tool_basename", so it can be a program name with args.
9898 set dummy $tool_basename; ac_word=$2
9899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9900 $as_echo_n "checking for $ac_word... " >&6; }
9901 if ${ac_cv_path_SH+:} false; then :
9902   $as_echo_n "(cached) " >&6
9903 else
9904   case $SH in
9905   [\\/]* | ?:[\\/]*)
9906   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9907   ;;
9908   *)
9909   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9910 for as_dir in $PATH
9911 do
9912   IFS=$as_save_IFS
9913   test -z "$as_dir" && as_dir=.
9914     for ac_exec_ext in '' $ac_executable_extensions; do
9915   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9916     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9917     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9918     break 2
9919   fi
9920 done
9921   done
9922 IFS=$as_save_IFS
9923 
9924   ;;
9925 esac
9926 fi
9927 SH=$ac_cv_path_SH
9928 if test -n "$SH"; then
9929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9930 $as_echo "$SH" >&6; }
9931 else
9932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9933 $as_echo "no" >&6; }
9934 fi
9935 
9936 
9937           if test "x$SH" = x; then
9938             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9939           fi
9940         else
9941           # Otherwise we believe it is a complete path. Use it as it is.
9942           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9943 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9944           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9945 $as_echo_n "checking for SH... " >&6; }
9946           if test ! -x "$tool_specified"; then
9947             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9948 $as_echo "not found" >&6; }
9949             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9950           fi
9951           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9952 $as_echo "$tool_specified" >&6; }
9953         fi
9954       fi
9955     fi
9956 
9957   fi
9958 
9959 
9960 
9961   if test "x$SH" = x; then
9962     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9963   fi
9964 
9965 
9966 
9967 
9968 
9969   # Publish this variable in the help.
9970 
9971 
9972   if [ -z "${SORT+x}" ]; then
9973     # The variable is not set by user, try to locate tool using the code snippet
9974     for ac_prog in sort
9975 do
9976   # Extract the first word of "$ac_prog", so it can be a program name with args.
9977 set dummy $ac_prog; ac_word=$2
9978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9979 $as_echo_n "checking for $ac_word... " >&6; }
9980 if ${ac_cv_path_SORT+:} false; then :
9981   $as_echo_n "(cached) " >&6
9982 else
9983   case $SORT in
9984   [\\/]* | ?:[\\/]*)
9985   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9986   ;;
9987   *)
9988   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9989 for as_dir in $PATH
9990 do
9991   IFS=$as_save_IFS
9992   test -z "$as_dir" && as_dir=.
9993     for ac_exec_ext in '' $ac_executable_extensions; do
9994   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9995     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9996     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9997     break 2
9998   fi
9999 done
10000   done
10001 IFS=$as_save_IFS
10002 
10003   ;;
10004 esac
10005 fi
10006 SORT=$ac_cv_path_SORT
10007 if test -n "$SORT"; then
10008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10009 $as_echo "$SORT" >&6; }
10010 else
10011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10012 $as_echo "no" >&6; }
10013 fi
10014 
10015 
10016   test -n "$SORT" && break
10017 done
10018 
10019   else
10020     # The variable is set, but is it from the command line or the environment?
10021 
10022     # Try to remove the string !SORT! from our list.
10023     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10024     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10025       # If it failed, the variable was not from the command line. Ignore it,
10026       # but warn the user (except for BASH, which is always set by the calling BASH).
10027       if test "xSORT" != xBASH; then
10028         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10029 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10030       fi
10031       # Try to locate tool using the code snippet
10032       for ac_prog in sort
10033 do
10034   # Extract the first word of "$ac_prog", so it can be a program name with args.
10035 set dummy $ac_prog; ac_word=$2
10036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10037 $as_echo_n "checking for $ac_word... " >&6; }
10038 if ${ac_cv_path_SORT+:} false; then :
10039   $as_echo_n "(cached) " >&6
10040 else
10041   case $SORT in
10042   [\\/]* | ?:[\\/]*)
10043   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10044   ;;
10045   *)
10046   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10047 for as_dir in $PATH
10048 do
10049   IFS=$as_save_IFS
10050   test -z "$as_dir" && as_dir=.
10051     for ac_exec_ext in '' $ac_executable_extensions; do
10052   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10053     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10054     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10055     break 2
10056   fi
10057 done
10058   done
10059 IFS=$as_save_IFS
10060 
10061   ;;
10062 esac
10063 fi
10064 SORT=$ac_cv_path_SORT
10065 if test -n "$SORT"; then
10066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10067 $as_echo "$SORT" >&6; }
10068 else
10069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10070 $as_echo "no" >&6; }
10071 fi
10072 
10073 
10074   test -n "$SORT" && break
10075 done
10076 
10077     else
10078       # If it succeeded, then it was overridden by the user. We will use it
10079       # for the tool.
10080 
10081       # First remove it from the list of overridden variables, so we can test
10082       # for unknown variables in the end.
10083       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10084 
10085       # Check if we try to supply an empty value
10086       if test "x$SORT" = x; then
10087         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10088 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10089         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10090 $as_echo_n "checking for SORT... " >&6; }
10091         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10092 $as_echo "disabled" >&6; }
10093       else
10094         # Check if the provided tool contains a complete path.
10095         tool_specified="$SORT"
10096         tool_basename="${tool_specified##*/}"
10097         if test "x$tool_basename" = "x$tool_specified"; then
10098           # A command without a complete path is provided, search $PATH.
10099           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10100 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10101           # Extract the first word of "$tool_basename", so it can be a program name with args.
10102 set dummy $tool_basename; ac_word=$2
10103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10104 $as_echo_n "checking for $ac_word... " >&6; }
10105 if ${ac_cv_path_SORT+:} false; then :
10106   $as_echo_n "(cached) " >&6
10107 else
10108   case $SORT in
10109   [\\/]* | ?:[\\/]*)
10110   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10111   ;;
10112   *)
10113   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10114 for as_dir in $PATH
10115 do
10116   IFS=$as_save_IFS
10117   test -z "$as_dir" && as_dir=.
10118     for ac_exec_ext in '' $ac_executable_extensions; do
10119   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10120     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10122     break 2
10123   fi
10124 done
10125   done
10126 IFS=$as_save_IFS
10127 
10128   ;;
10129 esac
10130 fi
10131 SORT=$ac_cv_path_SORT
10132 if test -n "$SORT"; then
10133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10134 $as_echo "$SORT" >&6; }
10135 else
10136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10137 $as_echo "no" >&6; }
10138 fi
10139 
10140 
10141           if test "x$SORT" = x; then
10142             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10143           fi
10144         else
10145           # Otherwise we believe it is a complete path. Use it as it is.
10146           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10147 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10148           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10149 $as_echo_n "checking for SORT... " >&6; }
10150           if test ! -x "$tool_specified"; then
10151             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10152 $as_echo "not found" >&6; }
10153             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10154           fi
10155           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10156 $as_echo "$tool_specified" >&6; }
10157         fi
10158       fi
10159     fi
10160 
10161   fi
10162 
10163 
10164 
10165   if test "x$SORT" = x; then
10166     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10167   fi
10168 
10169 
10170 
10171 
10172 
10173   # Publish this variable in the help.
10174 
10175 
10176   if [ -z "${TAIL+x}" ]; then
10177     # The variable is not set by user, try to locate tool using the code snippet
10178     for ac_prog in tail
10179 do
10180   # Extract the first word of "$ac_prog", so it can be a program name with args.
10181 set dummy $ac_prog; ac_word=$2
10182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10183 $as_echo_n "checking for $ac_word... " >&6; }
10184 if ${ac_cv_path_TAIL+:} false; then :
10185   $as_echo_n "(cached) " >&6
10186 else
10187   case $TAIL in
10188   [\\/]* | ?:[\\/]*)
10189   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10190   ;;
10191   *)
10192   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10193 for as_dir in $PATH
10194 do
10195   IFS=$as_save_IFS
10196   test -z "$as_dir" && as_dir=.
10197     for ac_exec_ext in '' $ac_executable_extensions; do
10198   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10199     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10200     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10201     break 2
10202   fi
10203 done
10204   done
10205 IFS=$as_save_IFS
10206 
10207   ;;
10208 esac
10209 fi
10210 TAIL=$ac_cv_path_TAIL
10211 if test -n "$TAIL"; then
10212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10213 $as_echo "$TAIL" >&6; }
10214 else
10215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10216 $as_echo "no" >&6; }
10217 fi
10218 
10219 
10220   test -n "$TAIL" && break
10221 done
10222 
10223   else
10224     # The variable is set, but is it from the command line or the environment?
10225 
10226     # Try to remove the string !TAIL! from our list.
10227     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10228     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10229       # If it failed, the variable was not from the command line. Ignore it,
10230       # but warn the user (except for BASH, which is always set by the calling BASH).
10231       if test "xTAIL" != xBASH; then
10232         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10233 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10234       fi
10235       # Try to locate tool using the code snippet
10236       for ac_prog in tail
10237 do
10238   # Extract the first word of "$ac_prog", so it can be a program name with args.
10239 set dummy $ac_prog; ac_word=$2
10240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10241 $as_echo_n "checking for $ac_word... " >&6; }
10242 if ${ac_cv_path_TAIL+:} false; then :
10243   $as_echo_n "(cached) " >&6
10244 else
10245   case $TAIL in
10246   [\\/]* | ?:[\\/]*)
10247   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10248   ;;
10249   *)
10250   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10251 for as_dir in $PATH
10252 do
10253   IFS=$as_save_IFS
10254   test -z "$as_dir" && as_dir=.
10255     for ac_exec_ext in '' $ac_executable_extensions; do
10256   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10257     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10258     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10259     break 2
10260   fi
10261 done
10262   done
10263 IFS=$as_save_IFS
10264 
10265   ;;
10266 esac
10267 fi
10268 TAIL=$ac_cv_path_TAIL
10269 if test -n "$TAIL"; then
10270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10271 $as_echo "$TAIL" >&6; }
10272 else
10273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10274 $as_echo "no" >&6; }
10275 fi
10276 
10277 
10278   test -n "$TAIL" && break
10279 done
10280 
10281     else
10282       # If it succeeded, then it was overridden by the user. We will use it
10283       # for the tool.
10284 
10285       # First remove it from the list of overridden variables, so we can test
10286       # for unknown variables in the end.
10287       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10288 
10289       # Check if we try to supply an empty value
10290       if test "x$TAIL" = x; then
10291         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10292 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10293         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10294 $as_echo_n "checking for TAIL... " >&6; }
10295         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10296 $as_echo "disabled" >&6; }
10297       else
10298         # Check if the provided tool contains a complete path.
10299         tool_specified="$TAIL"
10300         tool_basename="${tool_specified##*/}"
10301         if test "x$tool_basename" = "x$tool_specified"; then
10302           # A command without a complete path is provided, search $PATH.
10303           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10304 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10305           # Extract the first word of "$tool_basename", so it can be a program name with args.
10306 set dummy $tool_basename; ac_word=$2
10307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10308 $as_echo_n "checking for $ac_word... " >&6; }
10309 if ${ac_cv_path_TAIL+:} false; then :
10310   $as_echo_n "(cached) " >&6
10311 else
10312   case $TAIL in
10313   [\\/]* | ?:[\\/]*)
10314   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10315   ;;
10316   *)
10317   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10318 for as_dir in $PATH
10319 do
10320   IFS=$as_save_IFS
10321   test -z "$as_dir" && as_dir=.
10322     for ac_exec_ext in '' $ac_executable_extensions; do
10323   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10324     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10325     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10326     break 2
10327   fi
10328 done
10329   done
10330 IFS=$as_save_IFS
10331 
10332   ;;
10333 esac
10334 fi
10335 TAIL=$ac_cv_path_TAIL
10336 if test -n "$TAIL"; then
10337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10338 $as_echo "$TAIL" >&6; }
10339 else
10340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10341 $as_echo "no" >&6; }
10342 fi
10343 
10344 
10345           if test "x$TAIL" = x; then
10346             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10347           fi
10348         else
10349           # Otherwise we believe it is a complete path. Use it as it is.
10350           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10351 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10352           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10353 $as_echo_n "checking for TAIL... " >&6; }
10354           if test ! -x "$tool_specified"; then
10355             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10356 $as_echo "not found" >&6; }
10357             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10358           fi
10359           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10360 $as_echo "$tool_specified" >&6; }
10361         fi
10362       fi
10363     fi
10364 
10365   fi
10366 
10367 
10368 
10369   if test "x$TAIL" = x; then
10370     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10371   fi
10372 
10373 
10374 
10375 
10376 
10377   # Publish this variable in the help.
10378 
10379 
10380   if [ -z "${TAR+x}" ]; then
10381     # The variable is not set by user, try to locate tool using the code snippet
10382     for ac_prog in tar
10383 do
10384   # Extract the first word of "$ac_prog", so it can be a program name with args.
10385 set dummy $ac_prog; ac_word=$2
10386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10387 $as_echo_n "checking for $ac_word... " >&6; }
10388 if ${ac_cv_path_TAR+:} false; then :
10389   $as_echo_n "(cached) " >&6
10390 else
10391   case $TAR in
10392   [\\/]* | ?:[\\/]*)
10393   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10394   ;;
10395   *)
10396   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10397 for as_dir in $PATH
10398 do
10399   IFS=$as_save_IFS
10400   test -z "$as_dir" && as_dir=.
10401     for ac_exec_ext in '' $ac_executable_extensions; do
10402   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10403     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10404     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10405     break 2
10406   fi
10407 done
10408   done
10409 IFS=$as_save_IFS
10410 
10411   ;;
10412 esac
10413 fi
10414 TAR=$ac_cv_path_TAR
10415 if test -n "$TAR"; then
10416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10417 $as_echo "$TAR" >&6; }
10418 else
10419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10420 $as_echo "no" >&6; }
10421 fi
10422 
10423 
10424   test -n "$TAR" && break
10425 done
10426 
10427   else
10428     # The variable is set, but is it from the command line or the environment?
10429 
10430     # Try to remove the string !TAR! from our list.
10431     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10432     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10433       # If it failed, the variable was not from the command line. Ignore it,
10434       # but warn the user (except for BASH, which is always set by the calling BASH).
10435       if test "xTAR" != xBASH; then
10436         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10437 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10438       fi
10439       # Try to locate tool using the code snippet
10440       for ac_prog in tar
10441 do
10442   # Extract the first word of "$ac_prog", so it can be a program name with args.
10443 set dummy $ac_prog; ac_word=$2
10444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10445 $as_echo_n "checking for $ac_word... " >&6; }
10446 if ${ac_cv_path_TAR+:} false; then :
10447   $as_echo_n "(cached) " >&6
10448 else
10449   case $TAR in
10450   [\\/]* | ?:[\\/]*)
10451   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10452   ;;
10453   *)
10454   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10455 for as_dir in $PATH
10456 do
10457   IFS=$as_save_IFS
10458   test -z "$as_dir" && as_dir=.
10459     for ac_exec_ext in '' $ac_executable_extensions; do
10460   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10461     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10462     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10463     break 2
10464   fi
10465 done
10466   done
10467 IFS=$as_save_IFS
10468 
10469   ;;
10470 esac
10471 fi
10472 TAR=$ac_cv_path_TAR
10473 if test -n "$TAR"; then
10474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10475 $as_echo "$TAR" >&6; }
10476 else
10477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10478 $as_echo "no" >&6; }
10479 fi
10480 
10481 
10482   test -n "$TAR" && break
10483 done
10484 
10485     else
10486       # If it succeeded, then it was overridden by the user. We will use it
10487       # for the tool.
10488 
10489       # First remove it from the list of overridden variables, so we can test
10490       # for unknown variables in the end.
10491       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10492 
10493       # Check if we try to supply an empty value
10494       if test "x$TAR" = x; then
10495         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10496 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10497         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10498 $as_echo_n "checking for TAR... " >&6; }
10499         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10500 $as_echo "disabled" >&6; }
10501       else
10502         # Check if the provided tool contains a complete path.
10503         tool_specified="$TAR"
10504         tool_basename="${tool_specified##*/}"
10505         if test "x$tool_basename" = "x$tool_specified"; then
10506           # A command without a complete path is provided, search $PATH.
10507           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10508 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10509           # Extract the first word of "$tool_basename", so it can be a program name with args.
10510 set dummy $tool_basename; ac_word=$2
10511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10512 $as_echo_n "checking for $ac_word... " >&6; }
10513 if ${ac_cv_path_TAR+:} false; then :
10514   $as_echo_n "(cached) " >&6
10515 else
10516   case $TAR in
10517   [\\/]* | ?:[\\/]*)
10518   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10519   ;;
10520   *)
10521   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10522 for as_dir in $PATH
10523 do
10524   IFS=$as_save_IFS
10525   test -z "$as_dir" && as_dir=.
10526     for ac_exec_ext in '' $ac_executable_extensions; do
10527   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10528     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10529     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10530     break 2
10531   fi
10532 done
10533   done
10534 IFS=$as_save_IFS
10535 
10536   ;;
10537 esac
10538 fi
10539 TAR=$ac_cv_path_TAR
10540 if test -n "$TAR"; then
10541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10542 $as_echo "$TAR" >&6; }
10543 else
10544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10545 $as_echo "no" >&6; }
10546 fi
10547 
10548 
10549           if test "x$TAR" = x; then
10550             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10551           fi
10552         else
10553           # Otherwise we believe it is a complete path. Use it as it is.
10554           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10555 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10556           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10557 $as_echo_n "checking for TAR... " >&6; }
10558           if test ! -x "$tool_specified"; then
10559             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10560 $as_echo "not found" >&6; }
10561             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10562           fi
10563           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10564 $as_echo "$tool_specified" >&6; }
10565         fi
10566       fi
10567     fi
10568 
10569   fi
10570 
10571 
10572 
10573   if test "x$TAR" = x; then
10574     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10575   fi
10576 
10577 
10578 
10579 
10580 
10581   # Publish this variable in the help.
10582 
10583 
10584   if [ -z "${TEE+x}" ]; then
10585     # The variable is not set by user, try to locate tool using the code snippet
10586     for ac_prog in tee
10587 do
10588   # Extract the first word of "$ac_prog", so it can be a program name with args.
10589 set dummy $ac_prog; ac_word=$2
10590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10591 $as_echo_n "checking for $ac_word... " >&6; }
10592 if ${ac_cv_path_TEE+:} false; then :
10593   $as_echo_n "(cached) " >&6
10594 else
10595   case $TEE in
10596   [\\/]* | ?:[\\/]*)
10597   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10598   ;;
10599   *)
10600   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10601 for as_dir in $PATH
10602 do
10603   IFS=$as_save_IFS
10604   test -z "$as_dir" && as_dir=.
10605     for ac_exec_ext in '' $ac_executable_extensions; do
10606   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10607     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10608     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10609     break 2
10610   fi
10611 done
10612   done
10613 IFS=$as_save_IFS
10614 
10615   ;;
10616 esac
10617 fi
10618 TEE=$ac_cv_path_TEE
10619 if test -n "$TEE"; then
10620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10621 $as_echo "$TEE" >&6; }
10622 else
10623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10624 $as_echo "no" >&6; }
10625 fi
10626 
10627 
10628   test -n "$TEE" && break
10629 done
10630 
10631   else
10632     # The variable is set, but is it from the command line or the environment?
10633 
10634     # Try to remove the string !TEE! from our list.
10635     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10636     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10637       # If it failed, the variable was not from the command line. Ignore it,
10638       # but warn the user (except for BASH, which is always set by the calling BASH).
10639       if test "xTEE" != xBASH; then
10640         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10641 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10642       fi
10643       # Try to locate tool using the code snippet
10644       for ac_prog in tee
10645 do
10646   # Extract the first word of "$ac_prog", so it can be a program name with args.
10647 set dummy $ac_prog; ac_word=$2
10648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10649 $as_echo_n "checking for $ac_word... " >&6; }
10650 if ${ac_cv_path_TEE+:} false; then :
10651   $as_echo_n "(cached) " >&6
10652 else
10653   case $TEE in
10654   [\\/]* | ?:[\\/]*)
10655   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10656   ;;
10657   *)
10658   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10659 for as_dir in $PATH
10660 do
10661   IFS=$as_save_IFS
10662   test -z "$as_dir" && as_dir=.
10663     for ac_exec_ext in '' $ac_executable_extensions; do
10664   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10665     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10666     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10667     break 2
10668   fi
10669 done
10670   done
10671 IFS=$as_save_IFS
10672 
10673   ;;
10674 esac
10675 fi
10676 TEE=$ac_cv_path_TEE
10677 if test -n "$TEE"; then
10678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10679 $as_echo "$TEE" >&6; }
10680 else
10681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10682 $as_echo "no" >&6; }
10683 fi
10684 
10685 
10686   test -n "$TEE" && break
10687 done
10688 
10689     else
10690       # If it succeeded, then it was overridden by the user. We will use it
10691       # for the tool.
10692 
10693       # First remove it from the list of overridden variables, so we can test
10694       # for unknown variables in the end.
10695       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10696 
10697       # Check if we try to supply an empty value
10698       if test "x$TEE" = x; then
10699         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10700 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10701         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10702 $as_echo_n "checking for TEE... " >&6; }
10703         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10704 $as_echo "disabled" >&6; }
10705       else
10706         # Check if the provided tool contains a complete path.
10707         tool_specified="$TEE"
10708         tool_basename="${tool_specified##*/}"
10709         if test "x$tool_basename" = "x$tool_specified"; then
10710           # A command without a complete path is provided, search $PATH.
10711           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10712 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10713           # Extract the first word of "$tool_basename", so it can be a program name with args.
10714 set dummy $tool_basename; ac_word=$2
10715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10716 $as_echo_n "checking for $ac_word... " >&6; }
10717 if ${ac_cv_path_TEE+:} false; then :
10718   $as_echo_n "(cached) " >&6
10719 else
10720   case $TEE in
10721   [\\/]* | ?:[\\/]*)
10722   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10723   ;;
10724   *)
10725   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10726 for as_dir in $PATH
10727 do
10728   IFS=$as_save_IFS
10729   test -z "$as_dir" && as_dir=.
10730     for ac_exec_ext in '' $ac_executable_extensions; do
10731   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10732     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10733     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10734     break 2
10735   fi
10736 done
10737   done
10738 IFS=$as_save_IFS
10739 
10740   ;;
10741 esac
10742 fi
10743 TEE=$ac_cv_path_TEE
10744 if test -n "$TEE"; then
10745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10746 $as_echo "$TEE" >&6; }
10747 else
10748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10749 $as_echo "no" >&6; }
10750 fi
10751 
10752 
10753           if test "x$TEE" = x; then
10754             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10755           fi
10756         else
10757           # Otherwise we believe it is a complete path. Use it as it is.
10758           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10759 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10760           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10761 $as_echo_n "checking for TEE... " >&6; }
10762           if test ! -x "$tool_specified"; then
10763             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10764 $as_echo "not found" >&6; }
10765             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10766           fi
10767           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10768 $as_echo "$tool_specified" >&6; }
10769         fi
10770       fi
10771     fi
10772 
10773   fi
10774 
10775 
10776 
10777   if test "x$TEE" = x; then
10778     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10779   fi
10780 
10781 
10782 
10783 
10784 
10785   # Publish this variable in the help.
10786 
10787 
10788   if [ -z "${TOUCH+x}" ]; then
10789     # The variable is not set by user, try to locate tool using the code snippet
10790     for ac_prog in touch
10791 do
10792   # Extract the first word of "$ac_prog", so it can be a program name with args.
10793 set dummy $ac_prog; ac_word=$2
10794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10795 $as_echo_n "checking for $ac_word... " >&6; }
10796 if ${ac_cv_path_TOUCH+:} false; then :
10797   $as_echo_n "(cached) " >&6
10798 else
10799   case $TOUCH in
10800   [\\/]* | ?:[\\/]*)
10801   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10802   ;;
10803   *)
10804   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10805 for as_dir in $PATH
10806 do
10807   IFS=$as_save_IFS
10808   test -z "$as_dir" && as_dir=.
10809     for ac_exec_ext in '' $ac_executable_extensions; do
10810   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10811     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10812     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10813     break 2
10814   fi
10815 done
10816   done
10817 IFS=$as_save_IFS
10818 
10819   ;;
10820 esac
10821 fi
10822 TOUCH=$ac_cv_path_TOUCH
10823 if test -n "$TOUCH"; then
10824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10825 $as_echo "$TOUCH" >&6; }
10826 else
10827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10828 $as_echo "no" >&6; }
10829 fi
10830 
10831 
10832   test -n "$TOUCH" && break
10833 done
10834 
10835   else
10836     # The variable is set, but is it from the command line or the environment?
10837 
10838     # Try to remove the string !TOUCH! from our list.
10839     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10840     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10841       # If it failed, the variable was not from the command line. Ignore it,
10842       # but warn the user (except for BASH, which is always set by the calling BASH).
10843       if test "xTOUCH" != xBASH; then
10844         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10845 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10846       fi
10847       # Try to locate tool using the code snippet
10848       for ac_prog in touch
10849 do
10850   # Extract the first word of "$ac_prog", so it can be a program name with args.
10851 set dummy $ac_prog; ac_word=$2
10852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10853 $as_echo_n "checking for $ac_word... " >&6; }
10854 if ${ac_cv_path_TOUCH+:} false; then :
10855   $as_echo_n "(cached) " >&6
10856 else
10857   case $TOUCH in
10858   [\\/]* | ?:[\\/]*)
10859   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10860   ;;
10861   *)
10862   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10863 for as_dir in $PATH
10864 do
10865   IFS=$as_save_IFS
10866   test -z "$as_dir" && as_dir=.
10867     for ac_exec_ext in '' $ac_executable_extensions; do
10868   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10869     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10870     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10871     break 2
10872   fi
10873 done
10874   done
10875 IFS=$as_save_IFS
10876 
10877   ;;
10878 esac
10879 fi
10880 TOUCH=$ac_cv_path_TOUCH
10881 if test -n "$TOUCH"; then
10882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10883 $as_echo "$TOUCH" >&6; }
10884 else
10885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10886 $as_echo "no" >&6; }
10887 fi
10888 
10889 
10890   test -n "$TOUCH" && break
10891 done
10892 
10893     else
10894       # If it succeeded, then it was overridden by the user. We will use it
10895       # for the tool.
10896 
10897       # First remove it from the list of overridden variables, so we can test
10898       # for unknown variables in the end.
10899       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10900 
10901       # Check if we try to supply an empty value
10902       if test "x$TOUCH" = x; then
10903         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
10904 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
10905         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10906 $as_echo_n "checking for TOUCH... " >&6; }
10907         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10908 $as_echo "disabled" >&6; }
10909       else
10910         # Check if the provided tool contains a complete path.
10911         tool_specified="$TOUCH"
10912         tool_basename="${tool_specified##*/}"
10913         if test "x$tool_basename" = "x$tool_specified"; then
10914           # A command without a complete path is provided, search $PATH.
10915           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10916 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10917           # Extract the first word of "$tool_basename", so it can be a program name with args.
10918 set dummy $tool_basename; ac_word=$2
10919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10920 $as_echo_n "checking for $ac_word... " >&6; }
10921 if ${ac_cv_path_TOUCH+:} false; then :
10922   $as_echo_n "(cached) " >&6
10923 else
10924   case $TOUCH in
10925   [\\/]* | ?:[\\/]*)
10926   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10927   ;;
10928   *)
10929   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10930 for as_dir in $PATH
10931 do
10932   IFS=$as_save_IFS
10933   test -z "$as_dir" && as_dir=.
10934     for ac_exec_ext in '' $ac_executable_extensions; do
10935   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10936     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10937     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10938     break 2
10939   fi
10940 done
10941   done
10942 IFS=$as_save_IFS
10943 
10944   ;;
10945 esac
10946 fi
10947 TOUCH=$ac_cv_path_TOUCH
10948 if test -n "$TOUCH"; then
10949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10950 $as_echo "$TOUCH" >&6; }
10951 else
10952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10953 $as_echo "no" >&6; }
10954 fi
10955 
10956 
10957           if test "x$TOUCH" = x; then
10958             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10959           fi
10960         else
10961           # Otherwise we believe it is a complete path. Use it as it is.
10962           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10963 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10964           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10965 $as_echo_n "checking for TOUCH... " >&6; }
10966           if test ! -x "$tool_specified"; then
10967             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10968 $as_echo "not found" >&6; }
10969             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10970           fi
10971           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10972 $as_echo "$tool_specified" >&6; }
10973         fi
10974       fi
10975     fi
10976 
10977   fi
10978 
10979 
10980 
10981   if test "x$TOUCH" = x; then
10982     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10983   fi
10984 
10985 
10986 
10987 
10988 
10989   # Publish this variable in the help.
10990 
10991 
10992   if [ -z "${TR+x}" ]; then
10993     # The variable is not set by user, try to locate tool using the code snippet
10994     for ac_prog in tr
10995 do
10996   # Extract the first word of "$ac_prog", so it can be a program name with args.
10997 set dummy $ac_prog; ac_word=$2
10998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10999 $as_echo_n "checking for $ac_word... " >&6; }
11000 if ${ac_cv_path_TR+:} false; then :
11001   $as_echo_n "(cached) " >&6
11002 else
11003   case $TR in
11004   [\\/]* | ?:[\\/]*)
11005   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11006   ;;
11007   *)
11008   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11009 for as_dir in $PATH
11010 do
11011   IFS=$as_save_IFS
11012   test -z "$as_dir" && as_dir=.
11013     for ac_exec_ext in '' $ac_executable_extensions; do
11014   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11015     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11016     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11017     break 2
11018   fi
11019 done
11020   done
11021 IFS=$as_save_IFS
11022 
11023   ;;
11024 esac
11025 fi
11026 TR=$ac_cv_path_TR
11027 if test -n "$TR"; then
11028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11029 $as_echo "$TR" >&6; }
11030 else
11031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11032 $as_echo "no" >&6; }
11033 fi
11034 
11035 
11036   test -n "$TR" && break
11037 done
11038 
11039   else
11040     # The variable is set, but is it from the command line or the environment?
11041 
11042     # Try to remove the string !TR! from our list.
11043     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11044     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11045       # If it failed, the variable was not from the command line. Ignore it,
11046       # but warn the user (except for BASH, which is always set by the calling BASH).
11047       if test "xTR" != xBASH; then
11048         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11049 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11050       fi
11051       # Try to locate tool using the code snippet
11052       for ac_prog in tr
11053 do
11054   # Extract the first word of "$ac_prog", so it can be a program name with args.
11055 set dummy $ac_prog; ac_word=$2
11056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11057 $as_echo_n "checking for $ac_word... " >&6; }
11058 if ${ac_cv_path_TR+:} false; then :
11059   $as_echo_n "(cached) " >&6
11060 else
11061   case $TR in
11062   [\\/]* | ?:[\\/]*)
11063   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11064   ;;
11065   *)
11066   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11067 for as_dir in $PATH
11068 do
11069   IFS=$as_save_IFS
11070   test -z "$as_dir" && as_dir=.
11071     for ac_exec_ext in '' $ac_executable_extensions; do
11072   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11073     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11074     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11075     break 2
11076   fi
11077 done
11078   done
11079 IFS=$as_save_IFS
11080 
11081   ;;
11082 esac
11083 fi
11084 TR=$ac_cv_path_TR
11085 if test -n "$TR"; then
11086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11087 $as_echo "$TR" >&6; }
11088 else
11089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11090 $as_echo "no" >&6; }
11091 fi
11092 
11093 
11094   test -n "$TR" && break
11095 done
11096 
11097     else
11098       # If it succeeded, then it was overridden by the user. We will use it
11099       # for the tool.
11100 
11101       # First remove it from the list of overridden variables, so we can test
11102       # for unknown variables in the end.
11103       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11104 
11105       # Check if we try to supply an empty value
11106       if test "x$TR" = x; then
11107         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11108 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11109         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11110 $as_echo_n "checking for TR... " >&6; }
11111         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11112 $as_echo "disabled" >&6; }
11113       else
11114         # Check if the provided tool contains a complete path.
11115         tool_specified="$TR"
11116         tool_basename="${tool_specified##*/}"
11117         if test "x$tool_basename" = "x$tool_specified"; then
11118           # A command without a complete path is provided, search $PATH.
11119           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11120 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11121           # Extract the first word of "$tool_basename", so it can be a program name with args.
11122 set dummy $tool_basename; ac_word=$2
11123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11124 $as_echo_n "checking for $ac_word... " >&6; }
11125 if ${ac_cv_path_TR+:} false; then :
11126   $as_echo_n "(cached) " >&6
11127 else
11128   case $TR in
11129   [\\/]* | ?:[\\/]*)
11130   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11131   ;;
11132   *)
11133   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11134 for as_dir in $PATH
11135 do
11136   IFS=$as_save_IFS
11137   test -z "$as_dir" && as_dir=.
11138     for ac_exec_ext in '' $ac_executable_extensions; do
11139   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11140     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11141     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11142     break 2
11143   fi
11144 done
11145   done
11146 IFS=$as_save_IFS
11147 
11148   ;;
11149 esac
11150 fi
11151 TR=$ac_cv_path_TR
11152 if test -n "$TR"; then
11153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11154 $as_echo "$TR" >&6; }
11155 else
11156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11157 $as_echo "no" >&6; }
11158 fi
11159 
11160 
11161           if test "x$TR" = x; then
11162             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11163           fi
11164         else
11165           # Otherwise we believe it is a complete path. Use it as it is.
11166           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11167 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11168           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11169 $as_echo_n "checking for TR... " >&6; }
11170           if test ! -x "$tool_specified"; then
11171             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11172 $as_echo "not found" >&6; }
11173             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11174           fi
11175           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11176 $as_echo "$tool_specified" >&6; }
11177         fi
11178       fi
11179     fi
11180 
11181   fi
11182 
11183 
11184 
11185   if test "x$TR" = x; then
11186     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11187   fi
11188 
11189 
11190 
11191 
11192 
11193   # Publish this variable in the help.
11194 
11195 
11196   if [ -z "${UNAME+x}" ]; then
11197     # The variable is not set by user, try to locate tool using the code snippet
11198     for ac_prog in uname
11199 do
11200   # Extract the first word of "$ac_prog", so it can be a program name with args.
11201 set dummy $ac_prog; ac_word=$2
11202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11203 $as_echo_n "checking for $ac_word... " >&6; }
11204 if ${ac_cv_path_UNAME+:} false; then :
11205   $as_echo_n "(cached) " >&6
11206 else
11207   case $UNAME in
11208   [\\/]* | ?:[\\/]*)
11209   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11210   ;;
11211   *)
11212   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11213 for as_dir in $PATH
11214 do
11215   IFS=$as_save_IFS
11216   test -z "$as_dir" && as_dir=.
11217     for ac_exec_ext in '' $ac_executable_extensions; do
11218   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11219     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11220     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11221     break 2
11222   fi
11223 done
11224   done
11225 IFS=$as_save_IFS
11226 
11227   ;;
11228 esac
11229 fi
11230 UNAME=$ac_cv_path_UNAME
11231 if test -n "$UNAME"; then
11232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11233 $as_echo "$UNAME" >&6; }
11234 else
11235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11236 $as_echo "no" >&6; }
11237 fi
11238 
11239 
11240   test -n "$UNAME" && break
11241 done
11242 
11243   else
11244     # The variable is set, but is it from the command line or the environment?
11245 
11246     # Try to remove the string !UNAME! from our list.
11247     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11248     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11249       # If it failed, the variable was not from the command line. Ignore it,
11250       # but warn the user (except for BASH, which is always set by the calling BASH).
11251       if test "xUNAME" != xBASH; then
11252         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11253 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11254       fi
11255       # Try to locate tool using the code snippet
11256       for ac_prog in uname
11257 do
11258   # Extract the first word of "$ac_prog", so it can be a program name with args.
11259 set dummy $ac_prog; ac_word=$2
11260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11261 $as_echo_n "checking for $ac_word... " >&6; }
11262 if ${ac_cv_path_UNAME+:} false; then :
11263   $as_echo_n "(cached) " >&6
11264 else
11265   case $UNAME in
11266   [\\/]* | ?:[\\/]*)
11267   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11268   ;;
11269   *)
11270   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11271 for as_dir in $PATH
11272 do
11273   IFS=$as_save_IFS
11274   test -z "$as_dir" && as_dir=.
11275     for ac_exec_ext in '' $ac_executable_extensions; do
11276   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11277     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11278     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11279     break 2
11280   fi
11281 done
11282   done
11283 IFS=$as_save_IFS
11284 
11285   ;;
11286 esac
11287 fi
11288 UNAME=$ac_cv_path_UNAME
11289 if test -n "$UNAME"; then
11290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11291 $as_echo "$UNAME" >&6; }
11292 else
11293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11294 $as_echo "no" >&6; }
11295 fi
11296 
11297 
11298   test -n "$UNAME" && break
11299 done
11300 
11301     else
11302       # If it succeeded, then it was overridden by the user. We will use it
11303       # for the tool.
11304 
11305       # First remove it from the list of overridden variables, so we can test
11306       # for unknown variables in the end.
11307       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11308 
11309       # Check if we try to supply an empty value
11310       if test "x$UNAME" = x; then
11311         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11312 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11313         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11314 $as_echo_n "checking for UNAME... " >&6; }
11315         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11316 $as_echo "disabled" >&6; }
11317       else
11318         # Check if the provided tool contains a complete path.
11319         tool_specified="$UNAME"
11320         tool_basename="${tool_specified##*/}"
11321         if test "x$tool_basename" = "x$tool_specified"; then
11322           # A command without a complete path is provided, search $PATH.
11323           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11324 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11325           # Extract the first word of "$tool_basename", so it can be a program name with args.
11326 set dummy $tool_basename; ac_word=$2
11327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11328 $as_echo_n "checking for $ac_word... " >&6; }
11329 if ${ac_cv_path_UNAME+:} false; then :
11330   $as_echo_n "(cached) " >&6
11331 else
11332   case $UNAME in
11333   [\\/]* | ?:[\\/]*)
11334   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11335   ;;
11336   *)
11337   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11338 for as_dir in $PATH
11339 do
11340   IFS=$as_save_IFS
11341   test -z "$as_dir" && as_dir=.
11342     for ac_exec_ext in '' $ac_executable_extensions; do
11343   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11344     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11345     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11346     break 2
11347   fi
11348 done
11349   done
11350 IFS=$as_save_IFS
11351 
11352   ;;
11353 esac
11354 fi
11355 UNAME=$ac_cv_path_UNAME
11356 if test -n "$UNAME"; then
11357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11358 $as_echo "$UNAME" >&6; }
11359 else
11360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11361 $as_echo "no" >&6; }
11362 fi
11363 
11364 
11365           if test "x$UNAME" = x; then
11366             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11367           fi
11368         else
11369           # Otherwise we believe it is a complete path. Use it as it is.
11370           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11371 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11372           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11373 $as_echo_n "checking for UNAME... " >&6; }
11374           if test ! -x "$tool_specified"; then
11375             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11376 $as_echo "not found" >&6; }
11377             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11378           fi
11379           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11380 $as_echo "$tool_specified" >&6; }
11381         fi
11382       fi
11383     fi
11384 
11385   fi
11386 
11387 
11388 
11389   if test "x$UNAME" = x; then
11390     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11391   fi
11392 
11393 
11394 
11395 
11396 
11397   # Publish this variable in the help.
11398 
11399 
11400   if [ -z "${UNIQ+x}" ]; then
11401     # The variable is not set by user, try to locate tool using the code snippet
11402     for ac_prog in uniq
11403 do
11404   # Extract the first word of "$ac_prog", so it can be a program name with args.
11405 set dummy $ac_prog; ac_word=$2
11406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11407 $as_echo_n "checking for $ac_word... " >&6; }
11408 if ${ac_cv_path_UNIQ+:} false; then :
11409   $as_echo_n "(cached) " >&6
11410 else
11411   case $UNIQ in
11412   [\\/]* | ?:[\\/]*)
11413   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11414   ;;
11415   *)
11416   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11417 for as_dir in $PATH
11418 do
11419   IFS=$as_save_IFS
11420   test -z "$as_dir" && as_dir=.
11421     for ac_exec_ext in '' $ac_executable_extensions; do
11422   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11423     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11424     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11425     break 2
11426   fi
11427 done
11428   done
11429 IFS=$as_save_IFS
11430 
11431   ;;
11432 esac
11433 fi
11434 UNIQ=$ac_cv_path_UNIQ
11435 if test -n "$UNIQ"; then
11436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11437 $as_echo "$UNIQ" >&6; }
11438 else
11439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11440 $as_echo "no" >&6; }
11441 fi
11442 
11443 
11444   test -n "$UNIQ" && break
11445 done
11446 
11447   else
11448     # The variable is set, but is it from the command line or the environment?
11449 
11450     # Try to remove the string !UNIQ! from our list.
11451     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11452     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11453       # If it failed, the variable was not from the command line. Ignore it,
11454       # but warn the user (except for BASH, which is always set by the calling BASH).
11455       if test "xUNIQ" != xBASH; then
11456         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11457 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11458       fi
11459       # Try to locate tool using the code snippet
11460       for ac_prog in uniq
11461 do
11462   # Extract the first word of "$ac_prog", so it can be a program name with args.
11463 set dummy $ac_prog; ac_word=$2
11464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11465 $as_echo_n "checking for $ac_word... " >&6; }
11466 if ${ac_cv_path_UNIQ+:} false; then :
11467   $as_echo_n "(cached) " >&6
11468 else
11469   case $UNIQ in
11470   [\\/]* | ?:[\\/]*)
11471   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11472   ;;
11473   *)
11474   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11475 for as_dir in $PATH
11476 do
11477   IFS=$as_save_IFS
11478   test -z "$as_dir" && as_dir=.
11479     for ac_exec_ext in '' $ac_executable_extensions; do
11480   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11481     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11482     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11483     break 2
11484   fi
11485 done
11486   done
11487 IFS=$as_save_IFS
11488 
11489   ;;
11490 esac
11491 fi
11492 UNIQ=$ac_cv_path_UNIQ
11493 if test -n "$UNIQ"; then
11494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11495 $as_echo "$UNIQ" >&6; }
11496 else
11497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11498 $as_echo "no" >&6; }
11499 fi
11500 
11501 
11502   test -n "$UNIQ" && break
11503 done
11504 
11505     else
11506       # If it succeeded, then it was overridden by the user. We will use it
11507       # for the tool.
11508 
11509       # First remove it from the list of overridden variables, so we can test
11510       # for unknown variables in the end.
11511       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11512 
11513       # Check if we try to supply an empty value
11514       if test "x$UNIQ" = x; then
11515         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11516 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11517         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11518 $as_echo_n "checking for UNIQ... " >&6; }
11519         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11520 $as_echo "disabled" >&6; }
11521       else
11522         # Check if the provided tool contains a complete path.
11523         tool_specified="$UNIQ"
11524         tool_basename="${tool_specified##*/}"
11525         if test "x$tool_basename" = "x$tool_specified"; then
11526           # A command without a complete path is provided, search $PATH.
11527           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11528 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11529           # Extract the first word of "$tool_basename", so it can be a program name with args.
11530 set dummy $tool_basename; ac_word=$2
11531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11532 $as_echo_n "checking for $ac_word... " >&6; }
11533 if ${ac_cv_path_UNIQ+:} false; then :
11534   $as_echo_n "(cached) " >&6
11535 else
11536   case $UNIQ in
11537   [\\/]* | ?:[\\/]*)
11538   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11539   ;;
11540   *)
11541   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11542 for as_dir in $PATH
11543 do
11544   IFS=$as_save_IFS
11545   test -z "$as_dir" && as_dir=.
11546     for ac_exec_ext in '' $ac_executable_extensions; do
11547   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11548     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11549     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11550     break 2
11551   fi
11552 done
11553   done
11554 IFS=$as_save_IFS
11555 
11556   ;;
11557 esac
11558 fi
11559 UNIQ=$ac_cv_path_UNIQ
11560 if test -n "$UNIQ"; then
11561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11562 $as_echo "$UNIQ" >&6; }
11563 else
11564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11565 $as_echo "no" >&6; }
11566 fi
11567 
11568 
11569           if test "x$UNIQ" = x; then
11570             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11571           fi
11572         else
11573           # Otherwise we believe it is a complete path. Use it as it is.
11574           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11575 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11576           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11577 $as_echo_n "checking for UNIQ... " >&6; }
11578           if test ! -x "$tool_specified"; then
11579             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11580 $as_echo "not found" >&6; }
11581             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11582           fi
11583           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11584 $as_echo "$tool_specified" >&6; }
11585         fi
11586       fi
11587     fi
11588 
11589   fi
11590 
11591 
11592 
11593   if test "x$UNIQ" = x; then
11594     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11595   fi
11596 
11597 
11598 
11599 
11600 
11601   # Publish this variable in the help.
11602 
11603 
11604   if [ -z "${WC+x}" ]; then
11605     # The variable is not set by user, try to locate tool using the code snippet
11606     for ac_prog in wc
11607 do
11608   # Extract the first word of "$ac_prog", so it can be a program name with args.
11609 set dummy $ac_prog; ac_word=$2
11610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11611 $as_echo_n "checking for $ac_word... " >&6; }
11612 if ${ac_cv_path_WC+:} false; then :
11613   $as_echo_n "(cached) " >&6
11614 else
11615   case $WC in
11616   [\\/]* | ?:[\\/]*)
11617   ac_cv_path_WC="$WC" # Let the user override the test with a path.
11618   ;;
11619   *)
11620   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11621 for as_dir in $PATH
11622 do
11623   IFS=$as_save_IFS
11624   test -z "$as_dir" && as_dir=.
11625     for ac_exec_ext in '' $ac_executable_extensions; do
11626   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11627     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11628     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11629     break 2
11630   fi
11631 done
11632   done
11633 IFS=$as_save_IFS
11634 
11635   ;;
11636 esac
11637 fi
11638 WC=$ac_cv_path_WC
11639 if test -n "$WC"; then
11640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11641 $as_echo "$WC" >&6; }
11642 else
11643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11644 $as_echo "no" >&6; }
11645 fi
11646 
11647 
11648   test -n "$WC" && break
11649 done
11650 
11651   else
11652     # The variable is set, but is it from the command line or the environment?
11653 
11654     # Try to remove the string !WC! from our list.
11655     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11656     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11657       # If it failed, the variable was not from the command line. Ignore it,
11658       # but warn the user (except for BASH, which is always set by the calling BASH).
11659       if test "xWC" != xBASH; then
11660         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11661 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11662       fi
11663       # Try to locate tool using the code snippet
11664       for ac_prog in wc
11665 do
11666   # Extract the first word of "$ac_prog", so it can be a program name with args.
11667 set dummy $ac_prog; ac_word=$2
11668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11669 $as_echo_n "checking for $ac_word... " >&6; }
11670 if ${ac_cv_path_WC+:} false; then :
11671   $as_echo_n "(cached) " >&6
11672 else
11673   case $WC in
11674   [\\/]* | ?:[\\/]*)
11675   ac_cv_path_WC="$WC" # Let the user override the test with a path.
11676   ;;
11677   *)
11678   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11679 for as_dir in $PATH
11680 do
11681   IFS=$as_save_IFS
11682   test -z "$as_dir" && as_dir=.
11683     for ac_exec_ext in '' $ac_executable_extensions; do
11684   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11685     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11686     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11687     break 2
11688   fi
11689 done
11690   done
11691 IFS=$as_save_IFS
11692 
11693   ;;
11694 esac
11695 fi
11696 WC=$ac_cv_path_WC
11697 if test -n "$WC"; then
11698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11699 $as_echo "$WC" >&6; }
11700 else
11701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11702 $as_echo "no" >&6; }
11703 fi
11704 
11705 
11706   test -n "$WC" && break
11707 done
11708 
11709     else
11710       # If it succeeded, then it was overridden by the user. We will use it
11711       # for the tool.
11712 
11713       # First remove it from the list of overridden variables, so we can test
11714       # for unknown variables in the end.
11715       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11716 
11717       # Check if we try to supply an empty value
11718       if test "x$WC" = x; then
11719         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11720 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11721         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11722 $as_echo_n "checking for WC... " >&6; }
11723         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11724 $as_echo "disabled" >&6; }
11725       else
11726         # Check if the provided tool contains a complete path.
11727         tool_specified="$WC"
11728         tool_basename="${tool_specified##*/}"
11729         if test "x$tool_basename" = "x$tool_specified"; then
11730           # A command without a complete path is provided, search $PATH.
11731           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11732 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11733           # Extract the first word of "$tool_basename", so it can be a program name with args.
11734 set dummy $tool_basename; ac_word=$2
11735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11736 $as_echo_n "checking for $ac_word... " >&6; }
11737 if ${ac_cv_path_WC+:} false; then :
11738   $as_echo_n "(cached) " >&6
11739 else
11740   case $WC in
11741   [\\/]* | ?:[\\/]*)
11742   ac_cv_path_WC="$WC" # Let the user override the test with a path.
11743   ;;
11744   *)
11745   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11746 for as_dir in $PATH
11747 do
11748   IFS=$as_save_IFS
11749   test -z "$as_dir" && as_dir=.
11750     for ac_exec_ext in '' $ac_executable_extensions; do
11751   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11752     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11753     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11754     break 2
11755   fi
11756 done
11757   done
11758 IFS=$as_save_IFS
11759 
11760   ;;
11761 esac
11762 fi
11763 WC=$ac_cv_path_WC
11764 if test -n "$WC"; then
11765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11766 $as_echo "$WC" >&6; }
11767 else
11768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11769 $as_echo "no" >&6; }
11770 fi
11771 
11772 
11773           if test "x$WC" = x; then
11774             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11775           fi
11776         else
11777           # Otherwise we believe it is a complete path. Use it as it is.
11778           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11779 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11780           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11781 $as_echo_n "checking for WC... " >&6; }
11782           if test ! -x "$tool_specified"; then
11783             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11784 $as_echo "not found" >&6; }
11785             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11786           fi
11787           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11788 $as_echo "$tool_specified" >&6; }
11789         fi
11790       fi
11791     fi
11792 
11793   fi
11794 
11795 
11796 
11797   if test "x$WC" = x; then
11798     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11799   fi
11800 
11801 
11802 
11803 
11804 
11805   # Publish this variable in the help.
11806 
11807 
11808   if [ -z "${WHICH+x}" ]; then
11809     # The variable is not set by user, try to locate tool using the code snippet
11810     for ac_prog in which
11811 do
11812   # Extract the first word of "$ac_prog", so it can be a program name with args.
11813 set dummy $ac_prog; ac_word=$2
11814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11815 $as_echo_n "checking for $ac_word... " >&6; }
11816 if ${ac_cv_path_WHICH+:} false; then :
11817   $as_echo_n "(cached) " >&6
11818 else
11819   case $WHICH in
11820   [\\/]* | ?:[\\/]*)
11821   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11822   ;;
11823   *)
11824   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11825 for as_dir in $PATH
11826 do
11827   IFS=$as_save_IFS
11828   test -z "$as_dir" && as_dir=.
11829     for ac_exec_ext in '' $ac_executable_extensions; do
11830   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11831     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11832     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11833     break 2
11834   fi
11835 done
11836   done
11837 IFS=$as_save_IFS
11838 
11839   ;;
11840 esac
11841 fi
11842 WHICH=$ac_cv_path_WHICH
11843 if test -n "$WHICH"; then
11844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11845 $as_echo "$WHICH" >&6; }
11846 else
11847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11848 $as_echo "no" >&6; }
11849 fi
11850 
11851 
11852   test -n "$WHICH" && break
11853 done
11854 
11855   else
11856     # The variable is set, but is it from the command line or the environment?
11857 
11858     # Try to remove the string !WHICH! from our list.
11859     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11860     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11861       # If it failed, the variable was not from the command line. Ignore it,
11862       # but warn the user (except for BASH, which is always set by the calling BASH).
11863       if test "xWHICH" != xBASH; then
11864         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11865 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11866       fi
11867       # Try to locate tool using the code snippet
11868       for ac_prog in which
11869 do
11870   # Extract the first word of "$ac_prog", so it can be a program name with args.
11871 set dummy $ac_prog; ac_word=$2
11872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11873 $as_echo_n "checking for $ac_word... " >&6; }
11874 if ${ac_cv_path_WHICH+:} false; then :
11875   $as_echo_n "(cached) " >&6
11876 else
11877   case $WHICH in
11878   [\\/]* | ?:[\\/]*)
11879   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11880   ;;
11881   *)
11882   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11883 for as_dir in $PATH
11884 do
11885   IFS=$as_save_IFS
11886   test -z "$as_dir" && as_dir=.
11887     for ac_exec_ext in '' $ac_executable_extensions; do
11888   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11889     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11890     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11891     break 2
11892   fi
11893 done
11894   done
11895 IFS=$as_save_IFS
11896 
11897   ;;
11898 esac
11899 fi
11900 WHICH=$ac_cv_path_WHICH
11901 if test -n "$WHICH"; then
11902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11903 $as_echo "$WHICH" >&6; }
11904 else
11905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11906 $as_echo "no" >&6; }
11907 fi
11908 
11909 
11910   test -n "$WHICH" && break
11911 done
11912 
11913     else
11914       # If it succeeded, then it was overridden by the user. We will use it
11915       # for the tool.
11916 
11917       # First remove it from the list of overridden variables, so we can test
11918       # for unknown variables in the end.
11919       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11920 
11921       # Check if we try to supply an empty value
11922       if test "x$WHICH" = x; then
11923         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
11924 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
11925         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11926 $as_echo_n "checking for WHICH... " >&6; }
11927         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11928 $as_echo "disabled" >&6; }
11929       else
11930         # Check if the provided tool contains a complete path.
11931         tool_specified="$WHICH"
11932         tool_basename="${tool_specified##*/}"
11933         if test "x$tool_basename" = "x$tool_specified"; then
11934           # A command without a complete path is provided, search $PATH.
11935           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11936 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11937           # Extract the first word of "$tool_basename", so it can be a program name with args.
11938 set dummy $tool_basename; ac_word=$2
11939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11940 $as_echo_n "checking for $ac_word... " >&6; }
11941 if ${ac_cv_path_WHICH+:} false; then :
11942   $as_echo_n "(cached) " >&6
11943 else
11944   case $WHICH in
11945   [\\/]* | ?:[\\/]*)
11946   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11947   ;;
11948   *)
11949   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11950 for as_dir in $PATH
11951 do
11952   IFS=$as_save_IFS
11953   test -z "$as_dir" && as_dir=.
11954     for ac_exec_ext in '' $ac_executable_extensions; do
11955   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11956     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11957     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11958     break 2
11959   fi
11960 done
11961   done
11962 IFS=$as_save_IFS
11963 
11964   ;;
11965 esac
11966 fi
11967 WHICH=$ac_cv_path_WHICH
11968 if test -n "$WHICH"; then
11969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11970 $as_echo "$WHICH" >&6; }
11971 else
11972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11973 $as_echo "no" >&6; }
11974 fi
11975 
11976 
11977           if test "x$WHICH" = x; then
11978             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11979           fi
11980         else
11981           # Otherwise we believe it is a complete path. Use it as it is.
11982           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11983 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11984           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11985 $as_echo_n "checking for WHICH... " >&6; }
11986           if test ! -x "$tool_specified"; then
11987             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11988 $as_echo "not found" >&6; }
11989             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11990           fi
11991           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11992 $as_echo "$tool_specified" >&6; }
11993         fi
11994       fi
11995     fi
11996 
11997   fi
11998 
11999 
12000 
12001   if test "x$WHICH" = x; then
12002     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12003   fi
12004 
12005 
12006 
12007 
12008 
12009   # Publish this variable in the help.
12010 
12011 
12012   if [ -z "${XARGS+x}" ]; then
12013     # The variable is not set by user, try to locate tool using the code snippet
12014     for ac_prog in xargs
12015 do
12016   # Extract the first word of "$ac_prog", so it can be a program name with args.
12017 set dummy $ac_prog; ac_word=$2
12018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12019 $as_echo_n "checking for $ac_word... " >&6; }
12020 if ${ac_cv_path_XARGS+:} false; then :
12021   $as_echo_n "(cached) " >&6
12022 else
12023   case $XARGS in
12024   [\\/]* | ?:[\\/]*)
12025   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12026   ;;
12027   *)
12028   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12029 for as_dir in $PATH
12030 do
12031   IFS=$as_save_IFS
12032   test -z "$as_dir" && as_dir=.
12033     for ac_exec_ext in '' $ac_executable_extensions; do
12034   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12035     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12036     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12037     break 2
12038   fi
12039 done
12040   done
12041 IFS=$as_save_IFS
12042 
12043   ;;
12044 esac
12045 fi
12046 XARGS=$ac_cv_path_XARGS
12047 if test -n "$XARGS"; then
12048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12049 $as_echo "$XARGS" >&6; }
12050 else
12051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12052 $as_echo "no" >&6; }
12053 fi
12054 
12055 
12056   test -n "$XARGS" && break
12057 done
12058 
12059   else
12060     # The variable is set, but is it from the command line or the environment?
12061 
12062     # Try to remove the string !XARGS! from our list.
12063     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12064     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12065       # If it failed, the variable was not from the command line. Ignore it,
12066       # but warn the user (except for BASH, which is always set by the calling BASH).
12067       if test "xXARGS" != xBASH; then
12068         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12069 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12070       fi
12071       # Try to locate tool using the code snippet
12072       for ac_prog in xargs
12073 do
12074   # Extract the first word of "$ac_prog", so it can be a program name with args.
12075 set dummy $ac_prog; ac_word=$2
12076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12077 $as_echo_n "checking for $ac_word... " >&6; }
12078 if ${ac_cv_path_XARGS+:} false; then :
12079   $as_echo_n "(cached) " >&6
12080 else
12081   case $XARGS in
12082   [\\/]* | ?:[\\/]*)
12083   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12084   ;;
12085   *)
12086   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12087 for as_dir in $PATH
12088 do
12089   IFS=$as_save_IFS
12090   test -z "$as_dir" && as_dir=.
12091     for ac_exec_ext in '' $ac_executable_extensions; do
12092   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12093     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12094     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12095     break 2
12096   fi
12097 done
12098   done
12099 IFS=$as_save_IFS
12100 
12101   ;;
12102 esac
12103 fi
12104 XARGS=$ac_cv_path_XARGS
12105 if test -n "$XARGS"; then
12106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12107 $as_echo "$XARGS" >&6; }
12108 else
12109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12110 $as_echo "no" >&6; }
12111 fi
12112 
12113 
12114   test -n "$XARGS" && break
12115 done
12116 
12117     else
12118       # If it succeeded, then it was overridden by the user. We will use it
12119       # for the tool.
12120 
12121       # First remove it from the list of overridden variables, so we can test
12122       # for unknown variables in the end.
12123       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12124 
12125       # Check if we try to supply an empty value
12126       if test "x$XARGS" = x; then
12127         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12128 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12129         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12130 $as_echo_n "checking for XARGS... " >&6; }
12131         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12132 $as_echo "disabled" >&6; }
12133       else
12134         # Check if the provided tool contains a complete path.
12135         tool_specified="$XARGS"
12136         tool_basename="${tool_specified##*/}"
12137         if test "x$tool_basename" = "x$tool_specified"; then
12138           # A command without a complete path is provided, search $PATH.
12139           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12140 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12141           # Extract the first word of "$tool_basename", so it can be a program name with args.
12142 set dummy $tool_basename; ac_word=$2
12143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12144 $as_echo_n "checking for $ac_word... " >&6; }
12145 if ${ac_cv_path_XARGS+:} false; then :
12146   $as_echo_n "(cached) " >&6
12147 else
12148   case $XARGS in
12149   [\\/]* | ?:[\\/]*)
12150   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12151   ;;
12152   *)
12153   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12154 for as_dir in $PATH
12155 do
12156   IFS=$as_save_IFS
12157   test -z "$as_dir" && as_dir=.
12158     for ac_exec_ext in '' $ac_executable_extensions; do
12159   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12160     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12161     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12162     break 2
12163   fi
12164 done
12165   done
12166 IFS=$as_save_IFS
12167 
12168   ;;
12169 esac
12170 fi
12171 XARGS=$ac_cv_path_XARGS
12172 if test -n "$XARGS"; then
12173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12174 $as_echo "$XARGS" >&6; }
12175 else
12176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12177 $as_echo "no" >&6; }
12178 fi
12179 
12180 
12181           if test "x$XARGS" = x; then
12182             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12183           fi
12184         else
12185           # Otherwise we believe it is a complete path. Use it as it is.
12186           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12187 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12188           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12189 $as_echo_n "checking for XARGS... " >&6; }
12190           if test ! -x "$tool_specified"; then
12191             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12192 $as_echo "not found" >&6; }
12193             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12194           fi
12195           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12196 $as_echo "$tool_specified" >&6; }
12197         fi
12198       fi
12199     fi
12200 
12201   fi
12202 
12203 
12204 
12205   if test "x$XARGS" = x; then
12206     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12207   fi
12208 
12209 
12210 
12211   # Then required tools that require some special treatment.
12212 
12213 
12214   # Publish this variable in the help.
12215 
12216 
12217   if [ -z "${AWK+x}" ]; then
12218     # The variable is not set by user, try to locate tool using the code snippet
12219     for ac_prog in gawk mawk nawk awk
12220 do
12221   # Extract the first word of "$ac_prog", so it can be a program name with args.
12222 set dummy $ac_prog; ac_word=$2
12223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12224 $as_echo_n "checking for $ac_word... " >&6; }
12225 if ${ac_cv_prog_AWK+:} false; then :
12226   $as_echo_n "(cached) " >&6
12227 else
12228   if test -n "$AWK"; then
12229   ac_cv_prog_AWK="$AWK" # Let the user override the test.
12230 else
12231 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12232 for as_dir in $PATH
12233 do
12234   IFS=$as_save_IFS
12235   test -z "$as_dir" && as_dir=.
12236     for ac_exec_ext in '' $ac_executable_extensions; do
12237   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12238     ac_cv_prog_AWK="$ac_prog"
12239     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12240     break 2
12241   fi
12242 done
12243   done
12244 IFS=$as_save_IFS
12245 
12246 fi
12247 fi
12248 AWK=$ac_cv_prog_AWK
12249 if test -n "$AWK"; then
12250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12251 $as_echo "$AWK" >&6; }
12252 else
12253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12254 $as_echo "no" >&6; }
12255 fi
12256 
12257 
12258   test -n "$AWK" && break
12259 done
12260 
12261   else
12262     # The variable is set, but is it from the command line or the environment?
12263 
12264     # Try to remove the string !AWK! from our list.
12265     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12266     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12267       # If it failed, the variable was not from the command line. Ignore it,
12268       # but warn the user (except for BASH, which is always set by the calling BASH).
12269       if test "xAWK" != xBASH; then
12270         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12271 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12272       fi
12273       # Try to locate tool using the code snippet
12274       for ac_prog in gawk mawk nawk awk
12275 do
12276   # Extract the first word of "$ac_prog", so it can be a program name with args.
12277 set dummy $ac_prog; ac_word=$2
12278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12279 $as_echo_n "checking for $ac_word... " >&6; }
12280 if ${ac_cv_prog_AWK+:} false; then :
12281   $as_echo_n "(cached) " >&6
12282 else
12283   if test -n "$AWK"; then
12284   ac_cv_prog_AWK="$AWK" # Let the user override the test.
12285 else
12286 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12287 for as_dir in $PATH
12288 do
12289   IFS=$as_save_IFS
12290   test -z "$as_dir" && as_dir=.
12291     for ac_exec_ext in '' $ac_executable_extensions; do
12292   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12293     ac_cv_prog_AWK="$ac_prog"
12294     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12295     break 2
12296   fi
12297 done
12298   done
12299 IFS=$as_save_IFS
12300 
12301 fi
12302 fi
12303 AWK=$ac_cv_prog_AWK
12304 if test -n "$AWK"; then
12305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12306 $as_echo "$AWK" >&6; }
12307 else
12308   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12309 $as_echo "no" >&6; }
12310 fi
12311 
12312 
12313   test -n "$AWK" && break
12314 done
12315 
12316     else
12317       # If it succeeded, then it was overridden by the user. We will use it
12318       # for the tool.
12319 
12320       # First remove it from the list of overridden variables, so we can test
12321       # for unknown variables in the end.
12322       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12323 
12324       # Check if we try to supply an empty value
12325       if test "x$AWK" = x; then
12326         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12327 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12328         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12329 $as_echo_n "checking for AWK... " >&6; }
12330         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12331 $as_echo "disabled" >&6; }
12332       else
12333         # Check if the provided tool contains a complete path.
12334         tool_specified="$AWK"
12335         tool_basename="${tool_specified##*/}"
12336         if test "x$tool_basename" = "x$tool_specified"; then
12337           # A command without a complete path is provided, search $PATH.
12338           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12339 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12340           # Extract the first word of "$tool_basename", so it can be a program name with args.
12341 set dummy $tool_basename; ac_word=$2
12342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12343 $as_echo_n "checking for $ac_word... " >&6; }
12344 if ${ac_cv_path_AWK+:} false; then :
12345   $as_echo_n "(cached) " >&6
12346 else
12347   case $AWK in
12348   [\\/]* | ?:[\\/]*)
12349   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12350   ;;
12351   *)
12352   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12353 for as_dir in $PATH
12354 do
12355   IFS=$as_save_IFS
12356   test -z "$as_dir" && as_dir=.
12357     for ac_exec_ext in '' $ac_executable_extensions; do
12358   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12359     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12360     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12361     break 2
12362   fi
12363 done
12364   done
12365 IFS=$as_save_IFS
12366 
12367   ;;
12368 esac
12369 fi
12370 AWK=$ac_cv_path_AWK
12371 if test -n "$AWK"; then
12372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12373 $as_echo "$AWK" >&6; }
12374 else
12375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12376 $as_echo "no" >&6; }
12377 fi
12378 
12379 
12380           if test "x$AWK" = x; then
12381             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12382           fi
12383         else
12384           # Otherwise we believe it is a complete path. Use it as it is.
12385           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12386 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12387           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12388 $as_echo_n "checking for AWK... " >&6; }
12389           if test ! -x "$tool_specified"; then
12390             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12391 $as_echo "not found" >&6; }
12392             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12393           fi
12394           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12395 $as_echo "$tool_specified" >&6; }
12396         fi
12397       fi
12398     fi
12399 
12400   fi
12401 
12402 
12403   if test "x$AWK" = x; then
12404     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12405   fi
12406 
12407 
12408 
12409 
12410   # Publish this variable in the help.
12411 
12412 
12413   if [ -z "${GREP+x}" ]; then
12414     # The variable is not set by user, try to locate tool using the code snippet
12415     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12416 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12417 if ${ac_cv_path_GREP+:} false; then :
12418   $as_echo_n "(cached) " >&6
12419 else
12420   if test -z "$GREP"; then
12421   ac_path_GREP_found=false
12422   # Loop through the user's path and test for each of PROGNAME-LIST
12423   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12424 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12425 do
12426   IFS=$as_save_IFS
12427   test -z "$as_dir" && as_dir=.
12428     for ac_prog in grep ggrep; do
12429     for ac_exec_ext in '' $ac_executable_extensions; do
12430       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12431       as_fn_executable_p "$ac_path_GREP" || continue
12432 # Check for GNU ac_path_GREP and select it if it is found.
12433   # Check for GNU $ac_path_GREP
12434 case `"$ac_path_GREP" --version 2>&1` in
12435 *GNU*)
12436   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12437 *)
12438   ac_count=0
12439   $as_echo_n 0123456789 >"conftest.in"
12440   while :
12441   do
12442     cat "conftest.in" "conftest.in" >"conftest.tmp"
12443     mv "conftest.tmp" "conftest.in"
12444     cp "conftest.in" "conftest.nl"
12445     $as_echo 'GREP' >> "conftest.nl"
12446     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12447     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12448     as_fn_arith $ac_count + 1 && ac_count=$as_val
12449     if test $ac_count -gt ${ac_path_GREP_max-0}; then
12450       # Best one so far, save it but keep looking for a better one
12451       ac_cv_path_GREP="$ac_path_GREP"
12452       ac_path_GREP_max=$ac_count
12453     fi
12454     # 10*(2^10) chars as input seems more than enough
12455     test $ac_count -gt 10 && break
12456   done
12457   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12458 esac
12459 
12460       $ac_path_GREP_found && break 3
12461     done
12462   done
12463   done
12464 IFS=$as_save_IFS
12465   if test -z "$ac_cv_path_GREP"; then
12466     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12467   fi
12468 else
12469   ac_cv_path_GREP=$GREP
12470 fi
12471 
12472 fi
12473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12474 $as_echo "$ac_cv_path_GREP" >&6; }
12475  GREP="$ac_cv_path_GREP"
12476 
12477 
12478   else
12479     # The variable is set, but is it from the command line or the environment?
12480 
12481     # Try to remove the string !GREP! from our list.
12482     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12483     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12484       # If it failed, the variable was not from the command line. Ignore it,
12485       # but warn the user (except for BASH, which is always set by the calling BASH).
12486       if test "xGREP" != xBASH; then
12487         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12488 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12489       fi
12490       # Try to locate tool using the code snippet
12491       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12492 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12493 if ${ac_cv_path_GREP+:} false; then :
12494   $as_echo_n "(cached) " >&6
12495 else
12496   if test -z "$GREP"; then
12497   ac_path_GREP_found=false
12498   # Loop through the user's path and test for each of PROGNAME-LIST
12499   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12500 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12501 do
12502   IFS=$as_save_IFS
12503   test -z "$as_dir" && as_dir=.
12504     for ac_prog in grep ggrep; do
12505     for ac_exec_ext in '' $ac_executable_extensions; do
12506       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12507       as_fn_executable_p "$ac_path_GREP" || continue
12508 # Check for GNU ac_path_GREP and select it if it is found.
12509   # Check for GNU $ac_path_GREP
12510 case `"$ac_path_GREP" --version 2>&1` in
12511 *GNU*)
12512   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12513 *)
12514   ac_count=0
12515   $as_echo_n 0123456789 >"conftest.in"
12516   while :
12517   do
12518     cat "conftest.in" "conftest.in" >"conftest.tmp"
12519     mv "conftest.tmp" "conftest.in"
12520     cp "conftest.in" "conftest.nl"
12521     $as_echo 'GREP' >> "conftest.nl"
12522     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12523     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12524     as_fn_arith $ac_count + 1 && ac_count=$as_val
12525     if test $ac_count -gt ${ac_path_GREP_max-0}; then
12526       # Best one so far, save it but keep looking for a better one
12527       ac_cv_path_GREP="$ac_path_GREP"
12528       ac_path_GREP_max=$ac_count
12529     fi
12530     # 10*(2^10) chars as input seems more than enough
12531     test $ac_count -gt 10 && break
12532   done
12533   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12534 esac
12535 
12536       $ac_path_GREP_found && break 3
12537     done
12538   done
12539   done
12540 IFS=$as_save_IFS
12541   if test -z "$ac_cv_path_GREP"; then
12542     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12543   fi
12544 else
12545   ac_cv_path_GREP=$GREP
12546 fi
12547 
12548 fi
12549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12550 $as_echo "$ac_cv_path_GREP" >&6; }
12551  GREP="$ac_cv_path_GREP"
12552 
12553 
12554     else
12555       # If it succeeded, then it was overridden by the user. We will use it
12556       # for the tool.
12557 
12558       # First remove it from the list of overridden variables, so we can test
12559       # for unknown variables in the end.
12560       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12561 
12562       # Check if we try to supply an empty value
12563       if test "x$GREP" = x; then
12564         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12565 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12566         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12567 $as_echo_n "checking for GREP... " >&6; }
12568         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12569 $as_echo "disabled" >&6; }
12570       else
12571         # Check if the provided tool contains a complete path.
12572         tool_specified="$GREP"
12573         tool_basename="${tool_specified##*/}"
12574         if test "x$tool_basename" = "x$tool_specified"; then
12575           # A command without a complete path is provided, search $PATH.
12576           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12577 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12578           # Extract the first word of "$tool_basename", so it can be a program name with args.
12579 set dummy $tool_basename; ac_word=$2
12580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12581 $as_echo_n "checking for $ac_word... " >&6; }
12582 if ${ac_cv_path_GREP+:} false; then :
12583   $as_echo_n "(cached) " >&6
12584 else
12585   case $GREP in
12586   [\\/]* | ?:[\\/]*)
12587   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12588   ;;
12589   *)
12590   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12591 for as_dir in $PATH
12592 do
12593   IFS=$as_save_IFS
12594   test -z "$as_dir" && as_dir=.
12595     for ac_exec_ext in '' $ac_executable_extensions; do
12596   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12597     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12598     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12599     break 2
12600   fi
12601 done
12602   done
12603 IFS=$as_save_IFS
12604 
12605   ;;
12606 esac
12607 fi
12608 GREP=$ac_cv_path_GREP
12609 if test -n "$GREP"; then
12610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12611 $as_echo "$GREP" >&6; }
12612 else
12613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12614 $as_echo "no" >&6; }
12615 fi
12616 
12617 
12618           if test "x$GREP" = x; then
12619             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12620           fi
12621         else
12622           # Otherwise we believe it is a complete path. Use it as it is.
12623           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12624 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12625           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12626 $as_echo_n "checking for GREP... " >&6; }
12627           if test ! -x "$tool_specified"; then
12628             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12629 $as_echo "not found" >&6; }
12630             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12631           fi
12632           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12633 $as_echo "$tool_specified" >&6; }
12634         fi
12635       fi
12636     fi
12637 
12638   fi
12639 
12640 
12641   if test "x$GREP" = x; then
12642     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12643   fi
12644 
12645 
12646 
12647 
12648   # Publish this variable in the help.
12649 
12650 
12651   if [ -z "${EGREP+x}" ]; then
12652     # The variable is not set by user, try to locate tool using the code snippet
12653     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12654 $as_echo_n "checking for egrep... " >&6; }
12655 if ${ac_cv_path_EGREP+:} false; then :
12656   $as_echo_n "(cached) " >&6
12657 else
12658   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12659    then ac_cv_path_EGREP="$GREP -E"
12660    else
12661      if test -z "$EGREP"; then
12662   ac_path_EGREP_found=false
12663   # Loop through the user's path and test for each of PROGNAME-LIST
12664   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12665 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12666 do
12667   IFS=$as_save_IFS
12668   test -z "$as_dir" && as_dir=.
12669     for ac_prog in egrep; do
12670     for ac_exec_ext in '' $ac_executable_extensions; do
12671       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12672       as_fn_executable_p "$ac_path_EGREP" || continue
12673 # Check for GNU ac_path_EGREP and select it if it is found.
12674   # Check for GNU $ac_path_EGREP
12675 case `"$ac_path_EGREP" --version 2>&1` in
12676 *GNU*)
12677   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12678 *)
12679   ac_count=0
12680   $as_echo_n 0123456789 >"conftest.in"
12681   while :
12682   do
12683     cat "conftest.in" "conftest.in" >"conftest.tmp"
12684     mv "conftest.tmp" "conftest.in"
12685     cp "conftest.in" "conftest.nl"
12686     $as_echo 'EGREP' >> "conftest.nl"
12687     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12688     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12689     as_fn_arith $ac_count + 1 && ac_count=$as_val
12690     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12691       # Best one so far, save it but keep looking for a better one
12692       ac_cv_path_EGREP="$ac_path_EGREP"
12693       ac_path_EGREP_max=$ac_count
12694     fi
12695     # 10*(2^10) chars as input seems more than enough
12696     test $ac_count -gt 10 && break
12697   done
12698   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12699 esac
12700 
12701       $ac_path_EGREP_found && break 3
12702     done
12703   done
12704   done
12705 IFS=$as_save_IFS
12706   if test -z "$ac_cv_path_EGREP"; then
12707     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12708   fi
12709 else
12710   ac_cv_path_EGREP=$EGREP
12711 fi
12712 
12713    fi
12714 fi
12715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12716 $as_echo "$ac_cv_path_EGREP" >&6; }
12717  EGREP="$ac_cv_path_EGREP"
12718 
12719 
12720   else
12721     # The variable is set, but is it from the command line or the environment?
12722 
12723     # Try to remove the string !EGREP! from our list.
12724     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12725     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12726       # If it failed, the variable was not from the command line. Ignore it,
12727       # but warn the user (except for BASH, which is always set by the calling BASH).
12728       if test "xEGREP" != xBASH; then
12729         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12730 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12731       fi
12732       # Try to locate tool using the code snippet
12733       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12734 $as_echo_n "checking for egrep... " >&6; }
12735 if ${ac_cv_path_EGREP+:} false; then :
12736   $as_echo_n "(cached) " >&6
12737 else
12738   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12739    then ac_cv_path_EGREP="$GREP -E"
12740    else
12741      if test -z "$EGREP"; then
12742   ac_path_EGREP_found=false
12743   # Loop through the user's path and test for each of PROGNAME-LIST
12744   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12745 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12746 do
12747   IFS=$as_save_IFS
12748   test -z "$as_dir" && as_dir=.
12749     for ac_prog in egrep; do
12750     for ac_exec_ext in '' $ac_executable_extensions; do
12751       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12752       as_fn_executable_p "$ac_path_EGREP" || continue
12753 # Check for GNU ac_path_EGREP and select it if it is found.
12754   # Check for GNU $ac_path_EGREP
12755 case `"$ac_path_EGREP" --version 2>&1` in
12756 *GNU*)
12757   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12758 *)
12759   ac_count=0
12760   $as_echo_n 0123456789 >"conftest.in"
12761   while :
12762   do
12763     cat "conftest.in" "conftest.in" >"conftest.tmp"
12764     mv "conftest.tmp" "conftest.in"
12765     cp "conftest.in" "conftest.nl"
12766     $as_echo 'EGREP' >> "conftest.nl"
12767     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12768     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12769     as_fn_arith $ac_count + 1 && ac_count=$as_val
12770     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12771       # Best one so far, save it but keep looking for a better one
12772       ac_cv_path_EGREP="$ac_path_EGREP"
12773       ac_path_EGREP_max=$ac_count
12774     fi
12775     # 10*(2^10) chars as input seems more than enough
12776     test $ac_count -gt 10 && break
12777   done
12778   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12779 esac
12780 
12781       $ac_path_EGREP_found && break 3
12782     done
12783   done
12784   done
12785 IFS=$as_save_IFS
12786   if test -z "$ac_cv_path_EGREP"; then
12787     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12788   fi
12789 else
12790   ac_cv_path_EGREP=$EGREP
12791 fi
12792 
12793    fi
12794 fi
12795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12796 $as_echo "$ac_cv_path_EGREP" >&6; }
12797  EGREP="$ac_cv_path_EGREP"
12798 
12799 
12800     else
12801       # If it succeeded, then it was overridden by the user. We will use it
12802       # for the tool.
12803 
12804       # First remove it from the list of overridden variables, so we can test
12805       # for unknown variables in the end.
12806       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12807 
12808       # Check if we try to supply an empty value
12809       if test "x$EGREP" = x; then
12810         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
12811 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
12812         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12813 $as_echo_n "checking for EGREP... " >&6; }
12814         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12815 $as_echo "disabled" >&6; }
12816       else
12817         # Check if the provided tool contains a complete path.
12818         tool_specified="$EGREP"
12819         tool_basename="${tool_specified##*/}"
12820         if test "x$tool_basename" = "x$tool_specified"; then
12821           # A command without a complete path is provided, search $PATH.
12822           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12823 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12824           # Extract the first word of "$tool_basename", so it can be a program name with args.
12825 set dummy $tool_basename; ac_word=$2
12826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12827 $as_echo_n "checking for $ac_word... " >&6; }
12828 if ${ac_cv_path_EGREP+:} false; then :
12829   $as_echo_n "(cached) " >&6
12830 else
12831   case $EGREP in
12832   [\\/]* | ?:[\\/]*)
12833   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12834   ;;
12835   *)
12836   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12837 for as_dir in $PATH
12838 do
12839   IFS=$as_save_IFS
12840   test -z "$as_dir" && as_dir=.
12841     for ac_exec_ext in '' $ac_executable_extensions; do
12842   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12843     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12844     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12845     break 2
12846   fi
12847 done
12848   done
12849 IFS=$as_save_IFS
12850 
12851   ;;
12852 esac
12853 fi
12854 EGREP=$ac_cv_path_EGREP
12855 if test -n "$EGREP"; then
12856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12857 $as_echo "$EGREP" >&6; }
12858 else
12859   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12860 $as_echo "no" >&6; }
12861 fi
12862 
12863 
12864           if test "x$EGREP" = x; then
12865             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12866           fi
12867         else
12868           # Otherwise we believe it is a complete path. Use it as it is.
12869           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12870 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12871           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12872 $as_echo_n "checking for EGREP... " >&6; }
12873           if test ! -x "$tool_specified"; then
12874             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12875 $as_echo "not found" >&6; }
12876             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12877           fi
12878           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12879 $as_echo "$tool_specified" >&6; }
12880         fi
12881       fi
12882     fi
12883 
12884   fi
12885 
12886 
12887   if test "x$EGREP" = x; then
12888     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12889   fi
12890 
12891 
12892 
12893 
12894   # Publish this variable in the help.
12895 
12896 
12897   if [ -z "${FGREP+x}" ]; then
12898     # The variable is not set by user, try to locate tool using the code snippet
12899     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12900 $as_echo_n "checking for fgrep... " >&6; }
12901 if ${ac_cv_path_FGREP+:} false; then :
12902   $as_echo_n "(cached) " >&6
12903 else
12904   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12905    then ac_cv_path_FGREP="$GREP -F"
12906    else
12907      if test -z "$FGREP"; then
12908   ac_path_FGREP_found=false
12909   # Loop through the user's path and test for each of PROGNAME-LIST
12910   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12911 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12912 do
12913   IFS=$as_save_IFS
12914   test -z "$as_dir" && as_dir=.
12915     for ac_prog in fgrep; do
12916     for ac_exec_ext in '' $ac_executable_extensions; do
12917       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12918       as_fn_executable_p "$ac_path_FGREP" || continue
12919 # Check for GNU ac_path_FGREP and select it if it is found.
12920   # Check for GNU $ac_path_FGREP
12921 case `"$ac_path_FGREP" --version 2>&1` in
12922 *GNU*)
12923   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12924 *)
12925   ac_count=0
12926   $as_echo_n 0123456789 >"conftest.in"
12927   while :
12928   do
12929     cat "conftest.in" "conftest.in" >"conftest.tmp"
12930     mv "conftest.tmp" "conftest.in"
12931     cp "conftest.in" "conftest.nl"
12932     $as_echo 'FGREP' >> "conftest.nl"
12933     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12934     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12935     as_fn_arith $ac_count + 1 && ac_count=$as_val
12936     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12937       # Best one so far, save it but keep looking for a better one
12938       ac_cv_path_FGREP="$ac_path_FGREP"
12939       ac_path_FGREP_max=$ac_count
12940     fi
12941     # 10*(2^10) chars as input seems more than enough
12942     test $ac_count -gt 10 && break
12943   done
12944   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12945 esac
12946 
12947       $ac_path_FGREP_found && break 3
12948     done
12949   done
12950   done
12951 IFS=$as_save_IFS
12952   if test -z "$ac_cv_path_FGREP"; then
12953     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12954   fi
12955 else
12956   ac_cv_path_FGREP=$FGREP
12957 fi
12958 
12959    fi
12960 fi
12961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12962 $as_echo "$ac_cv_path_FGREP" >&6; }
12963  FGREP="$ac_cv_path_FGREP"
12964 
12965 
12966   else
12967     # The variable is set, but is it from the command line or the environment?
12968 
12969     # Try to remove the string !FGREP! from our list.
12970     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12971     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12972       # If it failed, the variable was not from the command line. Ignore it,
12973       # but warn the user (except for BASH, which is always set by the calling BASH).
12974       if test "xFGREP" != xBASH; then
12975         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12976 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12977       fi
12978       # Try to locate tool using the code snippet
12979       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12980 $as_echo_n "checking for fgrep... " >&6; }
12981 if ${ac_cv_path_FGREP+:} false; then :
12982   $as_echo_n "(cached) " >&6
12983 else
12984   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12985    then ac_cv_path_FGREP="$GREP -F"
12986    else
12987      if test -z "$FGREP"; then
12988   ac_path_FGREP_found=false
12989   # Loop through the user's path and test for each of PROGNAME-LIST
12990   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12991 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12992 do
12993   IFS=$as_save_IFS
12994   test -z "$as_dir" && as_dir=.
12995     for ac_prog in fgrep; do
12996     for ac_exec_ext in '' $ac_executable_extensions; do
12997       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12998       as_fn_executable_p "$ac_path_FGREP" || continue
12999 # Check for GNU ac_path_FGREP and select it if it is found.
13000   # Check for GNU $ac_path_FGREP
13001 case `"$ac_path_FGREP" --version 2>&1` in
13002 *GNU*)
13003   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13004 *)
13005   ac_count=0
13006   $as_echo_n 0123456789 >"conftest.in"
13007   while :
13008   do
13009     cat "conftest.in" "conftest.in" >"conftest.tmp"
13010     mv "conftest.tmp" "conftest.in"
13011     cp "conftest.in" "conftest.nl"
13012     $as_echo 'FGREP' >> "conftest.nl"
13013     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13014     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13015     as_fn_arith $ac_count + 1 && ac_count=$as_val
13016     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13017       # Best one so far, save it but keep looking for a better one
13018       ac_cv_path_FGREP="$ac_path_FGREP"
13019       ac_path_FGREP_max=$ac_count
13020     fi
13021     # 10*(2^10) chars as input seems more than enough
13022     test $ac_count -gt 10 && break
13023   done
13024   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13025 esac
13026 
13027       $ac_path_FGREP_found && break 3
13028     done
13029   done
13030   done
13031 IFS=$as_save_IFS
13032   if test -z "$ac_cv_path_FGREP"; then
13033     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13034   fi
13035 else
13036   ac_cv_path_FGREP=$FGREP
13037 fi
13038 
13039    fi
13040 fi
13041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13042 $as_echo "$ac_cv_path_FGREP" >&6; }
13043  FGREP="$ac_cv_path_FGREP"
13044 
13045 
13046     else
13047       # If it succeeded, then it was overridden by the user. We will use it
13048       # for the tool.
13049 
13050       # First remove it from the list of overridden variables, so we can test
13051       # for unknown variables in the end.
13052       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13053 
13054       # Check if we try to supply an empty value
13055       if test "x$FGREP" = x; then
13056         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13057 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13058         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13059 $as_echo_n "checking for FGREP... " >&6; }
13060         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13061 $as_echo "disabled" >&6; }
13062       else
13063         # Check if the provided tool contains a complete path.
13064         tool_specified="$FGREP"
13065         tool_basename="${tool_specified##*/}"
13066         if test "x$tool_basename" = "x$tool_specified"; then
13067           # A command without a complete path is provided, search $PATH.
13068           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13069 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13070           # Extract the first word of "$tool_basename", so it can be a program name with args.
13071 set dummy $tool_basename; ac_word=$2
13072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13073 $as_echo_n "checking for $ac_word... " >&6; }
13074 if ${ac_cv_path_FGREP+:} false; then :
13075   $as_echo_n "(cached) " >&6
13076 else
13077   case $FGREP in
13078   [\\/]* | ?:[\\/]*)
13079   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13080   ;;
13081   *)
13082   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13083 for as_dir in $PATH
13084 do
13085   IFS=$as_save_IFS
13086   test -z "$as_dir" && as_dir=.
13087     for ac_exec_ext in '' $ac_executable_extensions; do
13088   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13089     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13090     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13091     break 2
13092   fi
13093 done
13094   done
13095 IFS=$as_save_IFS
13096 
13097   ;;
13098 esac
13099 fi
13100 FGREP=$ac_cv_path_FGREP
13101 if test -n "$FGREP"; then
13102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13103 $as_echo "$FGREP" >&6; }
13104 else
13105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13106 $as_echo "no" >&6; }
13107 fi
13108 
13109 
13110           if test "x$FGREP" = x; then
13111             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13112           fi
13113         else
13114           # Otherwise we believe it is a complete path. Use it as it is.
13115           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13116 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13117           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13118 $as_echo_n "checking for FGREP... " >&6; }
13119           if test ! -x "$tool_specified"; then
13120             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13121 $as_echo "not found" >&6; }
13122             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13123           fi
13124           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13125 $as_echo "$tool_specified" >&6; }
13126         fi
13127       fi
13128     fi
13129 
13130   fi
13131 
13132 
13133   if test "x$FGREP" = x; then
13134     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13135   fi
13136 
13137 
13138 
13139 
13140   # Publish this variable in the help.
13141 
13142 
13143   if [ -z "${SED+x}" ]; then
13144     # The variable is not set by user, try to locate tool using the code snippet
13145     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13146 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13147 if ${ac_cv_path_SED+:} false; then :
13148   $as_echo_n "(cached) " >&6
13149 else
13150             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13151      for ac_i in 1 2 3 4 5 6 7; do
13152        ac_script="$ac_script$as_nl$ac_script"
13153      done
13154      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13155      { ac_script=; unset ac_script;}
13156      if test -z "$SED"; then
13157   ac_path_SED_found=false
13158   # Loop through the user's path and test for each of PROGNAME-LIST
13159   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13160 for as_dir in $PATH
13161 do
13162   IFS=$as_save_IFS
13163   test -z "$as_dir" && as_dir=.
13164     for ac_prog in sed gsed; do
13165     for ac_exec_ext in '' $ac_executable_extensions; do
13166       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13167       as_fn_executable_p "$ac_path_SED" || continue
13168 # Check for GNU ac_path_SED and select it if it is found.
13169   # Check for GNU $ac_path_SED
13170 case `"$ac_path_SED" --version 2>&1` in
13171 *GNU*)
13172   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13173 *)
13174   ac_count=0
13175   $as_echo_n 0123456789 >"conftest.in"
13176   while :
13177   do
13178     cat "conftest.in" "conftest.in" >"conftest.tmp"
13179     mv "conftest.tmp" "conftest.in"
13180     cp "conftest.in" "conftest.nl"
13181     $as_echo '' >> "conftest.nl"
13182     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13183     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13184     as_fn_arith $ac_count + 1 && ac_count=$as_val
13185     if test $ac_count -gt ${ac_path_SED_max-0}; then
13186       # Best one so far, save it but keep looking for a better one
13187       ac_cv_path_SED="$ac_path_SED"
13188       ac_path_SED_max=$ac_count
13189     fi
13190     # 10*(2^10) chars as input seems more than enough
13191     test $ac_count -gt 10 && break
13192   done
13193   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13194 esac
13195 
13196       $ac_path_SED_found && break 3
13197     done
13198   done
13199   done
13200 IFS=$as_save_IFS
13201   if test -z "$ac_cv_path_SED"; then
13202     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13203   fi
13204 else
13205   ac_cv_path_SED=$SED
13206 fi
13207 
13208 fi
13209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13210 $as_echo "$ac_cv_path_SED" >&6; }
13211  SED="$ac_cv_path_SED"
13212   rm -f conftest.sed
13213 
13214   else
13215     # The variable is set, but is it from the command line or the environment?
13216 
13217     # Try to remove the string !SED! from our list.
13218     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13219     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13220       # If it failed, the variable was not from the command line. Ignore it,
13221       # but warn the user (except for BASH, which is always set by the calling BASH).
13222       if test "xSED" != xBASH; then
13223         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13224 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13225       fi
13226       # Try to locate tool using the code snippet
13227       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13228 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13229 if ${ac_cv_path_SED+:} false; then :
13230   $as_echo_n "(cached) " >&6
13231 else
13232             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13233      for ac_i in 1 2 3 4 5 6 7; do
13234        ac_script="$ac_script$as_nl$ac_script"
13235      done
13236      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13237      { ac_script=; unset ac_script;}
13238      if test -z "$SED"; then
13239   ac_path_SED_found=false
13240   # Loop through the user's path and test for each of PROGNAME-LIST
13241   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13242 for as_dir in $PATH
13243 do
13244   IFS=$as_save_IFS
13245   test -z "$as_dir" && as_dir=.
13246     for ac_prog in sed gsed; do
13247     for ac_exec_ext in '' $ac_executable_extensions; do
13248       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13249       as_fn_executable_p "$ac_path_SED" || continue
13250 # Check for GNU ac_path_SED and select it if it is found.
13251   # Check for GNU $ac_path_SED
13252 case `"$ac_path_SED" --version 2>&1` in
13253 *GNU*)
13254   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13255 *)
13256   ac_count=0
13257   $as_echo_n 0123456789 >"conftest.in"
13258   while :
13259   do
13260     cat "conftest.in" "conftest.in" >"conftest.tmp"
13261     mv "conftest.tmp" "conftest.in"
13262     cp "conftest.in" "conftest.nl"
13263     $as_echo '' >> "conftest.nl"
13264     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13265     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13266     as_fn_arith $ac_count + 1 && ac_count=$as_val
13267     if test $ac_count -gt ${ac_path_SED_max-0}; then
13268       # Best one so far, save it but keep looking for a better one
13269       ac_cv_path_SED="$ac_path_SED"
13270       ac_path_SED_max=$ac_count
13271     fi
13272     # 10*(2^10) chars as input seems more than enough
13273     test $ac_count -gt 10 && break
13274   done
13275   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13276 esac
13277 
13278       $ac_path_SED_found && break 3
13279     done
13280   done
13281   done
13282 IFS=$as_save_IFS
13283   if test -z "$ac_cv_path_SED"; then
13284     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13285   fi
13286 else
13287   ac_cv_path_SED=$SED
13288 fi
13289 
13290 fi
13291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13292 $as_echo "$ac_cv_path_SED" >&6; }
13293  SED="$ac_cv_path_SED"
13294   rm -f conftest.sed
13295 
13296     else
13297       # If it succeeded, then it was overridden by the user. We will use it
13298       # for the tool.
13299 
13300       # First remove it from the list of overridden variables, so we can test
13301       # for unknown variables in the end.
13302       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13303 
13304       # Check if we try to supply an empty value
13305       if test "x$SED" = x; then
13306         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13307 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13308         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13309 $as_echo_n "checking for SED... " >&6; }
13310         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13311 $as_echo "disabled" >&6; }
13312       else
13313         # Check if the provided tool contains a complete path.
13314         tool_specified="$SED"
13315         tool_basename="${tool_specified##*/}"
13316         if test "x$tool_basename" = "x$tool_specified"; then
13317           # A command without a complete path is provided, search $PATH.
13318           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13319 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13320           # Extract the first word of "$tool_basename", so it can be a program name with args.
13321 set dummy $tool_basename; ac_word=$2
13322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13323 $as_echo_n "checking for $ac_word... " >&6; }
13324 if ${ac_cv_path_SED+:} false; then :
13325   $as_echo_n "(cached) " >&6
13326 else
13327   case $SED in
13328   [\\/]* | ?:[\\/]*)
13329   ac_cv_path_SED="$SED" # Let the user override the test with a path.
13330   ;;
13331   *)
13332   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13333 for as_dir in $PATH
13334 do
13335   IFS=$as_save_IFS
13336   test -z "$as_dir" && as_dir=.
13337     for ac_exec_ext in '' $ac_executable_extensions; do
13338   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13339     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13340     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13341     break 2
13342   fi
13343 done
13344   done
13345 IFS=$as_save_IFS
13346 
13347   ;;
13348 esac
13349 fi
13350 SED=$ac_cv_path_SED
13351 if test -n "$SED"; then
13352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13353 $as_echo "$SED" >&6; }
13354 else
13355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13356 $as_echo "no" >&6; }
13357 fi
13358 
13359 
13360           if test "x$SED" = x; then
13361             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13362           fi
13363         else
13364           # Otherwise we believe it is a complete path. Use it as it is.
13365           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13366 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13367           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13368 $as_echo_n "checking for SED... " >&6; }
13369           if test ! -x "$tool_specified"; then
13370             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13371 $as_echo "not found" >&6; }
13372             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13373           fi
13374           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13375 $as_echo "$tool_specified" >&6; }
13376         fi
13377       fi
13378     fi
13379 
13380   fi
13381 
13382 
13383   if test "x$SED" = x; then
13384     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13385   fi
13386 
13387 
13388 
13389   # Always force rm.
13390   RM="$RM -f"
13391 
13392   # pwd behaves differently on various platforms and some don't support the -L flag.
13393   # Always use the bash builtin pwd to get uniform behavior.
13394   THEPWDCMD=pwd
13395 
13396   # These are not required on all platforms
13397 
13398 
13399   # Publish this variable in the help.
13400 
13401 
13402   if [ -z "${CYGPATH+x}" ]; then
13403     # The variable is not set by user, try to locate tool using the code snippet
13404     for ac_prog in cygpath
13405 do
13406   # Extract the first word of "$ac_prog", so it can be a program name with args.
13407 set dummy $ac_prog; ac_word=$2
13408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13409 $as_echo_n "checking for $ac_word... " >&6; }
13410 if ${ac_cv_path_CYGPATH+:} false; then :
13411   $as_echo_n "(cached) " >&6
13412 else
13413   case $CYGPATH in
13414   [\\/]* | ?:[\\/]*)
13415   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13416   ;;
13417   *)
13418   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13419 for as_dir in $PATH
13420 do
13421   IFS=$as_save_IFS
13422   test -z "$as_dir" && as_dir=.
13423     for ac_exec_ext in '' $ac_executable_extensions; do
13424   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13425     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13426     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13427     break 2
13428   fi
13429 done
13430   done
13431 IFS=$as_save_IFS
13432 
13433   ;;
13434 esac
13435 fi
13436 CYGPATH=$ac_cv_path_CYGPATH
13437 if test -n "$CYGPATH"; then
13438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13439 $as_echo "$CYGPATH" >&6; }
13440 else
13441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13442 $as_echo "no" >&6; }
13443 fi
13444 
13445 
13446   test -n "$CYGPATH" && break
13447 done
13448 
13449   else
13450     # The variable is set, but is it from the command line or the environment?
13451 
13452     # Try to remove the string !CYGPATH! from our list.
13453     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13454     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13455       # If it failed, the variable was not from the command line. Ignore it,
13456       # but warn the user (except for BASH, which is always set by the calling BASH).
13457       if test "xCYGPATH" != xBASH; then
13458         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13459 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13460       fi
13461       # Try to locate tool using the code snippet
13462       for ac_prog in cygpath
13463 do
13464   # Extract the first word of "$ac_prog", so it can be a program name with args.
13465 set dummy $ac_prog; ac_word=$2
13466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13467 $as_echo_n "checking for $ac_word... " >&6; }
13468 if ${ac_cv_path_CYGPATH+:} false; then :
13469   $as_echo_n "(cached) " >&6
13470 else
13471   case $CYGPATH in
13472   [\\/]* | ?:[\\/]*)
13473   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13474   ;;
13475   *)
13476   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13477 for as_dir in $PATH
13478 do
13479   IFS=$as_save_IFS
13480   test -z "$as_dir" && as_dir=.
13481     for ac_exec_ext in '' $ac_executable_extensions; do
13482   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13483     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13484     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13485     break 2
13486   fi
13487 done
13488   done
13489 IFS=$as_save_IFS
13490 
13491   ;;
13492 esac
13493 fi
13494 CYGPATH=$ac_cv_path_CYGPATH
13495 if test -n "$CYGPATH"; then
13496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13497 $as_echo "$CYGPATH" >&6; }
13498 else
13499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13500 $as_echo "no" >&6; }
13501 fi
13502 
13503 
13504   test -n "$CYGPATH" && break
13505 done
13506 
13507     else
13508       # If it succeeded, then it was overridden by the user. We will use it
13509       # for the tool.
13510 
13511       # First remove it from the list of overridden variables, so we can test
13512       # for unknown variables in the end.
13513       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13514 
13515       # Check if we try to supply an empty value
13516       if test "x$CYGPATH" = x; then
13517         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13518 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13519         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13520 $as_echo_n "checking for CYGPATH... " >&6; }
13521         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13522 $as_echo "disabled" >&6; }
13523       else
13524         # Check if the provided tool contains a complete path.
13525         tool_specified="$CYGPATH"
13526         tool_basename="${tool_specified##*/}"
13527         if test "x$tool_basename" = "x$tool_specified"; then
13528           # A command without a complete path is provided, search $PATH.
13529           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13530 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13531           # Extract the first word of "$tool_basename", so it can be a program name with args.
13532 set dummy $tool_basename; ac_word=$2
13533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13534 $as_echo_n "checking for $ac_word... " >&6; }
13535 if ${ac_cv_path_CYGPATH+:} false; then :
13536   $as_echo_n "(cached) " >&6
13537 else
13538   case $CYGPATH in
13539   [\\/]* | ?:[\\/]*)
13540   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13541   ;;
13542   *)
13543   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13544 for as_dir in $PATH
13545 do
13546   IFS=$as_save_IFS
13547   test -z "$as_dir" && as_dir=.
13548     for ac_exec_ext in '' $ac_executable_extensions; do
13549   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13550     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13551     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13552     break 2
13553   fi
13554 done
13555   done
13556 IFS=$as_save_IFS
13557 
13558   ;;
13559 esac
13560 fi
13561 CYGPATH=$ac_cv_path_CYGPATH
13562 if test -n "$CYGPATH"; then
13563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13564 $as_echo "$CYGPATH" >&6; }
13565 else
13566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13567 $as_echo "no" >&6; }
13568 fi
13569 
13570 
13571           if test "x$CYGPATH" = x; then
13572             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13573           fi
13574         else
13575           # Otherwise we believe it is a complete path. Use it as it is.
13576           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13577 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13578           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13579 $as_echo_n "checking for CYGPATH... " >&6; }
13580           if test ! -x "$tool_specified"; then
13581             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13582 $as_echo "not found" >&6; }
13583             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13584           fi
13585           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13586 $as_echo "$tool_specified" >&6; }
13587         fi
13588       fi
13589     fi
13590 
13591   fi
13592 
13593 
13594 
13595 
13596   # Publish this variable in the help.
13597 
13598 
13599   if [ -z "${READLINK+x}" ]; then
13600     # The variable is not set by user, try to locate tool using the code snippet
13601     for ac_prog in greadlink readlink
13602 do
13603   # Extract the first word of "$ac_prog", so it can be a program name with args.
13604 set dummy $ac_prog; ac_word=$2
13605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13606 $as_echo_n "checking for $ac_word... " >&6; }
13607 if ${ac_cv_path_READLINK+:} false; then :
13608   $as_echo_n "(cached) " >&6
13609 else
13610   case $READLINK in
13611   [\\/]* | ?:[\\/]*)
13612   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13613   ;;
13614   *)
13615   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13616 for as_dir in $PATH
13617 do
13618   IFS=$as_save_IFS
13619   test -z "$as_dir" && as_dir=.
13620     for ac_exec_ext in '' $ac_executable_extensions; do
13621   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13622     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13623     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13624     break 2
13625   fi
13626 done
13627   done
13628 IFS=$as_save_IFS
13629 
13630   ;;
13631 esac
13632 fi
13633 READLINK=$ac_cv_path_READLINK
13634 if test -n "$READLINK"; then
13635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13636 $as_echo "$READLINK" >&6; }
13637 else
13638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13639 $as_echo "no" >&6; }
13640 fi
13641 
13642 
13643   test -n "$READLINK" && break
13644 done
13645 
13646   else
13647     # The variable is set, but is it from the command line or the environment?
13648 
13649     # Try to remove the string !READLINK! from our list.
13650     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13651     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13652       # If it failed, the variable was not from the command line. Ignore it,
13653       # but warn the user (except for BASH, which is always set by the calling BASH).
13654       if test "xREADLINK" != xBASH; then
13655         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13656 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13657       fi
13658       # Try to locate tool using the code snippet
13659       for ac_prog in greadlink readlink
13660 do
13661   # Extract the first word of "$ac_prog", so it can be a program name with args.
13662 set dummy $ac_prog; ac_word=$2
13663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13664 $as_echo_n "checking for $ac_word... " >&6; }
13665 if ${ac_cv_path_READLINK+:} false; then :
13666   $as_echo_n "(cached) " >&6
13667 else
13668   case $READLINK in
13669   [\\/]* | ?:[\\/]*)
13670   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13671   ;;
13672   *)
13673   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13674 for as_dir in $PATH
13675 do
13676   IFS=$as_save_IFS
13677   test -z "$as_dir" && as_dir=.
13678     for ac_exec_ext in '' $ac_executable_extensions; do
13679   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13680     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13681     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13682     break 2
13683   fi
13684 done
13685   done
13686 IFS=$as_save_IFS
13687 
13688   ;;
13689 esac
13690 fi
13691 READLINK=$ac_cv_path_READLINK
13692 if test -n "$READLINK"; then
13693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13694 $as_echo "$READLINK" >&6; }
13695 else
13696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13697 $as_echo "no" >&6; }
13698 fi
13699 
13700 
13701   test -n "$READLINK" && break
13702 done
13703 
13704     else
13705       # If it succeeded, then it was overridden by the user. We will use it
13706       # for the tool.
13707 
13708       # First remove it from the list of overridden variables, so we can test
13709       # for unknown variables in the end.
13710       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13711 
13712       # Check if we try to supply an empty value
13713       if test "x$READLINK" = x; then
13714         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13715 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13716         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13717 $as_echo_n "checking for READLINK... " >&6; }
13718         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13719 $as_echo "disabled" >&6; }
13720       else
13721         # Check if the provided tool contains a complete path.
13722         tool_specified="$READLINK"
13723         tool_basename="${tool_specified##*/}"
13724         if test "x$tool_basename" = "x$tool_specified"; then
13725           # A command without a complete path is provided, search $PATH.
13726           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13727 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13728           # Extract the first word of "$tool_basename", so it can be a program name with args.
13729 set dummy $tool_basename; ac_word=$2
13730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13731 $as_echo_n "checking for $ac_word... " >&6; }
13732 if ${ac_cv_path_READLINK+:} false; then :
13733   $as_echo_n "(cached) " >&6
13734 else
13735   case $READLINK in
13736   [\\/]* | ?:[\\/]*)
13737   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13738   ;;
13739   *)
13740   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13741 for as_dir in $PATH
13742 do
13743   IFS=$as_save_IFS
13744   test -z "$as_dir" && as_dir=.
13745     for ac_exec_ext in '' $ac_executable_extensions; do
13746   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13747     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13748     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13749     break 2
13750   fi
13751 done
13752   done
13753 IFS=$as_save_IFS
13754 
13755   ;;
13756 esac
13757 fi
13758 READLINK=$ac_cv_path_READLINK
13759 if test -n "$READLINK"; then
13760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13761 $as_echo "$READLINK" >&6; }
13762 else
13763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13764 $as_echo "no" >&6; }
13765 fi
13766 
13767 
13768           if test "x$READLINK" = x; then
13769             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13770           fi
13771         else
13772           # Otherwise we believe it is a complete path. Use it as it is.
13773           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13774 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13775           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13776 $as_echo_n "checking for READLINK... " >&6; }
13777           if test ! -x "$tool_specified"; then
13778             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13779 $as_echo "not found" >&6; }
13780             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13781           fi
13782           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13783 $as_echo "$tool_specified" >&6; }
13784         fi
13785       fi
13786     fi
13787 
13788   fi
13789 
13790 
13791 
13792 
13793   # Publish this variable in the help.
13794 
13795 
13796   if [ -z "${DF+x}" ]; then
13797     # The variable is not set by user, try to locate tool using the code snippet
13798     for ac_prog in df
13799 do
13800   # Extract the first word of "$ac_prog", so it can be a program name with args.
13801 set dummy $ac_prog; ac_word=$2
13802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13803 $as_echo_n "checking for $ac_word... " >&6; }
13804 if ${ac_cv_path_DF+:} false; then :
13805   $as_echo_n "(cached) " >&6
13806 else
13807   case $DF in
13808   [\\/]* | ?:[\\/]*)
13809   ac_cv_path_DF="$DF" # Let the user override the test with a path.
13810   ;;
13811   *)
13812   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13813 for as_dir in $PATH
13814 do
13815   IFS=$as_save_IFS
13816   test -z "$as_dir" && as_dir=.
13817     for ac_exec_ext in '' $ac_executable_extensions; do
13818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13819     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13821     break 2
13822   fi
13823 done
13824   done
13825 IFS=$as_save_IFS
13826 
13827   ;;
13828 esac
13829 fi
13830 DF=$ac_cv_path_DF
13831 if test -n "$DF"; then
13832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13833 $as_echo "$DF" >&6; }
13834 else
13835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13836 $as_echo "no" >&6; }
13837 fi
13838 
13839 
13840   test -n "$DF" && break
13841 done
13842 
13843   else
13844     # The variable is set, but is it from the command line or the environment?
13845 
13846     # Try to remove the string !DF! from our list.
13847     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13848     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13849       # If it failed, the variable was not from the command line. Ignore it,
13850       # but warn the user (except for BASH, which is always set by the calling BASH).
13851       if test "xDF" != xBASH; then
13852         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13853 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13854       fi
13855       # Try to locate tool using the code snippet
13856       for ac_prog in df
13857 do
13858   # Extract the first word of "$ac_prog", so it can be a program name with args.
13859 set dummy $ac_prog; ac_word=$2
13860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13861 $as_echo_n "checking for $ac_word... " >&6; }
13862 if ${ac_cv_path_DF+:} false; then :
13863   $as_echo_n "(cached) " >&6
13864 else
13865   case $DF in
13866   [\\/]* | ?:[\\/]*)
13867   ac_cv_path_DF="$DF" # Let the user override the test with a path.
13868   ;;
13869   *)
13870   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13871 for as_dir in $PATH
13872 do
13873   IFS=$as_save_IFS
13874   test -z "$as_dir" && as_dir=.
13875     for ac_exec_ext in '' $ac_executable_extensions; do
13876   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13877     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13878     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13879     break 2
13880   fi
13881 done
13882   done
13883 IFS=$as_save_IFS
13884 
13885   ;;
13886 esac
13887 fi
13888 DF=$ac_cv_path_DF
13889 if test -n "$DF"; then
13890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13891 $as_echo "$DF" >&6; }
13892 else
13893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13894 $as_echo "no" >&6; }
13895 fi
13896 
13897 
13898   test -n "$DF" && break
13899 done
13900 
13901     else
13902       # If it succeeded, then it was overridden by the user. We will use it
13903       # for the tool.
13904 
13905       # First remove it from the list of overridden variables, so we can test
13906       # for unknown variables in the end.
13907       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13908 
13909       # Check if we try to supply an empty value
13910       if test "x$DF" = x; then
13911         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
13912 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
13913         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13914 $as_echo_n "checking for DF... " >&6; }
13915         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13916 $as_echo "disabled" >&6; }
13917       else
13918         # Check if the provided tool contains a complete path.
13919         tool_specified="$DF"
13920         tool_basename="${tool_specified##*/}"
13921         if test "x$tool_basename" = "x$tool_specified"; then
13922           # A command without a complete path is provided, search $PATH.
13923           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13924 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13925           # Extract the first word of "$tool_basename", so it can be a program name with args.
13926 set dummy $tool_basename; ac_word=$2
13927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13928 $as_echo_n "checking for $ac_word... " >&6; }
13929 if ${ac_cv_path_DF+:} false; then :
13930   $as_echo_n "(cached) " >&6
13931 else
13932   case $DF in
13933   [\\/]* | ?:[\\/]*)
13934   ac_cv_path_DF="$DF" # Let the user override the test with a path.
13935   ;;
13936   *)
13937   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13938 for as_dir in $PATH
13939 do
13940   IFS=$as_save_IFS
13941   test -z "$as_dir" && as_dir=.
13942     for ac_exec_ext in '' $ac_executable_extensions; do
13943   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13944     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13945     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13946     break 2
13947   fi
13948 done
13949   done
13950 IFS=$as_save_IFS
13951 
13952   ;;
13953 esac
13954 fi
13955 DF=$ac_cv_path_DF
13956 if test -n "$DF"; then
13957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13958 $as_echo "$DF" >&6; }
13959 else
13960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13961 $as_echo "no" >&6; }
13962 fi
13963 
13964 
13965           if test "x$DF" = x; then
13966             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13967           fi
13968         else
13969           # Otherwise we believe it is a complete path. Use it as it is.
13970           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13971 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13972           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13973 $as_echo_n "checking for DF... " >&6; }
13974           if test ! -x "$tool_specified"; then
13975             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13976 $as_echo "not found" >&6; }
13977             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13978           fi
13979           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13980 $as_echo "$tool_specified" >&6; }
13981         fi
13982       fi
13983     fi
13984 
13985   fi
13986 
13987 
13988 
13989 
13990   # Publish this variable in the help.
13991 
13992 
13993   if [ -z "${CPIO+x}" ]; then
13994     # The variable is not set by user, try to locate tool using the code snippet
13995     for ac_prog in cpio bsdcpio
13996 do
13997   # Extract the first word of "$ac_prog", so it can be a program name with args.
13998 set dummy $ac_prog; ac_word=$2
13999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14000 $as_echo_n "checking for $ac_word... " >&6; }
14001 if ${ac_cv_path_CPIO+:} false; then :
14002   $as_echo_n "(cached) " >&6
14003 else
14004   case $CPIO in
14005   [\\/]* | ?:[\\/]*)
14006   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14007   ;;
14008   *)
14009   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14010 for as_dir in $PATH
14011 do
14012   IFS=$as_save_IFS
14013   test -z "$as_dir" && as_dir=.
14014     for ac_exec_ext in '' $ac_executable_extensions; do
14015   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14016     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14017     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14018     break 2
14019   fi
14020 done
14021   done
14022 IFS=$as_save_IFS
14023 
14024   ;;
14025 esac
14026 fi
14027 CPIO=$ac_cv_path_CPIO
14028 if test -n "$CPIO"; then
14029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14030 $as_echo "$CPIO" >&6; }
14031 else
14032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14033 $as_echo "no" >&6; }
14034 fi
14035 
14036 
14037   test -n "$CPIO" && break
14038 done
14039 
14040   else
14041     # The variable is set, but is it from the command line or the environment?
14042 
14043     # Try to remove the string !CPIO! from our list.
14044     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14045     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14046       # If it failed, the variable was not from the command line. Ignore it,
14047       # but warn the user (except for BASH, which is always set by the calling BASH).
14048       if test "xCPIO" != xBASH; then
14049         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14050 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14051       fi
14052       # Try to locate tool using the code snippet
14053       for ac_prog in cpio bsdcpio
14054 do
14055   # Extract the first word of "$ac_prog", so it can be a program name with args.
14056 set dummy $ac_prog; ac_word=$2
14057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14058 $as_echo_n "checking for $ac_word... " >&6; }
14059 if ${ac_cv_path_CPIO+:} false; then :
14060   $as_echo_n "(cached) " >&6
14061 else
14062   case $CPIO in
14063   [\\/]* | ?:[\\/]*)
14064   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14065   ;;
14066   *)
14067   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14068 for as_dir in $PATH
14069 do
14070   IFS=$as_save_IFS
14071   test -z "$as_dir" && as_dir=.
14072     for ac_exec_ext in '' $ac_executable_extensions; do
14073   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14074     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14075     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14076     break 2
14077   fi
14078 done
14079   done
14080 IFS=$as_save_IFS
14081 
14082   ;;
14083 esac
14084 fi
14085 CPIO=$ac_cv_path_CPIO
14086 if test -n "$CPIO"; then
14087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14088 $as_echo "$CPIO" >&6; }
14089 else
14090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14091 $as_echo "no" >&6; }
14092 fi
14093 
14094 
14095   test -n "$CPIO" && break
14096 done
14097 
14098     else
14099       # If it succeeded, then it was overridden by the user. We will use it
14100       # for the tool.
14101 
14102       # First remove it from the list of overridden variables, so we can test
14103       # for unknown variables in the end.
14104       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14105 
14106       # Check if we try to supply an empty value
14107       if test "x$CPIO" = x; then
14108         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14109 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14110         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14111 $as_echo_n "checking for CPIO... " >&6; }
14112         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14113 $as_echo "disabled" >&6; }
14114       else
14115         # Check if the provided tool contains a complete path.
14116         tool_specified="$CPIO"
14117         tool_basename="${tool_specified##*/}"
14118         if test "x$tool_basename" = "x$tool_specified"; then
14119           # A command without a complete path is provided, search $PATH.
14120           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14121 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14122           # Extract the first word of "$tool_basename", so it can be a program name with args.
14123 set dummy $tool_basename; ac_word=$2
14124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14125 $as_echo_n "checking for $ac_word... " >&6; }
14126 if ${ac_cv_path_CPIO+:} false; then :
14127   $as_echo_n "(cached) " >&6
14128 else
14129   case $CPIO in
14130   [\\/]* | ?:[\\/]*)
14131   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14132   ;;
14133   *)
14134   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14135 for as_dir in $PATH
14136 do
14137   IFS=$as_save_IFS
14138   test -z "$as_dir" && as_dir=.
14139     for ac_exec_ext in '' $ac_executable_extensions; do
14140   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14141     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14142     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14143     break 2
14144   fi
14145 done
14146   done
14147 IFS=$as_save_IFS
14148 
14149   ;;
14150 esac
14151 fi
14152 CPIO=$ac_cv_path_CPIO
14153 if test -n "$CPIO"; then
14154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14155 $as_echo "$CPIO" >&6; }
14156 else
14157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14158 $as_echo "no" >&6; }
14159 fi
14160 
14161 
14162           if test "x$CPIO" = x; then
14163             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14164           fi
14165         else
14166           # Otherwise we believe it is a complete path. Use it as it is.
14167           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14168 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14169           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14170 $as_echo_n "checking for CPIO... " >&6; }
14171           if test ! -x "$tool_specified"; then
14172             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14173 $as_echo "not found" >&6; }
14174             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14175           fi
14176           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14177 $as_echo "$tool_specified" >&6; }
14178         fi
14179       fi
14180     fi
14181 
14182   fi
14183 
14184 
14185 
14186 
14187   # Publish this variable in the help.
14188 
14189 
14190   if [ -z "${NICE+x}" ]; then
14191     # The variable is not set by user, try to locate tool using the code snippet
14192     for ac_prog in nice
14193 do
14194   # Extract the first word of "$ac_prog", so it can be a program name with args.
14195 set dummy $ac_prog; ac_word=$2
14196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14197 $as_echo_n "checking for $ac_word... " >&6; }
14198 if ${ac_cv_path_NICE+:} false; then :
14199   $as_echo_n "(cached) " >&6
14200 else
14201   case $NICE in
14202   [\\/]* | ?:[\\/]*)
14203   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14204   ;;
14205   *)
14206   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14207 for as_dir in $PATH
14208 do
14209   IFS=$as_save_IFS
14210   test -z "$as_dir" && as_dir=.
14211     for ac_exec_ext in '' $ac_executable_extensions; do
14212   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14213     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14214     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14215     break 2
14216   fi
14217 done
14218   done
14219 IFS=$as_save_IFS
14220 
14221   ;;
14222 esac
14223 fi
14224 NICE=$ac_cv_path_NICE
14225 if test -n "$NICE"; then
14226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14227 $as_echo "$NICE" >&6; }
14228 else
14229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14230 $as_echo "no" >&6; }
14231 fi
14232 
14233 
14234   test -n "$NICE" && break
14235 done
14236 
14237   else
14238     # The variable is set, but is it from the command line or the environment?
14239 
14240     # Try to remove the string !NICE! from our list.
14241     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14242     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14243       # If it failed, the variable was not from the command line. Ignore it,
14244       # but warn the user (except for BASH, which is always set by the calling BASH).
14245       if test "xNICE" != xBASH; then
14246         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14247 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14248       fi
14249       # Try to locate tool using the code snippet
14250       for ac_prog in nice
14251 do
14252   # Extract the first word of "$ac_prog", so it can be a program name with args.
14253 set dummy $ac_prog; ac_word=$2
14254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14255 $as_echo_n "checking for $ac_word... " >&6; }
14256 if ${ac_cv_path_NICE+:} false; then :
14257   $as_echo_n "(cached) " >&6
14258 else
14259   case $NICE in
14260   [\\/]* | ?:[\\/]*)
14261   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14262   ;;
14263   *)
14264   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14265 for as_dir in $PATH
14266 do
14267   IFS=$as_save_IFS
14268   test -z "$as_dir" && as_dir=.
14269     for ac_exec_ext in '' $ac_executable_extensions; do
14270   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14271     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14272     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14273     break 2
14274   fi
14275 done
14276   done
14277 IFS=$as_save_IFS
14278 
14279   ;;
14280 esac
14281 fi
14282 NICE=$ac_cv_path_NICE
14283 if test -n "$NICE"; then
14284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14285 $as_echo "$NICE" >&6; }
14286 else
14287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14288 $as_echo "no" >&6; }
14289 fi
14290 
14291 
14292   test -n "$NICE" && break
14293 done
14294 
14295     else
14296       # If it succeeded, then it was overridden by the user. We will use it
14297       # for the tool.
14298 
14299       # First remove it from the list of overridden variables, so we can test
14300       # for unknown variables in the end.
14301       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14302 
14303       # Check if we try to supply an empty value
14304       if test "x$NICE" = x; then
14305         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14306 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14307         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14308 $as_echo_n "checking for NICE... " >&6; }
14309         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14310 $as_echo "disabled" >&6; }
14311       else
14312         # Check if the provided tool contains a complete path.
14313         tool_specified="$NICE"
14314         tool_basename="${tool_specified##*/}"
14315         if test "x$tool_basename" = "x$tool_specified"; then
14316           # A command without a complete path is provided, search $PATH.
14317           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14318 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14319           # Extract the first word of "$tool_basename", so it can be a program name with args.
14320 set dummy $tool_basename; ac_word=$2
14321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14322 $as_echo_n "checking for $ac_word... " >&6; }
14323 if ${ac_cv_path_NICE+:} false; then :
14324   $as_echo_n "(cached) " >&6
14325 else
14326   case $NICE in
14327   [\\/]* | ?:[\\/]*)
14328   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14329   ;;
14330   *)
14331   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14332 for as_dir in $PATH
14333 do
14334   IFS=$as_save_IFS
14335   test -z "$as_dir" && as_dir=.
14336     for ac_exec_ext in '' $ac_executable_extensions; do
14337   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14338     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14339     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14340     break 2
14341   fi
14342 done
14343   done
14344 IFS=$as_save_IFS
14345 
14346   ;;
14347 esac
14348 fi
14349 NICE=$ac_cv_path_NICE
14350 if test -n "$NICE"; then
14351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14352 $as_echo "$NICE" >&6; }
14353 else
14354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14355 $as_echo "no" >&6; }
14356 fi
14357 
14358 
14359           if test "x$NICE" = x; then
14360             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14361           fi
14362         else
14363           # Otherwise we believe it is a complete path. Use it as it is.
14364           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14365 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14366           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14367 $as_echo_n "checking for NICE... " >&6; }
14368           if test ! -x "$tool_specified"; then
14369             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14370 $as_echo "not found" >&6; }
14371             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14372           fi
14373           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14374 $as_echo "$tool_specified" >&6; }
14375         fi
14376       fi
14377     fi
14378 
14379   fi
14380 
14381 
14382 
14383 
14384 # Now we can determine OpenJDK build and target platforms. This is required to
14385 # have early on.
14386 # Make sure we can run config.sub.
14387 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14388   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14389 
14390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14391 $as_echo_n "checking build system type... " >&6; }
14392 if ${ac_cv_build+:} false; then :
14393   $as_echo_n "(cached) " >&6
14394 else
14395   ac_build_alias=$build_alias
14396 test "x$ac_build_alias" = x &&
14397   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14398 test "x$ac_build_alias" = x &&
14399   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14400 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14401   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14402 
14403 fi
14404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14405 $as_echo "$ac_cv_build" >&6; }
14406 case $ac_cv_build in
14407 *-*-*) ;;
14408 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14409 esac
14410 build=$ac_cv_build
14411 ac_save_IFS=$IFS; IFS='-'
14412 set x $ac_cv_build
14413 shift
14414 build_cpu=$1
14415 build_vendor=$2
14416 shift; shift
14417 # Remember, the first character of IFS is used to create $*,
14418 # except with old shells:
14419 build_os=$*
14420 IFS=$ac_save_IFS
14421 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14422 
14423 
14424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14425 $as_echo_n "checking host system type... " >&6; }
14426 if ${ac_cv_host+:} false; then :
14427   $as_echo_n "(cached) " >&6
14428 else
14429   if test "x$host_alias" = x; then
14430   ac_cv_host=$ac_cv_build
14431 else
14432   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14433     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14434 fi
14435 
14436 fi
14437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14438 $as_echo "$ac_cv_host" >&6; }
14439 case $ac_cv_host in
14440 *-*-*) ;;
14441 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14442 esac
14443 host=$ac_cv_host
14444 ac_save_IFS=$IFS; IFS='-'
14445 set x $ac_cv_host
14446 shift
14447 host_cpu=$1
14448 host_vendor=$2
14449 shift; shift
14450 # Remember, the first character of IFS is used to create $*,
14451 # except with old shells:
14452 host_os=$*
14453 IFS=$ac_save_IFS
14454 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14455 
14456 
14457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14458 $as_echo_n "checking target system type... " >&6; }
14459 if ${ac_cv_target+:} false; then :
14460   $as_echo_n "(cached) " >&6
14461 else
14462   if test "x$target_alias" = x; then
14463   ac_cv_target=$ac_cv_host
14464 else
14465   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14466     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14467 fi
14468 
14469 fi
14470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14471 $as_echo "$ac_cv_target" >&6; }
14472 case $ac_cv_target in
14473 *-*-*) ;;
14474 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14475 esac
14476 target=$ac_cv_target
14477 ac_save_IFS=$IFS; IFS='-'
14478 set x $ac_cv_target
14479 shift
14480 target_cpu=$1
14481 target_vendor=$2
14482 shift; shift
14483 # Remember, the first character of IFS is used to create $*,
14484 # except with old shells:
14485 target_os=$*
14486 IFS=$ac_save_IFS
14487 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14488 
14489 
14490 # The aliases save the names the user supplied, while $host etc.
14491 # will get canonicalized.
14492 test -n "$target_alias" &&
14493   test "$program_prefix$program_suffix$program_transform_name" = \
14494     NONENONEs,x,x, &&
14495   program_prefix=${target_alias}-
14496 
14497   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14498   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14499   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14500   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14501   # to use the configure naming style.
14502 
14503 
14504 
14505 
14506 
14507   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14508   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14509   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14510   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14511   OPENJDK_TARGET_AUTOCONF_NAME="$host"
14512   OPENJDK_BUILD_AUTOCONF_NAME="$build"
14513 
14514 
14515 
14516   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14517 
14518   case "$build_os" in
14519     *linux*)
14520       VAR_OS=linux
14521       VAR_OS_TYPE=unix
14522       ;;
14523     *solaris*)
14524       VAR_OS=solaris
14525       VAR_OS_TYPE=unix
14526       ;;
14527     *darwin*)
14528       VAR_OS=macosx
14529       VAR_OS_TYPE=unix
14530       ;;
14531     *bsd*)
14532       VAR_OS=bsd
14533       VAR_OS_TYPE=unix
14534       ;;
14535     *cygwin*)
14536       VAR_OS=windows
14537       VAR_OS_ENV=windows.cygwin
14538       ;;
14539     *mingw*)
14540       VAR_OS=windows
14541       VAR_OS_ENV=windows.msys
14542       ;;
14543     *aix*)
14544       VAR_OS=aix
14545       VAR_OS_TYPE=unix
14546       ;;
14547     *)
14548       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14549       ;;
14550   esac
14551 
14552 
14553   # First argument is the cpu name from the trip/quad
14554   case "$build_cpu" in
14555     x86_64)
14556       VAR_CPU=x86_64
14557       VAR_CPU_ARCH=x86
14558       VAR_CPU_BITS=64
14559       VAR_CPU_ENDIAN=little
14560       ;;
14561     i?86)
14562       VAR_CPU=x86
14563       VAR_CPU_ARCH=x86
14564       VAR_CPU_BITS=32
14565       VAR_CPU_ENDIAN=little
14566       ;;
14567     arm*)
14568       VAR_CPU=arm
14569       VAR_CPU_ARCH=arm
14570       VAR_CPU_BITS=32
14571       VAR_CPU_ENDIAN=little
14572       ;;
14573     aarch64)
14574       VAR_CPU=aarch64
14575       VAR_CPU_ARCH=aarch64
14576       VAR_CPU_BITS=64
14577       VAR_CPU_ENDIAN=little
14578       ;;
14579     powerpc)
14580       VAR_CPU=ppc
14581       VAR_CPU_ARCH=ppc
14582       VAR_CPU_BITS=32
14583       VAR_CPU_ENDIAN=big
14584       ;;
14585     powerpc64)
14586       VAR_CPU=ppc64
14587       VAR_CPU_ARCH=ppc
14588       VAR_CPU_BITS=64
14589       VAR_CPU_ENDIAN=big
14590       ;;
14591     powerpc64le)
14592       VAR_CPU=ppc64
14593       VAR_CPU_ARCH=ppc
14594       VAR_CPU_BITS=64
14595       VAR_CPU_ENDIAN=little
14596       ;;
14597     s390)
14598       VAR_CPU=s390
14599       VAR_CPU_ARCH=s390
14600       VAR_CPU_BITS=32
14601       VAR_CPU_ENDIAN=big
14602       ;;
14603     s390x)
14604       VAR_CPU=s390x
14605       VAR_CPU_ARCH=s390
14606       VAR_CPU_BITS=64
14607       VAR_CPU_ENDIAN=big
14608       ;;
14609     sparc)
14610       VAR_CPU=sparc
14611       VAR_CPU_ARCH=sparc
14612       VAR_CPU_BITS=32
14613       VAR_CPU_ENDIAN=big
14614       ;;
14615     sparcv9|sparc64)
14616       VAR_CPU=sparcv9
14617       VAR_CPU_ARCH=sparc
14618       VAR_CPU_BITS=64
14619       VAR_CPU_ENDIAN=big
14620       ;;
14621     *)
14622       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14623       ;;
14624   esac
14625 
14626   # ..and setup our own variables. (Do this explicitely to facilitate searching)
14627   OPENJDK_BUILD_OS="$VAR_OS"
14628   if test "x$VAR_OS_TYPE" != x; then
14629     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14630   else
14631     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14632   fi
14633   if test "x$VAR_OS_ENV" != x; then
14634     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14635   else
14636     OPENJDK_BUILD_OS_ENV="$VAR_OS"
14637   fi
14638   OPENJDK_BUILD_CPU="$VAR_CPU"
14639   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14640   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14641   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14642 
14643 
14644 
14645 
14646 
14647 
14648 
14649 
14650   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14651 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
14652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14653 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14654 
14655   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14656 
14657   case "$host_os" in
14658     *linux*)
14659       VAR_OS=linux
14660       VAR_OS_TYPE=unix
14661       ;;
14662     *solaris*)
14663       VAR_OS=solaris
14664       VAR_OS_TYPE=unix
14665       ;;
14666     *darwin*)
14667       VAR_OS=macosx
14668       VAR_OS_TYPE=unix
14669       ;;
14670     *bsd*)
14671       VAR_OS=bsd
14672       VAR_OS_TYPE=unix
14673       ;;
14674     *cygwin*)
14675       VAR_OS=windows
14676       VAR_OS_ENV=windows.cygwin
14677       ;;
14678     *mingw*)
14679       VAR_OS=windows
14680       VAR_OS_ENV=windows.msys
14681       ;;
14682     *aix*)
14683       VAR_OS=aix
14684       VAR_OS_TYPE=unix
14685       ;;
14686     *)
14687       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14688       ;;
14689   esac
14690 
14691 
14692   # First argument is the cpu name from the trip/quad
14693   case "$host_cpu" in
14694     x86_64)
14695       VAR_CPU=x86_64
14696       VAR_CPU_ARCH=x86
14697       VAR_CPU_BITS=64
14698       VAR_CPU_ENDIAN=little
14699       ;;
14700     i?86)
14701       VAR_CPU=x86
14702       VAR_CPU_ARCH=x86
14703       VAR_CPU_BITS=32
14704       VAR_CPU_ENDIAN=little
14705       ;;
14706     arm*)
14707       VAR_CPU=arm
14708       VAR_CPU_ARCH=arm
14709       VAR_CPU_BITS=32
14710       VAR_CPU_ENDIAN=little
14711       ;;
14712     aarch64)
14713       VAR_CPU=aarch64
14714       VAR_CPU_ARCH=aarch64
14715       VAR_CPU_BITS=64
14716       VAR_CPU_ENDIAN=little
14717       ;;
14718     powerpc)
14719       VAR_CPU=ppc
14720       VAR_CPU_ARCH=ppc
14721       VAR_CPU_BITS=32
14722       VAR_CPU_ENDIAN=big
14723       ;;
14724     powerpc64)
14725       VAR_CPU=ppc64
14726       VAR_CPU_ARCH=ppc
14727       VAR_CPU_BITS=64
14728       VAR_CPU_ENDIAN=big
14729       ;;
14730     powerpc64le)
14731       VAR_CPU=ppc64
14732       VAR_CPU_ARCH=ppc
14733       VAR_CPU_BITS=64
14734       VAR_CPU_ENDIAN=little
14735       ;;
14736     s390)
14737       VAR_CPU=s390
14738       VAR_CPU_ARCH=s390
14739       VAR_CPU_BITS=32
14740       VAR_CPU_ENDIAN=big
14741       ;;
14742     s390x)
14743       VAR_CPU=s390x
14744       VAR_CPU_ARCH=s390
14745       VAR_CPU_BITS=64
14746       VAR_CPU_ENDIAN=big
14747       ;;
14748     sparc)
14749       VAR_CPU=sparc
14750       VAR_CPU_ARCH=sparc
14751       VAR_CPU_BITS=32
14752       VAR_CPU_ENDIAN=big
14753       ;;
14754     sparcv9|sparc64)
14755       VAR_CPU=sparcv9
14756       VAR_CPU_ARCH=sparc
14757       VAR_CPU_BITS=64
14758       VAR_CPU_ENDIAN=big
14759       ;;
14760     *)
14761       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14762       ;;
14763   esac
14764 
14765   # ... and setup our own variables. (Do this explicitely to facilitate searching)
14766   OPENJDK_TARGET_OS="$VAR_OS"
14767   if test "x$VAR_OS_TYPE" != x; then
14768     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14769   else
14770     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14771   fi
14772   if test "x$VAR_OS_ENV" != x; then
14773     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14774   else
14775     OPENJDK_TARGET_OS_ENV="$VAR_OS"
14776   fi
14777   OPENJDK_TARGET_CPU="$VAR_CPU"
14778   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14779   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14780   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14781 
14782 
14783 
14784 
14785 
14786 
14787 
14788 
14789   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14790 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
14791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14792 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14793 
14794 
14795 
14796 # Check whether --with-target-bits was given.
14797 if test "${with_target_bits+set}" = set; then :
14798   withval=$with_target_bits;
14799 fi
14800 
14801 
14802   # We have three types of compiles:
14803   # native  == normal compilation, target system == build system
14804   # cross   == traditional cross compilation, target system != build system; special toolchain needed
14805   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14806   #
14807   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14808     # We're doing a proper cross-compilation
14809     COMPILE_TYPE="cross"
14810   else
14811     COMPILE_TYPE="native"
14812   fi
14813 
14814   if test "x$with_target_bits" != x; then
14815     if test "x$COMPILE_TYPE" = "xcross"; then
14816       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
14817     fi
14818 
14819     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14820       # A reduced build is requested
14821       COMPILE_TYPE="reduced"
14822       OPENJDK_TARGET_CPU_BITS=32
14823       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
14824         OPENJDK_TARGET_CPU=x86
14825       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
14826         OPENJDK_TARGET_CPU=sparc
14827       else
14828         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
14829       fi
14830     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
14831       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
14832     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
14833       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
14834 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
14835     else
14836       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
14837     fi
14838   fi
14839 
14840 
14841   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
14842 $as_echo_n "checking compilation type... " >&6; }
14843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
14844 $as_echo "$COMPILE_TYPE" >&6; }
14845 
14846 
14847   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
14848     REQUIRED_OS_NAME=SunOS
14849     REQUIRED_OS_VERSION=5.10
14850   fi
14851   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
14852     REQUIRED_OS_NAME=Linux
14853     REQUIRED_OS_VERSION=2.6
14854   fi
14855   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14856     REQUIRED_OS_NAME=Windows
14857     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
14858       REQUIRED_OS_VERSION=5.2
14859     else
14860       REQUIRED_OS_VERSION=5.1
14861     fi
14862   fi
14863   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14864     REQUIRED_OS_NAME=Darwin
14865     REQUIRED_OS_VERSION=11.2
14866   fi
14867 
14868 
14869 
14870 
14871 
14872   # Also store the legacy naming of the cpu.
14873   # Ie i586 and amd64 instead of x86 and x86_64
14874   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
14875   if test "x$OPENJDK_TARGET_CPU" = xx86; then
14876     OPENJDK_TARGET_CPU_LEGACY="i586"
14877   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14878     # On all platforms except MacOSX replace x86_64 with amd64.
14879     OPENJDK_TARGET_CPU_LEGACY="amd64"
14880   fi
14881 
14882 
14883   # And the second legacy naming of the cpu.
14884   # Ie i386 and amd64 instead of x86 and x86_64.
14885   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14886   if test "x$OPENJDK_TARGET_CPU" = xx86; then
14887     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14888   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14889     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14890   fi
14891 
14892 
14893   # This is the name of the cpu (but using i386 and amd64 instead of
14894   # x86 and x86_64, respectively), preceeded by a /, to be used when
14895   # locating libraries. On macosx, it's empty, though.
14896   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14897   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14898     OPENJDK_TARGET_CPU_LIBDIR=""
14899   fi
14900 
14901 
14902   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
14903   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
14904   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
14905   OPENJDK_TARGET_CPU_ISADIR=""
14906   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14907     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14908       OPENJDK_TARGET_CPU_ISADIR="/amd64"
14909     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
14910       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
14911     fi
14912   fi
14913 
14914 
14915   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
14916   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
14917   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
14918     # On linux only, we replace x86 with i386.
14919     OPENJDK_TARGET_CPU_OSARCH="i386"
14920   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14921     # On all platforms except macosx, we replace x86_64 with amd64.
14922     OPENJDK_TARGET_CPU_OSARCH="amd64"
14923   fi
14924 
14925 
14926   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14927   if test "x$OPENJDK_TARGET_CPU" = xx86; then
14928     OPENJDK_TARGET_CPU_JLI="i386"
14929   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14930     # On all platforms except macosx, we replace x86_64 with amd64.
14931     OPENJDK_TARGET_CPU_JLI="amd64"
14932   fi
14933   # Now setup the -D flags for building libjli.
14934   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14935   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14936     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14937       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14938     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14939       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14940     fi
14941   fi
14942 
14943 
14944   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14945       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14946   else
14947       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14948   fi
14949 
14950 
14951   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14952     A_LP64="LP64:="
14953     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14954     # unpack200.exe
14955     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14956       ADD_LP64="-D_LP64=1"
14957     fi
14958   fi
14959   LP64=$A_LP64
14960 
14961 
14962   if test "x$COMPILE_TYPE" = "xcross"; then
14963     # FIXME: ... or should this include reduced builds..?
14964     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14965   else
14966     DEFINE_CROSS_COMPILE_ARCH=""
14967   fi
14968 
14969 
14970   # ZERO_ARCHDEF is used to enable architecture-specific code
14971   case "${OPENJDK_TARGET_CPU}" in
14972     ppc)     ZERO_ARCHDEF=PPC32 ;;
14973     ppc64)   ZERO_ARCHDEF=PPC64 ;;
14974     s390*)   ZERO_ARCHDEF=S390  ;;
14975     sparc*)  ZERO_ARCHDEF=SPARC ;;
14976     x86_64*) ZERO_ARCHDEF=AMD64 ;;
14977     x86)     ZERO_ARCHDEF=IA32  ;;
14978     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14979   esac
14980 
14981 
14982 
14983 
14984 # Continue setting up basic stuff. Most remaining code require fundamental tools.
14985 
14986   # Save the current directory this script was started from
14987   CURDIR="$PWD"
14988 
14989   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
14990   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
14991   # was not available at that time.
14992   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
14993   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
14994     ORIGINAL_PATH="$REWRITTEN_PATH"
14995     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
14996 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
14997   fi
14998 
14999   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15000     PATH_SEP=";"
15001 
15002   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15003   if test $SRC_ROOT_LENGTH -gt 100; then
15004     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15005   fi
15006 
15007   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15008     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15009 $as_echo_n "checking cygwin release... " >&6; }
15010     CYGWIN_VERSION=`$UNAME -r`
15011     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15012 $as_echo "$CYGWIN_VERSION" >&6; }
15013     WINDOWS_ENV_VENDOR='cygwin'
15014     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15015 
15016     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15017     if test "x$CYGWIN_VERSION_OLD" != x; then
15018       { $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
15019 $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;}
15020       as_fn_error $? "Cannot continue" "$LINENO" 5
15021     fi
15022     if test "x$CYGPATH" = x; then
15023       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15024     fi
15025     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15026 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15027     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15028     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15029     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15030     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15031     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15032 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
15033     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15034     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15035     if test "x$test_cygdrive_prefix" = x; then
15036       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15037     fi
15038   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15039     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15040 $as_echo_n "checking msys release... " >&6; }
15041     MSYS_VERSION=`$UNAME -r`
15042     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15043 $as_echo "$MSYS_VERSION" >&6; }
15044 
15045     WINDOWS_ENV_VENDOR='msys'
15046     WINDOWS_ENV_VERSION="$MSYS_VERSION"
15047 
15048     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15049 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
15050     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15051     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15052 
15053   windows_path="$MSYS_ROOT_PATH"
15054   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15055     unix_path=`$CYGPATH -u "$windows_path"`
15056     MSYS_ROOT_PATH="$unix_path"
15057   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15058     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15059     MSYS_ROOT_PATH="$unix_path"
15060   fi
15061 
15062     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15063 $as_echo "$MSYS_ROOT_PATH" >&6; }
15064     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15065   else
15066     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15067   fi
15068 
15069   # Test if windows or unix (cygwin/msys) find is first in path.
15070   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15071 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15072   FIND_BINARY_OUTPUT=`find --version 2>&1`
15073   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15074     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15075 $as_echo "unix style" >&6; }
15076   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15077     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15078 $as_echo "Windows" >&6; }
15079     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15080 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15081     { $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
15082 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15083     as_fn_error $? "Cannot continue" "$LINENO" 5
15084   else
15085     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15086 $as_echo "unknown" >&6; }
15087     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15088 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15089   fi
15090 
15091   else
15092     PATH_SEP=":"
15093   fi
15094 
15095 
15096   # We get the top-level directory from the supporting wrappers.
15097   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15098 $as_echo_n "checking for top-level directory... " >&6; }
15099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15100 $as_echo "$TOPDIR" >&6; }
15101 
15102 
15103   # Save the original version of TOPDIR for string comparisons
15104   ORIGINAL_TOPDIR="$TOPDIR"
15105 
15106 
15107   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15108 
15109   # Only process if variable expands to non-empty
15110 
15111   if test "x$CURDIR" != x; then
15112     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15113 
15114   # Input might be given as Windows format, start by converting to
15115   # unix format.
15116   path="$CURDIR"
15117   new_path=`$CYGPATH -u "$path"`
15118 
15119   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15120   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15121   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15122   # "foo.exe" is OK but "foo" is an error.
15123   #
15124   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15125   # It is also a way to make sure we got the proper file name for the real test later on.
15126   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15127   if test "x$test_shortpath" = x; then
15128     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15129 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15130     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15131   fi
15132 
15133   # Call helper function which possibly converts this using DOS-style short mode.
15134   # If so, the updated path is stored in $new_path.
15135 
15136   input_path="$new_path"
15137   # Check if we need to convert this using DOS-style short mode. If the path
15138   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15139   # take no chances and rewrite it.
15140   # Note: m4 eats our [], so we need to use [ and ] instead.
15141   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15142   if test "x$has_forbidden_chars" != x; then
15143     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15144     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15145     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15146     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15147       # Going to short mode and back again did indeed matter. Since short mode is
15148       # case insensitive, let's make it lowercase to improve readability.
15149       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15150       # Now convert it back to Unix-style (cygpath)
15151       input_path=`$CYGPATH -u "$shortmode_path"`
15152       new_path="$input_path"
15153     fi
15154   fi
15155 
15156   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15157   if test "x$test_cygdrive_prefix" = x; then
15158     # As a simple fix, exclude /usr/bin since it's not a real path.
15159     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15160       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15161       # a path prefixed by /cygdrive for fixpath to work.
15162       new_path="$CYGWIN_ROOT_PATH$input_path"
15163     fi
15164   fi
15165 
15166 
15167   if test "x$path" != "x$new_path"; then
15168     CURDIR="$new_path"
15169     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15170 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15171   fi
15172 
15173     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15174 
15175   path="$CURDIR"
15176   has_colon=`$ECHO $path | $GREP ^.:`
15177   new_path="$path"
15178   if test "x$has_colon" = x; then
15179     # Not in mixed or Windows style, start by that.
15180     new_path=`cmd //c echo $path`
15181   fi
15182 
15183 
15184   input_path="$new_path"
15185   # Check if we need to convert this using DOS-style short mode. If the path
15186   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15187   # take no chances and rewrite it.
15188   # Note: m4 eats our [], so we need to use [ and ] instead.
15189   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15190   if test "x$has_forbidden_chars" != x; then
15191     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15192     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15193   fi
15194 
15195 
15196   windows_path="$new_path"
15197   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15198     unix_path=`$CYGPATH -u "$windows_path"`
15199     new_path="$unix_path"
15200   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15201     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15202     new_path="$unix_path"
15203   fi
15204 
15205   if test "x$path" != "x$new_path"; then
15206     CURDIR="$new_path"
15207     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15208 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15209   fi
15210 
15211   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15212   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15213 
15214     else
15215       # We're on a unix platform. Hooray! :)
15216       path="$CURDIR"
15217       has_space=`$ECHO "$path" | $GREP " "`
15218       if test "x$has_space" != x; then
15219         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15220 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15221         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15222       fi
15223 
15224       # Use eval to expand a potential ~
15225       eval path="$path"
15226       if test ! -f "$path" && test ! -d "$path"; then
15227         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15228       fi
15229 
15230       CURDIR="`cd "$path"; $THEPWDCMD -L`"
15231     fi
15232   fi
15233 
15234 
15235   # Only process if variable expands to non-empty
15236 
15237   if test "x$TOPDIR" != x; then
15238     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15239 
15240   # Input might be given as Windows format, start by converting to
15241   # unix format.
15242   path="$TOPDIR"
15243   new_path=`$CYGPATH -u "$path"`
15244 
15245   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15246   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15247   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15248   # "foo.exe" is OK but "foo" is an error.
15249   #
15250   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15251   # It is also a way to make sure we got the proper file name for the real test later on.
15252   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15253   if test "x$test_shortpath" = x; then
15254     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15255 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15256     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15257   fi
15258 
15259   # Call helper function which possibly converts this using DOS-style short mode.
15260   # If so, the updated path is stored in $new_path.
15261 
15262   input_path="$new_path"
15263   # Check if we need to convert this using DOS-style short mode. If the path
15264   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15265   # take no chances and rewrite it.
15266   # Note: m4 eats our [], so we need to use [ and ] instead.
15267   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15268   if test "x$has_forbidden_chars" != x; then
15269     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15270     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15271     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15272     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15273       # Going to short mode and back again did indeed matter. Since short mode is
15274       # case insensitive, let's make it lowercase to improve readability.
15275       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15276       # Now convert it back to Unix-style (cygpath)
15277       input_path=`$CYGPATH -u "$shortmode_path"`
15278       new_path="$input_path"
15279     fi
15280   fi
15281 
15282   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15283   if test "x$test_cygdrive_prefix" = x; then
15284     # As a simple fix, exclude /usr/bin since it's not a real path.
15285     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15286       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15287       # a path prefixed by /cygdrive for fixpath to work.
15288       new_path="$CYGWIN_ROOT_PATH$input_path"
15289     fi
15290   fi
15291 
15292 
15293   if test "x$path" != "x$new_path"; then
15294     TOPDIR="$new_path"
15295     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15296 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15297   fi
15298 
15299     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15300 
15301   path="$TOPDIR"
15302   has_colon=`$ECHO $path | $GREP ^.:`
15303   new_path="$path"
15304   if test "x$has_colon" = x; then
15305     # Not in mixed or Windows style, start by that.
15306     new_path=`cmd //c echo $path`
15307   fi
15308 
15309 
15310   input_path="$new_path"
15311   # Check if we need to convert this using DOS-style short mode. If the path
15312   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15313   # take no chances and rewrite it.
15314   # Note: m4 eats our [], so we need to use [ and ] instead.
15315   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15316   if test "x$has_forbidden_chars" != x; then
15317     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15318     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15319   fi
15320 
15321 
15322   windows_path="$new_path"
15323   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15324     unix_path=`$CYGPATH -u "$windows_path"`
15325     new_path="$unix_path"
15326   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15327     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15328     new_path="$unix_path"
15329   fi
15330 
15331   if test "x$path" != "x$new_path"; then
15332     TOPDIR="$new_path"
15333     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15334 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15335   fi
15336 
15337   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15338   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15339 
15340     else
15341       # We're on a unix platform. Hooray! :)
15342       path="$TOPDIR"
15343       has_space=`$ECHO "$path" | $GREP " "`
15344       if test "x$has_space" != x; then
15345         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15346 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15347         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15348       fi
15349 
15350       # Use eval to expand a potential ~
15351       eval path="$path"
15352       if test ! -f "$path" && test ! -d "$path"; then
15353         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15354       fi
15355 
15356       TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15357     fi
15358   fi
15359 
15360   # SRC_ROOT is a traditional alias for TOPDIR.
15361   SRC_ROOT=$TOPDIR
15362 
15363   # Calculate a canonical version of TOPDIR for string comparisons
15364   CANONICAL_TOPDIR=$TOPDIR
15365 
15366   if test "x$OPENJDK_BUILD_OS" != xwindows; then
15367     # Follow a chain of symbolic links. Use readlink
15368     # where it exists, else fall back to horribly
15369     # complicated shell code.
15370     if test "x$READLINK_TESTED" != yes; then
15371       # On MacOSX there is a readlink tool with a different
15372       # purpose than the GNU readlink tool. Check the found readlink.
15373       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15374       if test "x$ISGNU" = x; then
15375         # A readlink that we do not know how to use.
15376         # Are there other non-GNU readlinks out there?
15377         READLINK_TESTED=yes
15378         READLINK=
15379       fi
15380     fi
15381 
15382     if test "x$READLINK" != x; then
15383       CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15384     else
15385       # Save the current directory for restoring afterwards
15386       STARTDIR=$PWD
15387       COUNTER=0
15388       sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15389       sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15390       cd $sym_link_dir
15391       # Use -P flag to resolve symlinks in directories.
15392       cd `$THEPWDCMD -P`
15393       sym_link_dir=`$THEPWDCMD -P`
15394       # Resolve file symlinks
15395       while test $COUNTER -lt 20; do
15396         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15397         if test "x$ISLINK" == x; then
15398           # This is not a symbolic link! We are done!
15399           break
15400         fi
15401         # Again resolve directory symlinks since the target of the just found
15402         # link could be in a different directory
15403         cd `$DIRNAME $ISLINK`
15404         sym_link_dir=`$THEPWDCMD -P`
15405         sym_link_file=`$BASENAME $ISLINK`
15406         let COUNTER=COUNTER+1
15407       done
15408       cd $STARTDIR
15409       CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15410     fi
15411   fi
15412 
15413 
15414 
15415   # Locate the directory of this script.
15416   AUTOCONF_DIR=$TOPDIR/common/autoconf
15417 
15418 
15419 # Check if it's a pure open build or if custom sources are to be used.
15420 
15421   # Check whether --enable-openjdk-only was given.
15422 if test "${enable_openjdk_only+set}" = set; then :
15423   enableval=$enable_openjdk_only;
15424 else
15425   enable_openjdk_only="no"
15426 fi
15427 
15428 
15429   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15430 $as_echo_n "checking for presence of closed sources... " >&6; }
15431   if test -d "$SRC_ROOT/jdk/src/closed"; then
15432     CLOSED_SOURCE_PRESENT=yes
15433   else
15434     CLOSED_SOURCE_PRESENT=no
15435   fi
15436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15437 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15438 
15439   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15440 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15441   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15443 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15444 
15445   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15446     OPENJDK=true
15447     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15448       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15449 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15450     fi
15451   else
15452     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15453       OPENJDK=true
15454     else
15455       OPENJDK=false
15456     fi
15457   fi
15458 
15459   if test "x$OPENJDK" = "xtrue"; then
15460     SET_OPENJDK="OPENJDK=true"
15461   fi
15462 
15463 
15464 
15465   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15466   # the IncludeCustomExtension macro.
15467 
15468 
15469 # Check whether --with-custom-make-dir was given.
15470 if test "${with_custom_make_dir+set}" = set; then :
15471   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
15472 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15473 fi
15474 
15475 
15476 
15477 
15478 # These are needed to be able to create a configuration name (and thus the output directory)
15479 
15480   ###############################################################################
15481   #
15482   # Check which variant of the JDK that we want to build.
15483   # Currently we have:
15484   #    normal:   standard edition
15485   # but the custom make system may add other variants
15486   #
15487   # Effectively the JDK variant gives a name to a specific set of
15488   # modules to compile into the JDK. In the future, these modules
15489   # might even be Jigsaw modules.
15490   #
15491   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15492 $as_echo_n "checking which variant of the JDK to build... " >&6; }
15493 
15494 # Check whether --with-jdk-variant was given.
15495 if test "${with_jdk_variant+set}" = set; then :
15496   withval=$with_jdk_variant;
15497 fi
15498 
15499 
15500   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15501     JDK_VARIANT="normal"
15502   else
15503     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15504   fi
15505 
15506 
15507 
15508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15509 $as_echo "$JDK_VARIANT" >&6; }
15510 
15511 
15512 ###############################################################################
15513 #
15514 # Check which interpreter of the JVM we want to build.
15515 # Currently we have:
15516 #    template: Template interpreter (the default)
15517 #    cpp     : C++ interpreter
15518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15519 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15520 
15521 # Check whether --with-jvm-interpreter was given.
15522 if test "${with_jvm_interpreter+set}" = set; then :
15523   withval=$with_jvm_interpreter;
15524 fi
15525 
15526 
15527 if test "x$with_jvm_interpreter" = x; then
15528      with_jvm_interpreter="template"
15529 fi
15530 
15531 JVM_INTERPRETER="$with_jvm_interpreter"
15532 
15533 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15534    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15535 fi
15536 
15537 
15538 
15539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
15540 $as_echo "$with_jvm_interpreter" >&6; }
15541 
15542 
15543 
15544   ###############################################################################
15545   #
15546   # Check which variants of the JVM that we want to build.
15547   # Currently we have:
15548   #    server: normal interpreter and a tiered C1/C2 compiler
15549   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
15550   #    minimal1: reduced form of client with optional VM services and features stripped out
15551   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
15552   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
15553   #    zero: no machine code interpreter, no compiler
15554   #    zeroshark: zero interpreter and shark/llvm compiler backend
15555 #    core: interpreter only, no compiler (only works on some platforms)
15556   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15557 $as_echo_n "checking which variants of the JVM to build... " >&6; }
15558 
15559 # Check whether --with-jvm-variants was given.
15560 if test "${with_jvm_variants+set}" = set; then :
15561   withval=$with_jvm_variants;
15562 fi
15563 
15564 
15565   if test "x$with_jvm_variants" = x; then
15566     with_jvm_variants="server"
15567   fi
15568 
15569   JVM_VARIANTS=",$with_jvm_variants,"
15570   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,//'`
15571 
15572   if test "x$TEST_VARIANTS" != "x,"; then
15573      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
15574   fi
15575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15576 $as_echo "$with_jvm_variants" >&6; }
15577 
15578   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15579   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15580   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15581   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
15582   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15583   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15584   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15585 
15586   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15587     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15588       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15589     fi
15590   fi
15591   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15592     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15593       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
15594     fi
15595   fi
15596   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15597     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15598       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15599     fi
15600   fi
15601 
15602   # Replace the commas with AND for use in the build directory name.
15603   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15604   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/'`
15605   if test "x$COUNT_VARIANTS" != "x,1"; then
15606     BUILDING_MULTIPLE_JVM_VARIANTS=yes
15607   else
15608     BUILDING_MULTIPLE_JVM_VARIANTS=no
15609   fi
15610 
15611 
15612 
15613 
15614 
15615 
15616 
15617 
15618 
15619 
15620   INCLUDE_SA=true
15621   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15622     INCLUDE_SA=false
15623   fi
15624   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15625     INCLUDE_SA=false
15626   fi
15627   if test "x$OPENJDK_TARGET_OS" = xaix ; then
15628     INCLUDE_SA=false
15629   fi
15630   if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15631     INCLUDE_SA=false
15632   fi
15633 
15634 
15635   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15636     MACOSX_UNIVERSAL="true"
15637   fi
15638 
15639 
15640 
15641 
15642   ###############################################################################
15643   #
15644   # Set the debug level
15645   #    release: no debug information, all optimizations, no asserts.
15646   #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
15647   #    fastdebug: debug information (-g), all optimizations, all asserts
15648   #    slowdebug: debug information (-g), no optimizations, all asserts
15649   #
15650   DEBUG_LEVEL="release"
15651   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15652 $as_echo_n "checking which debug level to use... " >&6; }
15653   # Check whether --enable-debug was given.
15654 if test "${enable_debug+set}" = set; then :
15655   enableval=$enable_debug;
15656         ENABLE_DEBUG="${enableval}"
15657         DEBUG_LEVEL="fastdebug"
15658 
15659 else
15660   ENABLE_DEBUG="no"
15661 fi
15662 
15663 
15664 
15665 # Check whether --with-debug-level was given.
15666 if test "${with_debug_level+set}" = set; then :
15667   withval=$with_debug_level;
15668         DEBUG_LEVEL="${withval}"
15669         if test "x$ENABLE_DEBUG" = xyes; then
15670           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15671         fi
15672 
15673 fi
15674 
15675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15676 $as_echo "$DEBUG_LEVEL" >&6; }
15677 
15678   if test "x$DEBUG_LEVEL" != xrelease && \
15679       test "x$DEBUG_LEVEL" != xoptimized && \
15680       test "x$DEBUG_LEVEL" != xfastdebug && \
15681       test "x$DEBUG_LEVEL" != xslowdebug; then
15682     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15683   fi
15684 
15685 
15686   ###############################################################################
15687   #
15688   # Setup legacy vars/targets and new vars to deal with different debug levels.
15689   #
15690 
15691   case $DEBUG_LEVEL in
15692     release )
15693       VARIANT="OPT"
15694       FASTDEBUG="false"
15695       DEBUG_CLASSFILES="false"
15696       BUILD_VARIANT_RELEASE=""
15697       HOTSPOT_DEBUG_LEVEL="product"
15698       HOTSPOT_EXPORT="product"
15699       ;;
15700     fastdebug )
15701       VARIANT="DBG"
15702       FASTDEBUG="true"
15703       DEBUG_CLASSFILES="true"
15704       BUILD_VARIANT_RELEASE="-fastdebug"
15705       HOTSPOT_DEBUG_LEVEL="fastdebug"
15706       HOTSPOT_EXPORT="fastdebug"
15707       ;;
15708     slowdebug )
15709       VARIANT="DBG"
15710       FASTDEBUG="false"
15711       DEBUG_CLASSFILES="true"
15712       BUILD_VARIANT_RELEASE="-debug"
15713       HOTSPOT_DEBUG_LEVEL="debug"
15714       HOTSPOT_EXPORT="debug"
15715       ;;
15716     optimized )
15717       VARIANT="OPT"
15718       FASTDEBUG="false"
15719       DEBUG_CLASSFILES="false"
15720       BUILD_VARIANT_RELEASE="-optimized"
15721       HOTSPOT_DEBUG_LEVEL="optimized"
15722       HOTSPOT_EXPORT="optimized"
15723       ;;
15724   esac
15725 
15726   # The debug level 'optimized' is a little special because it is currently only
15727   # applicable to the HotSpot build where it means to build a completely
15728   # optimized version of the VM without any debugging code (like for the
15729   # 'release' debug level which is called 'product' in the HotSpot build) but
15730   # with the exception that it can contain additional code which is otherwise
15731   # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15732   # test new and/or experimental features which are not intended for customer
15733   # shipment. Because these new features need to be tested and benchmarked in
15734   # real world scenarios, we want to build the containing JDK at the 'release'
15735   # debug level.
15736   if test "x$DEBUG_LEVEL" = xoptimized; then
15737     DEBUG_LEVEL="release"
15738   fi
15739 
15740   #####
15741   # Generate the legacy makefile targets for hotspot.
15742   # The hotspot api for selecting the build artifacts, really, needs to be improved.
15743   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15744   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15745   # But until then ...
15746   HOTSPOT_TARGET=""
15747 
15748   if test "x$JVM_VARIANT_SERVER" = xtrue; then
15749     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15750   fi
15751 
15752   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15753     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15754   fi
15755 
15756   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15757     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15758   fi
15759 
15760   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15761     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
15762   fi
15763 
15764   if test "x$JVM_VARIANT_ZERO" = xtrue; then
15765     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15766   fi
15767 
15768   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15769     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15770   fi
15771 
15772   if test "x$JVM_VARIANT_CORE" = xtrue; then
15773     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15774   fi
15775 
15776   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15777 
15778   # On Macosx universal binaries are produced, but they only contain
15779   # 64 bit intel. This invalidates control of which jvms are built
15780   # from configure, but only server is valid anyway. Fix this
15781   # when hotspot makefiles are rewritten.
15782   if test "x$MACOSX_UNIVERSAL" = xtrue; then
15783     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15784   fi
15785 
15786   #####
15787 
15788 
15789 
15790 
15791 
15792 
15793 
15794 
15795 # With basic setup done, call the custom early hook.
15796 
15797 
15798 # Check if we have devkits, extra paths or sysroot set.
15799 
15800 
15801 # Check whether --with-devkit was given.
15802 if test "${with_devkit+set}" = set; then :
15803   withval=$with_devkit;
15804 
15805   # Only process if variable expands to non-empty
15806 
15807   if test "x$with_devkit" != x; then
15808     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15809 
15810   # Input might be given as Windows format, start by converting to
15811   # unix format.
15812   path="$with_devkit"
15813   new_path=`$CYGPATH -u "$path"`
15814 
15815   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15816   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15817   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15818   # "foo.exe" is OK but "foo" is an error.
15819   #
15820   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15821   # It is also a way to make sure we got the proper file name for the real test later on.
15822   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15823   if test "x$test_shortpath" = x; then
15824     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15825 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15826     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15827   fi
15828 
15829   # Call helper function which possibly converts this using DOS-style short mode.
15830   # If so, the updated path is stored in $new_path.
15831 
15832   input_path="$new_path"
15833   # Check if we need to convert this using DOS-style short mode. If the path
15834   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15835   # take no chances and rewrite it.
15836   # Note: m4 eats our [], so we need to use [ and ] instead.
15837   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15838   if test "x$has_forbidden_chars" != x; then
15839     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15840     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15841     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15842     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15843       # Going to short mode and back again did indeed matter. Since short mode is
15844       # case insensitive, let's make it lowercase to improve readability.
15845       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15846       # Now convert it back to Unix-style (cygpath)
15847       input_path=`$CYGPATH -u "$shortmode_path"`
15848       new_path="$input_path"
15849     fi
15850   fi
15851 
15852   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15853   if test "x$test_cygdrive_prefix" = x; then
15854     # As a simple fix, exclude /usr/bin since it's not a real path.
15855     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15856       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15857       # a path prefixed by /cygdrive for fixpath to work.
15858       new_path="$CYGWIN_ROOT_PATH$input_path"
15859     fi
15860   fi
15861 
15862 
15863   if test "x$path" != "x$new_path"; then
15864     with_devkit="$new_path"
15865     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15866 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15867   fi
15868 
15869     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15870 
15871   path="$with_devkit"
15872   has_colon=`$ECHO $path | $GREP ^.:`
15873   new_path="$path"
15874   if test "x$has_colon" = x; then
15875     # Not in mixed or Windows style, start by that.
15876     new_path=`cmd //c echo $path`
15877   fi
15878 
15879 
15880   input_path="$new_path"
15881   # Check if we need to convert this using DOS-style short mode. If the path
15882   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15883   # take no chances and rewrite it.
15884   # Note: m4 eats our [], so we need to use [ and ] instead.
15885   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15886   if test "x$has_forbidden_chars" != x; then
15887     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15888     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15889   fi
15890 
15891 
15892   windows_path="$new_path"
15893   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15894     unix_path=`$CYGPATH -u "$windows_path"`
15895     new_path="$unix_path"
15896   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15897     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15898     new_path="$unix_path"
15899   fi
15900 
15901   if test "x$path" != "x$new_path"; then
15902     with_devkit="$new_path"
15903     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15904 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15905   fi
15906 
15907   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15908   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15909 
15910     else
15911       # We're on a unix platform. Hooray! :)
15912       path="$with_devkit"
15913       has_space=`$ECHO "$path" | $GREP " "`
15914       if test "x$has_space" != x; then
15915         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15916 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15917         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15918       fi
15919 
15920       # Use eval to expand a potential ~
15921       eval path="$path"
15922       if test ! -f "$path" && test ! -d "$path"; then
15923         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
15924       fi
15925 
15926       with_devkit="`cd "$path"; $THEPWDCMD -L`"
15927     fi
15928   fi
15929 
15930         DEVKIT_ROOT="$with_devkit"
15931         # Check for a meta data info file in the root of the devkit
15932         if test -f "$DEVKIT_ROOT/devkit.info"; then
15933           . $DEVKIT_ROOT/devkit.info
15934           # This potentially sets the following:
15935           # A descriptive name of the devkit
15936 
15937   if test "x$DEVKIT_NAME" = x; then
15938     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
15939   fi
15940 
15941           # Corresponds to --with-extra-path
15942 
15943   if test "x$DEVKIT_EXTRA_PATH" = x; then
15944     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
15945   fi
15946 
15947           # Corresponds to --with-toolchain-path
15948 
15949   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15950     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
15951   fi
15952 
15953           # Corresponds to --with-sysroot
15954 
15955   if test "x$DEVKIT_SYSROOT" = x; then
15956     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
15957   fi
15958 
15959 
15960           # Identifies the Visual Studio version in the devkit
15961 
15962   if test "x$DEVKIT_VS_VERSION" = x; then
15963     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
15964   fi
15965 
15966           # The Visual Studio include environment variable
15967 
15968   if test "x$DEVKIT_VS_INCLUDE" = x; then
15969     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
15970   fi
15971 
15972           # The Visual Studio lib environment variable
15973 
15974   if test "x$DEVKIT_VS_LIB" = x; then
15975     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
15976   fi
15977 
15978           # Corresponds to --with-msvcr-dll
15979 
15980   if test "x$DEVKIT_MSVCR_DLL" = x; then
15981     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
15982   fi
15983 
15984           # Corresponds to --with-msvcp-dll
15985 
15986   if test "x$DEVKIT_MSVCP_DLL" = x; then
15987     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
15988   fi
15989 
15990         fi
15991 
15992         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
15993 $as_echo_n "checking for devkit... " >&6; }
15994         if test "x$DEVKIT_NAME" != x; then
15995           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
15996 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
15997         else
15998           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
15999 $as_echo "$DEVKIT_ROOT" >&6; }
16000         fi
16001 
16002 
16003   if test "x$DEVKIT_EXTRA_PATH" != x; then
16004     if test "x$EXTRA_PATH" = x; then
16005       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16006     else
16007       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16008     fi
16009   fi
16010 
16011 
16012         # Fallback default of just /bin if DEVKIT_PATH is not defined
16013         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16014           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16015         fi
16016 
16017   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16018     if test "x$TOOLCHAIN_PATH" = x; then
16019       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16020     else
16021       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16022     fi
16023   fi
16024 
16025 
16026         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16027         # places for backwards compatiblity.
16028         if test "x$DEVKIT_SYSROOT" != x; then
16029           SYSROOT="$DEVKIT_SYSROOT"
16030         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16031           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16032         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16033           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16034         fi
16035 
16036 
16037 fi
16038 
16039 
16040   # You can force the sysroot if the sysroot encoded into the compiler tools
16041   # is not correct.
16042 
16043 # Check whether --with-sys-root was given.
16044 if test "${with_sys_root+set}" = set; then :
16045   withval=$with_sys_root; SYSROOT=$with_sys_root
16046 
16047 fi
16048 
16049 
16050 
16051 # Check whether --with-sysroot was given.
16052 if test "${with_sysroot+set}" = set; then :
16053   withval=$with_sysroot; SYSROOT=$with_sysroot
16054 
16055 fi
16056 
16057 
16058 
16059 # Check whether --with-tools-dir was given.
16060 if test "${with_tools_dir+set}" = set; then :
16061   withval=$with_tools_dir;
16062   if test "x$with_tools_dir" != x; then
16063     if test "x$TOOLCHAIN_PATH" = x; then
16064       TOOLCHAIN_PATH="$with_tools_dir"
16065     else
16066       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16067     fi
16068   fi
16069 
16070 
16071 fi
16072 
16073 
16074 
16075 # Check whether --with-toolchain-path was given.
16076 if test "${with_toolchain_path+set}" = set; then :
16077   withval=$with_toolchain_path;
16078   if test "x$with_toolchain_path" != x; then
16079     if test "x$TOOLCHAIN_PATH" = x; then
16080       TOOLCHAIN_PATH="$with_toolchain_path"
16081     else
16082       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16083     fi
16084   fi
16085 
16086 
16087 fi
16088 
16089 
16090 
16091 # Check whether --with-extra-path was given.
16092 if test "${with_extra_path+set}" = set; then :
16093   withval=$with_extra_path;
16094   if test "x$with_extra_path" != x; then
16095     if test "x$EXTRA_PATH" = x; then
16096       EXTRA_PATH="$with_extra_path"
16097     else
16098       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16099     fi
16100   fi
16101 
16102 
16103 fi
16104 
16105 
16106   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16107     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16108     # If not, detect if Xcode is installed by running xcodebuild -version
16109     # if no Xcode installed, xcodebuild exits with 1
16110     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16111     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16112       # We need to use xcodebuild in the toolchain dir provided by the user, this will
16113       # fall back on the stub binary in /usr/bin/xcodebuild
16114       # Extract the first word of "xcodebuild", so it can be a program name with args.
16115 set dummy xcodebuild; ac_word=$2
16116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16117 $as_echo_n "checking for $ac_word... " >&6; }
16118 if ${ac_cv_path_XCODEBUILD+:} false; then :
16119   $as_echo_n "(cached) " >&6
16120 else
16121   case $XCODEBUILD in
16122   [\\/]* | ?:[\\/]*)
16123   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16124   ;;
16125   *)
16126   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16127 for as_dir in $TOOLCHAIN_PATH
16128 do
16129   IFS=$as_save_IFS
16130   test -z "$as_dir" && as_dir=.
16131     for ac_exec_ext in '' $ac_executable_extensions; do
16132   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16133     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16134     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16135     break 2
16136   fi
16137 done
16138   done
16139 IFS=$as_save_IFS
16140 
16141   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16142   ;;
16143 esac
16144 fi
16145 XCODEBUILD=$ac_cv_path_XCODEBUILD
16146 if test -n "$XCODEBUILD"; then
16147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16148 $as_echo "$XCODEBUILD" >&6; }
16149 else
16150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16151 $as_echo "no" >&6; }
16152 fi
16153 
16154 
16155     else
16156       # this should result in SYSROOT being empty, unless --with-sysroot is provided
16157       # when only the command line tools are installed there are no SDKs, so headers
16158       # are copied into the system frameworks
16159       XCODEBUILD=
16160 
16161     fi
16162 
16163     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16164 $as_echo_n "checking for sdk name... " >&6; }
16165 
16166 # Check whether --with-sdk-name was given.
16167 if test "${with_sdk_name+set}" = set; then :
16168   withval=$with_sdk_name; SDKNAME=$with_sdk_name
16169 
16170 fi
16171 
16172     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16173 $as_echo "$SDKNAME" >&6; }
16174 
16175     # if toolchain path is specified then don't rely on system headers, they may not compile
16176     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16177     test -z "$TOOLCHAIN_PATH" && \
16178       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16179 
16180     if test -z "$SYSROOT"; then
16181       if test -n "$XCODEBUILD"; then
16182         # if we don't have system headers, use default SDK name (last resort)
16183         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16184           SDKNAME=${SDKNAME:-macosx}
16185         fi
16186 
16187         if test -n "$SDKNAME"; then
16188           # Call xcodebuild to determine SYSROOT
16189           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16190         fi
16191       else
16192         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16193           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
16194         fi
16195       fi
16196     else
16197       # warn user if --with-sdk-name was also set
16198       if test -n "$with_sdk_name"; then
16199         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16200 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16201       fi
16202     fi
16203 
16204     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16205       # If no system framework headers, then SYSROOT must be set, or we won't build
16206       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
16207     fi
16208 
16209     # Perform a basic sanity test
16210     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16211       if test -z "$SYSROOT"; then
16212         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
16213       else
16214         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16215       fi
16216     fi
16217 
16218     # set SDKROOT too, Xcode tools will pick it up
16219     SDKROOT=$SYSROOT
16220 
16221   fi
16222 
16223   # Prepend the extra path to the global path
16224 
16225   if test "x$EXTRA_PATH" != x; then
16226     if test "x$PATH" = x; then
16227       PATH="$EXTRA_PATH"
16228     else
16229       PATH="$EXTRA_PATH:$PATH"
16230     fi
16231   fi
16232 
16233 
16234   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16235     # Add extra search paths on solaris for utilities like ar and as etc...
16236     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16237   fi
16238 
16239   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16240 $as_echo_n "checking for sysroot... " >&6; }
16241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16242 $as_echo "$SYSROOT" >&6; }
16243   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16244 $as_echo_n "checking for toolchain path... " >&6; }
16245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16246 $as_echo "$TOOLCHAIN_PATH" >&6; }
16247   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16248 $as_echo_n "checking for extra path... " >&6; }
16249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16250 $as_echo "$EXTRA_PATH" >&6; }
16251 
16252 
16253 # To properly create a configuration name, we need to have the OpenJDK target
16254 # and options (variants and debug level) parsed.
16255 
16256 
16257 
16258 # Check whether --with-conf-name was given.
16259 if test "${with_conf_name+set}" = set; then :
16260   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16261 fi
16262 
16263 
16264   # Test from where we are running configure, in or outside of src root.
16265   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16266 $as_echo_n "checking where to store configuration... " >&6; }
16267   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16268       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16269       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16270     # We are running configure from the src root.
16271     # Create a default ./build/target-variant-debuglevel output root.
16272     if test "x${CONF_NAME}" = x; then
16273       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16274 $as_echo "in default location" >&6; }
16275       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16276     else
16277       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16278 $as_echo "in build directory with custom name" >&6; }
16279     fi
16280     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16281     $MKDIR -p "$OUTPUT_ROOT"
16282     if test ! -d "$OUTPUT_ROOT"; then
16283       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16284     fi
16285   else
16286     # We are running configure from outside of the src dir.
16287     # Then use the current directory as output dir!
16288     # If configuration is situated in normal build directory, just use the build
16289     # directory name as configuration name, otherwise use the complete path.
16290     if test "x${CONF_NAME}" = x; then
16291       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16292     fi
16293     OUTPUT_ROOT="$CURDIR"
16294     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16295 $as_echo "in current directory" >&6; }
16296 
16297     # WARNING: This might be a bad thing to do. You need to be sure you want to
16298     # have a configuration in this directory. Do some sanity checks!
16299 
16300     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16301       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16302       # other files
16303       files_present=`$LS $OUTPUT_ROOT`
16304       # Configure has already touched config.log and confdefs.h in the current dir when this check
16305       # is performed.
16306       filtered_files=`$ECHO "$files_present" \
16307           | $SED -e 's/config.log//g' \
16308               -e 's/configure.log//g' \
16309               -e 's/confdefs.h//g' \
16310               -e 's/ //g' \
16311           | $TR -d '\n'`
16312       if test "x$filtered_files" != x; then
16313         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16314 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
16315         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16316 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16317         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16318 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16319         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16320 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16321         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16322 $as_echo "$as_me: seriously mess up just about everything." >&6;}
16323         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16324 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16325         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16326 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16327         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16328       fi
16329     fi
16330   fi
16331   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16332 $as_echo_n "checking what configuration name to use... " >&6; }
16333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16334 $as_echo "$CONF_NAME" >&6; }
16335 
16336 
16337   # Only process if variable expands to non-empty
16338 
16339   if test "x$OUTPUT_ROOT" != x; then
16340     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16341 
16342   # Input might be given as Windows format, start by converting to
16343   # unix format.
16344   path="$OUTPUT_ROOT"
16345   new_path=`$CYGPATH -u "$path"`
16346 
16347   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16348   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16349   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16350   # "foo.exe" is OK but "foo" is an error.
16351   #
16352   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16353   # It is also a way to make sure we got the proper file name for the real test later on.
16354   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16355   if test "x$test_shortpath" = x; then
16356     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16357 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16358     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16359   fi
16360 
16361   # Call helper function which possibly converts this using DOS-style short mode.
16362   # If so, the updated path is stored in $new_path.
16363 
16364   input_path="$new_path"
16365   # Check if we need to convert this using DOS-style short mode. If the path
16366   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16367   # take no chances and rewrite it.
16368   # Note: m4 eats our [], so we need to use [ and ] instead.
16369   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16370   if test "x$has_forbidden_chars" != x; then
16371     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16372     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16373     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16374     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16375       # Going to short mode and back again did indeed matter. Since short mode is
16376       # case insensitive, let's make it lowercase to improve readability.
16377       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16378       # Now convert it back to Unix-style (cygpath)
16379       input_path=`$CYGPATH -u "$shortmode_path"`
16380       new_path="$input_path"
16381     fi
16382   fi
16383 
16384   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16385   if test "x$test_cygdrive_prefix" = x; then
16386     # As a simple fix, exclude /usr/bin since it's not a real path.
16387     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16388       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16389       # a path prefixed by /cygdrive for fixpath to work.
16390       new_path="$CYGWIN_ROOT_PATH$input_path"
16391     fi
16392   fi
16393 
16394 
16395   if test "x$path" != "x$new_path"; then
16396     OUTPUT_ROOT="$new_path"
16397     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16398 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16399   fi
16400 
16401     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16402 
16403   path="$OUTPUT_ROOT"
16404   has_colon=`$ECHO $path | $GREP ^.:`
16405   new_path="$path"
16406   if test "x$has_colon" = x; then
16407     # Not in mixed or Windows style, start by that.
16408     new_path=`cmd //c echo $path`
16409   fi
16410 
16411 
16412   input_path="$new_path"
16413   # Check if we need to convert this using DOS-style short mode. If the path
16414   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16415   # take no chances and rewrite it.
16416   # Note: m4 eats our [], so we need to use [ and ] instead.
16417   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16418   if test "x$has_forbidden_chars" != x; then
16419     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16420     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16421   fi
16422 
16423 
16424   windows_path="$new_path"
16425   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16426     unix_path=`$CYGPATH -u "$windows_path"`
16427     new_path="$unix_path"
16428   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16429     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16430     new_path="$unix_path"
16431   fi
16432 
16433   if test "x$path" != "x$new_path"; then
16434     OUTPUT_ROOT="$new_path"
16435     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16436 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16437   fi
16438 
16439   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16440   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16441 
16442     else
16443       # We're on a unix platform. Hooray! :)
16444       path="$OUTPUT_ROOT"
16445       has_space=`$ECHO "$path" | $GREP " "`
16446       if test "x$has_space" != x; then
16447         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16448 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16449         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16450       fi
16451 
16452       # Use eval to expand a potential ~
16453       eval path="$path"
16454       if test ! -f "$path" && test ! -d "$path"; then
16455         as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16456       fi
16457 
16458       OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16459     fi
16460   fi
16461 
16462 
16463   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16464   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16465 
16466   SPEC=$OUTPUT_ROOT/spec.gmk
16467 
16468   CONF_NAME=$CONF_NAME
16469 
16470   OUTPUT_ROOT=$OUTPUT_ROOT
16471 
16472 
16473 
16474   # The spec.gmk file contains all variables for the make system.
16475   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16476 
16477   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16478   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16479 
16480   # The bootcycle-spec.gmk file contains support for boot cycle builds.
16481   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16482 
16483   # The compare.sh is used to compare the build output to other builds.
16484   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16485 
16486   # The generated Makefile knows where the spec.gmk is and where the source is.
16487   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16488   # which will look for generated configurations
16489   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16490 
16491 
16492 
16493 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16494 
16495   for ac_prog in apt-get yum port pkgutil pkgadd
16496 do
16497   # Extract the first word of "$ac_prog", so it can be a program name with args.
16498 set dummy $ac_prog; ac_word=$2
16499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16500 $as_echo_n "checking for $ac_word... " >&6; }
16501 if ${ac_cv_prog_PKGHANDLER+:} false; then :
16502   $as_echo_n "(cached) " >&6
16503 else
16504   if test -n "$PKGHANDLER"; then
16505   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16506 else
16507 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16508 for as_dir in $PATH
16509 do
16510   IFS=$as_save_IFS
16511   test -z "$as_dir" && as_dir=.
16512     for ac_exec_ext in '' $ac_executable_extensions; do
16513   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16514     ac_cv_prog_PKGHANDLER="$ac_prog"
16515     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16516     break 2
16517   fi
16518 done
16519   done
16520 IFS=$as_save_IFS
16521 
16522 fi
16523 fi
16524 PKGHANDLER=$ac_cv_prog_PKGHANDLER
16525 if test -n "$PKGHANDLER"; then
16526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16527 $as_echo "$PKGHANDLER" >&6; }
16528 else
16529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16530 $as_echo "no" >&6; }
16531 fi
16532 
16533 
16534   test -n "$PKGHANDLER" && break
16535 done
16536 
16537 
16538 
16539 # Setup tools that requires more complex handling, or that is not needed by the configure script.
16540 
16541 
16542 
16543   # Publish this variable in the help.
16544 
16545 
16546   if [ -z "${MAKE+x}" ]; then
16547     # The variable is not set by user, try to locate tool using the code snippet
16548 
16549     # Try our hardest to locate a correct version of GNU make
16550     for ac_prog in gmake
16551 do
16552   # Extract the first word of "$ac_prog", so it can be a program name with args.
16553 set dummy $ac_prog; ac_word=$2
16554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16555 $as_echo_n "checking for $ac_word... " >&6; }
16556 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16557   $as_echo_n "(cached) " >&6
16558 else
16559   case $CHECK_GMAKE in
16560   [\\/]* | ?:[\\/]*)
16561   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16562   ;;
16563   *)
16564   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16565 for as_dir in $PATH
16566 do
16567   IFS=$as_save_IFS
16568   test -z "$as_dir" && as_dir=.
16569     for ac_exec_ext in '' $ac_executable_extensions; do
16570   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16571     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16572     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16573     break 2
16574   fi
16575 done
16576   done
16577 IFS=$as_save_IFS
16578 
16579   ;;
16580 esac
16581 fi
16582 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16583 if test -n "$CHECK_GMAKE"; then
16584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16585 $as_echo "$CHECK_GMAKE" >&6; }
16586 else
16587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16588 $as_echo "no" >&6; }
16589 fi
16590 
16591 
16592   test -n "$CHECK_GMAKE" && break
16593 done
16594 
16595 
16596   MAKE_CANDIDATE=""$CHECK_GMAKE""
16597   DESCRIPTION="gmake in PATH"
16598 
16599   # On Cygwin, we require a newer version of make than on other platforms
16600   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16601     MAKE_VERSION_EXPR="-e 4\."
16602     MAKE_REQUIRED_VERSION="4.0"
16603    else
16604     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16605     MAKE_REQUIRED_VERSION="3.81"
16606   fi
16607 
16608   if test "x$MAKE_CANDIDATE" != x; then
16609     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16610 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16611     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16612     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16613     if test "x$IS_GNU_MAKE" = x; then
16614       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16615 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16616     else
16617       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16618       if test "x$IS_MODERN_MAKE" = x; then
16619         { $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
16620 $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;}
16621       else
16622         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16623           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16624             MAKE_EXPECTED_ENV='cygwin'
16625           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16626             MAKE_EXPECTED_ENV='msys'
16627           else
16628             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16629           fi
16630           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16631           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16632         else
16633           # Not relevant for non-Windows
16634           IS_MAKE_CORRECT_ENV=true
16635         fi
16636         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16637           { $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
16638 $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;}
16639         else
16640           FOUND_MAKE=$MAKE_CANDIDATE
16641 
16642   # Only process if variable expands to non-empty
16643 
16644   if test "x$FOUND_MAKE" != x; then
16645     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16646 
16647   # First separate the path from the arguments. This will split at the first
16648   # space.
16649   complete="$FOUND_MAKE"
16650   path="${complete%% *}"
16651   tmp="$complete EOL"
16652   arguments="${tmp#* }"
16653 
16654   # Input might be given as Windows format, start by converting to
16655   # unix format.
16656   new_path=`$CYGPATH -u "$path"`
16657 
16658   # Now try to locate executable using which
16659   new_path=`$WHICH "$new_path" 2> /dev/null`
16660   # bat and cmd files are not always considered executable in cygwin causing which
16661   # to not find them
16662   if test "x$new_path" = x \
16663       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16664       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16665     new_path=`$CYGPATH -u "$path"`
16666   fi
16667   if test "x$new_path" = x; then
16668     # Oops. Which didn't find the executable.
16669     # The splitting of arguments from the executable at a space might have been incorrect,
16670     # since paths with space are more likely in Windows. Give it another try with the whole
16671     # argument.
16672     path="$complete"
16673     arguments="EOL"
16674     new_path=`$CYGPATH -u "$path"`
16675     new_path=`$WHICH "$new_path" 2> /dev/null`
16676     # bat and cmd files are not always considered executable in cygwin causing which
16677     # to not find them
16678     if test "x$new_path" = x \
16679         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16680         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16681       new_path=`$CYGPATH -u "$path"`
16682     fi
16683     if test "x$new_path" = x; then
16684       # It's still not found. Now this is an unrecoverable error.
16685       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16686 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16687       has_space=`$ECHO "$complete" | $GREP " "`
16688       if test "x$has_space" != x; then
16689         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16690 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16691       fi
16692       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16693     fi
16694   fi
16695 
16696   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16697   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16698   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16699   # "foo.exe" is OK but "foo" is an error.
16700   #
16701   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16702   # It is also a way to make sure we got the proper file name for the real test later on.
16703   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16704   if test "x$test_shortpath" = x; then
16705     # Short path failed, file does not exist as specified.
16706     # Try adding .exe or .cmd
16707     if test -f "${new_path}.exe"; then
16708       input_to_shortpath="${new_path}.exe"
16709     elif test -f "${new_path}.cmd"; then
16710       input_to_shortpath="${new_path}.cmd"
16711     else
16712       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16713 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16714       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16715 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16716       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16717     fi
16718   else
16719     input_to_shortpath="$new_path"
16720   fi
16721 
16722   # Call helper function which possibly converts this using DOS-style short mode.
16723   # If so, the updated path is stored in $new_path.
16724   new_path="$input_to_shortpath"
16725 
16726   input_path="$input_to_shortpath"
16727   # Check if we need to convert this using DOS-style short mode. If the path
16728   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16729   # take no chances and rewrite it.
16730   # Note: m4 eats our [], so we need to use [ and ] instead.
16731   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16732   if test "x$has_forbidden_chars" != x; then
16733     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16734     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16735     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16736     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16737       # Going to short mode and back again did indeed matter. Since short mode is
16738       # case insensitive, let's make it lowercase to improve readability.
16739       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16740       # Now convert it back to Unix-style (cygpath)
16741       input_path=`$CYGPATH -u "$shortmode_path"`
16742       new_path="$input_path"
16743     fi
16744   fi
16745 
16746   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16747   if test "x$test_cygdrive_prefix" = x; then
16748     # As a simple fix, exclude /usr/bin since it's not a real path.
16749     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16750       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16751       # a path prefixed by /cygdrive for fixpath to work.
16752       new_path="$CYGWIN_ROOT_PATH$input_path"
16753     fi
16754   fi
16755 
16756   # remove trailing .exe if any
16757   new_path="${new_path/%.exe/}"
16758 
16759     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16760 
16761   # First separate the path from the arguments. This will split at the first
16762   # space.
16763   complete="$FOUND_MAKE"
16764   path="${complete%% *}"
16765   tmp="$complete EOL"
16766   arguments="${tmp#* }"
16767 
16768   # Input might be given as Windows format, start by converting to
16769   # unix format.
16770   new_path="$path"
16771 
16772   windows_path="$new_path"
16773   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16774     unix_path=`$CYGPATH -u "$windows_path"`
16775     new_path="$unix_path"
16776   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16777     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16778     new_path="$unix_path"
16779   fi
16780 
16781 
16782   # Now try to locate executable using which
16783   new_path=`$WHICH "$new_path" 2> /dev/null`
16784 
16785   if test "x$new_path" = x; then
16786     # Oops. Which didn't find the executable.
16787     # The splitting of arguments from the executable at a space might have been incorrect,
16788     # since paths with space are more likely in Windows. Give it another try with the whole
16789     # argument.
16790     path="$complete"
16791     arguments="EOL"
16792     new_path="$path"
16793 
16794   windows_path="$new_path"
16795   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16796     unix_path=`$CYGPATH -u "$windows_path"`
16797     new_path="$unix_path"
16798   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16799     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16800     new_path="$unix_path"
16801   fi
16802 
16803 
16804     new_path=`$WHICH "$new_path" 2> /dev/null`
16805     # bat and cmd files are not always considered executable in MSYS causing which
16806     # to not find them
16807     if test "x$new_path" = x \
16808         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16809         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16810       new_path="$path"
16811 
16812   windows_path="$new_path"
16813   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16814     unix_path=`$CYGPATH -u "$windows_path"`
16815     new_path="$unix_path"
16816   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16817     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16818     new_path="$unix_path"
16819   fi
16820 
16821     fi
16822 
16823     if test "x$new_path" = x; then
16824       # It's still not found. Now this is an unrecoverable error.
16825       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16826 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16827       has_space=`$ECHO "$complete" | $GREP " "`
16828       if test "x$has_space" != x; then
16829         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16830 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16831       fi
16832       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16833     fi
16834   fi
16835 
16836   # Now new_path has a complete unix path to the binary
16837   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16838     # Keep paths in /bin as-is, but remove trailing .exe if any
16839     new_path="${new_path/%.exe/}"
16840     # Do not save /bin paths to all_fixpath_prefixes!
16841   else
16842     # Not in mixed or Windows style, start by that.
16843     new_path=`cmd //c echo $new_path`
16844 
16845   input_path="$new_path"
16846   # Check if we need to convert this using DOS-style short mode. If the path
16847   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16848   # take no chances and rewrite it.
16849   # Note: m4 eats our [], so we need to use [ and ] instead.
16850   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16851   if test "x$has_forbidden_chars" != x; then
16852     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16853     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16854   fi
16855 
16856     # Output is in $new_path
16857 
16858   windows_path="$new_path"
16859   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16860     unix_path=`$CYGPATH -u "$windows_path"`
16861     new_path="$unix_path"
16862   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16863     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16864     new_path="$unix_path"
16865   fi
16866 
16867     # remove trailing .exe if any
16868     new_path="${new_path/%.exe/}"
16869 
16870     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16871     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16872   fi
16873 
16874     else
16875       # We're on a unix platform. Hooray! :)
16876       # First separate the path from the arguments. This will split at the first
16877       # space.
16878       complete="$FOUND_MAKE"
16879       path="${complete%% *}"
16880       tmp="$complete EOL"
16881       arguments="${tmp#* }"
16882 
16883       # Cannot rely on the command "which" here since it doesn't always work.
16884       is_absolute_path=`$ECHO "$path" | $GREP ^/`
16885       if test -z "$is_absolute_path"; then
16886         # Path to executable is not absolute. Find it.
16887         IFS_save="$IFS"
16888         IFS=:
16889         for p in $PATH; do
16890           if test -f "$p/$path" && test -x "$p/$path"; then
16891             new_path="$p/$path"
16892             break
16893           fi
16894         done
16895         IFS="$IFS_save"
16896       else
16897         # This is an absolute path, we can use it without further modifications.
16898         new_path="$path"
16899       fi
16900 
16901       if test "x$new_path" = x; then
16902         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16903 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16904         has_space=`$ECHO "$complete" | $GREP " "`
16905         if test "x$has_space" != x; then
16906           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16907 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16908         fi
16909         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16910       fi
16911     fi
16912 
16913     # Now join together the path and the arguments once again
16914     if test "x$arguments" != xEOL; then
16915       new_complete="$new_path ${arguments% *}"
16916     else
16917       new_complete="$new_path"
16918     fi
16919 
16920     if test "x$complete" != "x$new_complete"; then
16921       FOUND_MAKE="$new_complete"
16922       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16923 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16924     fi
16925   fi
16926 
16927         fi
16928       fi
16929     fi
16930   fi
16931 
16932 
16933     if test "x$FOUND_MAKE" = x; then
16934       for ac_prog in make
16935 do
16936   # Extract the first word of "$ac_prog", so it can be a program name with args.
16937 set dummy $ac_prog; ac_word=$2
16938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16939 $as_echo_n "checking for $ac_word... " >&6; }
16940 if ${ac_cv_path_CHECK_MAKE+:} false; then :
16941   $as_echo_n "(cached) " >&6
16942 else
16943   case $CHECK_MAKE in
16944   [\\/]* | ?:[\\/]*)
16945   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16946   ;;
16947   *)
16948   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16949 for as_dir in $PATH
16950 do
16951   IFS=$as_save_IFS
16952   test -z "$as_dir" && as_dir=.
16953     for ac_exec_ext in '' $ac_executable_extensions; do
16954   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16955     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16956     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16957     break 2
16958   fi
16959 done
16960   done
16961 IFS=$as_save_IFS
16962 
16963   ;;
16964 esac
16965 fi
16966 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16967 if test -n "$CHECK_MAKE"; then
16968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16969 $as_echo "$CHECK_MAKE" >&6; }
16970 else
16971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16972 $as_echo "no" >&6; }
16973 fi
16974 
16975 
16976   test -n "$CHECK_MAKE" && break
16977 done
16978 
16979 
16980   MAKE_CANDIDATE=""$CHECK_MAKE""
16981   DESCRIPTION="make in PATH"
16982 
16983   # On Cygwin, we require a newer version of make than on other platforms
16984   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16985     MAKE_VERSION_EXPR="-e 4\."
16986     MAKE_REQUIRED_VERSION="4.0"
16987    else
16988     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16989     MAKE_REQUIRED_VERSION="3.81"
16990   fi
16991 
16992   if test "x$MAKE_CANDIDATE" != x; then
16993     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16994 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16995     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16996     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16997     if test "x$IS_GNU_MAKE" = x; then
16998       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16999 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17000     else
17001       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17002       if test "x$IS_MODERN_MAKE" = x; then
17003         { $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
17004 $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;}
17005       else
17006         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17007           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17008             MAKE_EXPECTED_ENV='cygwin'
17009           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17010             MAKE_EXPECTED_ENV='msys'
17011           else
17012             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17013           fi
17014           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17015           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17016         else
17017           # Not relevant for non-Windows
17018           IS_MAKE_CORRECT_ENV=true
17019         fi
17020         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17021           { $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
17022 $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;}
17023         else
17024           FOUND_MAKE=$MAKE_CANDIDATE
17025 
17026   # Only process if variable expands to non-empty
17027 
17028   if test "x$FOUND_MAKE" != x; then
17029     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17030 
17031   # First separate the path from the arguments. This will split at the first
17032   # space.
17033   complete="$FOUND_MAKE"
17034   path="${complete%% *}"
17035   tmp="$complete EOL"
17036   arguments="${tmp#* }"
17037 
17038   # Input might be given as Windows format, start by converting to
17039   # unix format.
17040   new_path=`$CYGPATH -u "$path"`
17041 
17042   # Now try to locate executable using which
17043   new_path=`$WHICH "$new_path" 2> /dev/null`
17044   # bat and cmd files are not always considered executable in cygwin causing which
17045   # to not find them
17046   if test "x$new_path" = x \
17047       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17048       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17049     new_path=`$CYGPATH -u "$path"`
17050   fi
17051   if test "x$new_path" = x; then
17052     # Oops. Which didn't find the executable.
17053     # The splitting of arguments from the executable at a space might have been incorrect,
17054     # since paths with space are more likely in Windows. Give it another try with the whole
17055     # argument.
17056     path="$complete"
17057     arguments="EOL"
17058     new_path=`$CYGPATH -u "$path"`
17059     new_path=`$WHICH "$new_path" 2> /dev/null`
17060     # bat and cmd files are not always considered executable in cygwin causing which
17061     # to not find them
17062     if test "x$new_path" = x \
17063         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17064         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17065       new_path=`$CYGPATH -u "$path"`
17066     fi
17067     if test "x$new_path" = x; then
17068       # It's still not found. Now this is an unrecoverable error.
17069       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17070 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17071       has_space=`$ECHO "$complete" | $GREP " "`
17072       if test "x$has_space" != x; then
17073         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17074 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17075       fi
17076       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17077     fi
17078   fi
17079 
17080   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17081   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17082   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17083   # "foo.exe" is OK but "foo" is an error.
17084   #
17085   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17086   # It is also a way to make sure we got the proper file name for the real test later on.
17087   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17088   if test "x$test_shortpath" = x; then
17089     # Short path failed, file does not exist as specified.
17090     # Try adding .exe or .cmd
17091     if test -f "${new_path}.exe"; then
17092       input_to_shortpath="${new_path}.exe"
17093     elif test -f "${new_path}.cmd"; then
17094       input_to_shortpath="${new_path}.cmd"
17095     else
17096       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17097 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17098       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17099 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17100       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17101     fi
17102   else
17103     input_to_shortpath="$new_path"
17104   fi
17105 
17106   # Call helper function which possibly converts this using DOS-style short mode.
17107   # If so, the updated path is stored in $new_path.
17108   new_path="$input_to_shortpath"
17109 
17110   input_path="$input_to_shortpath"
17111   # Check if we need to convert this using DOS-style short mode. If the path
17112   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17113   # take no chances and rewrite it.
17114   # Note: m4 eats our [], so we need to use [ and ] instead.
17115   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17116   if test "x$has_forbidden_chars" != x; then
17117     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17118     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17119     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17120     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17121       # Going to short mode and back again did indeed matter. Since short mode is
17122       # case insensitive, let's make it lowercase to improve readability.
17123       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17124       # Now convert it back to Unix-style (cygpath)
17125       input_path=`$CYGPATH -u "$shortmode_path"`
17126       new_path="$input_path"
17127     fi
17128   fi
17129 
17130   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17131   if test "x$test_cygdrive_prefix" = x; then
17132     # As a simple fix, exclude /usr/bin since it's not a real path.
17133     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17134       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17135       # a path prefixed by /cygdrive for fixpath to work.
17136       new_path="$CYGWIN_ROOT_PATH$input_path"
17137     fi
17138   fi
17139 
17140   # remove trailing .exe if any
17141   new_path="${new_path/%.exe/}"
17142 
17143     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17144 
17145   # First separate the path from the arguments. This will split at the first
17146   # space.
17147   complete="$FOUND_MAKE"
17148   path="${complete%% *}"
17149   tmp="$complete EOL"
17150   arguments="${tmp#* }"
17151 
17152   # Input might be given as Windows format, start by converting to
17153   # unix format.
17154   new_path="$path"
17155 
17156   windows_path="$new_path"
17157   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17158     unix_path=`$CYGPATH -u "$windows_path"`
17159     new_path="$unix_path"
17160   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17161     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17162     new_path="$unix_path"
17163   fi
17164 
17165 
17166   # Now try to locate executable using which
17167   new_path=`$WHICH "$new_path" 2> /dev/null`
17168 
17169   if test "x$new_path" = x; then
17170     # Oops. Which didn't find the executable.
17171     # The splitting of arguments from the executable at a space might have been incorrect,
17172     # since paths with space are more likely in Windows. Give it another try with the whole
17173     # argument.
17174     path="$complete"
17175     arguments="EOL"
17176     new_path="$path"
17177 
17178   windows_path="$new_path"
17179   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17180     unix_path=`$CYGPATH -u "$windows_path"`
17181     new_path="$unix_path"
17182   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17183     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17184     new_path="$unix_path"
17185   fi
17186 
17187 
17188     new_path=`$WHICH "$new_path" 2> /dev/null`
17189     # bat and cmd files are not always considered executable in MSYS causing which
17190     # to not find them
17191     if test "x$new_path" = x \
17192         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17193         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17194       new_path="$path"
17195 
17196   windows_path="$new_path"
17197   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17198     unix_path=`$CYGPATH -u "$windows_path"`
17199     new_path="$unix_path"
17200   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17201     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17202     new_path="$unix_path"
17203   fi
17204 
17205     fi
17206 
17207     if test "x$new_path" = x; then
17208       # It's still not found. Now this is an unrecoverable error.
17209       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17210 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17211       has_space=`$ECHO "$complete" | $GREP " "`
17212       if test "x$has_space" != x; then
17213         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17214 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17215       fi
17216       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17217     fi
17218   fi
17219 
17220   # Now new_path has a complete unix path to the binary
17221   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17222     # Keep paths in /bin as-is, but remove trailing .exe if any
17223     new_path="${new_path/%.exe/}"
17224     # Do not save /bin paths to all_fixpath_prefixes!
17225   else
17226     # Not in mixed or Windows style, start by that.
17227     new_path=`cmd //c echo $new_path`
17228 
17229   input_path="$new_path"
17230   # Check if we need to convert this using DOS-style short mode. If the path
17231   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17232   # take no chances and rewrite it.
17233   # Note: m4 eats our [], so we need to use [ and ] instead.
17234   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17235   if test "x$has_forbidden_chars" != x; then
17236     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17237     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17238   fi
17239 
17240     # Output is in $new_path
17241 
17242   windows_path="$new_path"
17243   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17244     unix_path=`$CYGPATH -u "$windows_path"`
17245     new_path="$unix_path"
17246   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17247     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17248     new_path="$unix_path"
17249   fi
17250 
17251     # remove trailing .exe if any
17252     new_path="${new_path/%.exe/}"
17253 
17254     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17255     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17256   fi
17257 
17258     else
17259       # We're on a unix platform. Hooray! :)
17260       # First separate the path from the arguments. This will split at the first
17261       # space.
17262       complete="$FOUND_MAKE"
17263       path="${complete%% *}"
17264       tmp="$complete EOL"
17265       arguments="${tmp#* }"
17266 
17267       # Cannot rely on the command "which" here since it doesn't always work.
17268       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17269       if test -z "$is_absolute_path"; then
17270         # Path to executable is not absolute. Find it.
17271         IFS_save="$IFS"
17272         IFS=:
17273         for p in $PATH; do
17274           if test -f "$p/$path" && test -x "$p/$path"; then
17275             new_path="$p/$path"
17276             break
17277           fi
17278         done
17279         IFS="$IFS_save"
17280       else
17281         # This is an absolute path, we can use it without further modifications.
17282         new_path="$path"
17283       fi
17284 
17285       if test "x$new_path" = x; then
17286         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17287 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17288         has_space=`$ECHO "$complete" | $GREP " "`
17289         if test "x$has_space" != x; then
17290           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17291 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17292         fi
17293         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17294       fi
17295     fi
17296 
17297     # Now join together the path and the arguments once again
17298     if test "x$arguments" != xEOL; then
17299       new_complete="$new_path ${arguments% *}"
17300     else
17301       new_complete="$new_path"
17302     fi
17303 
17304     if test "x$complete" != "x$new_complete"; then
17305       FOUND_MAKE="$new_complete"
17306       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17307 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17308     fi
17309   fi
17310 
17311         fi
17312       fi
17313     fi
17314   fi
17315 
17316     fi
17317 
17318     if test "x$FOUND_MAKE" = x; then
17319       if test "x$TOOLCHAIN_PATH" != x; then
17320         # We have a toolchain path, check that as well before giving up.
17321         OLD_PATH=$PATH
17322         PATH=$TOOLCHAIN_PATH:$PATH
17323         for ac_prog in gmake
17324 do
17325   # Extract the first word of "$ac_prog", so it can be a program name with args.
17326 set dummy $ac_prog; ac_word=$2
17327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17328 $as_echo_n "checking for $ac_word... " >&6; }
17329 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17330   $as_echo_n "(cached) " >&6
17331 else
17332   case $CHECK_TOOLSDIR_GMAKE in
17333   [\\/]* | ?:[\\/]*)
17334   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17335   ;;
17336   *)
17337   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17338 for as_dir in $PATH
17339 do
17340   IFS=$as_save_IFS
17341   test -z "$as_dir" && as_dir=.
17342     for ac_exec_ext in '' $ac_executable_extensions; do
17343   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17344     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17345     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17346     break 2
17347   fi
17348 done
17349   done
17350 IFS=$as_save_IFS
17351 
17352   ;;
17353 esac
17354 fi
17355 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17356 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17358 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17359 else
17360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17361 $as_echo "no" >&6; }
17362 fi
17363 
17364 
17365   test -n "$CHECK_TOOLSDIR_GMAKE" && break
17366 done
17367 
17368 
17369   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17370   DESCRIPTION="gmake in tools-dir"
17371 
17372   # On Cygwin, we require a newer version of make than on other platforms
17373   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17374     MAKE_VERSION_EXPR="-e 4\."
17375     MAKE_REQUIRED_VERSION="4.0"
17376    else
17377     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17378     MAKE_REQUIRED_VERSION="3.81"
17379   fi
17380 
17381   if test "x$MAKE_CANDIDATE" != x; then
17382     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17383 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17384     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17385     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17386     if test "x$IS_GNU_MAKE" = x; then
17387       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17388 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17389     else
17390       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17391       if test "x$IS_MODERN_MAKE" = x; then
17392         { $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
17393 $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;}
17394       else
17395         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17396           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17397             MAKE_EXPECTED_ENV='cygwin'
17398           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17399             MAKE_EXPECTED_ENV='msys'
17400           else
17401             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17402           fi
17403           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17404           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17405         else
17406           # Not relevant for non-Windows
17407           IS_MAKE_CORRECT_ENV=true
17408         fi
17409         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17410           { $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
17411 $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;}
17412         else
17413           FOUND_MAKE=$MAKE_CANDIDATE
17414 
17415   # Only process if variable expands to non-empty
17416 
17417   if test "x$FOUND_MAKE" != x; then
17418     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17419 
17420   # First separate the path from the arguments. This will split at the first
17421   # space.
17422   complete="$FOUND_MAKE"
17423   path="${complete%% *}"
17424   tmp="$complete EOL"
17425   arguments="${tmp#* }"
17426 
17427   # Input might be given as Windows format, start by converting to
17428   # unix format.
17429   new_path=`$CYGPATH -u "$path"`
17430 
17431   # Now try to locate executable using which
17432   new_path=`$WHICH "$new_path" 2> /dev/null`
17433   # bat and cmd files are not always considered executable in cygwin causing which
17434   # to not find them
17435   if test "x$new_path" = x \
17436       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17437       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17438     new_path=`$CYGPATH -u "$path"`
17439   fi
17440   if test "x$new_path" = x; then
17441     # Oops. Which didn't find the executable.
17442     # The splitting of arguments from the executable at a space might have been incorrect,
17443     # since paths with space are more likely in Windows. Give it another try with the whole
17444     # argument.
17445     path="$complete"
17446     arguments="EOL"
17447     new_path=`$CYGPATH -u "$path"`
17448     new_path=`$WHICH "$new_path" 2> /dev/null`
17449     # bat and cmd files are not always considered executable in cygwin causing which
17450     # to not find them
17451     if test "x$new_path" = x \
17452         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17453         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17454       new_path=`$CYGPATH -u "$path"`
17455     fi
17456     if test "x$new_path" = x; then
17457       # It's still not found. Now this is an unrecoverable error.
17458       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17459 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17460       has_space=`$ECHO "$complete" | $GREP " "`
17461       if test "x$has_space" != x; then
17462         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17463 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17464       fi
17465       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17466     fi
17467   fi
17468 
17469   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17470   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17471   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17472   # "foo.exe" is OK but "foo" is an error.
17473   #
17474   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17475   # It is also a way to make sure we got the proper file name for the real test later on.
17476   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17477   if test "x$test_shortpath" = x; then
17478     # Short path failed, file does not exist as specified.
17479     # Try adding .exe or .cmd
17480     if test -f "${new_path}.exe"; then
17481       input_to_shortpath="${new_path}.exe"
17482     elif test -f "${new_path}.cmd"; then
17483       input_to_shortpath="${new_path}.cmd"
17484     else
17485       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17486 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17487       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17488 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17489       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17490     fi
17491   else
17492     input_to_shortpath="$new_path"
17493   fi
17494 
17495   # Call helper function which possibly converts this using DOS-style short mode.
17496   # If so, the updated path is stored in $new_path.
17497   new_path="$input_to_shortpath"
17498 
17499   input_path="$input_to_shortpath"
17500   # Check if we need to convert this using DOS-style short mode. If the path
17501   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17502   # take no chances and rewrite it.
17503   # Note: m4 eats our [], so we need to use [ and ] instead.
17504   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17505   if test "x$has_forbidden_chars" != x; then
17506     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17507     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17508     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17509     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17510       # Going to short mode and back again did indeed matter. Since short mode is
17511       # case insensitive, let's make it lowercase to improve readability.
17512       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17513       # Now convert it back to Unix-style (cygpath)
17514       input_path=`$CYGPATH -u "$shortmode_path"`
17515       new_path="$input_path"
17516     fi
17517   fi
17518 
17519   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17520   if test "x$test_cygdrive_prefix" = x; then
17521     # As a simple fix, exclude /usr/bin since it's not a real path.
17522     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17523       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17524       # a path prefixed by /cygdrive for fixpath to work.
17525       new_path="$CYGWIN_ROOT_PATH$input_path"
17526     fi
17527   fi
17528 
17529   # remove trailing .exe if any
17530   new_path="${new_path/%.exe/}"
17531 
17532     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17533 
17534   # First separate the path from the arguments. This will split at the first
17535   # space.
17536   complete="$FOUND_MAKE"
17537   path="${complete%% *}"
17538   tmp="$complete EOL"
17539   arguments="${tmp#* }"
17540 
17541   # Input might be given as Windows format, start by converting to
17542   # unix format.
17543   new_path="$path"
17544 
17545   windows_path="$new_path"
17546   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17547     unix_path=`$CYGPATH -u "$windows_path"`
17548     new_path="$unix_path"
17549   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17550     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17551     new_path="$unix_path"
17552   fi
17553 
17554 
17555   # Now try to locate executable using which
17556   new_path=`$WHICH "$new_path" 2> /dev/null`
17557 
17558   if test "x$new_path" = x; then
17559     # Oops. Which didn't find the executable.
17560     # The splitting of arguments from the executable at a space might have been incorrect,
17561     # since paths with space are more likely in Windows. Give it another try with the whole
17562     # argument.
17563     path="$complete"
17564     arguments="EOL"
17565     new_path="$path"
17566 
17567   windows_path="$new_path"
17568   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17569     unix_path=`$CYGPATH -u "$windows_path"`
17570     new_path="$unix_path"
17571   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17572     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17573     new_path="$unix_path"
17574   fi
17575 
17576 
17577     new_path=`$WHICH "$new_path" 2> /dev/null`
17578     # bat and cmd files are not always considered executable in MSYS causing which
17579     # to not find them
17580     if test "x$new_path" = x \
17581         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17582         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17583       new_path="$path"
17584 
17585   windows_path="$new_path"
17586   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17587     unix_path=`$CYGPATH -u "$windows_path"`
17588     new_path="$unix_path"
17589   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17590     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17591     new_path="$unix_path"
17592   fi
17593 
17594     fi
17595 
17596     if test "x$new_path" = x; then
17597       # It's still not found. Now this is an unrecoverable error.
17598       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17599 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17600       has_space=`$ECHO "$complete" | $GREP " "`
17601       if test "x$has_space" != x; then
17602         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17603 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17604       fi
17605       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17606     fi
17607   fi
17608 
17609   # Now new_path has a complete unix path to the binary
17610   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17611     # Keep paths in /bin as-is, but remove trailing .exe if any
17612     new_path="${new_path/%.exe/}"
17613     # Do not save /bin paths to all_fixpath_prefixes!
17614   else
17615     # Not in mixed or Windows style, start by that.
17616     new_path=`cmd //c echo $new_path`
17617 
17618   input_path="$new_path"
17619   # Check if we need to convert this using DOS-style short mode. If the path
17620   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17621   # take no chances and rewrite it.
17622   # Note: m4 eats our [], so we need to use [ and ] instead.
17623   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17624   if test "x$has_forbidden_chars" != x; then
17625     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17626     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17627   fi
17628 
17629     # Output is in $new_path
17630 
17631   windows_path="$new_path"
17632   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17633     unix_path=`$CYGPATH -u "$windows_path"`
17634     new_path="$unix_path"
17635   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17636     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17637     new_path="$unix_path"
17638   fi
17639 
17640     # remove trailing .exe if any
17641     new_path="${new_path/%.exe/}"
17642 
17643     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17644     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17645   fi
17646 
17647     else
17648       # We're on a unix platform. Hooray! :)
17649       # First separate the path from the arguments. This will split at the first
17650       # space.
17651       complete="$FOUND_MAKE"
17652       path="${complete%% *}"
17653       tmp="$complete EOL"
17654       arguments="${tmp#* }"
17655 
17656       # Cannot rely on the command "which" here since it doesn't always work.
17657       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17658       if test -z "$is_absolute_path"; then
17659         # Path to executable is not absolute. Find it.
17660         IFS_save="$IFS"
17661         IFS=:
17662         for p in $PATH; do
17663           if test -f "$p/$path" && test -x "$p/$path"; then
17664             new_path="$p/$path"
17665             break
17666           fi
17667         done
17668         IFS="$IFS_save"
17669       else
17670         # This is an absolute path, we can use it without further modifications.
17671         new_path="$path"
17672       fi
17673 
17674       if test "x$new_path" = x; then
17675         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17676 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17677         has_space=`$ECHO "$complete" | $GREP " "`
17678         if test "x$has_space" != x; then
17679           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17680 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17681         fi
17682         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17683       fi
17684     fi
17685 
17686     # Now join together the path and the arguments once again
17687     if test "x$arguments" != xEOL; then
17688       new_complete="$new_path ${arguments% *}"
17689     else
17690       new_complete="$new_path"
17691     fi
17692 
17693     if test "x$complete" != "x$new_complete"; then
17694       FOUND_MAKE="$new_complete"
17695       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17696 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17697     fi
17698   fi
17699 
17700         fi
17701       fi
17702     fi
17703   fi
17704 
17705         if test "x$FOUND_MAKE" = x; then
17706           for ac_prog in make
17707 do
17708   # Extract the first word of "$ac_prog", so it can be a program name with args.
17709 set dummy $ac_prog; ac_word=$2
17710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17711 $as_echo_n "checking for $ac_word... " >&6; }
17712 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17713   $as_echo_n "(cached) " >&6
17714 else
17715   case $CHECK_TOOLSDIR_MAKE in
17716   [\\/]* | ?:[\\/]*)
17717   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17718   ;;
17719   *)
17720   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17721 for as_dir in $PATH
17722 do
17723   IFS=$as_save_IFS
17724   test -z "$as_dir" && as_dir=.
17725     for ac_exec_ext in '' $ac_executable_extensions; do
17726   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17727     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17728     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17729     break 2
17730   fi
17731 done
17732   done
17733 IFS=$as_save_IFS
17734 
17735   ;;
17736 esac
17737 fi
17738 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17739 if test -n "$CHECK_TOOLSDIR_MAKE"; then
17740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17741 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17742 else
17743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17744 $as_echo "no" >&6; }
17745 fi
17746 
17747 
17748   test -n "$CHECK_TOOLSDIR_MAKE" && break
17749 done
17750 
17751 
17752   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17753   DESCRIPTION="make in tools-dir"
17754 
17755   # On Cygwin, we require a newer version of make than on other platforms
17756   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17757     MAKE_VERSION_EXPR="-e 4\."
17758     MAKE_REQUIRED_VERSION="4.0"
17759    else
17760     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17761     MAKE_REQUIRED_VERSION="3.81"
17762   fi
17763 
17764   if test "x$MAKE_CANDIDATE" != x; then
17765     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17766 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17767     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17768     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17769     if test "x$IS_GNU_MAKE" = x; then
17770       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17771 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17772     else
17773       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17774       if test "x$IS_MODERN_MAKE" = x; then
17775         { $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
17776 $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;}
17777       else
17778         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17779           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17780             MAKE_EXPECTED_ENV='cygwin'
17781           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17782             MAKE_EXPECTED_ENV='msys'
17783           else
17784             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17785           fi
17786           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17787           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17788         else
17789           # Not relevant for non-Windows
17790           IS_MAKE_CORRECT_ENV=true
17791         fi
17792         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17793           { $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
17794 $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;}
17795         else
17796           FOUND_MAKE=$MAKE_CANDIDATE
17797 
17798   # Only process if variable expands to non-empty
17799 
17800   if test "x$FOUND_MAKE" != x; then
17801     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17802 
17803   # First separate the path from the arguments. This will split at the first
17804   # space.
17805   complete="$FOUND_MAKE"
17806   path="${complete%% *}"
17807   tmp="$complete EOL"
17808   arguments="${tmp#* }"
17809 
17810   # Input might be given as Windows format, start by converting to
17811   # unix format.
17812   new_path=`$CYGPATH -u "$path"`
17813 
17814   # Now try to locate executable using which
17815   new_path=`$WHICH "$new_path" 2> /dev/null`
17816   # bat and cmd files are not always considered executable in cygwin causing which
17817   # to not find them
17818   if test "x$new_path" = x \
17819       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17820       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17821     new_path=`$CYGPATH -u "$path"`
17822   fi
17823   if test "x$new_path" = x; then
17824     # Oops. Which didn't find the executable.
17825     # The splitting of arguments from the executable at a space might have been incorrect,
17826     # since paths with space are more likely in Windows. Give it another try with the whole
17827     # argument.
17828     path="$complete"
17829     arguments="EOL"
17830     new_path=`$CYGPATH -u "$path"`
17831     new_path=`$WHICH "$new_path" 2> /dev/null`
17832     # bat and cmd files are not always considered executable in cygwin causing which
17833     # to not find them
17834     if test "x$new_path" = x \
17835         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17836         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17837       new_path=`$CYGPATH -u "$path"`
17838     fi
17839     if test "x$new_path" = x; then
17840       # It's still not found. Now this is an unrecoverable error.
17841       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17842 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17843       has_space=`$ECHO "$complete" | $GREP " "`
17844       if test "x$has_space" != x; then
17845         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17846 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17847       fi
17848       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17849     fi
17850   fi
17851 
17852   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17853   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17854   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17855   # "foo.exe" is OK but "foo" is an error.
17856   #
17857   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17858   # It is also a way to make sure we got the proper file name for the real test later on.
17859   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17860   if test "x$test_shortpath" = x; then
17861     # Short path failed, file does not exist as specified.
17862     # Try adding .exe or .cmd
17863     if test -f "${new_path}.exe"; then
17864       input_to_shortpath="${new_path}.exe"
17865     elif test -f "${new_path}.cmd"; then
17866       input_to_shortpath="${new_path}.cmd"
17867     else
17868       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17869 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17870       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17871 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17872       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17873     fi
17874   else
17875     input_to_shortpath="$new_path"
17876   fi
17877 
17878   # Call helper function which possibly converts this using DOS-style short mode.
17879   # If so, the updated path is stored in $new_path.
17880   new_path="$input_to_shortpath"
17881 
17882   input_path="$input_to_shortpath"
17883   # Check if we need to convert this using DOS-style short mode. If the path
17884   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17885   # take no chances and rewrite it.
17886   # Note: m4 eats our [], so we need to use [ and ] instead.
17887   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17888   if test "x$has_forbidden_chars" != x; then
17889     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17890     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17891     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17892     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17893       # Going to short mode and back again did indeed matter. Since short mode is
17894       # case insensitive, let's make it lowercase to improve readability.
17895       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17896       # Now convert it back to Unix-style (cygpath)
17897       input_path=`$CYGPATH -u "$shortmode_path"`
17898       new_path="$input_path"
17899     fi
17900   fi
17901 
17902   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17903   if test "x$test_cygdrive_prefix" = x; then
17904     # As a simple fix, exclude /usr/bin since it's not a real path.
17905     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17906       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17907       # a path prefixed by /cygdrive for fixpath to work.
17908       new_path="$CYGWIN_ROOT_PATH$input_path"
17909     fi
17910   fi
17911 
17912   # remove trailing .exe if any
17913   new_path="${new_path/%.exe/}"
17914 
17915     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17916 
17917   # First separate the path from the arguments. This will split at the first
17918   # space.
17919   complete="$FOUND_MAKE"
17920   path="${complete%% *}"
17921   tmp="$complete EOL"
17922   arguments="${tmp#* }"
17923 
17924   # Input might be given as Windows format, start by converting to
17925   # unix format.
17926   new_path="$path"
17927 
17928   windows_path="$new_path"
17929   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17930     unix_path=`$CYGPATH -u "$windows_path"`
17931     new_path="$unix_path"
17932   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17933     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17934     new_path="$unix_path"
17935   fi
17936 
17937 
17938   # Now try to locate executable using which
17939   new_path=`$WHICH "$new_path" 2> /dev/null`
17940 
17941   if test "x$new_path" = x; then
17942     # Oops. Which didn't find the executable.
17943     # The splitting of arguments from the executable at a space might have been incorrect,
17944     # since paths with space are more likely in Windows. Give it another try with the whole
17945     # argument.
17946     path="$complete"
17947     arguments="EOL"
17948     new_path="$path"
17949 
17950   windows_path="$new_path"
17951   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17952     unix_path=`$CYGPATH -u "$windows_path"`
17953     new_path="$unix_path"
17954   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17955     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17956     new_path="$unix_path"
17957   fi
17958 
17959 
17960     new_path=`$WHICH "$new_path" 2> /dev/null`
17961     # bat and cmd files are not always considered executable in MSYS causing which
17962     # to not find them
17963     if test "x$new_path" = x \
17964         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17965         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17966       new_path="$path"
17967 
17968   windows_path="$new_path"
17969   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17970     unix_path=`$CYGPATH -u "$windows_path"`
17971     new_path="$unix_path"
17972   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17973     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17974     new_path="$unix_path"
17975   fi
17976 
17977     fi
17978 
17979     if test "x$new_path" = x; then
17980       # It's still not found. Now this is an unrecoverable error.
17981       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17982 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17983       has_space=`$ECHO "$complete" | $GREP " "`
17984       if test "x$has_space" != x; then
17985         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17986 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17987       fi
17988       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17989     fi
17990   fi
17991 
17992   # Now new_path has a complete unix path to the binary
17993   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17994     # Keep paths in /bin as-is, but remove trailing .exe if any
17995     new_path="${new_path/%.exe/}"
17996     # Do not save /bin paths to all_fixpath_prefixes!
17997   else
17998     # Not in mixed or Windows style, start by that.
17999     new_path=`cmd //c echo $new_path`
18000 
18001   input_path="$new_path"
18002   # Check if we need to convert this using DOS-style short mode. If the path
18003   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18004   # take no chances and rewrite it.
18005   # Note: m4 eats our [], so we need to use [ and ] instead.
18006   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18007   if test "x$has_forbidden_chars" != x; then
18008     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18009     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18010   fi
18011 
18012     # Output is in $new_path
18013 
18014   windows_path="$new_path"
18015   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18016     unix_path=`$CYGPATH -u "$windows_path"`
18017     new_path="$unix_path"
18018   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18019     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18020     new_path="$unix_path"
18021   fi
18022 
18023     # remove trailing .exe if any
18024     new_path="${new_path/%.exe/}"
18025 
18026     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18027     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18028   fi
18029 
18030     else
18031       # We're on a unix platform. Hooray! :)
18032       # First separate the path from the arguments. This will split at the first
18033       # space.
18034       complete="$FOUND_MAKE"
18035       path="${complete%% *}"
18036       tmp="$complete EOL"
18037       arguments="${tmp#* }"
18038 
18039       # Cannot rely on the command "which" here since it doesn't always work.
18040       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18041       if test -z "$is_absolute_path"; then
18042         # Path to executable is not absolute. Find it.
18043         IFS_save="$IFS"
18044         IFS=:
18045         for p in $PATH; do
18046           if test -f "$p/$path" && test -x "$p/$path"; then
18047             new_path="$p/$path"
18048             break
18049           fi
18050         done
18051         IFS="$IFS_save"
18052       else
18053         # This is an absolute path, we can use it without further modifications.
18054         new_path="$path"
18055       fi
18056 
18057       if test "x$new_path" = x; then
18058         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18059 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18060         has_space=`$ECHO "$complete" | $GREP " "`
18061         if test "x$has_space" != x; then
18062           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18063 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18064         fi
18065         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18066       fi
18067     fi
18068 
18069     # Now join together the path and the arguments once again
18070     if test "x$arguments" != xEOL; then
18071       new_complete="$new_path ${arguments% *}"
18072     else
18073       new_complete="$new_path"
18074     fi
18075 
18076     if test "x$complete" != "x$new_complete"; then
18077       FOUND_MAKE="$new_complete"
18078       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18079 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18080     fi
18081   fi
18082 
18083         fi
18084       fi
18085     fi
18086   fi
18087 
18088         fi
18089         PATH=$OLD_PATH
18090       fi
18091     fi
18092 
18093     if test "x$FOUND_MAKE" = x; then
18094       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
18095     fi
18096 
18097   else
18098     # The variable is set, but is it from the command line or the environment?
18099 
18100     # Try to remove the string !MAKE! from our list.
18101     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18102     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18103       # If it failed, the variable was not from the command line. Ignore it,
18104       # but warn the user (except for BASH, which is always set by the calling BASH).
18105       if test "xMAKE" != xBASH; then
18106         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18107 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18108       fi
18109       # Try to locate tool using the code snippet
18110 
18111     # Try our hardest to locate a correct version of GNU make
18112     for ac_prog in gmake
18113 do
18114   # Extract the first word of "$ac_prog", so it can be a program name with args.
18115 set dummy $ac_prog; ac_word=$2
18116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18117 $as_echo_n "checking for $ac_word... " >&6; }
18118 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18119   $as_echo_n "(cached) " >&6
18120 else
18121   case $CHECK_GMAKE in
18122   [\\/]* | ?:[\\/]*)
18123   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18124   ;;
18125   *)
18126   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18127 for as_dir in $PATH
18128 do
18129   IFS=$as_save_IFS
18130   test -z "$as_dir" && as_dir=.
18131     for ac_exec_ext in '' $ac_executable_extensions; do
18132   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18133     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18134     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18135     break 2
18136   fi
18137 done
18138   done
18139 IFS=$as_save_IFS
18140 
18141   ;;
18142 esac
18143 fi
18144 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18145 if test -n "$CHECK_GMAKE"; then
18146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18147 $as_echo "$CHECK_GMAKE" >&6; }
18148 else
18149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18150 $as_echo "no" >&6; }
18151 fi
18152 
18153 
18154   test -n "$CHECK_GMAKE" && break
18155 done
18156 
18157 
18158   MAKE_CANDIDATE=""$CHECK_GMAKE""
18159   DESCRIPTION="gmake in PATH"
18160 
18161   # On Cygwin, we require a newer version of make than on other platforms
18162   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18163     MAKE_VERSION_EXPR="-e 4\."
18164     MAKE_REQUIRED_VERSION="4.0"
18165    else
18166     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18167     MAKE_REQUIRED_VERSION="3.81"
18168   fi
18169 
18170   if test "x$MAKE_CANDIDATE" != x; then
18171     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18172 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18173     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18174     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18175     if test "x$IS_GNU_MAKE" = x; then
18176       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18177 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18178     else
18179       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18180       if test "x$IS_MODERN_MAKE" = x; then
18181         { $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
18182 $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;}
18183       else
18184         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18185           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18186             MAKE_EXPECTED_ENV='cygwin'
18187           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18188             MAKE_EXPECTED_ENV='msys'
18189           else
18190             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18191           fi
18192           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18193           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18194         else
18195           # Not relevant for non-Windows
18196           IS_MAKE_CORRECT_ENV=true
18197         fi
18198         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18199           { $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
18200 $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;}
18201         else
18202           FOUND_MAKE=$MAKE_CANDIDATE
18203 
18204   # Only process if variable expands to non-empty
18205 
18206   if test "x$FOUND_MAKE" != x; then
18207     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18208 
18209   # First separate the path from the arguments. This will split at the first
18210   # space.
18211   complete="$FOUND_MAKE"
18212   path="${complete%% *}"
18213   tmp="$complete EOL"
18214   arguments="${tmp#* }"
18215 
18216   # Input might be given as Windows format, start by converting to
18217   # unix format.
18218   new_path=`$CYGPATH -u "$path"`
18219 
18220   # Now try to locate executable using which
18221   new_path=`$WHICH "$new_path" 2> /dev/null`
18222   # bat and cmd files are not always considered executable in cygwin causing which
18223   # to not find them
18224   if test "x$new_path" = x \
18225       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18226       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18227     new_path=`$CYGPATH -u "$path"`
18228   fi
18229   if test "x$new_path" = x; then
18230     # Oops. Which didn't find the executable.
18231     # The splitting of arguments from the executable at a space might have been incorrect,
18232     # since paths with space are more likely in Windows. Give it another try with the whole
18233     # argument.
18234     path="$complete"
18235     arguments="EOL"
18236     new_path=`$CYGPATH -u "$path"`
18237     new_path=`$WHICH "$new_path" 2> /dev/null`
18238     # bat and cmd files are not always considered executable in cygwin causing which
18239     # to not find them
18240     if test "x$new_path" = x \
18241         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18242         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18243       new_path=`$CYGPATH -u "$path"`
18244     fi
18245     if test "x$new_path" = x; then
18246       # It's still not found. Now this is an unrecoverable error.
18247       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18248 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18249       has_space=`$ECHO "$complete" | $GREP " "`
18250       if test "x$has_space" != x; then
18251         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18252 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18253       fi
18254       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18255     fi
18256   fi
18257 
18258   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18259   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18260   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18261   # "foo.exe" is OK but "foo" is an error.
18262   #
18263   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18264   # It is also a way to make sure we got the proper file name for the real test later on.
18265   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18266   if test "x$test_shortpath" = x; then
18267     # Short path failed, file does not exist as specified.
18268     # Try adding .exe or .cmd
18269     if test -f "${new_path}.exe"; then
18270       input_to_shortpath="${new_path}.exe"
18271     elif test -f "${new_path}.cmd"; then
18272       input_to_shortpath="${new_path}.cmd"
18273     else
18274       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18275 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18276       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18277 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18278       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18279     fi
18280   else
18281     input_to_shortpath="$new_path"
18282   fi
18283 
18284   # Call helper function which possibly converts this using DOS-style short mode.
18285   # If so, the updated path is stored in $new_path.
18286   new_path="$input_to_shortpath"
18287 
18288   input_path="$input_to_shortpath"
18289   # Check if we need to convert this using DOS-style short mode. If the path
18290   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18291   # take no chances and rewrite it.
18292   # Note: m4 eats our [], so we need to use [ and ] instead.
18293   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18294   if test "x$has_forbidden_chars" != x; then
18295     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18296     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18297     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18298     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18299       # Going to short mode and back again did indeed matter. Since short mode is
18300       # case insensitive, let's make it lowercase to improve readability.
18301       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18302       # Now convert it back to Unix-style (cygpath)
18303       input_path=`$CYGPATH -u "$shortmode_path"`
18304       new_path="$input_path"
18305     fi
18306   fi
18307 
18308   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18309   if test "x$test_cygdrive_prefix" = x; then
18310     # As a simple fix, exclude /usr/bin since it's not a real path.
18311     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18312       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18313       # a path prefixed by /cygdrive for fixpath to work.
18314       new_path="$CYGWIN_ROOT_PATH$input_path"
18315     fi
18316   fi
18317 
18318   # remove trailing .exe if any
18319   new_path="${new_path/%.exe/}"
18320 
18321     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18322 
18323   # First separate the path from the arguments. This will split at the first
18324   # space.
18325   complete="$FOUND_MAKE"
18326   path="${complete%% *}"
18327   tmp="$complete EOL"
18328   arguments="${tmp#* }"
18329 
18330   # Input might be given as Windows format, start by converting to
18331   # unix format.
18332   new_path="$path"
18333 
18334   windows_path="$new_path"
18335   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18336     unix_path=`$CYGPATH -u "$windows_path"`
18337     new_path="$unix_path"
18338   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18339     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18340     new_path="$unix_path"
18341   fi
18342 
18343 
18344   # Now try to locate executable using which
18345   new_path=`$WHICH "$new_path" 2> /dev/null`
18346 
18347   if test "x$new_path" = x; then
18348     # Oops. Which didn't find the executable.
18349     # The splitting of arguments from the executable at a space might have been incorrect,
18350     # since paths with space are more likely in Windows. Give it another try with the whole
18351     # argument.
18352     path="$complete"
18353     arguments="EOL"
18354     new_path="$path"
18355 
18356   windows_path="$new_path"
18357   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18358     unix_path=`$CYGPATH -u "$windows_path"`
18359     new_path="$unix_path"
18360   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18361     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18362     new_path="$unix_path"
18363   fi
18364 
18365 
18366     new_path=`$WHICH "$new_path" 2> /dev/null`
18367     # bat and cmd files are not always considered executable in MSYS causing which
18368     # to not find them
18369     if test "x$new_path" = x \
18370         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18371         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18372       new_path="$path"
18373 
18374   windows_path="$new_path"
18375   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18376     unix_path=`$CYGPATH -u "$windows_path"`
18377     new_path="$unix_path"
18378   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18379     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18380     new_path="$unix_path"
18381   fi
18382 
18383     fi
18384 
18385     if test "x$new_path" = x; then
18386       # It's still not found. Now this is an unrecoverable error.
18387       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18388 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18389       has_space=`$ECHO "$complete" | $GREP " "`
18390       if test "x$has_space" != x; then
18391         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18392 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18393       fi
18394       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18395     fi
18396   fi
18397 
18398   # Now new_path has a complete unix path to the binary
18399   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18400     # Keep paths in /bin as-is, but remove trailing .exe if any
18401     new_path="${new_path/%.exe/}"
18402     # Do not save /bin paths to all_fixpath_prefixes!
18403   else
18404     # Not in mixed or Windows style, start by that.
18405     new_path=`cmd //c echo $new_path`
18406 
18407   input_path="$new_path"
18408   # Check if we need to convert this using DOS-style short mode. If the path
18409   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18410   # take no chances and rewrite it.
18411   # Note: m4 eats our [], so we need to use [ and ] instead.
18412   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18413   if test "x$has_forbidden_chars" != x; then
18414     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18415     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18416   fi
18417 
18418     # Output is in $new_path
18419 
18420   windows_path="$new_path"
18421   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18422     unix_path=`$CYGPATH -u "$windows_path"`
18423     new_path="$unix_path"
18424   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18425     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18426     new_path="$unix_path"
18427   fi
18428 
18429     # remove trailing .exe if any
18430     new_path="${new_path/%.exe/}"
18431 
18432     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18433     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18434   fi
18435 
18436     else
18437       # We're on a unix platform. Hooray! :)
18438       # First separate the path from the arguments. This will split at the first
18439       # space.
18440       complete="$FOUND_MAKE"
18441       path="${complete%% *}"
18442       tmp="$complete EOL"
18443       arguments="${tmp#* }"
18444 
18445       # Cannot rely on the command "which" here since it doesn't always work.
18446       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18447       if test -z "$is_absolute_path"; then
18448         # Path to executable is not absolute. Find it.
18449         IFS_save="$IFS"
18450         IFS=:
18451         for p in $PATH; do
18452           if test -f "$p/$path" && test -x "$p/$path"; then
18453             new_path="$p/$path"
18454             break
18455           fi
18456         done
18457         IFS="$IFS_save"
18458       else
18459         # This is an absolute path, we can use it without further modifications.
18460         new_path="$path"
18461       fi
18462 
18463       if test "x$new_path" = x; then
18464         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18465 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18466         has_space=`$ECHO "$complete" | $GREP " "`
18467         if test "x$has_space" != x; then
18468           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18469 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18470         fi
18471         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18472       fi
18473     fi
18474 
18475     # Now join together the path and the arguments once again
18476     if test "x$arguments" != xEOL; then
18477       new_complete="$new_path ${arguments% *}"
18478     else
18479       new_complete="$new_path"
18480     fi
18481 
18482     if test "x$complete" != "x$new_complete"; then
18483       FOUND_MAKE="$new_complete"
18484       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18485 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18486     fi
18487   fi
18488 
18489         fi
18490       fi
18491     fi
18492   fi
18493 
18494 
18495     if test "x$FOUND_MAKE" = x; then
18496       for ac_prog in make
18497 do
18498   # Extract the first word of "$ac_prog", so it can be a program name with args.
18499 set dummy $ac_prog; ac_word=$2
18500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18501 $as_echo_n "checking for $ac_word... " >&6; }
18502 if ${ac_cv_path_CHECK_MAKE+:} false; then :
18503   $as_echo_n "(cached) " >&6
18504 else
18505   case $CHECK_MAKE in
18506   [\\/]* | ?:[\\/]*)
18507   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18508   ;;
18509   *)
18510   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18511 for as_dir in $PATH
18512 do
18513   IFS=$as_save_IFS
18514   test -z "$as_dir" && as_dir=.
18515     for ac_exec_ext in '' $ac_executable_extensions; do
18516   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18517     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18518     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18519     break 2
18520   fi
18521 done
18522   done
18523 IFS=$as_save_IFS
18524 
18525   ;;
18526 esac
18527 fi
18528 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18529 if test -n "$CHECK_MAKE"; then
18530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18531 $as_echo "$CHECK_MAKE" >&6; }
18532 else
18533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18534 $as_echo "no" >&6; }
18535 fi
18536 
18537 
18538   test -n "$CHECK_MAKE" && break
18539 done
18540 
18541 
18542   MAKE_CANDIDATE=""$CHECK_MAKE""
18543   DESCRIPTION="make in PATH"
18544 
18545   # On Cygwin, we require a newer version of make than on other platforms
18546   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18547     MAKE_VERSION_EXPR="-e 4\."
18548     MAKE_REQUIRED_VERSION="4.0"
18549    else
18550     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18551     MAKE_REQUIRED_VERSION="3.81"
18552   fi
18553 
18554   if test "x$MAKE_CANDIDATE" != x; then
18555     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18556 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18557     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18558     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18559     if test "x$IS_GNU_MAKE" = x; then
18560       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18561 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18562     else
18563       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18564       if test "x$IS_MODERN_MAKE" = x; then
18565         { $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
18566 $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;}
18567       else
18568         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18569           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18570             MAKE_EXPECTED_ENV='cygwin'
18571           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18572             MAKE_EXPECTED_ENV='msys'
18573           else
18574             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18575           fi
18576           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18577           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18578         else
18579           # Not relevant for non-Windows
18580           IS_MAKE_CORRECT_ENV=true
18581         fi
18582         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18583           { $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
18584 $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;}
18585         else
18586           FOUND_MAKE=$MAKE_CANDIDATE
18587 
18588   # Only process if variable expands to non-empty
18589 
18590   if test "x$FOUND_MAKE" != x; then
18591     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18592 
18593   # First separate the path from the arguments. This will split at the first
18594   # space.
18595   complete="$FOUND_MAKE"
18596   path="${complete%% *}"
18597   tmp="$complete EOL"
18598   arguments="${tmp#* }"
18599 
18600   # Input might be given as Windows format, start by converting to
18601   # unix format.
18602   new_path=`$CYGPATH -u "$path"`
18603 
18604   # Now try to locate executable using which
18605   new_path=`$WHICH "$new_path" 2> /dev/null`
18606   # bat and cmd files are not always considered executable in cygwin causing which
18607   # to not find them
18608   if test "x$new_path" = x \
18609       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18610       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18611     new_path=`$CYGPATH -u "$path"`
18612   fi
18613   if test "x$new_path" = x; then
18614     # Oops. Which didn't find the executable.
18615     # The splitting of arguments from the executable at a space might have been incorrect,
18616     # since paths with space are more likely in Windows. Give it another try with the whole
18617     # argument.
18618     path="$complete"
18619     arguments="EOL"
18620     new_path=`$CYGPATH -u "$path"`
18621     new_path=`$WHICH "$new_path" 2> /dev/null`
18622     # bat and cmd files are not always considered executable in cygwin causing which
18623     # to not find them
18624     if test "x$new_path" = x \
18625         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18626         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18627       new_path=`$CYGPATH -u "$path"`
18628     fi
18629     if test "x$new_path" = x; then
18630       # It's still not found. Now this is an unrecoverable error.
18631       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18632 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18633       has_space=`$ECHO "$complete" | $GREP " "`
18634       if test "x$has_space" != x; then
18635         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18636 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18637       fi
18638       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18639     fi
18640   fi
18641 
18642   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18643   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18644   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18645   # "foo.exe" is OK but "foo" is an error.
18646   #
18647   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18648   # It is also a way to make sure we got the proper file name for the real test later on.
18649   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18650   if test "x$test_shortpath" = x; then
18651     # Short path failed, file does not exist as specified.
18652     # Try adding .exe or .cmd
18653     if test -f "${new_path}.exe"; then
18654       input_to_shortpath="${new_path}.exe"
18655     elif test -f "${new_path}.cmd"; then
18656       input_to_shortpath="${new_path}.cmd"
18657     else
18658       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18659 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18660       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18661 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18662       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18663     fi
18664   else
18665     input_to_shortpath="$new_path"
18666   fi
18667 
18668   # Call helper function which possibly converts this using DOS-style short mode.
18669   # If so, the updated path is stored in $new_path.
18670   new_path="$input_to_shortpath"
18671 
18672   input_path="$input_to_shortpath"
18673   # Check if we need to convert this using DOS-style short mode. If the path
18674   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18675   # take no chances and rewrite it.
18676   # Note: m4 eats our [], so we need to use [ and ] instead.
18677   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18678   if test "x$has_forbidden_chars" != x; then
18679     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18680     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18681     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18682     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18683       # Going to short mode and back again did indeed matter. Since short mode is
18684       # case insensitive, let's make it lowercase to improve readability.
18685       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18686       # Now convert it back to Unix-style (cygpath)
18687       input_path=`$CYGPATH -u "$shortmode_path"`
18688       new_path="$input_path"
18689     fi
18690   fi
18691 
18692   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18693   if test "x$test_cygdrive_prefix" = x; then
18694     # As a simple fix, exclude /usr/bin since it's not a real path.
18695     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18696       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18697       # a path prefixed by /cygdrive for fixpath to work.
18698       new_path="$CYGWIN_ROOT_PATH$input_path"
18699     fi
18700   fi
18701 
18702   # remove trailing .exe if any
18703   new_path="${new_path/%.exe/}"
18704 
18705     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18706 
18707   # First separate the path from the arguments. This will split at the first
18708   # space.
18709   complete="$FOUND_MAKE"
18710   path="${complete%% *}"
18711   tmp="$complete EOL"
18712   arguments="${tmp#* }"
18713 
18714   # Input might be given as Windows format, start by converting to
18715   # unix format.
18716   new_path="$path"
18717 
18718   windows_path="$new_path"
18719   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18720     unix_path=`$CYGPATH -u "$windows_path"`
18721     new_path="$unix_path"
18722   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18723     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18724     new_path="$unix_path"
18725   fi
18726 
18727 
18728   # Now try to locate executable using which
18729   new_path=`$WHICH "$new_path" 2> /dev/null`
18730 
18731   if test "x$new_path" = x; then
18732     # Oops. Which didn't find the executable.
18733     # The splitting of arguments from the executable at a space might have been incorrect,
18734     # since paths with space are more likely in Windows. Give it another try with the whole
18735     # argument.
18736     path="$complete"
18737     arguments="EOL"
18738     new_path="$path"
18739 
18740   windows_path="$new_path"
18741   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18742     unix_path=`$CYGPATH -u "$windows_path"`
18743     new_path="$unix_path"
18744   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18745     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18746     new_path="$unix_path"
18747   fi
18748 
18749 
18750     new_path=`$WHICH "$new_path" 2> /dev/null`
18751     # bat and cmd files are not always considered executable in MSYS causing which
18752     # to not find them
18753     if test "x$new_path" = x \
18754         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18755         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18756       new_path="$path"
18757 
18758   windows_path="$new_path"
18759   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18760     unix_path=`$CYGPATH -u "$windows_path"`
18761     new_path="$unix_path"
18762   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18763     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18764     new_path="$unix_path"
18765   fi
18766 
18767     fi
18768 
18769     if test "x$new_path" = x; then
18770       # It's still not found. Now this is an unrecoverable error.
18771       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18772 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18773       has_space=`$ECHO "$complete" | $GREP " "`
18774       if test "x$has_space" != x; then
18775         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18776 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18777       fi
18778       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18779     fi
18780   fi
18781 
18782   # Now new_path has a complete unix path to the binary
18783   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18784     # Keep paths in /bin as-is, but remove trailing .exe if any
18785     new_path="${new_path/%.exe/}"
18786     # Do not save /bin paths to all_fixpath_prefixes!
18787   else
18788     # Not in mixed or Windows style, start by that.
18789     new_path=`cmd //c echo $new_path`
18790 
18791   input_path="$new_path"
18792   # Check if we need to convert this using DOS-style short mode. If the path
18793   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18794   # take no chances and rewrite it.
18795   # Note: m4 eats our [], so we need to use [ and ] instead.
18796   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18797   if test "x$has_forbidden_chars" != x; then
18798     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18799     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18800   fi
18801 
18802     # Output is in $new_path
18803 
18804   windows_path="$new_path"
18805   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18806     unix_path=`$CYGPATH -u "$windows_path"`
18807     new_path="$unix_path"
18808   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18809     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18810     new_path="$unix_path"
18811   fi
18812 
18813     # remove trailing .exe if any
18814     new_path="${new_path/%.exe/}"
18815 
18816     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18817     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18818   fi
18819 
18820     else
18821       # We're on a unix platform. Hooray! :)
18822       # First separate the path from the arguments. This will split at the first
18823       # space.
18824       complete="$FOUND_MAKE"
18825       path="${complete%% *}"
18826       tmp="$complete EOL"
18827       arguments="${tmp#* }"
18828 
18829       # Cannot rely on the command "which" here since it doesn't always work.
18830       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18831       if test -z "$is_absolute_path"; then
18832         # Path to executable is not absolute. Find it.
18833         IFS_save="$IFS"
18834         IFS=:
18835         for p in $PATH; do
18836           if test -f "$p/$path" && test -x "$p/$path"; then
18837             new_path="$p/$path"
18838             break
18839           fi
18840         done
18841         IFS="$IFS_save"
18842       else
18843         # This is an absolute path, we can use it without further modifications.
18844         new_path="$path"
18845       fi
18846 
18847       if test "x$new_path" = x; then
18848         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18849 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18850         has_space=`$ECHO "$complete" | $GREP " "`
18851         if test "x$has_space" != x; then
18852           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18853 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18854         fi
18855         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18856       fi
18857     fi
18858 
18859     # Now join together the path and the arguments once again
18860     if test "x$arguments" != xEOL; then
18861       new_complete="$new_path ${arguments% *}"
18862     else
18863       new_complete="$new_path"
18864     fi
18865 
18866     if test "x$complete" != "x$new_complete"; then
18867       FOUND_MAKE="$new_complete"
18868       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18869 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18870     fi
18871   fi
18872 
18873         fi
18874       fi
18875     fi
18876   fi
18877 
18878     fi
18879 
18880     if test "x$FOUND_MAKE" = x; then
18881       if test "x$TOOLCHAIN_PATH" != x; then
18882         # We have a toolchain path, check that as well before giving up.
18883         OLD_PATH=$PATH
18884         PATH=$TOOLCHAIN_PATH:$PATH
18885         for ac_prog in gmake
18886 do
18887   # Extract the first word of "$ac_prog", so it can be a program name with args.
18888 set dummy $ac_prog; ac_word=$2
18889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18890 $as_echo_n "checking for $ac_word... " >&6; }
18891 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18892   $as_echo_n "(cached) " >&6
18893 else
18894   case $CHECK_TOOLSDIR_GMAKE in
18895   [\\/]* | ?:[\\/]*)
18896   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18897   ;;
18898   *)
18899   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18900 for as_dir in $PATH
18901 do
18902   IFS=$as_save_IFS
18903   test -z "$as_dir" && as_dir=.
18904     for ac_exec_ext in '' $ac_executable_extensions; do
18905   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18906     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18907     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18908     break 2
18909   fi
18910 done
18911   done
18912 IFS=$as_save_IFS
18913 
18914   ;;
18915 esac
18916 fi
18917 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18918 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18920 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18921 else
18922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18923 $as_echo "no" >&6; }
18924 fi
18925 
18926 
18927   test -n "$CHECK_TOOLSDIR_GMAKE" && break
18928 done
18929 
18930 
18931   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18932   DESCRIPTION="gmake in tools-dir"
18933 
18934   # On Cygwin, we require a newer version of make than on other platforms
18935   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18936     MAKE_VERSION_EXPR="-e 4\."
18937     MAKE_REQUIRED_VERSION="4.0"
18938    else
18939     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18940     MAKE_REQUIRED_VERSION="3.81"
18941   fi
18942 
18943   if test "x$MAKE_CANDIDATE" != x; then
18944     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18945 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18946     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18947     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18948     if test "x$IS_GNU_MAKE" = x; then
18949       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18950 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18951     else
18952       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18953       if test "x$IS_MODERN_MAKE" = x; then
18954         { $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
18955 $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;}
18956       else
18957         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18958           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18959             MAKE_EXPECTED_ENV='cygwin'
18960           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18961             MAKE_EXPECTED_ENV='msys'
18962           else
18963             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18964           fi
18965           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18966           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18967         else
18968           # Not relevant for non-Windows
18969           IS_MAKE_CORRECT_ENV=true
18970         fi
18971         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18972           { $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
18973 $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;}
18974         else
18975           FOUND_MAKE=$MAKE_CANDIDATE
18976 
18977   # Only process if variable expands to non-empty
18978 
18979   if test "x$FOUND_MAKE" != x; then
18980     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18981 
18982   # First separate the path from the arguments. This will split at the first
18983   # space.
18984   complete="$FOUND_MAKE"
18985   path="${complete%% *}"
18986   tmp="$complete EOL"
18987   arguments="${tmp#* }"
18988 
18989   # Input might be given as Windows format, start by converting to
18990   # unix format.
18991   new_path=`$CYGPATH -u "$path"`
18992 
18993   # Now try to locate executable using which
18994   new_path=`$WHICH "$new_path" 2> /dev/null`
18995   # bat and cmd files are not always considered executable in cygwin causing which
18996   # to not find them
18997   if test "x$new_path" = x \
18998       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18999       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19000     new_path=`$CYGPATH -u "$path"`
19001   fi
19002   if test "x$new_path" = x; then
19003     # Oops. Which didn't find the executable.
19004     # The splitting of arguments from the executable at a space might have been incorrect,
19005     # since paths with space are more likely in Windows. Give it another try with the whole
19006     # argument.
19007     path="$complete"
19008     arguments="EOL"
19009     new_path=`$CYGPATH -u "$path"`
19010     new_path=`$WHICH "$new_path" 2> /dev/null`
19011     # bat and cmd files are not always considered executable in cygwin causing which
19012     # to not find them
19013     if test "x$new_path" = x \
19014         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19015         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19016       new_path=`$CYGPATH -u "$path"`
19017     fi
19018     if test "x$new_path" = x; then
19019       # It's still not found. Now this is an unrecoverable error.
19020       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19021 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19022       has_space=`$ECHO "$complete" | $GREP " "`
19023       if test "x$has_space" != x; then
19024         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19025 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19026       fi
19027       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19028     fi
19029   fi
19030 
19031   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19032   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19033   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19034   # "foo.exe" is OK but "foo" is an error.
19035   #
19036   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19037   # It is also a way to make sure we got the proper file name for the real test later on.
19038   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19039   if test "x$test_shortpath" = x; then
19040     # Short path failed, file does not exist as specified.
19041     # Try adding .exe or .cmd
19042     if test -f "${new_path}.exe"; then
19043       input_to_shortpath="${new_path}.exe"
19044     elif test -f "${new_path}.cmd"; then
19045       input_to_shortpath="${new_path}.cmd"
19046     else
19047       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19048 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19049       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19050 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19051       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19052     fi
19053   else
19054     input_to_shortpath="$new_path"
19055   fi
19056 
19057   # Call helper function which possibly converts this using DOS-style short mode.
19058   # If so, the updated path is stored in $new_path.
19059   new_path="$input_to_shortpath"
19060 
19061   input_path="$input_to_shortpath"
19062   # Check if we need to convert this using DOS-style short mode. If the path
19063   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19064   # take no chances and rewrite it.
19065   # Note: m4 eats our [], so we need to use [ and ] instead.
19066   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19067   if test "x$has_forbidden_chars" != x; then
19068     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19069     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19070     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19071     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19072       # Going to short mode and back again did indeed matter. Since short mode is
19073       # case insensitive, let's make it lowercase to improve readability.
19074       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19075       # Now convert it back to Unix-style (cygpath)
19076       input_path=`$CYGPATH -u "$shortmode_path"`
19077       new_path="$input_path"
19078     fi
19079   fi
19080 
19081   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19082   if test "x$test_cygdrive_prefix" = x; then
19083     # As a simple fix, exclude /usr/bin since it's not a real path.
19084     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19085       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19086       # a path prefixed by /cygdrive for fixpath to work.
19087       new_path="$CYGWIN_ROOT_PATH$input_path"
19088     fi
19089   fi
19090 
19091   # remove trailing .exe if any
19092   new_path="${new_path/%.exe/}"
19093 
19094     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19095 
19096   # First separate the path from the arguments. This will split at the first
19097   # space.
19098   complete="$FOUND_MAKE"
19099   path="${complete%% *}"
19100   tmp="$complete EOL"
19101   arguments="${tmp#* }"
19102 
19103   # Input might be given as Windows format, start by converting to
19104   # unix format.
19105   new_path="$path"
19106 
19107   windows_path="$new_path"
19108   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19109     unix_path=`$CYGPATH -u "$windows_path"`
19110     new_path="$unix_path"
19111   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19112     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19113     new_path="$unix_path"
19114   fi
19115 
19116 
19117   # Now try to locate executable using which
19118   new_path=`$WHICH "$new_path" 2> /dev/null`
19119 
19120   if test "x$new_path" = x; then
19121     # Oops. Which didn't find the executable.
19122     # The splitting of arguments from the executable at a space might have been incorrect,
19123     # since paths with space are more likely in Windows. Give it another try with the whole
19124     # argument.
19125     path="$complete"
19126     arguments="EOL"
19127     new_path="$path"
19128 
19129   windows_path="$new_path"
19130   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19131     unix_path=`$CYGPATH -u "$windows_path"`
19132     new_path="$unix_path"
19133   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19134     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19135     new_path="$unix_path"
19136   fi
19137 
19138 
19139     new_path=`$WHICH "$new_path" 2> /dev/null`
19140     # bat and cmd files are not always considered executable in MSYS causing which
19141     # to not find them
19142     if test "x$new_path" = x \
19143         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19144         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19145       new_path="$path"
19146 
19147   windows_path="$new_path"
19148   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19149     unix_path=`$CYGPATH -u "$windows_path"`
19150     new_path="$unix_path"
19151   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19152     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19153     new_path="$unix_path"
19154   fi
19155 
19156     fi
19157 
19158     if test "x$new_path" = x; then
19159       # It's still not found. Now this is an unrecoverable error.
19160       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19161 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19162       has_space=`$ECHO "$complete" | $GREP " "`
19163       if test "x$has_space" != x; then
19164         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19165 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19166       fi
19167       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19168     fi
19169   fi
19170 
19171   # Now new_path has a complete unix path to the binary
19172   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19173     # Keep paths in /bin as-is, but remove trailing .exe if any
19174     new_path="${new_path/%.exe/}"
19175     # Do not save /bin paths to all_fixpath_prefixes!
19176   else
19177     # Not in mixed or Windows style, start by that.
19178     new_path=`cmd //c echo $new_path`
19179 
19180   input_path="$new_path"
19181   # Check if we need to convert this using DOS-style short mode. If the path
19182   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19183   # take no chances and rewrite it.
19184   # Note: m4 eats our [], so we need to use [ and ] instead.
19185   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19186   if test "x$has_forbidden_chars" != x; then
19187     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19188     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19189   fi
19190 
19191     # Output is in $new_path
19192 
19193   windows_path="$new_path"
19194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19195     unix_path=`$CYGPATH -u "$windows_path"`
19196     new_path="$unix_path"
19197   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19198     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19199     new_path="$unix_path"
19200   fi
19201 
19202     # remove trailing .exe if any
19203     new_path="${new_path/%.exe/}"
19204 
19205     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19206     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19207   fi
19208 
19209     else
19210       # We're on a unix platform. Hooray! :)
19211       # First separate the path from the arguments. This will split at the first
19212       # space.
19213       complete="$FOUND_MAKE"
19214       path="${complete%% *}"
19215       tmp="$complete EOL"
19216       arguments="${tmp#* }"
19217 
19218       # Cannot rely on the command "which" here since it doesn't always work.
19219       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19220       if test -z "$is_absolute_path"; then
19221         # Path to executable is not absolute. Find it.
19222         IFS_save="$IFS"
19223         IFS=:
19224         for p in $PATH; do
19225           if test -f "$p/$path" && test -x "$p/$path"; then
19226             new_path="$p/$path"
19227             break
19228           fi
19229         done
19230         IFS="$IFS_save"
19231       else
19232         # This is an absolute path, we can use it without further modifications.
19233         new_path="$path"
19234       fi
19235 
19236       if test "x$new_path" = x; then
19237         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19238 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19239         has_space=`$ECHO "$complete" | $GREP " "`
19240         if test "x$has_space" != x; then
19241           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19242 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19243         fi
19244         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19245       fi
19246     fi
19247 
19248     # Now join together the path and the arguments once again
19249     if test "x$arguments" != xEOL; then
19250       new_complete="$new_path ${arguments% *}"
19251     else
19252       new_complete="$new_path"
19253     fi
19254 
19255     if test "x$complete" != "x$new_complete"; then
19256       FOUND_MAKE="$new_complete"
19257       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19258 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19259     fi
19260   fi
19261 
19262         fi
19263       fi
19264     fi
19265   fi
19266 
19267         if test "x$FOUND_MAKE" = x; then
19268           for ac_prog in make
19269 do
19270   # Extract the first word of "$ac_prog", so it can be a program name with args.
19271 set dummy $ac_prog; ac_word=$2
19272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19273 $as_echo_n "checking for $ac_word... " >&6; }
19274 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19275   $as_echo_n "(cached) " >&6
19276 else
19277   case $CHECK_TOOLSDIR_MAKE in
19278   [\\/]* | ?:[\\/]*)
19279   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19280   ;;
19281   *)
19282   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19283 for as_dir in $PATH
19284 do
19285   IFS=$as_save_IFS
19286   test -z "$as_dir" && as_dir=.
19287     for ac_exec_ext in '' $ac_executable_extensions; do
19288   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19289     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19290     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19291     break 2
19292   fi
19293 done
19294   done
19295 IFS=$as_save_IFS
19296 
19297   ;;
19298 esac
19299 fi
19300 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19301 if test -n "$CHECK_TOOLSDIR_MAKE"; then
19302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19303 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19304 else
19305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19306 $as_echo "no" >&6; }
19307 fi
19308 
19309 
19310   test -n "$CHECK_TOOLSDIR_MAKE" && break
19311 done
19312 
19313 
19314   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19315   DESCRIPTION="make in tools-dir"
19316 
19317   # On Cygwin, we require a newer version of make than on other platforms
19318   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19319     MAKE_VERSION_EXPR="-e 4\."
19320     MAKE_REQUIRED_VERSION="4.0"
19321    else
19322     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19323     MAKE_REQUIRED_VERSION="3.81"
19324   fi
19325 
19326   if test "x$MAKE_CANDIDATE" != x; then
19327     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19328 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19329     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19330     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19331     if test "x$IS_GNU_MAKE" = x; then
19332       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19333 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19334     else
19335       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19336       if test "x$IS_MODERN_MAKE" = x; then
19337         { $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
19338 $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;}
19339       else
19340         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19341           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19342             MAKE_EXPECTED_ENV='cygwin'
19343           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19344             MAKE_EXPECTED_ENV='msys'
19345           else
19346             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19347           fi
19348           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19349           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19350         else
19351           # Not relevant for non-Windows
19352           IS_MAKE_CORRECT_ENV=true
19353         fi
19354         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19355           { $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
19356 $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;}
19357         else
19358           FOUND_MAKE=$MAKE_CANDIDATE
19359 
19360   # Only process if variable expands to non-empty
19361 
19362   if test "x$FOUND_MAKE" != x; then
19363     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19364 
19365   # First separate the path from the arguments. This will split at the first
19366   # space.
19367   complete="$FOUND_MAKE"
19368   path="${complete%% *}"
19369   tmp="$complete EOL"
19370   arguments="${tmp#* }"
19371 
19372   # Input might be given as Windows format, start by converting to
19373   # unix format.
19374   new_path=`$CYGPATH -u "$path"`
19375 
19376   # Now try to locate executable using which
19377   new_path=`$WHICH "$new_path" 2> /dev/null`
19378   # bat and cmd files are not always considered executable in cygwin causing which
19379   # to not find them
19380   if test "x$new_path" = x \
19381       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19382       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19383     new_path=`$CYGPATH -u "$path"`
19384   fi
19385   if test "x$new_path" = x; then
19386     # Oops. Which didn't find the executable.
19387     # The splitting of arguments from the executable at a space might have been incorrect,
19388     # since paths with space are more likely in Windows. Give it another try with the whole
19389     # argument.
19390     path="$complete"
19391     arguments="EOL"
19392     new_path=`$CYGPATH -u "$path"`
19393     new_path=`$WHICH "$new_path" 2> /dev/null`
19394     # bat and cmd files are not always considered executable in cygwin causing which
19395     # to not find them
19396     if test "x$new_path" = x \
19397         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19398         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19399       new_path=`$CYGPATH -u "$path"`
19400     fi
19401     if test "x$new_path" = x; then
19402       # It's still not found. Now this is an unrecoverable error.
19403       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19404 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19405       has_space=`$ECHO "$complete" | $GREP " "`
19406       if test "x$has_space" != x; then
19407         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19408 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19409       fi
19410       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19411     fi
19412   fi
19413 
19414   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19415   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19416   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19417   # "foo.exe" is OK but "foo" is an error.
19418   #
19419   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19420   # It is also a way to make sure we got the proper file name for the real test later on.
19421   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19422   if test "x$test_shortpath" = x; then
19423     # Short path failed, file does not exist as specified.
19424     # Try adding .exe or .cmd
19425     if test -f "${new_path}.exe"; then
19426       input_to_shortpath="${new_path}.exe"
19427     elif test -f "${new_path}.cmd"; then
19428       input_to_shortpath="${new_path}.cmd"
19429     else
19430       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19431 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19432       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19433 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19434       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19435     fi
19436   else
19437     input_to_shortpath="$new_path"
19438   fi
19439 
19440   # Call helper function which possibly converts this using DOS-style short mode.
19441   # If so, the updated path is stored in $new_path.
19442   new_path="$input_to_shortpath"
19443 
19444   input_path="$input_to_shortpath"
19445   # Check if we need to convert this using DOS-style short mode. If the path
19446   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19447   # take no chances and rewrite it.
19448   # Note: m4 eats our [], so we need to use [ and ] instead.
19449   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19450   if test "x$has_forbidden_chars" != x; then
19451     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19452     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19453     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19454     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19455       # Going to short mode and back again did indeed matter. Since short mode is
19456       # case insensitive, let's make it lowercase to improve readability.
19457       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19458       # Now convert it back to Unix-style (cygpath)
19459       input_path=`$CYGPATH -u "$shortmode_path"`
19460       new_path="$input_path"
19461     fi
19462   fi
19463 
19464   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19465   if test "x$test_cygdrive_prefix" = x; then
19466     # As a simple fix, exclude /usr/bin since it's not a real path.
19467     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19468       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19469       # a path prefixed by /cygdrive for fixpath to work.
19470       new_path="$CYGWIN_ROOT_PATH$input_path"
19471     fi
19472   fi
19473 
19474   # remove trailing .exe if any
19475   new_path="${new_path/%.exe/}"
19476 
19477     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19478 
19479   # First separate the path from the arguments. This will split at the first
19480   # space.
19481   complete="$FOUND_MAKE"
19482   path="${complete%% *}"
19483   tmp="$complete EOL"
19484   arguments="${tmp#* }"
19485 
19486   # Input might be given as Windows format, start by converting to
19487   # unix format.
19488   new_path="$path"
19489 
19490   windows_path="$new_path"
19491   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19492     unix_path=`$CYGPATH -u "$windows_path"`
19493     new_path="$unix_path"
19494   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19495     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19496     new_path="$unix_path"
19497   fi
19498 
19499 
19500   # Now try to locate executable using which
19501   new_path=`$WHICH "$new_path" 2> /dev/null`
19502 
19503   if test "x$new_path" = x; then
19504     # Oops. Which didn't find the executable.
19505     # The splitting of arguments from the executable at a space might have been incorrect,
19506     # since paths with space are more likely in Windows. Give it another try with the whole
19507     # argument.
19508     path="$complete"
19509     arguments="EOL"
19510     new_path="$path"
19511 
19512   windows_path="$new_path"
19513   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19514     unix_path=`$CYGPATH -u "$windows_path"`
19515     new_path="$unix_path"
19516   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19517     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19518     new_path="$unix_path"
19519   fi
19520 
19521 
19522     new_path=`$WHICH "$new_path" 2> /dev/null`
19523     # bat and cmd files are not always considered executable in MSYS causing which
19524     # to not find them
19525     if test "x$new_path" = x \
19526         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19527         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19528       new_path="$path"
19529 
19530   windows_path="$new_path"
19531   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19532     unix_path=`$CYGPATH -u "$windows_path"`
19533     new_path="$unix_path"
19534   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19535     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19536     new_path="$unix_path"
19537   fi
19538 
19539     fi
19540 
19541     if test "x$new_path" = x; then
19542       # It's still not found. Now this is an unrecoverable error.
19543       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19544 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19545       has_space=`$ECHO "$complete" | $GREP " "`
19546       if test "x$has_space" != x; then
19547         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19548 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19549       fi
19550       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19551     fi
19552   fi
19553 
19554   # Now new_path has a complete unix path to the binary
19555   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19556     # Keep paths in /bin as-is, but remove trailing .exe if any
19557     new_path="${new_path/%.exe/}"
19558     # Do not save /bin paths to all_fixpath_prefixes!
19559   else
19560     # Not in mixed or Windows style, start by that.
19561     new_path=`cmd //c echo $new_path`
19562 
19563   input_path="$new_path"
19564   # Check if we need to convert this using DOS-style short mode. If the path
19565   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19566   # take no chances and rewrite it.
19567   # Note: m4 eats our [], so we need to use [ and ] instead.
19568   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19569   if test "x$has_forbidden_chars" != x; then
19570     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19571     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19572   fi
19573 
19574     # Output is in $new_path
19575 
19576   windows_path="$new_path"
19577   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19578     unix_path=`$CYGPATH -u "$windows_path"`
19579     new_path="$unix_path"
19580   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19581     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19582     new_path="$unix_path"
19583   fi
19584 
19585     # remove trailing .exe if any
19586     new_path="${new_path/%.exe/}"
19587 
19588     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19589     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19590   fi
19591 
19592     else
19593       # We're on a unix platform. Hooray! :)
19594       # First separate the path from the arguments. This will split at the first
19595       # space.
19596       complete="$FOUND_MAKE"
19597       path="${complete%% *}"
19598       tmp="$complete EOL"
19599       arguments="${tmp#* }"
19600 
19601       # Cannot rely on the command "which" here since it doesn't always work.
19602       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19603       if test -z "$is_absolute_path"; then
19604         # Path to executable is not absolute. Find it.
19605         IFS_save="$IFS"
19606         IFS=:
19607         for p in $PATH; do
19608           if test -f "$p/$path" && test -x "$p/$path"; then
19609             new_path="$p/$path"
19610             break
19611           fi
19612         done
19613         IFS="$IFS_save"
19614       else
19615         # This is an absolute path, we can use it without further modifications.
19616         new_path="$path"
19617       fi
19618 
19619       if test "x$new_path" = x; then
19620         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19621 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19622         has_space=`$ECHO "$complete" | $GREP " "`
19623         if test "x$has_space" != x; then
19624           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19625 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19626         fi
19627         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19628       fi
19629     fi
19630 
19631     # Now join together the path and the arguments once again
19632     if test "x$arguments" != xEOL; then
19633       new_complete="$new_path ${arguments% *}"
19634     else
19635       new_complete="$new_path"
19636     fi
19637 
19638     if test "x$complete" != "x$new_complete"; then
19639       FOUND_MAKE="$new_complete"
19640       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19641 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19642     fi
19643   fi
19644 
19645         fi
19646       fi
19647     fi
19648   fi
19649 
19650         fi
19651         PATH=$OLD_PATH
19652       fi
19653     fi
19654 
19655     if test "x$FOUND_MAKE" = x; then
19656       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
19657     fi
19658 
19659     else
19660       # If it succeeded, then it was overridden by the user. We will use it
19661       # for the tool.
19662 
19663       # First remove it from the list of overridden variables, so we can test
19664       # for unknown variables in the end.
19665       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19666 
19667       # Check if we try to supply an empty value
19668       if test "x$MAKE" = x; then
19669         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19670 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19671         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19672 $as_echo_n "checking for MAKE... " >&6; }
19673         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19674 $as_echo "disabled" >&6; }
19675       else
19676         # Check if the provided tool contains a complete path.
19677         tool_specified="$MAKE"
19678         tool_basename="${tool_specified##*/}"
19679         if test "x$tool_basename" = "x$tool_specified"; then
19680           # A command without a complete path is provided, search $PATH.
19681           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19682 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19683           # Extract the first word of "$tool_basename", so it can be a program name with args.
19684 set dummy $tool_basename; ac_word=$2
19685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19686 $as_echo_n "checking for $ac_word... " >&6; }
19687 if ${ac_cv_path_MAKE+:} false; then :
19688   $as_echo_n "(cached) " >&6
19689 else
19690   case $MAKE in
19691   [\\/]* | ?:[\\/]*)
19692   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19693   ;;
19694   *)
19695   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19696 for as_dir in $PATH
19697 do
19698   IFS=$as_save_IFS
19699   test -z "$as_dir" && as_dir=.
19700     for ac_exec_ext in '' $ac_executable_extensions; do
19701   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19702     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19703     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19704     break 2
19705   fi
19706 done
19707   done
19708 IFS=$as_save_IFS
19709 
19710   ;;
19711 esac
19712 fi
19713 MAKE=$ac_cv_path_MAKE
19714 if test -n "$MAKE"; then
19715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19716 $as_echo "$MAKE" >&6; }
19717 else
19718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19719 $as_echo "no" >&6; }
19720 fi
19721 
19722 
19723           if test "x$MAKE" = x; then
19724             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19725           fi
19726         else
19727           # Otherwise we believe it is a complete path. Use it as it is.
19728           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19729 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19730           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19731 $as_echo_n "checking for MAKE... " >&6; }
19732           if test ! -x "$tool_specified"; then
19733             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19734 $as_echo "not found" >&6; }
19735             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19736           fi
19737           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19738 $as_echo "$tool_specified" >&6; }
19739         fi
19740       fi
19741     fi
19742 
19743     # If MAKE was set by user, verify the version
19744 
19745   MAKE_CANDIDATE=""$MAKE""
19746   DESCRIPTION="user supplied MAKE=$MAKE"
19747 
19748   # On Cygwin, we require a newer version of make than on other platforms
19749   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19750     MAKE_VERSION_EXPR="-e 4\."
19751     MAKE_REQUIRED_VERSION="4.0"
19752    else
19753     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19754     MAKE_REQUIRED_VERSION="3.81"
19755   fi
19756 
19757   if test "x$MAKE_CANDIDATE" != x; then
19758     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19759 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19760     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19761     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19762     if test "x$IS_GNU_MAKE" = x; then
19763       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19764 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19765     else
19766       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19767       if test "x$IS_MODERN_MAKE" = x; then
19768         { $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
19769 $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;}
19770       else
19771         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19772           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19773             MAKE_EXPECTED_ENV='cygwin'
19774           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19775             MAKE_EXPECTED_ENV='msys'
19776           else
19777             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19778           fi
19779           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19780           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19781         else
19782           # Not relevant for non-Windows
19783           IS_MAKE_CORRECT_ENV=true
19784         fi
19785         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19786           { $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
19787 $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;}
19788         else
19789           FOUND_MAKE=$MAKE_CANDIDATE
19790 
19791   # Only process if variable expands to non-empty
19792 
19793   if test "x$FOUND_MAKE" != x; then
19794     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19795 
19796   # First separate the path from the arguments. This will split at the first
19797   # space.
19798   complete="$FOUND_MAKE"
19799   path="${complete%% *}"
19800   tmp="$complete EOL"
19801   arguments="${tmp#* }"
19802 
19803   # Input might be given as Windows format, start by converting to
19804   # unix format.
19805   new_path=`$CYGPATH -u "$path"`
19806 
19807   # Now try to locate executable using which
19808   new_path=`$WHICH "$new_path" 2> /dev/null`
19809   # bat and cmd files are not always considered executable in cygwin causing which
19810   # to not find them
19811   if test "x$new_path" = x \
19812       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19813       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19814     new_path=`$CYGPATH -u "$path"`
19815   fi
19816   if test "x$new_path" = x; then
19817     # Oops. Which didn't find the executable.
19818     # The splitting of arguments from the executable at a space might have been incorrect,
19819     # since paths with space are more likely in Windows. Give it another try with the whole
19820     # argument.
19821     path="$complete"
19822     arguments="EOL"
19823     new_path=`$CYGPATH -u "$path"`
19824     new_path=`$WHICH "$new_path" 2> /dev/null`
19825     # bat and cmd files are not always considered executable in cygwin causing which
19826     # to not find them
19827     if test "x$new_path" = x \
19828         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19829         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19830       new_path=`$CYGPATH -u "$path"`
19831     fi
19832     if test "x$new_path" = x; then
19833       # It's still not found. Now this is an unrecoverable error.
19834       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19835 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19836       has_space=`$ECHO "$complete" | $GREP " "`
19837       if test "x$has_space" != x; then
19838         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19839 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19840       fi
19841       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19842     fi
19843   fi
19844 
19845   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19846   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19847   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19848   # "foo.exe" is OK but "foo" is an error.
19849   #
19850   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19851   # It is also a way to make sure we got the proper file name for the real test later on.
19852   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19853   if test "x$test_shortpath" = x; then
19854     # Short path failed, file does not exist as specified.
19855     # Try adding .exe or .cmd
19856     if test -f "${new_path}.exe"; then
19857       input_to_shortpath="${new_path}.exe"
19858     elif test -f "${new_path}.cmd"; then
19859       input_to_shortpath="${new_path}.cmd"
19860     else
19861       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19862 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19863       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19864 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19865       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19866     fi
19867   else
19868     input_to_shortpath="$new_path"
19869   fi
19870 
19871   # Call helper function which possibly converts this using DOS-style short mode.
19872   # If so, the updated path is stored in $new_path.
19873   new_path="$input_to_shortpath"
19874 
19875   input_path="$input_to_shortpath"
19876   # Check if we need to convert this using DOS-style short mode. If the path
19877   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19878   # take no chances and rewrite it.
19879   # Note: m4 eats our [], so we need to use [ and ] instead.
19880   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19881   if test "x$has_forbidden_chars" != x; then
19882     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19883     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19884     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19885     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19886       # Going to short mode and back again did indeed matter. Since short mode is
19887       # case insensitive, let's make it lowercase to improve readability.
19888       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19889       # Now convert it back to Unix-style (cygpath)
19890       input_path=`$CYGPATH -u "$shortmode_path"`
19891       new_path="$input_path"
19892     fi
19893   fi
19894 
19895   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19896   if test "x$test_cygdrive_prefix" = x; then
19897     # As a simple fix, exclude /usr/bin since it's not a real path.
19898     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19899       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19900       # a path prefixed by /cygdrive for fixpath to work.
19901       new_path="$CYGWIN_ROOT_PATH$input_path"
19902     fi
19903   fi
19904 
19905   # remove trailing .exe if any
19906   new_path="${new_path/%.exe/}"
19907 
19908     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19909 
19910   # First separate the path from the arguments. This will split at the first
19911   # space.
19912   complete="$FOUND_MAKE"
19913   path="${complete%% *}"
19914   tmp="$complete EOL"
19915   arguments="${tmp#* }"
19916 
19917   # Input might be given as Windows format, start by converting to
19918   # unix format.
19919   new_path="$path"
19920 
19921   windows_path="$new_path"
19922   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19923     unix_path=`$CYGPATH -u "$windows_path"`
19924     new_path="$unix_path"
19925   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19926     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19927     new_path="$unix_path"
19928   fi
19929 
19930 
19931   # Now try to locate executable using which
19932   new_path=`$WHICH "$new_path" 2> /dev/null`
19933 
19934   if test "x$new_path" = x; then
19935     # Oops. Which didn't find the executable.
19936     # The splitting of arguments from the executable at a space might have been incorrect,
19937     # since paths with space are more likely in Windows. Give it another try with the whole
19938     # argument.
19939     path="$complete"
19940     arguments="EOL"
19941     new_path="$path"
19942 
19943   windows_path="$new_path"
19944   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19945     unix_path=`$CYGPATH -u "$windows_path"`
19946     new_path="$unix_path"
19947   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19948     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19949     new_path="$unix_path"
19950   fi
19951 
19952 
19953     new_path=`$WHICH "$new_path" 2> /dev/null`
19954     # bat and cmd files are not always considered executable in MSYS causing which
19955     # to not find them
19956     if test "x$new_path" = x \
19957         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19958         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19959       new_path="$path"
19960 
19961   windows_path="$new_path"
19962   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19963     unix_path=`$CYGPATH -u "$windows_path"`
19964     new_path="$unix_path"
19965   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19966     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19967     new_path="$unix_path"
19968   fi
19969 
19970     fi
19971 
19972     if test "x$new_path" = x; then
19973       # It's still not found. Now this is an unrecoverable error.
19974       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19975 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19976       has_space=`$ECHO "$complete" | $GREP " "`
19977       if test "x$has_space" != x; then
19978         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19979 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19980       fi
19981       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19982     fi
19983   fi
19984 
19985   # Now new_path has a complete unix path to the binary
19986   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19987     # Keep paths in /bin as-is, but remove trailing .exe if any
19988     new_path="${new_path/%.exe/}"
19989     # Do not save /bin paths to all_fixpath_prefixes!
19990   else
19991     # Not in mixed or Windows style, start by that.
19992     new_path=`cmd //c echo $new_path`
19993 
19994   input_path="$new_path"
19995   # Check if we need to convert this using DOS-style short mode. If the path
19996   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19997   # take no chances and rewrite it.
19998   # Note: m4 eats our [], so we need to use [ and ] instead.
19999   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20000   if test "x$has_forbidden_chars" != x; then
20001     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20002     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20003   fi
20004 
20005     # Output is in $new_path
20006 
20007   windows_path="$new_path"
20008   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20009     unix_path=`$CYGPATH -u "$windows_path"`
20010     new_path="$unix_path"
20011   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20012     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20013     new_path="$unix_path"
20014   fi
20015 
20016     # remove trailing .exe if any
20017     new_path="${new_path/%.exe/}"
20018 
20019     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20020     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20021   fi
20022 
20023     else
20024       # We're on a unix platform. Hooray! :)
20025       # First separate the path from the arguments. This will split at the first
20026       # space.
20027       complete="$FOUND_MAKE"
20028       path="${complete%% *}"
20029       tmp="$complete EOL"
20030       arguments="${tmp#* }"
20031 
20032       # Cannot rely on the command "which" here since it doesn't always work.
20033       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20034       if test -z "$is_absolute_path"; then
20035         # Path to executable is not absolute. Find it.
20036         IFS_save="$IFS"
20037         IFS=:
20038         for p in $PATH; do
20039           if test -f "$p/$path" && test -x "$p/$path"; then
20040             new_path="$p/$path"
20041             break
20042           fi
20043         done
20044         IFS="$IFS_save"
20045       else
20046         # This is an absolute path, we can use it without further modifications.
20047         new_path="$path"
20048       fi
20049 
20050       if test "x$new_path" = x; then
20051         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20052 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20053         has_space=`$ECHO "$complete" | $GREP " "`
20054         if test "x$has_space" != x; then
20055           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20056 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20057         fi
20058         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20059       fi
20060     fi
20061 
20062     # Now join together the path and the arguments once again
20063     if test "x$arguments" != xEOL; then
20064       new_complete="$new_path ${arguments% *}"
20065     else
20066       new_complete="$new_path"
20067     fi
20068 
20069     if test "x$complete" != "x$new_complete"; then
20070       FOUND_MAKE="$new_complete"
20071       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20072 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20073     fi
20074   fi
20075 
20076         fi
20077       fi
20078     fi
20079   fi
20080 
20081     if test "x$FOUND_MAKE" = x; then
20082       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20083     fi
20084 
20085   fi
20086 
20087 
20088   MAKE=$FOUND_MAKE
20089 
20090   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20091 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20092 
20093 
20094   # Check if make supports the output sync option and if so, setup using it.
20095   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20096 $as_echo_n "checking if make --output-sync is supported... " >&6; }
20097   if $MAKE --version -O > /dev/null 2>&1; then
20098     OUTPUT_SYNC_SUPPORTED=true
20099     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20100 $as_echo "yes" >&6; }
20101     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20102 $as_echo_n "checking for output-sync value... " >&6; }
20103 
20104 # Check whether --with-output-sync was given.
20105 if test "${with_output_sync+set}" = set; then :
20106   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20107 fi
20108 
20109     if test "x$OUTPUT_SYNC" = "x"; then
20110       OUTPUT_SYNC=none
20111     fi
20112     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20113 $as_echo "$OUTPUT_SYNC" >&6; }
20114     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20115       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20116     fi
20117   else
20118     OUTPUT_SYNC_SUPPORTED=false
20119     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20120 $as_echo "no" >&6; }
20121   fi
20122 
20123 
20124 
20125 
20126 
20127 
20128   # Test if find supports -delete
20129   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20130 $as_echo_n "checking if find supports -delete... " >&6; }
20131   FIND_DELETE="-delete"
20132 
20133   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20134 
20135   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20136 
20137   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20138   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20139     # No, it does not.
20140     rm $DELETEDIR/TestIfFindSupportsDelete
20141     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20142       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20143       FIND_DELETE="-print | xargs rm"
20144     else
20145       FIND_DELETE="-exec rm \{\} \+"
20146     fi
20147     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20148 $as_echo "no" >&6; }
20149   else
20150     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20151 $as_echo "yes" >&6; }
20152   fi
20153   rmdir $DELETEDIR
20154 
20155 
20156 
20157   # These tools might not be installed by default,
20158   # need hint on how to install them.
20159 
20160 
20161 
20162   # Publish this variable in the help.
20163 
20164 
20165   if [ -z "${UNZIP+x}" ]; then
20166     # The variable is not set by user, try to locate tool using the code snippet
20167     for ac_prog in unzip
20168 do
20169   # Extract the first word of "$ac_prog", so it can be a program name with args.
20170 set dummy $ac_prog; ac_word=$2
20171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20172 $as_echo_n "checking for $ac_word... " >&6; }
20173 if ${ac_cv_path_UNZIP+:} false; then :
20174   $as_echo_n "(cached) " >&6
20175 else
20176   case $UNZIP in
20177   [\\/]* | ?:[\\/]*)
20178   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20179   ;;
20180   *)
20181   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20182 for as_dir in $PATH
20183 do
20184   IFS=$as_save_IFS
20185   test -z "$as_dir" && as_dir=.
20186     for ac_exec_ext in '' $ac_executable_extensions; do
20187   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20188     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20189     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20190     break 2
20191   fi
20192 done
20193   done
20194 IFS=$as_save_IFS
20195 
20196   ;;
20197 esac
20198 fi
20199 UNZIP=$ac_cv_path_UNZIP
20200 if test -n "$UNZIP"; then
20201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20202 $as_echo "$UNZIP" >&6; }
20203 else
20204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20205 $as_echo "no" >&6; }
20206 fi
20207 
20208 
20209   test -n "$UNZIP" && break
20210 done
20211 
20212   else
20213     # The variable is set, but is it from the command line or the environment?
20214 
20215     # Try to remove the string !UNZIP! from our list.
20216     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20217     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20218       # If it failed, the variable was not from the command line. Ignore it,
20219       # but warn the user (except for BASH, which is always set by the calling BASH).
20220       if test "xUNZIP" != xBASH; then
20221         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20222 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20223       fi
20224       # Try to locate tool using the code snippet
20225       for ac_prog in unzip
20226 do
20227   # Extract the first word of "$ac_prog", so it can be a program name with args.
20228 set dummy $ac_prog; ac_word=$2
20229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20230 $as_echo_n "checking for $ac_word... " >&6; }
20231 if ${ac_cv_path_UNZIP+:} false; then :
20232   $as_echo_n "(cached) " >&6
20233 else
20234   case $UNZIP in
20235   [\\/]* | ?:[\\/]*)
20236   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20237   ;;
20238   *)
20239   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20240 for as_dir in $PATH
20241 do
20242   IFS=$as_save_IFS
20243   test -z "$as_dir" && as_dir=.
20244     for ac_exec_ext in '' $ac_executable_extensions; do
20245   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20246     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20247     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20248     break 2
20249   fi
20250 done
20251   done
20252 IFS=$as_save_IFS
20253 
20254   ;;
20255 esac
20256 fi
20257 UNZIP=$ac_cv_path_UNZIP
20258 if test -n "$UNZIP"; then
20259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20260 $as_echo "$UNZIP" >&6; }
20261 else
20262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20263 $as_echo "no" >&6; }
20264 fi
20265 
20266 
20267   test -n "$UNZIP" && break
20268 done
20269 
20270     else
20271       # If it succeeded, then it was overridden by the user. We will use it
20272       # for the tool.
20273 
20274       # First remove it from the list of overridden variables, so we can test
20275       # for unknown variables in the end.
20276       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20277 
20278       # Check if we try to supply an empty value
20279       if test "x$UNZIP" = x; then
20280         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20281 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20282         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20283 $as_echo_n "checking for UNZIP... " >&6; }
20284         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20285 $as_echo "disabled" >&6; }
20286       else
20287         # Check if the provided tool contains a complete path.
20288         tool_specified="$UNZIP"
20289         tool_basename="${tool_specified##*/}"
20290         if test "x$tool_basename" = "x$tool_specified"; then
20291           # A command without a complete path is provided, search $PATH.
20292           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20293 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20294           # Extract the first word of "$tool_basename", so it can be a program name with args.
20295 set dummy $tool_basename; ac_word=$2
20296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20297 $as_echo_n "checking for $ac_word... " >&6; }
20298 if ${ac_cv_path_UNZIP+:} false; then :
20299   $as_echo_n "(cached) " >&6
20300 else
20301   case $UNZIP in
20302   [\\/]* | ?:[\\/]*)
20303   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20304   ;;
20305   *)
20306   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20307 for as_dir in $PATH
20308 do
20309   IFS=$as_save_IFS
20310   test -z "$as_dir" && as_dir=.
20311     for ac_exec_ext in '' $ac_executable_extensions; do
20312   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20313     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20314     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20315     break 2
20316   fi
20317 done
20318   done
20319 IFS=$as_save_IFS
20320 
20321   ;;
20322 esac
20323 fi
20324 UNZIP=$ac_cv_path_UNZIP
20325 if test -n "$UNZIP"; then
20326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20327 $as_echo "$UNZIP" >&6; }
20328 else
20329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20330 $as_echo "no" >&6; }
20331 fi
20332 
20333 
20334           if test "x$UNZIP" = x; then
20335             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20336           fi
20337         else
20338           # Otherwise we believe it is a complete path. Use it as it is.
20339           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20340 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20341           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20342 $as_echo_n "checking for UNZIP... " >&6; }
20343           if test ! -x "$tool_specified"; then
20344             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20345 $as_echo "not found" >&6; }
20346             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20347           fi
20348           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20349 $as_echo "$tool_specified" >&6; }
20350         fi
20351       fi
20352     fi
20353 
20354   fi
20355 
20356 
20357 
20358   if test "x$UNZIP" = x; then
20359     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20360   fi
20361 
20362 
20363 
20364 
20365 
20366   # Publish this variable in the help.
20367 
20368 
20369   if [ -z "${ZIP+x}" ]; then
20370     # The variable is not set by user, try to locate tool using the code snippet
20371     for ac_prog in zip
20372 do
20373   # Extract the first word of "$ac_prog", so it can be a program name with args.
20374 set dummy $ac_prog; ac_word=$2
20375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20376 $as_echo_n "checking for $ac_word... " >&6; }
20377 if ${ac_cv_path_ZIP+:} false; then :
20378   $as_echo_n "(cached) " >&6
20379 else
20380   case $ZIP in
20381   [\\/]* | ?:[\\/]*)
20382   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20383   ;;
20384   *)
20385   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20386 for as_dir in $PATH
20387 do
20388   IFS=$as_save_IFS
20389   test -z "$as_dir" && as_dir=.
20390     for ac_exec_ext in '' $ac_executable_extensions; do
20391   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20392     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20393     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20394     break 2
20395   fi
20396 done
20397   done
20398 IFS=$as_save_IFS
20399 
20400   ;;
20401 esac
20402 fi
20403 ZIP=$ac_cv_path_ZIP
20404 if test -n "$ZIP"; then
20405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20406 $as_echo "$ZIP" >&6; }
20407 else
20408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20409 $as_echo "no" >&6; }
20410 fi
20411 
20412 
20413   test -n "$ZIP" && break
20414 done
20415 
20416   else
20417     # The variable is set, but is it from the command line or the environment?
20418 
20419     # Try to remove the string !ZIP! from our list.
20420     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20421     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20422       # If it failed, the variable was not from the command line. Ignore it,
20423       # but warn the user (except for BASH, which is always set by the calling BASH).
20424       if test "xZIP" != xBASH; then
20425         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20426 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20427       fi
20428       # Try to locate tool using the code snippet
20429       for ac_prog in zip
20430 do
20431   # Extract the first word of "$ac_prog", so it can be a program name with args.
20432 set dummy $ac_prog; ac_word=$2
20433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20434 $as_echo_n "checking for $ac_word... " >&6; }
20435 if ${ac_cv_path_ZIP+:} false; then :
20436   $as_echo_n "(cached) " >&6
20437 else
20438   case $ZIP in
20439   [\\/]* | ?:[\\/]*)
20440   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20441   ;;
20442   *)
20443   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20444 for as_dir in $PATH
20445 do
20446   IFS=$as_save_IFS
20447   test -z "$as_dir" && as_dir=.
20448     for ac_exec_ext in '' $ac_executable_extensions; do
20449   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20450     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20451     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20452     break 2
20453   fi
20454 done
20455   done
20456 IFS=$as_save_IFS
20457 
20458   ;;
20459 esac
20460 fi
20461 ZIP=$ac_cv_path_ZIP
20462 if test -n "$ZIP"; then
20463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20464 $as_echo "$ZIP" >&6; }
20465 else
20466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20467 $as_echo "no" >&6; }
20468 fi
20469 
20470 
20471   test -n "$ZIP" && break
20472 done
20473 
20474     else
20475       # If it succeeded, then it was overridden by the user. We will use it
20476       # for the tool.
20477 
20478       # First remove it from the list of overridden variables, so we can test
20479       # for unknown variables in the end.
20480       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20481 
20482       # Check if we try to supply an empty value
20483       if test "x$ZIP" = x; then
20484         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20485 $as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20486         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20487 $as_echo_n "checking for ZIP... " >&6; }
20488         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20489 $as_echo "disabled" >&6; }
20490       else
20491         # Check if the provided tool contains a complete path.
20492         tool_specified="$ZIP"
20493         tool_basename="${tool_specified##*/}"
20494         if test "x$tool_basename" = "x$tool_specified"; then
20495           # A command without a complete path is provided, search $PATH.
20496           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20497 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20498           # Extract the first word of "$tool_basename", so it can be a program name with args.
20499 set dummy $tool_basename; ac_word=$2
20500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20501 $as_echo_n "checking for $ac_word... " >&6; }
20502 if ${ac_cv_path_ZIP+:} false; then :
20503   $as_echo_n "(cached) " >&6
20504 else
20505   case $ZIP in
20506   [\\/]* | ?:[\\/]*)
20507   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20508   ;;
20509   *)
20510   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20511 for as_dir in $PATH
20512 do
20513   IFS=$as_save_IFS
20514   test -z "$as_dir" && as_dir=.
20515     for ac_exec_ext in '' $ac_executable_extensions; do
20516   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20517     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20518     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20519     break 2
20520   fi
20521 done
20522   done
20523 IFS=$as_save_IFS
20524 
20525   ;;
20526 esac
20527 fi
20528 ZIP=$ac_cv_path_ZIP
20529 if test -n "$ZIP"; then
20530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20531 $as_echo "$ZIP" >&6; }
20532 else
20533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20534 $as_echo "no" >&6; }
20535 fi
20536 
20537 
20538           if test "x$ZIP" = x; then
20539             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20540           fi
20541         else
20542           # Otherwise we believe it is a complete path. Use it as it is.
20543           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20544 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20545           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20546 $as_echo_n "checking for ZIP... " >&6; }
20547           if test ! -x "$tool_specified"; then
20548             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20549 $as_echo "not found" >&6; }
20550             as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20551           fi
20552           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20553 $as_echo "$tool_specified" >&6; }
20554         fi
20555       fi
20556     fi
20557 
20558   fi
20559 
20560 
20561 
20562   if test "x$ZIP" = x; then
20563     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20564   fi
20565 
20566 
20567 
20568   # Non-required basic tools
20569 
20570 
20571 
20572   # Publish this variable in the help.
20573 
20574 
20575   if [ -z "${LDD+x}" ]; then
20576     # The variable is not set by user, try to locate tool using the code snippet
20577     for ac_prog in ldd
20578 do
20579   # Extract the first word of "$ac_prog", so it can be a program name with args.
20580 set dummy $ac_prog; ac_word=$2
20581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20582 $as_echo_n "checking for $ac_word... " >&6; }
20583 if ${ac_cv_path_LDD+:} false; then :
20584   $as_echo_n "(cached) " >&6
20585 else
20586   case $LDD in
20587   [\\/]* | ?:[\\/]*)
20588   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20589   ;;
20590   *)
20591   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20592 for as_dir in $PATH
20593 do
20594   IFS=$as_save_IFS
20595   test -z "$as_dir" && as_dir=.
20596     for ac_exec_ext in '' $ac_executable_extensions; do
20597   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20598     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20599     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20600     break 2
20601   fi
20602 done
20603   done
20604 IFS=$as_save_IFS
20605 
20606   ;;
20607 esac
20608 fi
20609 LDD=$ac_cv_path_LDD
20610 if test -n "$LDD"; then
20611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20612 $as_echo "$LDD" >&6; }
20613 else
20614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20615 $as_echo "no" >&6; }
20616 fi
20617 
20618 
20619   test -n "$LDD" && break
20620 done
20621 
20622   else
20623     # The variable is set, but is it from the command line or the environment?
20624 
20625     # Try to remove the string !LDD! from our list.
20626     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20627     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20628       # If it failed, the variable was not from the command line. Ignore it,
20629       # but warn the user (except for BASH, which is always set by the calling BASH).
20630       if test "xLDD" != xBASH; then
20631         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20632 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20633       fi
20634       # Try to locate tool using the code snippet
20635       for ac_prog in ldd
20636 do
20637   # Extract the first word of "$ac_prog", so it can be a program name with args.
20638 set dummy $ac_prog; ac_word=$2
20639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20640 $as_echo_n "checking for $ac_word... " >&6; }
20641 if ${ac_cv_path_LDD+:} false; then :
20642   $as_echo_n "(cached) " >&6
20643 else
20644   case $LDD in
20645   [\\/]* | ?:[\\/]*)
20646   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20647   ;;
20648   *)
20649   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20650 for as_dir in $PATH
20651 do
20652   IFS=$as_save_IFS
20653   test -z "$as_dir" && as_dir=.
20654     for ac_exec_ext in '' $ac_executable_extensions; do
20655   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20656     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20657     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20658     break 2
20659   fi
20660 done
20661   done
20662 IFS=$as_save_IFS
20663 
20664   ;;
20665 esac
20666 fi
20667 LDD=$ac_cv_path_LDD
20668 if test -n "$LDD"; then
20669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20670 $as_echo "$LDD" >&6; }
20671 else
20672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20673 $as_echo "no" >&6; }
20674 fi
20675 
20676 
20677   test -n "$LDD" && break
20678 done
20679 
20680     else
20681       # If it succeeded, then it was overridden by the user. We will use it
20682       # for the tool.
20683 
20684       # First remove it from the list of overridden variables, so we can test
20685       # for unknown variables in the end.
20686       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20687 
20688       # Check if we try to supply an empty value
20689       if test "x$LDD" = x; then
20690         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20691 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20692         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20693 $as_echo_n "checking for LDD... " >&6; }
20694         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20695 $as_echo "disabled" >&6; }
20696       else
20697         # Check if the provided tool contains a complete path.
20698         tool_specified="$LDD"
20699         tool_basename="${tool_specified##*/}"
20700         if test "x$tool_basename" = "x$tool_specified"; then
20701           # A command without a complete path is provided, search $PATH.
20702           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20703 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20704           # Extract the first word of "$tool_basename", so it can be a program name with args.
20705 set dummy $tool_basename; ac_word=$2
20706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20707 $as_echo_n "checking for $ac_word... " >&6; }
20708 if ${ac_cv_path_LDD+:} false; then :
20709   $as_echo_n "(cached) " >&6
20710 else
20711   case $LDD in
20712   [\\/]* | ?:[\\/]*)
20713   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20714   ;;
20715   *)
20716   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20717 for as_dir in $PATH
20718 do
20719   IFS=$as_save_IFS
20720   test -z "$as_dir" && as_dir=.
20721     for ac_exec_ext in '' $ac_executable_extensions; do
20722   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20723     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20724     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20725     break 2
20726   fi
20727 done
20728   done
20729 IFS=$as_save_IFS
20730 
20731   ;;
20732 esac
20733 fi
20734 LDD=$ac_cv_path_LDD
20735 if test -n "$LDD"; then
20736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20737 $as_echo "$LDD" >&6; }
20738 else
20739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20740 $as_echo "no" >&6; }
20741 fi
20742 
20743 
20744           if test "x$LDD" = x; then
20745             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20746           fi
20747         else
20748           # Otherwise we believe it is a complete path. Use it as it is.
20749           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20750 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20751           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20752 $as_echo_n "checking for LDD... " >&6; }
20753           if test ! -x "$tool_specified"; then
20754             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20755 $as_echo "not found" >&6; }
20756             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20757           fi
20758           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20759 $as_echo "$tool_specified" >&6; }
20760         fi
20761       fi
20762     fi
20763 
20764   fi
20765 
20766 
20767   if test "x$LDD" = "x"; then
20768     # List shared lib dependencies is used for
20769     # debug output and checking for forbidden dependencies.
20770     # We can build without it.
20771     LDD="true"
20772   fi
20773 
20774 
20775   # Publish this variable in the help.
20776 
20777 
20778   if [ -z "${OTOOL+x}" ]; then
20779     # The variable is not set by user, try to locate tool using the code snippet
20780     for ac_prog in otool
20781 do
20782   # Extract the first word of "$ac_prog", so it can be a program name with args.
20783 set dummy $ac_prog; ac_word=$2
20784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20785 $as_echo_n "checking for $ac_word... " >&6; }
20786 if ${ac_cv_path_OTOOL+:} false; then :
20787   $as_echo_n "(cached) " >&6
20788 else
20789   case $OTOOL in
20790   [\\/]* | ?:[\\/]*)
20791   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20792   ;;
20793   *)
20794   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20795 for as_dir in $PATH
20796 do
20797   IFS=$as_save_IFS
20798   test -z "$as_dir" && as_dir=.
20799     for ac_exec_ext in '' $ac_executable_extensions; do
20800   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20801     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20802     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20803     break 2
20804   fi
20805 done
20806   done
20807 IFS=$as_save_IFS
20808 
20809   ;;
20810 esac
20811 fi
20812 OTOOL=$ac_cv_path_OTOOL
20813 if test -n "$OTOOL"; then
20814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20815 $as_echo "$OTOOL" >&6; }
20816 else
20817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20818 $as_echo "no" >&6; }
20819 fi
20820 
20821 
20822   test -n "$OTOOL" && break
20823 done
20824 
20825   else
20826     # The variable is set, but is it from the command line or the environment?
20827 
20828     # Try to remove the string !OTOOL! from our list.
20829     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
20830     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20831       # If it failed, the variable was not from the command line. Ignore it,
20832       # but warn the user (except for BASH, which is always set by the calling BASH).
20833       if test "xOTOOL" != xBASH; then
20834         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
20835 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
20836       fi
20837       # Try to locate tool using the code snippet
20838       for ac_prog in otool
20839 do
20840   # Extract the first word of "$ac_prog", so it can be a program name with args.
20841 set dummy $ac_prog; ac_word=$2
20842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20843 $as_echo_n "checking for $ac_word... " >&6; }
20844 if ${ac_cv_path_OTOOL+:} false; then :
20845   $as_echo_n "(cached) " >&6
20846 else
20847   case $OTOOL in
20848   [\\/]* | ?:[\\/]*)
20849   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20850   ;;
20851   *)
20852   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20853 for as_dir in $PATH
20854 do
20855   IFS=$as_save_IFS
20856   test -z "$as_dir" && as_dir=.
20857     for ac_exec_ext in '' $ac_executable_extensions; do
20858   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20859     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20860     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20861     break 2
20862   fi
20863 done
20864   done
20865 IFS=$as_save_IFS
20866 
20867   ;;
20868 esac
20869 fi
20870 OTOOL=$ac_cv_path_OTOOL
20871 if test -n "$OTOOL"; then
20872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20873 $as_echo "$OTOOL" >&6; }
20874 else
20875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20876 $as_echo "no" >&6; }
20877 fi
20878 
20879 
20880   test -n "$OTOOL" && break
20881 done
20882 
20883     else
20884       # If it succeeded, then it was overridden by the user. We will use it
20885       # for the tool.
20886 
20887       # First remove it from the list of overridden variables, so we can test
20888       # for unknown variables in the end.
20889       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20890 
20891       # Check if we try to supply an empty value
20892       if test "x$OTOOL" = x; then
20893         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
20894 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
20895         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20896 $as_echo_n "checking for OTOOL... " >&6; }
20897         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20898 $as_echo "disabled" >&6; }
20899       else
20900         # Check if the provided tool contains a complete path.
20901         tool_specified="$OTOOL"
20902         tool_basename="${tool_specified##*/}"
20903         if test "x$tool_basename" = "x$tool_specified"; then
20904           # A command without a complete path is provided, search $PATH.
20905           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
20906 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
20907           # Extract the first word of "$tool_basename", so it can be a program name with args.
20908 set dummy $tool_basename; ac_word=$2
20909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20910 $as_echo_n "checking for $ac_word... " >&6; }
20911 if ${ac_cv_path_OTOOL+:} false; then :
20912   $as_echo_n "(cached) " >&6
20913 else
20914   case $OTOOL in
20915   [\\/]* | ?:[\\/]*)
20916   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20917   ;;
20918   *)
20919   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20920 for as_dir in $PATH
20921 do
20922   IFS=$as_save_IFS
20923   test -z "$as_dir" && as_dir=.
20924     for ac_exec_ext in '' $ac_executable_extensions; do
20925   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20926     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20927     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20928     break 2
20929   fi
20930 done
20931   done
20932 IFS=$as_save_IFS
20933 
20934   ;;
20935 esac
20936 fi
20937 OTOOL=$ac_cv_path_OTOOL
20938 if test -n "$OTOOL"; then
20939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20940 $as_echo "$OTOOL" >&6; }
20941 else
20942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20943 $as_echo "no" >&6; }
20944 fi
20945 
20946 
20947           if test "x$OTOOL" = x; then
20948             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20949           fi
20950         else
20951           # Otherwise we believe it is a complete path. Use it as it is.
20952           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
20953 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
20954           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20955 $as_echo_n "checking for OTOOL... " >&6; }
20956           if test ! -x "$tool_specified"; then
20957             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20958 $as_echo "not found" >&6; }
20959             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
20960           fi
20961           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20962 $as_echo "$tool_specified" >&6; }
20963         fi
20964       fi
20965     fi
20966 
20967   fi
20968 
20969 
20970   if test "x$OTOOL" = "x"; then
20971     OTOOL="true"
20972   fi
20973 
20974 
20975   # Publish this variable in the help.
20976 
20977 
20978   if [ -z "${READELF+x}" ]; then
20979     # The variable is not set by user, try to locate tool using the code snippet
20980     for ac_prog in greadelf readelf
20981 do
20982   # Extract the first word of "$ac_prog", so it can be a program name with args.
20983 set dummy $ac_prog; ac_word=$2
20984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20985 $as_echo_n "checking for $ac_word... " >&6; }
20986 if ${ac_cv_path_READELF+:} false; then :
20987   $as_echo_n "(cached) " >&6
20988 else
20989   case $READELF in
20990   [\\/]* | ?:[\\/]*)
20991   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
20992   ;;
20993   *)
20994   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20995 for as_dir in $PATH
20996 do
20997   IFS=$as_save_IFS
20998   test -z "$as_dir" && as_dir=.
20999     for ac_exec_ext in '' $ac_executable_extensions; do
21000   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21001     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21002     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21003     break 2
21004   fi
21005 done
21006   done
21007 IFS=$as_save_IFS
21008 
21009   ;;
21010 esac
21011 fi
21012 READELF=$ac_cv_path_READELF
21013 if test -n "$READELF"; then
21014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21015 $as_echo "$READELF" >&6; }
21016 else
21017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21018 $as_echo "no" >&6; }
21019 fi
21020 
21021 
21022   test -n "$READELF" && break
21023 done
21024 
21025   else
21026     # The variable is set, but is it from the command line or the environment?
21027 
21028     # Try to remove the string !READELF! from our list.
21029     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21030     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21031       # If it failed, the variable was not from the command line. Ignore it,
21032       # but warn the user (except for BASH, which is always set by the calling BASH).
21033       if test "xREADELF" != xBASH; then
21034         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21035 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21036       fi
21037       # Try to locate tool using the code snippet
21038       for ac_prog in greadelf readelf
21039 do
21040   # Extract the first word of "$ac_prog", so it can be a program name with args.
21041 set dummy $ac_prog; ac_word=$2
21042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21043 $as_echo_n "checking for $ac_word... " >&6; }
21044 if ${ac_cv_path_READELF+:} false; then :
21045   $as_echo_n "(cached) " >&6
21046 else
21047   case $READELF in
21048   [\\/]* | ?:[\\/]*)
21049   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21050   ;;
21051   *)
21052   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21053 for as_dir in $PATH
21054 do
21055   IFS=$as_save_IFS
21056   test -z "$as_dir" && as_dir=.
21057     for ac_exec_ext in '' $ac_executable_extensions; do
21058   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21059     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21060     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21061     break 2
21062   fi
21063 done
21064   done
21065 IFS=$as_save_IFS
21066 
21067   ;;
21068 esac
21069 fi
21070 READELF=$ac_cv_path_READELF
21071 if test -n "$READELF"; then
21072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21073 $as_echo "$READELF" >&6; }
21074 else
21075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21076 $as_echo "no" >&6; }
21077 fi
21078 
21079 
21080   test -n "$READELF" && break
21081 done
21082 
21083     else
21084       # If it succeeded, then it was overridden by the user. We will use it
21085       # for the tool.
21086 
21087       # First remove it from the list of overridden variables, so we can test
21088       # for unknown variables in the end.
21089       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21090 
21091       # Check if we try to supply an empty value
21092       if test "x$READELF" = x; then
21093         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21094 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21095         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21096 $as_echo_n "checking for READELF... " >&6; }
21097         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21098 $as_echo "disabled" >&6; }
21099       else
21100         # Check if the provided tool contains a complete path.
21101         tool_specified="$READELF"
21102         tool_basename="${tool_specified##*/}"
21103         if test "x$tool_basename" = "x$tool_specified"; then
21104           # A command without a complete path is provided, search $PATH.
21105           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21106 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21107           # Extract the first word of "$tool_basename", so it can be a program name with args.
21108 set dummy $tool_basename; ac_word=$2
21109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21110 $as_echo_n "checking for $ac_word... " >&6; }
21111 if ${ac_cv_path_READELF+:} false; then :
21112   $as_echo_n "(cached) " >&6
21113 else
21114   case $READELF in
21115   [\\/]* | ?:[\\/]*)
21116   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21117   ;;
21118   *)
21119   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21120 for as_dir in $PATH
21121 do
21122   IFS=$as_save_IFS
21123   test -z "$as_dir" && as_dir=.
21124     for ac_exec_ext in '' $ac_executable_extensions; do
21125   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21126     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21127     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21128     break 2
21129   fi
21130 done
21131   done
21132 IFS=$as_save_IFS
21133 
21134   ;;
21135 esac
21136 fi
21137 READELF=$ac_cv_path_READELF
21138 if test -n "$READELF"; then
21139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21140 $as_echo "$READELF" >&6; }
21141 else
21142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21143 $as_echo "no" >&6; }
21144 fi
21145 
21146 
21147           if test "x$READELF" = x; then
21148             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21149           fi
21150         else
21151           # Otherwise we believe it is a complete path. Use it as it is.
21152           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21153 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21154           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21155 $as_echo_n "checking for READELF... " >&6; }
21156           if test ! -x "$tool_specified"; then
21157             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21158 $as_echo "not found" >&6; }
21159             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21160           fi
21161           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21162 $as_echo "$tool_specified" >&6; }
21163         fi
21164       fi
21165     fi
21166 
21167   fi
21168 
21169 
21170 
21171 
21172   # Publish this variable in the help.
21173 
21174 
21175   if [ -z "${HG+x}" ]; then
21176     # The variable is not set by user, try to locate tool using the code snippet
21177     for ac_prog in hg
21178 do
21179   # Extract the first word of "$ac_prog", so it can be a program name with args.
21180 set dummy $ac_prog; ac_word=$2
21181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21182 $as_echo_n "checking for $ac_word... " >&6; }
21183 if ${ac_cv_path_HG+:} false; then :
21184   $as_echo_n "(cached) " >&6
21185 else
21186   case $HG in
21187   [\\/]* | ?:[\\/]*)
21188   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21189   ;;
21190   *)
21191   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21192 for as_dir in $PATH
21193 do
21194   IFS=$as_save_IFS
21195   test -z "$as_dir" && as_dir=.
21196     for ac_exec_ext in '' $ac_executable_extensions; do
21197   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21198     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21199     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21200     break 2
21201   fi
21202 done
21203   done
21204 IFS=$as_save_IFS
21205 
21206   ;;
21207 esac
21208 fi
21209 HG=$ac_cv_path_HG
21210 if test -n "$HG"; then
21211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21212 $as_echo "$HG" >&6; }
21213 else
21214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21215 $as_echo "no" >&6; }
21216 fi
21217 
21218 
21219   test -n "$HG" && break
21220 done
21221 
21222   else
21223     # The variable is set, but is it from the command line or the environment?
21224 
21225     # Try to remove the string !HG! from our list.
21226     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21227     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21228       # If it failed, the variable was not from the command line. Ignore it,
21229       # but warn the user (except for BASH, which is always set by the calling BASH).
21230       if test "xHG" != xBASH; then
21231         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21232 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21233       fi
21234       # Try to locate tool using the code snippet
21235       for ac_prog in hg
21236 do
21237   # Extract the first word of "$ac_prog", so it can be a program name with args.
21238 set dummy $ac_prog; ac_word=$2
21239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21240 $as_echo_n "checking for $ac_word... " >&6; }
21241 if ${ac_cv_path_HG+:} false; then :
21242   $as_echo_n "(cached) " >&6
21243 else
21244   case $HG in
21245   [\\/]* | ?:[\\/]*)
21246   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21247   ;;
21248   *)
21249   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21250 for as_dir in $PATH
21251 do
21252   IFS=$as_save_IFS
21253   test -z "$as_dir" && as_dir=.
21254     for ac_exec_ext in '' $ac_executable_extensions; do
21255   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21256     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21257     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21258     break 2
21259   fi
21260 done
21261   done
21262 IFS=$as_save_IFS
21263 
21264   ;;
21265 esac
21266 fi
21267 HG=$ac_cv_path_HG
21268 if test -n "$HG"; then
21269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21270 $as_echo "$HG" >&6; }
21271 else
21272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21273 $as_echo "no" >&6; }
21274 fi
21275 
21276 
21277   test -n "$HG" && break
21278 done
21279 
21280     else
21281       # If it succeeded, then it was overridden by the user. We will use it
21282       # for the tool.
21283 
21284       # First remove it from the list of overridden variables, so we can test
21285       # for unknown variables in the end.
21286       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21287 
21288       # Check if we try to supply an empty value
21289       if test "x$HG" = x; then
21290         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21291 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21292         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21293 $as_echo_n "checking for HG... " >&6; }
21294         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21295 $as_echo "disabled" >&6; }
21296       else
21297         # Check if the provided tool contains a complete path.
21298         tool_specified="$HG"
21299         tool_basename="${tool_specified##*/}"
21300         if test "x$tool_basename" = "x$tool_specified"; then
21301           # A command without a complete path is provided, search $PATH.
21302           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21303 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21304           # Extract the first word of "$tool_basename", so it can be a program name with args.
21305 set dummy $tool_basename; ac_word=$2
21306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21307 $as_echo_n "checking for $ac_word... " >&6; }
21308 if ${ac_cv_path_HG+:} false; then :
21309   $as_echo_n "(cached) " >&6
21310 else
21311   case $HG in
21312   [\\/]* | ?:[\\/]*)
21313   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21314   ;;
21315   *)
21316   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21317 for as_dir in $PATH
21318 do
21319   IFS=$as_save_IFS
21320   test -z "$as_dir" && as_dir=.
21321     for ac_exec_ext in '' $ac_executable_extensions; do
21322   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21323     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21324     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21325     break 2
21326   fi
21327 done
21328   done
21329 IFS=$as_save_IFS
21330 
21331   ;;
21332 esac
21333 fi
21334 HG=$ac_cv_path_HG
21335 if test -n "$HG"; then
21336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21337 $as_echo "$HG" >&6; }
21338 else
21339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21340 $as_echo "no" >&6; }
21341 fi
21342 
21343 
21344           if test "x$HG" = x; then
21345             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21346           fi
21347         else
21348           # Otherwise we believe it is a complete path. Use it as it is.
21349           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21350 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21351           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21352 $as_echo_n "checking for HG... " >&6; }
21353           if test ! -x "$tool_specified"; then
21354             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21355 $as_echo "not found" >&6; }
21356             as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21357           fi
21358           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21359 $as_echo "$tool_specified" >&6; }
21360         fi
21361       fi
21362     fi
21363 
21364   fi
21365 
21366 
21367 
21368 
21369   # Publish this variable in the help.
21370 
21371 
21372   if [ -z "${STAT+x}" ]; then
21373     # The variable is not set by user, try to locate tool using the code snippet
21374     for ac_prog in stat
21375 do
21376   # Extract the first word of "$ac_prog", so it can be a program name with args.
21377 set dummy $ac_prog; ac_word=$2
21378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21379 $as_echo_n "checking for $ac_word... " >&6; }
21380 if ${ac_cv_path_STAT+:} false; then :
21381   $as_echo_n "(cached) " >&6
21382 else
21383   case $STAT in
21384   [\\/]* | ?:[\\/]*)
21385   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21386   ;;
21387   *)
21388   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21389 for as_dir in $PATH
21390 do
21391   IFS=$as_save_IFS
21392   test -z "$as_dir" && as_dir=.
21393     for ac_exec_ext in '' $ac_executable_extensions; do
21394   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21395     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21396     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21397     break 2
21398   fi
21399 done
21400   done
21401 IFS=$as_save_IFS
21402 
21403   ;;
21404 esac
21405 fi
21406 STAT=$ac_cv_path_STAT
21407 if test -n "$STAT"; then
21408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21409 $as_echo "$STAT" >&6; }
21410 else
21411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21412 $as_echo "no" >&6; }
21413 fi
21414 
21415 
21416   test -n "$STAT" && break
21417 done
21418 
21419   else
21420     # The variable is set, but is it from the command line or the environment?
21421 
21422     # Try to remove the string !STAT! from our list.
21423     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21424     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21425       # If it failed, the variable was not from the command line. Ignore it,
21426       # but warn the user (except for BASH, which is always set by the calling BASH).
21427       if test "xSTAT" != xBASH; then
21428         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21429 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21430       fi
21431       # Try to locate tool using the code snippet
21432       for ac_prog in stat
21433 do
21434   # Extract the first word of "$ac_prog", so it can be a program name with args.
21435 set dummy $ac_prog; ac_word=$2
21436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21437 $as_echo_n "checking for $ac_word... " >&6; }
21438 if ${ac_cv_path_STAT+:} false; then :
21439   $as_echo_n "(cached) " >&6
21440 else
21441   case $STAT in
21442   [\\/]* | ?:[\\/]*)
21443   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21444   ;;
21445   *)
21446   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21447 for as_dir in $PATH
21448 do
21449   IFS=$as_save_IFS
21450   test -z "$as_dir" && as_dir=.
21451     for ac_exec_ext in '' $ac_executable_extensions; do
21452   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21453     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21454     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21455     break 2
21456   fi
21457 done
21458   done
21459 IFS=$as_save_IFS
21460 
21461   ;;
21462 esac
21463 fi
21464 STAT=$ac_cv_path_STAT
21465 if test -n "$STAT"; then
21466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21467 $as_echo "$STAT" >&6; }
21468 else
21469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21470 $as_echo "no" >&6; }
21471 fi
21472 
21473 
21474   test -n "$STAT" && break
21475 done
21476 
21477     else
21478       # If it succeeded, then it was overridden by the user. We will use it
21479       # for the tool.
21480 
21481       # First remove it from the list of overridden variables, so we can test
21482       # for unknown variables in the end.
21483       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21484 
21485       # Check if we try to supply an empty value
21486       if test "x$STAT" = x; then
21487         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21488 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21489         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21490 $as_echo_n "checking for STAT... " >&6; }
21491         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21492 $as_echo "disabled" >&6; }
21493       else
21494         # Check if the provided tool contains a complete path.
21495         tool_specified="$STAT"
21496         tool_basename="${tool_specified##*/}"
21497         if test "x$tool_basename" = "x$tool_specified"; then
21498           # A command without a complete path is provided, search $PATH.
21499           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21500 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21501           # Extract the first word of "$tool_basename", so it can be a program name with args.
21502 set dummy $tool_basename; ac_word=$2
21503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21504 $as_echo_n "checking for $ac_word... " >&6; }
21505 if ${ac_cv_path_STAT+:} false; then :
21506   $as_echo_n "(cached) " >&6
21507 else
21508   case $STAT in
21509   [\\/]* | ?:[\\/]*)
21510   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21511   ;;
21512   *)
21513   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21514 for as_dir in $PATH
21515 do
21516   IFS=$as_save_IFS
21517   test -z "$as_dir" && as_dir=.
21518     for ac_exec_ext in '' $ac_executable_extensions; do
21519   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21520     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21521     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21522     break 2
21523   fi
21524 done
21525   done
21526 IFS=$as_save_IFS
21527 
21528   ;;
21529 esac
21530 fi
21531 STAT=$ac_cv_path_STAT
21532 if test -n "$STAT"; then
21533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21534 $as_echo "$STAT" >&6; }
21535 else
21536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21537 $as_echo "no" >&6; }
21538 fi
21539 
21540 
21541           if test "x$STAT" = x; then
21542             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21543           fi
21544         else
21545           # Otherwise we believe it is a complete path. Use it as it is.
21546           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21547 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21548           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21549 $as_echo_n "checking for STAT... " >&6; }
21550           if test ! -x "$tool_specified"; then
21551             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21552 $as_echo "not found" >&6; }
21553             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21554           fi
21555           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21556 $as_echo "$tool_specified" >&6; }
21557         fi
21558       fi
21559     fi
21560 
21561   fi
21562 
21563 
21564 
21565 
21566   # Publish this variable in the help.
21567 
21568 
21569   if [ -z "${TIME+x}" ]; then
21570     # The variable is not set by user, try to locate tool using the code snippet
21571     for ac_prog in time
21572 do
21573   # Extract the first word of "$ac_prog", so it can be a program name with args.
21574 set dummy $ac_prog; ac_word=$2
21575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21576 $as_echo_n "checking for $ac_word... " >&6; }
21577 if ${ac_cv_path_TIME+:} false; then :
21578   $as_echo_n "(cached) " >&6
21579 else
21580   case $TIME in
21581   [\\/]* | ?:[\\/]*)
21582   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21583   ;;
21584   *)
21585   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21586 for as_dir in $PATH
21587 do
21588   IFS=$as_save_IFS
21589   test -z "$as_dir" && as_dir=.
21590     for ac_exec_ext in '' $ac_executable_extensions; do
21591   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21592     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21593     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21594     break 2
21595   fi
21596 done
21597   done
21598 IFS=$as_save_IFS
21599 
21600   ;;
21601 esac
21602 fi
21603 TIME=$ac_cv_path_TIME
21604 if test -n "$TIME"; then
21605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21606 $as_echo "$TIME" >&6; }
21607 else
21608   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21609 $as_echo "no" >&6; }
21610 fi
21611 
21612 
21613   test -n "$TIME" && break
21614 done
21615 
21616   else
21617     # The variable is set, but is it from the command line or the environment?
21618 
21619     # Try to remove the string !TIME! from our list.
21620     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21621     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21622       # If it failed, the variable was not from the command line. Ignore it,
21623       # but warn the user (except for BASH, which is always set by the calling BASH).
21624       if test "xTIME" != xBASH; then
21625         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21626 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21627       fi
21628       # Try to locate tool using the code snippet
21629       for ac_prog in time
21630 do
21631   # Extract the first word of "$ac_prog", so it can be a program name with args.
21632 set dummy $ac_prog; ac_word=$2
21633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21634 $as_echo_n "checking for $ac_word... " >&6; }
21635 if ${ac_cv_path_TIME+:} false; then :
21636   $as_echo_n "(cached) " >&6
21637 else
21638   case $TIME in
21639   [\\/]* | ?:[\\/]*)
21640   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21641   ;;
21642   *)
21643   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21644 for as_dir in $PATH
21645 do
21646   IFS=$as_save_IFS
21647   test -z "$as_dir" && as_dir=.
21648     for ac_exec_ext in '' $ac_executable_extensions; do
21649   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21650     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21651     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21652     break 2
21653   fi
21654 done
21655   done
21656 IFS=$as_save_IFS
21657 
21658   ;;
21659 esac
21660 fi
21661 TIME=$ac_cv_path_TIME
21662 if test -n "$TIME"; then
21663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21664 $as_echo "$TIME" >&6; }
21665 else
21666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21667 $as_echo "no" >&6; }
21668 fi
21669 
21670 
21671   test -n "$TIME" && break
21672 done
21673 
21674     else
21675       # If it succeeded, then it was overridden by the user. We will use it
21676       # for the tool.
21677 
21678       # First remove it from the list of overridden variables, so we can test
21679       # for unknown variables in the end.
21680       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21681 
21682       # Check if we try to supply an empty value
21683       if test "x$TIME" = x; then
21684         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21685 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21686         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21687 $as_echo_n "checking for TIME... " >&6; }
21688         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21689 $as_echo "disabled" >&6; }
21690       else
21691         # Check if the provided tool contains a complete path.
21692         tool_specified="$TIME"
21693         tool_basename="${tool_specified##*/}"
21694         if test "x$tool_basename" = "x$tool_specified"; then
21695           # A command without a complete path is provided, search $PATH.
21696           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21697 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21698           # Extract the first word of "$tool_basename", so it can be a program name with args.
21699 set dummy $tool_basename; ac_word=$2
21700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21701 $as_echo_n "checking for $ac_word... " >&6; }
21702 if ${ac_cv_path_TIME+:} false; then :
21703   $as_echo_n "(cached) " >&6
21704 else
21705   case $TIME in
21706   [\\/]* | ?:[\\/]*)
21707   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21708   ;;
21709   *)
21710   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21711 for as_dir in $PATH
21712 do
21713   IFS=$as_save_IFS
21714   test -z "$as_dir" && as_dir=.
21715     for ac_exec_ext in '' $ac_executable_extensions; do
21716   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21717     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21718     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21719     break 2
21720   fi
21721 done
21722   done
21723 IFS=$as_save_IFS
21724 
21725   ;;
21726 esac
21727 fi
21728 TIME=$ac_cv_path_TIME
21729 if test -n "$TIME"; then
21730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21731 $as_echo "$TIME" >&6; }
21732 else
21733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21734 $as_echo "no" >&6; }
21735 fi
21736 
21737 
21738           if test "x$TIME" = x; then
21739             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21740           fi
21741         else
21742           # Otherwise we believe it is a complete path. Use it as it is.
21743           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21744 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21745           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21746 $as_echo_n "checking for TIME... " >&6; }
21747           if test ! -x "$tool_specified"; then
21748             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21749 $as_echo "not found" >&6; }
21750             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21751           fi
21752           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21753 $as_echo "$tool_specified" >&6; }
21754         fi
21755       fi
21756     fi
21757 
21758   fi
21759 
21760 
21761 
21762 
21763   # Publish this variable in the help.
21764 
21765 
21766   if [ -z "${PATCH+x}" ]; then
21767     # The variable is not set by user, try to locate tool using the code snippet
21768     for ac_prog in gpatch patch
21769 do
21770   # Extract the first word of "$ac_prog", so it can be a program name with args.
21771 set dummy $ac_prog; ac_word=$2
21772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21773 $as_echo_n "checking for $ac_word... " >&6; }
21774 if ${ac_cv_path_PATCH+:} false; then :
21775   $as_echo_n "(cached) " >&6
21776 else
21777   case $PATCH in
21778   [\\/]* | ?:[\\/]*)
21779   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21780   ;;
21781   *)
21782   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21783 for as_dir in $PATH
21784 do
21785   IFS=$as_save_IFS
21786   test -z "$as_dir" && as_dir=.
21787     for ac_exec_ext in '' $ac_executable_extensions; do
21788   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21789     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21790     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21791     break 2
21792   fi
21793 done
21794   done
21795 IFS=$as_save_IFS
21796 
21797   ;;
21798 esac
21799 fi
21800 PATCH=$ac_cv_path_PATCH
21801 if test -n "$PATCH"; then
21802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21803 $as_echo "$PATCH" >&6; }
21804 else
21805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21806 $as_echo "no" >&6; }
21807 fi
21808 
21809 
21810   test -n "$PATCH" && break
21811 done
21812 
21813   else
21814     # The variable is set, but is it from the command line or the environment?
21815 
21816     # Try to remove the string !PATCH! from our list.
21817     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
21818     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21819       # If it failed, the variable was not from the command line. Ignore it,
21820       # but warn the user (except for BASH, which is always set by the calling BASH).
21821       if test "xPATCH" != xBASH; then
21822         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
21823 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
21824       fi
21825       # Try to locate tool using the code snippet
21826       for ac_prog in gpatch patch
21827 do
21828   # Extract the first word of "$ac_prog", so it can be a program name with args.
21829 set dummy $ac_prog; ac_word=$2
21830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21831 $as_echo_n "checking for $ac_word... " >&6; }
21832 if ${ac_cv_path_PATCH+:} false; then :
21833   $as_echo_n "(cached) " >&6
21834 else
21835   case $PATCH in
21836   [\\/]* | ?:[\\/]*)
21837   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21838   ;;
21839   *)
21840   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21841 for as_dir in $PATH
21842 do
21843   IFS=$as_save_IFS
21844   test -z "$as_dir" && as_dir=.
21845     for ac_exec_ext in '' $ac_executable_extensions; do
21846   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21847     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21848     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21849     break 2
21850   fi
21851 done
21852   done
21853 IFS=$as_save_IFS
21854 
21855   ;;
21856 esac
21857 fi
21858 PATCH=$ac_cv_path_PATCH
21859 if test -n "$PATCH"; then
21860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21861 $as_echo "$PATCH" >&6; }
21862 else
21863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21864 $as_echo "no" >&6; }
21865 fi
21866 
21867 
21868   test -n "$PATCH" && break
21869 done
21870 
21871     else
21872       # If it succeeded, then it was overridden by the user. We will use it
21873       # for the tool.
21874 
21875       # First remove it from the list of overridden variables, so we can test
21876       # for unknown variables in the end.
21877       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21878 
21879       # Check if we try to supply an empty value
21880       if test "x$PATCH" = x; then
21881         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
21882 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
21883         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21884 $as_echo_n "checking for PATCH... " >&6; }
21885         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21886 $as_echo "disabled" >&6; }
21887       else
21888         # Check if the provided tool contains a complete path.
21889         tool_specified="$PATCH"
21890         tool_basename="${tool_specified##*/}"
21891         if test "x$tool_basename" = "x$tool_specified"; then
21892           # A command without a complete path is provided, search $PATH.
21893           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
21894 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
21895           # Extract the first word of "$tool_basename", so it can be a program name with args.
21896 set dummy $tool_basename; ac_word=$2
21897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21898 $as_echo_n "checking for $ac_word... " >&6; }
21899 if ${ac_cv_path_PATCH+:} false; then :
21900   $as_echo_n "(cached) " >&6
21901 else
21902   case $PATCH in
21903   [\\/]* | ?:[\\/]*)
21904   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21905   ;;
21906   *)
21907   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21908 for as_dir in $PATH
21909 do
21910   IFS=$as_save_IFS
21911   test -z "$as_dir" && as_dir=.
21912     for ac_exec_ext in '' $ac_executable_extensions; do
21913   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21914     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21915     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21916     break 2
21917   fi
21918 done
21919   done
21920 IFS=$as_save_IFS
21921 
21922   ;;
21923 esac
21924 fi
21925 PATCH=$ac_cv_path_PATCH
21926 if test -n "$PATCH"; then
21927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21928 $as_echo "$PATCH" >&6; }
21929 else
21930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21931 $as_echo "no" >&6; }
21932 fi
21933 
21934 
21935           if test "x$PATCH" = x; then
21936             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21937           fi
21938         else
21939           # Otherwise we believe it is a complete path. Use it as it is.
21940           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
21941 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
21942           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21943 $as_echo_n "checking for PATCH... " >&6; }
21944           if test ! -x "$tool_specified"; then
21945             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21946 $as_echo "not found" >&6; }
21947             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
21948           fi
21949           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21950 $as_echo "$tool_specified" >&6; }
21951         fi
21952       fi
21953     fi
21954 
21955   fi
21956 
21957 
21958   # Check if it's GNU time
21959   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
21960   if test "x$IS_GNU_TIME" != x; then
21961     IS_GNU_TIME=yes
21962   else
21963     IS_GNU_TIME=no
21964   fi
21965 
21966 
21967   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
21968 
21969 
21970 
21971   # Publish this variable in the help.
21972 
21973 
21974   if [ -z "${DSYMUTIL+x}" ]; then
21975     # The variable is not set by user, try to locate tool using the code snippet
21976     for ac_prog in dsymutil
21977 do
21978   # Extract the first word of "$ac_prog", so it can be a program name with args.
21979 set dummy $ac_prog; ac_word=$2
21980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21981 $as_echo_n "checking for $ac_word... " >&6; }
21982 if ${ac_cv_path_DSYMUTIL+:} false; then :
21983   $as_echo_n "(cached) " >&6
21984 else
21985   case $DSYMUTIL in
21986   [\\/]* | ?:[\\/]*)
21987   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
21988   ;;
21989   *)
21990   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21991 for as_dir in $PATH
21992 do
21993   IFS=$as_save_IFS
21994   test -z "$as_dir" && as_dir=.
21995     for ac_exec_ext in '' $ac_executable_extensions; do
21996   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21997     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
21998     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21999     break 2
22000   fi
22001 done
22002   done
22003 IFS=$as_save_IFS
22004 
22005   ;;
22006 esac
22007 fi
22008 DSYMUTIL=$ac_cv_path_DSYMUTIL
22009 if test -n "$DSYMUTIL"; then
22010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22011 $as_echo "$DSYMUTIL" >&6; }
22012 else
22013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22014 $as_echo "no" >&6; }
22015 fi
22016 
22017 
22018   test -n "$DSYMUTIL" && break
22019 done
22020 
22021   else
22022     # The variable is set, but is it from the command line or the environment?
22023 
22024     # Try to remove the string !DSYMUTIL! from our list.
22025     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22026     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22027       # If it failed, the variable was not from the command line. Ignore it,
22028       # but warn the user (except for BASH, which is always set by the calling BASH).
22029       if test "xDSYMUTIL" != xBASH; then
22030         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22031 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22032       fi
22033       # Try to locate tool using the code snippet
22034       for ac_prog in dsymutil
22035 do
22036   # Extract the first word of "$ac_prog", so it can be a program name with args.
22037 set dummy $ac_prog; ac_word=$2
22038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22039 $as_echo_n "checking for $ac_word... " >&6; }
22040 if ${ac_cv_path_DSYMUTIL+:} false; then :
22041   $as_echo_n "(cached) " >&6
22042 else
22043   case $DSYMUTIL in
22044   [\\/]* | ?:[\\/]*)
22045   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22046   ;;
22047   *)
22048   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22049 for as_dir in $PATH
22050 do
22051   IFS=$as_save_IFS
22052   test -z "$as_dir" && as_dir=.
22053     for ac_exec_ext in '' $ac_executable_extensions; do
22054   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22055     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22056     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22057     break 2
22058   fi
22059 done
22060   done
22061 IFS=$as_save_IFS
22062 
22063   ;;
22064 esac
22065 fi
22066 DSYMUTIL=$ac_cv_path_DSYMUTIL
22067 if test -n "$DSYMUTIL"; then
22068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22069 $as_echo "$DSYMUTIL" >&6; }
22070 else
22071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22072 $as_echo "no" >&6; }
22073 fi
22074 
22075 
22076   test -n "$DSYMUTIL" && break
22077 done
22078 
22079     else
22080       # If it succeeded, then it was overridden by the user. We will use it
22081       # for the tool.
22082 
22083       # First remove it from the list of overridden variables, so we can test
22084       # for unknown variables in the end.
22085       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22086 
22087       # Check if we try to supply an empty value
22088       if test "x$DSYMUTIL" = x; then
22089         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22090 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22091         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22092 $as_echo_n "checking for DSYMUTIL... " >&6; }
22093         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22094 $as_echo "disabled" >&6; }
22095       else
22096         # Check if the provided tool contains a complete path.
22097         tool_specified="$DSYMUTIL"
22098         tool_basename="${tool_specified##*/}"
22099         if test "x$tool_basename" = "x$tool_specified"; then
22100           # A command without a complete path is provided, search $PATH.
22101           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22102 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22103           # Extract the first word of "$tool_basename", so it can be a program name with args.
22104 set dummy $tool_basename; ac_word=$2
22105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22106 $as_echo_n "checking for $ac_word... " >&6; }
22107 if ${ac_cv_path_DSYMUTIL+:} false; then :
22108   $as_echo_n "(cached) " >&6
22109 else
22110   case $DSYMUTIL in
22111   [\\/]* | ?:[\\/]*)
22112   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22113   ;;
22114   *)
22115   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22116 for as_dir in $PATH
22117 do
22118   IFS=$as_save_IFS
22119   test -z "$as_dir" && as_dir=.
22120     for ac_exec_ext in '' $ac_executable_extensions; do
22121   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22122     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22123     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22124     break 2
22125   fi
22126 done
22127   done
22128 IFS=$as_save_IFS
22129 
22130   ;;
22131 esac
22132 fi
22133 DSYMUTIL=$ac_cv_path_DSYMUTIL
22134 if test -n "$DSYMUTIL"; then
22135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22136 $as_echo "$DSYMUTIL" >&6; }
22137 else
22138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22139 $as_echo "no" >&6; }
22140 fi
22141 
22142 
22143           if test "x$DSYMUTIL" = x; then
22144             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22145           fi
22146         else
22147           # Otherwise we believe it is a complete path. Use it as it is.
22148           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22149 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22150           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22151 $as_echo_n "checking for DSYMUTIL... " >&6; }
22152           if test ! -x "$tool_specified"; then
22153             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22154 $as_echo "not found" >&6; }
22155             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22156           fi
22157           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22158 $as_echo "$tool_specified" >&6; }
22159         fi
22160       fi
22161     fi
22162 
22163   fi
22164 
22165 
22166 
22167   if test "x$DSYMUTIL" = x; then
22168     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22169   fi
22170 
22171 
22172 
22173 
22174 
22175   # Publish this variable in the help.
22176 
22177 
22178   if [ -z "${XATTR+x}" ]; then
22179     # The variable is not set by user, try to locate tool using the code snippet
22180     for ac_prog in xattr
22181 do
22182   # Extract the first word of "$ac_prog", so it can be a program name with args.
22183 set dummy $ac_prog; ac_word=$2
22184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22185 $as_echo_n "checking for $ac_word... " >&6; }
22186 if ${ac_cv_path_XATTR+:} false; then :
22187   $as_echo_n "(cached) " >&6
22188 else
22189   case $XATTR in
22190   [\\/]* | ?:[\\/]*)
22191   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22192   ;;
22193   *)
22194   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22195 for as_dir in $PATH
22196 do
22197   IFS=$as_save_IFS
22198   test -z "$as_dir" && as_dir=.
22199     for ac_exec_ext in '' $ac_executable_extensions; do
22200   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22201     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22202     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22203     break 2
22204   fi
22205 done
22206   done
22207 IFS=$as_save_IFS
22208 
22209   ;;
22210 esac
22211 fi
22212 XATTR=$ac_cv_path_XATTR
22213 if test -n "$XATTR"; then
22214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22215 $as_echo "$XATTR" >&6; }
22216 else
22217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22218 $as_echo "no" >&6; }
22219 fi
22220 
22221 
22222   test -n "$XATTR" && break
22223 done
22224 
22225   else
22226     # The variable is set, but is it from the command line or the environment?
22227 
22228     # Try to remove the string !XATTR! from our list.
22229     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22230     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22231       # If it failed, the variable was not from the command line. Ignore it,
22232       # but warn the user (except for BASH, which is always set by the calling BASH).
22233       if test "xXATTR" != xBASH; then
22234         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22235 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22236       fi
22237       # Try to locate tool using the code snippet
22238       for ac_prog in xattr
22239 do
22240   # Extract the first word of "$ac_prog", so it can be a program name with args.
22241 set dummy $ac_prog; ac_word=$2
22242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22243 $as_echo_n "checking for $ac_word... " >&6; }
22244 if ${ac_cv_path_XATTR+:} false; then :
22245   $as_echo_n "(cached) " >&6
22246 else
22247   case $XATTR in
22248   [\\/]* | ?:[\\/]*)
22249   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22250   ;;
22251   *)
22252   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22253 for as_dir in $PATH
22254 do
22255   IFS=$as_save_IFS
22256   test -z "$as_dir" && as_dir=.
22257     for ac_exec_ext in '' $ac_executable_extensions; do
22258   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22259     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22260     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22261     break 2
22262   fi
22263 done
22264   done
22265 IFS=$as_save_IFS
22266 
22267   ;;
22268 esac
22269 fi
22270 XATTR=$ac_cv_path_XATTR
22271 if test -n "$XATTR"; then
22272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22273 $as_echo "$XATTR" >&6; }
22274 else
22275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22276 $as_echo "no" >&6; }
22277 fi
22278 
22279 
22280   test -n "$XATTR" && break
22281 done
22282 
22283     else
22284       # If it succeeded, then it was overridden by the user. We will use it
22285       # for the tool.
22286 
22287       # First remove it from the list of overridden variables, so we can test
22288       # for unknown variables in the end.
22289       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22290 
22291       # Check if we try to supply an empty value
22292       if test "x$XATTR" = x; then
22293         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22294 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22295         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22296 $as_echo_n "checking for XATTR... " >&6; }
22297         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22298 $as_echo "disabled" >&6; }
22299       else
22300         # Check if the provided tool contains a complete path.
22301         tool_specified="$XATTR"
22302         tool_basename="${tool_specified##*/}"
22303         if test "x$tool_basename" = "x$tool_specified"; then
22304           # A command without a complete path is provided, search $PATH.
22305           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22306 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22307           # Extract the first word of "$tool_basename", so it can be a program name with args.
22308 set dummy $tool_basename; ac_word=$2
22309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22310 $as_echo_n "checking for $ac_word... " >&6; }
22311 if ${ac_cv_path_XATTR+:} false; then :
22312   $as_echo_n "(cached) " >&6
22313 else
22314   case $XATTR in
22315   [\\/]* | ?:[\\/]*)
22316   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22317   ;;
22318   *)
22319   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22320 for as_dir in $PATH
22321 do
22322   IFS=$as_save_IFS
22323   test -z "$as_dir" && as_dir=.
22324     for ac_exec_ext in '' $ac_executable_extensions; do
22325   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22326     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22327     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22328     break 2
22329   fi
22330 done
22331   done
22332 IFS=$as_save_IFS
22333 
22334   ;;
22335 esac
22336 fi
22337 XATTR=$ac_cv_path_XATTR
22338 if test -n "$XATTR"; then
22339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22340 $as_echo "$XATTR" >&6; }
22341 else
22342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22343 $as_echo "no" >&6; }
22344 fi
22345 
22346 
22347           if test "x$XATTR" = x; then
22348             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22349           fi
22350         else
22351           # Otherwise we believe it is a complete path. Use it as it is.
22352           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22353 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22354           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22355 $as_echo_n "checking for XATTR... " >&6; }
22356           if test ! -x "$tool_specified"; then
22357             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22358 $as_echo "not found" >&6; }
22359             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22360           fi
22361           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22362 $as_echo "$tool_specified" >&6; }
22363         fi
22364       fi
22365     fi
22366 
22367   fi
22368 
22369 
22370 
22371   if test "x$XATTR" = x; then
22372     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22373   fi
22374 
22375 
22376 
22377 
22378   # Publish this variable in the help.
22379 
22380 
22381   if [ -z "${CODESIGN+x}" ]; then
22382     # The variable is not set by user, try to locate tool using the code snippet
22383     for ac_prog in codesign
22384 do
22385   # Extract the first word of "$ac_prog", so it can be a program name with args.
22386 set dummy $ac_prog; ac_word=$2
22387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22388 $as_echo_n "checking for $ac_word... " >&6; }
22389 if ${ac_cv_path_CODESIGN+:} false; then :
22390   $as_echo_n "(cached) " >&6
22391 else
22392   case $CODESIGN in
22393   [\\/]* | ?:[\\/]*)
22394   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22395   ;;
22396   *)
22397   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22398 for as_dir in $PATH
22399 do
22400   IFS=$as_save_IFS
22401   test -z "$as_dir" && as_dir=.
22402     for ac_exec_ext in '' $ac_executable_extensions; do
22403   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22404     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22405     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22406     break 2
22407   fi
22408 done
22409   done
22410 IFS=$as_save_IFS
22411 
22412   ;;
22413 esac
22414 fi
22415 CODESIGN=$ac_cv_path_CODESIGN
22416 if test -n "$CODESIGN"; then
22417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22418 $as_echo "$CODESIGN" >&6; }
22419 else
22420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22421 $as_echo "no" >&6; }
22422 fi
22423 
22424 
22425   test -n "$CODESIGN" && break
22426 done
22427 
22428   else
22429     # The variable is set, but is it from the command line or the environment?
22430 
22431     # Try to remove the string !CODESIGN! from our list.
22432     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22433     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22434       # If it failed, the variable was not from the command line. Ignore it,
22435       # but warn the user (except for BASH, which is always set by the calling BASH).
22436       if test "xCODESIGN" != xBASH; then
22437         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22438 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22439       fi
22440       # Try to locate tool using the code snippet
22441       for ac_prog in codesign
22442 do
22443   # Extract the first word of "$ac_prog", so it can be a program name with args.
22444 set dummy $ac_prog; ac_word=$2
22445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22446 $as_echo_n "checking for $ac_word... " >&6; }
22447 if ${ac_cv_path_CODESIGN+:} false; then :
22448   $as_echo_n "(cached) " >&6
22449 else
22450   case $CODESIGN in
22451   [\\/]* | ?:[\\/]*)
22452   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22453   ;;
22454   *)
22455   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22456 for as_dir in $PATH
22457 do
22458   IFS=$as_save_IFS
22459   test -z "$as_dir" && as_dir=.
22460     for ac_exec_ext in '' $ac_executable_extensions; do
22461   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22462     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22463     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22464     break 2
22465   fi
22466 done
22467   done
22468 IFS=$as_save_IFS
22469 
22470   ;;
22471 esac
22472 fi
22473 CODESIGN=$ac_cv_path_CODESIGN
22474 if test -n "$CODESIGN"; then
22475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22476 $as_echo "$CODESIGN" >&6; }
22477 else
22478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22479 $as_echo "no" >&6; }
22480 fi
22481 
22482 
22483   test -n "$CODESIGN" && break
22484 done
22485 
22486     else
22487       # If it succeeded, then it was overridden by the user. We will use it
22488       # for the tool.
22489 
22490       # First remove it from the list of overridden variables, so we can test
22491       # for unknown variables in the end.
22492       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22493 
22494       # Check if we try to supply an empty value
22495       if test "x$CODESIGN" = x; then
22496         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22497 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22498         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22499 $as_echo_n "checking for CODESIGN... " >&6; }
22500         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22501 $as_echo "disabled" >&6; }
22502       else
22503         # Check if the provided tool contains a complete path.
22504         tool_specified="$CODESIGN"
22505         tool_basename="${tool_specified##*/}"
22506         if test "x$tool_basename" = "x$tool_specified"; then
22507           # A command without a complete path is provided, search $PATH.
22508           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22509 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22510           # Extract the first word of "$tool_basename", so it can be a program name with args.
22511 set dummy $tool_basename; ac_word=$2
22512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22513 $as_echo_n "checking for $ac_word... " >&6; }
22514 if ${ac_cv_path_CODESIGN+:} false; then :
22515   $as_echo_n "(cached) " >&6
22516 else
22517   case $CODESIGN in
22518   [\\/]* | ?:[\\/]*)
22519   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22520   ;;
22521   *)
22522   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22523 for as_dir in $PATH
22524 do
22525   IFS=$as_save_IFS
22526   test -z "$as_dir" && as_dir=.
22527     for ac_exec_ext in '' $ac_executable_extensions; do
22528   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22529     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22530     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22531     break 2
22532   fi
22533 done
22534   done
22535 IFS=$as_save_IFS
22536 
22537   ;;
22538 esac
22539 fi
22540 CODESIGN=$ac_cv_path_CODESIGN
22541 if test -n "$CODESIGN"; then
22542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22543 $as_echo "$CODESIGN" >&6; }
22544 else
22545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22546 $as_echo "no" >&6; }
22547 fi
22548 
22549 
22550           if test "x$CODESIGN" = x; then
22551             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22552           fi
22553         else
22554           # Otherwise we believe it is a complete path. Use it as it is.
22555           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22556 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22557           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22558 $as_echo_n "checking for CODESIGN... " >&6; }
22559           if test ! -x "$tool_specified"; then
22560             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22561 $as_echo "not found" >&6; }
22562             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22563           fi
22564           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22565 $as_echo "$tool_specified" >&6; }
22566         fi
22567       fi
22568     fi
22569 
22570   fi
22571 
22572 
22573     if test "x$CODESIGN" != "x"; then
22574       # Verify that the openjdk_codesign certificate is present
22575       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22576 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22577       rm -f codesign-testfile
22578       touch codesign-testfile
22579       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22580       rm -f codesign-testfile
22581       if test "x$CODESIGN" = x; then
22582         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22583 $as_echo "no" >&6; }
22584       else
22585         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22586 $as_echo "yes" >&6; }
22587       fi
22588     fi
22589 
22590 
22591 
22592   # Publish this variable in the help.
22593 
22594 
22595   if [ -z "${SETFILE+x}" ]; then
22596     # The variable is not set by user, try to locate tool using the code snippet
22597     for ac_prog in SetFile
22598 do
22599   # Extract the first word of "$ac_prog", so it can be a program name with args.
22600 set dummy $ac_prog; ac_word=$2
22601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22602 $as_echo_n "checking for $ac_word... " >&6; }
22603 if ${ac_cv_path_SETFILE+:} false; then :
22604   $as_echo_n "(cached) " >&6
22605 else
22606   case $SETFILE in
22607   [\\/]* | ?:[\\/]*)
22608   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22609   ;;
22610   *)
22611   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22612 for as_dir in $PATH
22613 do
22614   IFS=$as_save_IFS
22615   test -z "$as_dir" && as_dir=.
22616     for ac_exec_ext in '' $ac_executable_extensions; do
22617   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22618     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22619     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22620     break 2
22621   fi
22622 done
22623   done
22624 IFS=$as_save_IFS
22625 
22626   ;;
22627 esac
22628 fi
22629 SETFILE=$ac_cv_path_SETFILE
22630 if test -n "$SETFILE"; then
22631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22632 $as_echo "$SETFILE" >&6; }
22633 else
22634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22635 $as_echo "no" >&6; }
22636 fi
22637 
22638 
22639   test -n "$SETFILE" && break
22640 done
22641 
22642   else
22643     # The variable is set, but is it from the command line or the environment?
22644 
22645     # Try to remove the string !SETFILE! from our list.
22646     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22647     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22648       # If it failed, the variable was not from the command line. Ignore it,
22649       # but warn the user (except for BASH, which is always set by the calling BASH).
22650       if test "xSETFILE" != xBASH; then
22651         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22652 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22653       fi
22654       # Try to locate tool using the code snippet
22655       for ac_prog in SetFile
22656 do
22657   # Extract the first word of "$ac_prog", so it can be a program name with args.
22658 set dummy $ac_prog; ac_word=$2
22659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22660 $as_echo_n "checking for $ac_word... " >&6; }
22661 if ${ac_cv_path_SETFILE+:} false; then :
22662   $as_echo_n "(cached) " >&6
22663 else
22664   case $SETFILE in
22665   [\\/]* | ?:[\\/]*)
22666   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22667   ;;
22668   *)
22669   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22670 for as_dir in $PATH
22671 do
22672   IFS=$as_save_IFS
22673   test -z "$as_dir" && as_dir=.
22674     for ac_exec_ext in '' $ac_executable_extensions; do
22675   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22676     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22677     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22678     break 2
22679   fi
22680 done
22681   done
22682 IFS=$as_save_IFS
22683 
22684   ;;
22685 esac
22686 fi
22687 SETFILE=$ac_cv_path_SETFILE
22688 if test -n "$SETFILE"; then
22689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22690 $as_echo "$SETFILE" >&6; }
22691 else
22692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22693 $as_echo "no" >&6; }
22694 fi
22695 
22696 
22697   test -n "$SETFILE" && break
22698 done
22699 
22700     else
22701       # If it succeeded, then it was overridden by the user. We will use it
22702       # for the tool.
22703 
22704       # First remove it from the list of overridden variables, so we can test
22705       # for unknown variables in the end.
22706       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22707 
22708       # Check if we try to supply an empty value
22709       if test "x$SETFILE" = x; then
22710         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22711 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22712         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22713 $as_echo_n "checking for SETFILE... " >&6; }
22714         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22715 $as_echo "disabled" >&6; }
22716       else
22717         # Check if the provided tool contains a complete path.
22718         tool_specified="$SETFILE"
22719         tool_basename="${tool_specified##*/}"
22720         if test "x$tool_basename" = "x$tool_specified"; then
22721           # A command without a complete path is provided, search $PATH.
22722           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22723 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22724           # Extract the first word of "$tool_basename", so it can be a program name with args.
22725 set dummy $tool_basename; ac_word=$2
22726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22727 $as_echo_n "checking for $ac_word... " >&6; }
22728 if ${ac_cv_path_SETFILE+:} false; then :
22729   $as_echo_n "(cached) " >&6
22730 else
22731   case $SETFILE in
22732   [\\/]* | ?:[\\/]*)
22733   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22734   ;;
22735   *)
22736   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22737 for as_dir in $PATH
22738 do
22739   IFS=$as_save_IFS
22740   test -z "$as_dir" && as_dir=.
22741     for ac_exec_ext in '' $ac_executable_extensions; do
22742   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22743     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22744     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22745     break 2
22746   fi
22747 done
22748   done
22749 IFS=$as_save_IFS
22750 
22751   ;;
22752 esac
22753 fi
22754 SETFILE=$ac_cv_path_SETFILE
22755 if test -n "$SETFILE"; then
22756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22757 $as_echo "$SETFILE" >&6; }
22758 else
22759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22760 $as_echo "no" >&6; }
22761 fi
22762 
22763 
22764           if test "x$SETFILE" = x; then
22765             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22766           fi
22767         else
22768           # Otherwise we believe it is a complete path. Use it as it is.
22769           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22770 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22771           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22772 $as_echo_n "checking for SETFILE... " >&6; }
22773           if test ! -x "$tool_specified"; then
22774             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22775 $as_echo "not found" >&6; }
22776             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22777           fi
22778           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22779 $as_echo "$tool_specified" >&6; }
22780         fi
22781       fi
22782     fi
22783 
22784   fi
22785 
22786 
22787 
22788   if test "x$SETFILE" = x; then
22789     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22790   fi
22791 
22792 
22793   fi
22794 
22795 
22796   # Test if bash supports pipefail.
22797   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
22798 $as_echo_n "checking if bash supports pipefail... " >&6; }
22799   if ${BASH} -c 'set -o pipefail'; then
22800     BASH_ARGS="$BASH_ARGS -o pipefail"
22801     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22802 $as_echo "yes" >&6; }
22803   else
22804     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22805 $as_echo "no" >&6; }
22806   fi
22807 
22808   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
22809 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
22810   if ${BASH} -e -c 'true'; then
22811     BASH_ARGS="$BASH_ARGS -e"
22812     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22813 $as_echo "yes" >&6; }
22814   else
22815     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22816 $as_echo "no" >&6; }
22817   fi
22818 
22819 
22820 
22821 
22822 # Check if pkg-config is available.
22823 
22824 
22825 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
22826         if test -n "$ac_tool_prefix"; then
22827   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22828 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
22829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22830 $as_echo_n "checking for $ac_word... " >&6; }
22831 if ${ac_cv_path_PKG_CONFIG+:} false; then :
22832   $as_echo_n "(cached) " >&6
22833 else
22834   case $PKG_CONFIG in
22835   [\\/]* | ?:[\\/]*)
22836   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
22837   ;;
22838   *)
22839   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22840 for as_dir in $PATH
22841 do
22842   IFS=$as_save_IFS
22843   test -z "$as_dir" && as_dir=.
22844     for ac_exec_ext in '' $ac_executable_extensions; do
22845   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22846     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22847     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22848     break 2
22849   fi
22850 done
22851   done
22852 IFS=$as_save_IFS
22853 
22854   ;;
22855 esac
22856 fi
22857 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
22858 if test -n "$PKG_CONFIG"; then
22859   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
22860 $as_echo "$PKG_CONFIG" >&6; }
22861 else
22862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22863 $as_echo "no" >&6; }
22864 fi
22865 
22866 
22867 fi
22868 if test -z "$ac_cv_path_PKG_CONFIG"; then
22869   ac_pt_PKG_CONFIG=$PKG_CONFIG
22870   # Extract the first word of "pkg-config", so it can be a program name with args.
22871 set dummy pkg-config; ac_word=$2
22872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22873 $as_echo_n "checking for $ac_word... " >&6; }
22874 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
22875   $as_echo_n "(cached) " >&6
22876 else
22877   case $ac_pt_PKG_CONFIG in
22878   [\\/]* | ?:[\\/]*)
22879   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
22880   ;;
22881   *)
22882   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22883 for as_dir in $PATH
22884 do
22885   IFS=$as_save_IFS
22886   test -z "$as_dir" && as_dir=.
22887     for ac_exec_ext in '' $ac_executable_extensions; do
22888   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22889     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22890     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22891     break 2
22892   fi
22893 done
22894   done
22895 IFS=$as_save_IFS
22896 
22897   ;;
22898 esac
22899 fi
22900 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
22901 if test -n "$ac_pt_PKG_CONFIG"; then
22902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
22903 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
22904 else
22905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22906 $as_echo "no" >&6; }
22907 fi
22908 
22909   if test "x$ac_pt_PKG_CONFIG" = x; then
22910     PKG_CONFIG=""
22911   else
22912     case $cross_compiling:$ac_tool_warned in
22913 yes:)
22914 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22915 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22916 ac_tool_warned=yes ;;
22917 esac
22918     PKG_CONFIG=$ac_pt_PKG_CONFIG
22919   fi
22920 else
22921   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
22922 fi
22923 
22924 fi
22925 if test -n "$PKG_CONFIG"; then
22926         _pkg_min_version=0.9.0
22927         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
22928 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
22929         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
22930                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22931 $as_echo "yes" >&6; }
22932         else
22933                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22934 $as_echo "no" >&6; }
22935                 PKG_CONFIG=""
22936         fi
22937 
22938 fi
22939 
22940 # After basic tools have been setup, we can check build os specific details.
22941 
22942   ###############################################################################
22943 
22944   # Note that this is the build platform OS version!
22945 
22946   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
22947   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
22948   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
22949   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
22950 
22951 
22952 
22953 
22954 
22955 ###############################################################################
22956 #
22957 # Determine OpenJDK variants, options and version numbers.
22958 #
22959 ###############################################################################
22960 
22961 # We need build & target for this.
22962 
22963 
22964   ###############################################################################
22965   #
22966   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
22967   # We always build headless support.
22968   #
22969   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
22970 $as_echo_n "checking headful support... " >&6; }
22971   # Check whether --enable-headful was given.
22972 if test "${enable_headful+set}" = set; then :
22973   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
22974 else
22975   SUPPORT_HEADFUL=yes
22976 fi
22977 
22978 
22979   SUPPORT_HEADLESS=yes
22980   BUILD_HEADLESS="BUILD_HEADLESS:=true"
22981 
22982   if test "x$SUPPORT_HEADFUL" = xyes; then
22983     # We are building both headful and headless.
22984     headful_msg="include support for both headful and headless"
22985   fi
22986 
22987   if test "x$SUPPORT_HEADFUL" = xno; then
22988     # Thus we are building headless only.
22989     BUILD_HEADLESS="BUILD_HEADLESS:=true"
22990     headful_msg="headless only"
22991   fi
22992 
22993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
22994 $as_echo "$headful_msg" >&6; }
22995 
22996 
22997 
22998 
22999 
23000   # Control wether Hotspot runs Queens test after build.
23001   # Check whether --enable-hotspot-test-in-build was given.
23002 if test "${enable_hotspot_test_in_build+set}" = set; then :
23003   enableval=$enable_hotspot_test_in_build;
23004 else
23005   enable_hotspot_test_in_build=no
23006 fi
23007 
23008   if test "x$enable_hotspot_test_in_build" = "xyes"; then
23009     TEST_IN_BUILD=true
23010   else
23011     TEST_IN_BUILD=false
23012   fi
23013 
23014 
23015   ###############################################################################
23016   #
23017   # Choose cacerts source file
23018   #
23019 
23020 # Check whether --with-cacerts-file was given.
23021 if test "${with_cacerts_file+set}" = set; then :
23022   withval=$with_cacerts_file;
23023 fi
23024 
23025   if test "x$with_cacerts_file" != x; then
23026     CACERTS_FILE=$with_cacerts_file
23027   fi
23028 
23029 
23030   ###############################################################################
23031   #
23032   # Enable or disable unlimited crypto
23033   #
23034   # Check whether --enable-unlimited-crypto was given.
23035 if test "${enable_unlimited_crypto+set}" = set; then :
23036   enableval=$enable_unlimited_crypto;
23037 else
23038   enable_unlimited_crypto=no
23039 fi
23040 
23041   if test "x$enable_unlimited_crypto" = "xyes"; then
23042     UNLIMITED_CRYPTO=true
23043   else
23044     UNLIMITED_CRYPTO=false
23045   fi
23046 
23047 
23048   ###############################################################################
23049   #
23050   # Enable or disable the elliptic curve crypto implementation
23051   #
23052 
23053 
23054   ###############################################################################
23055   #
23056   # Compress jars
23057   #
23058   COMPRESS_JARS=false
23059 
23060 
23061 
23062 
23063   # Source the version numbers
23064   . $AUTOCONF_DIR/version-numbers
23065 
23066   # Get the settings from parameters
23067 
23068 # Check whether --with-milestone was given.
23069 if test "${with_milestone+set}" = set; then :
23070   withval=$with_milestone;
23071 fi
23072 
23073   if test "x$with_milestone" = xyes; then
23074     as_fn_error $? "Milestone must have a value" "$LINENO" 5
23075   elif test "x$with_milestone" != x; then
23076     MILESTONE="$with_milestone"
23077   fi
23078   if test "x$MILESTONE" = x; then
23079     MILESTONE=internal
23080   fi
23081 
23082 
23083 # Check whether --with-update-version was given.
23084 if test "${with_update_version+set}" = set; then :
23085   withval=$with_update_version;
23086 fi
23087 
23088   if test "x$with_update_version" = xyes; then
23089     as_fn_error $? "Update version must have a value" "$LINENO" 5
23090   elif test "x$with_update_version" != x; then
23091     JDK_UPDATE_VERSION="$with_update_version"
23092     # On macosx 10.7, it's not possible to set --with-update-version=0X due
23093     # to a bug in expr (which reduces it to just X). To work around this, we
23094     # always add a 0 to one digit update versions.
23095     if test "${#JDK_UPDATE_VERSION}" = "1"; then
23096       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
23097     fi
23098   fi
23099 
23100 
23101 # Check whether --with-user-release-suffix was given.
23102 if test "${with_user_release_suffix+set}" = set; then :
23103   withval=$with_user_release_suffix;
23104 fi
23105 
23106   if test "x$with_user_release_suffix" = xyes; then
23107     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
23108   elif test "x$with_user_release_suffix" != x; then
23109     USER_RELEASE_SUFFIX="$with_user_release_suffix"
23110   fi
23111 
23112 
23113 # Check whether --with-build-number was given.
23114 if test "${with_build_number+set}" = set; then :
23115   withval=$with_build_number;
23116 fi
23117 
23118   if test "x$with_build_number" = xyes; then
23119     as_fn_error $? "Build number must have a value" "$LINENO" 5
23120   elif test "x$with_build_number" != x; then
23121     JDK_BUILD_NUMBER="$with_build_number"
23122   fi
23123   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
23124   if test "x$JDK_BUILD_NUMBER" = x; then
23125     JDK_BUILD_NUMBER=b00
23126     if test "x$USER_RELEASE_SUFFIX" = x; then
23127       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
23128       # Avoid [:alnum:] since it depends on the locale.
23129       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
23130       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23131     fi
23132   fi
23133 
23134   # Now set the JDK version, milestone, build number etc.
23135 
23136 
23137 
23138 
23139 
23140 
23141 
23142 
23143 
23144 
23145 
23146 
23147 
23148 
23149 
23150 
23151 # Check whether --with-copyright-year was given.
23152 if test "${with_copyright_year+set}" = set; then :
23153   withval=$with_copyright_year;
23154 fi
23155 
23156   if test "x$with_copyright_year" = xyes; then
23157     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23158   elif test "x$with_copyright_year" != x; then
23159     COPYRIGHT_YEAR="$with_copyright_year"
23160   else
23161     COPYRIGHT_YEAR=`date +'%Y'`
23162   fi
23163 
23164 
23165   if test "x$JDK_UPDATE_VERSION" != x; then
23166     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
23167   else
23168     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
23169   fi
23170 
23171 
23172   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
23173 
23174 
23175 
23176 ###############################################################################
23177 #
23178 # Setup BootJDK, used to bootstrap the build.
23179 #
23180 ###############################################################################
23181 
23182 
23183   BOOT_JDK_FOUND=no
23184 
23185 # Check whether --with-boot-jdk was given.
23186 if test "${with_boot_jdk+set}" = set; then :
23187   withval=$with_boot_jdk;
23188 fi
23189 
23190 
23191   # We look for the Boot JDK through various means, going from more certain to
23192   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23193   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23194   # must check if this is indeed valid; otherwise we'll continue looking.
23195 
23196   # Test: Is bootjdk explicitely set by command line arguments?
23197 
23198   if test "x$BOOT_JDK_FOUND" = xno; then
23199     # Now execute the test
23200 
23201   if test "x$with_boot_jdk" != x; then
23202     BOOT_JDK=$with_boot_jdk
23203     BOOT_JDK_FOUND=maybe
23204     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23205 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23206   fi
23207 
23208 
23209     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23210     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23211       # Do we have a bin/java?
23212       if test ! -x "$BOOT_JDK/bin/java"; then
23213         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23214 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23215         BOOT_JDK_FOUND=no
23216       else
23217         # Do we have a bin/javac?
23218         if test ! -x "$BOOT_JDK/bin/javac"; then
23219           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23220 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23221           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23222 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23223           BOOT_JDK_FOUND=no
23224         else
23225           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23226           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23227 
23228           # Extra M4 quote needed to protect [] in grep expression.
23229           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23230           if test "x$FOUND_CORRECT_VERSION" = x; then
23231             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23232 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23233             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23234 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23235             BOOT_JDK_FOUND=no
23236           else
23237             # We're done! :-)
23238             BOOT_JDK_FOUND=yes
23239 
23240   # Only process if variable expands to non-empty
23241 
23242   if test "x$BOOT_JDK" != x; then
23243     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23244 
23245   # Input might be given as Windows format, start by converting to
23246   # unix format.
23247   path="$BOOT_JDK"
23248   new_path=`$CYGPATH -u "$path"`
23249 
23250   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23251   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23252   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23253   # "foo.exe" is OK but "foo" is an error.
23254   #
23255   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23256   # It is also a way to make sure we got the proper file name for the real test later on.
23257   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23258   if test "x$test_shortpath" = x; then
23259     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23260 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23261     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23262   fi
23263 
23264   # Call helper function which possibly converts this using DOS-style short mode.
23265   # If so, the updated path is stored in $new_path.
23266 
23267   input_path="$new_path"
23268   # Check if we need to convert this using DOS-style short mode. If the path
23269   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23270   # take no chances and rewrite it.
23271   # Note: m4 eats our [], so we need to use [ and ] instead.
23272   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23273   if test "x$has_forbidden_chars" != x; then
23274     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23275     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23276     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23277     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23278       # Going to short mode and back again did indeed matter. Since short mode is
23279       # case insensitive, let's make it lowercase to improve readability.
23280       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23281       # Now convert it back to Unix-style (cygpath)
23282       input_path=`$CYGPATH -u "$shortmode_path"`
23283       new_path="$input_path"
23284     fi
23285   fi
23286 
23287   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23288   if test "x$test_cygdrive_prefix" = x; then
23289     # As a simple fix, exclude /usr/bin since it's not a real path.
23290     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23291       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23292       # a path prefixed by /cygdrive for fixpath to work.
23293       new_path="$CYGWIN_ROOT_PATH$input_path"
23294     fi
23295   fi
23296 
23297 
23298   if test "x$path" != "x$new_path"; then
23299     BOOT_JDK="$new_path"
23300     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23301 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23302   fi
23303 
23304     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23305 
23306   path="$BOOT_JDK"
23307   has_colon=`$ECHO $path | $GREP ^.:`
23308   new_path="$path"
23309   if test "x$has_colon" = x; then
23310     # Not in mixed or Windows style, start by that.
23311     new_path=`cmd //c echo $path`
23312   fi
23313 
23314 
23315   input_path="$new_path"
23316   # Check if we need to convert this using DOS-style short mode. If the path
23317   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23318   # take no chances and rewrite it.
23319   # Note: m4 eats our [], so we need to use [ and ] instead.
23320   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23321   if test "x$has_forbidden_chars" != x; then
23322     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23323     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23324   fi
23325 
23326 
23327   windows_path="$new_path"
23328   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23329     unix_path=`$CYGPATH -u "$windows_path"`
23330     new_path="$unix_path"
23331   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23332     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23333     new_path="$unix_path"
23334   fi
23335 
23336   if test "x$path" != "x$new_path"; then
23337     BOOT_JDK="$new_path"
23338     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23339 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23340   fi
23341 
23342   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23343   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23344 
23345     else
23346       # We're on a unix platform. Hooray! :)
23347       path="$BOOT_JDK"
23348       has_space=`$ECHO "$path" | $GREP " "`
23349       if test "x$has_space" != x; then
23350         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23351 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23352         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23353       fi
23354 
23355       # Use eval to expand a potential ~
23356       eval path="$path"
23357       if test ! -f "$path" && test ! -d "$path"; then
23358         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23359       fi
23360 
23361       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23362     fi
23363   fi
23364 
23365             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23366 $as_echo_n "checking for Boot JDK... " >&6; }
23367             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23368 $as_echo "$BOOT_JDK" >&6; }
23369             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23370 $as_echo_n "checking Boot JDK version... " >&6; }
23371             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23372             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23373 $as_echo "$BOOT_JDK_VERSION" >&6; }
23374           fi # end check jdk version
23375         fi # end check javac
23376       fi # end check java
23377     fi # end check boot jdk found
23378   fi
23379 
23380   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23381     # Having specified an argument which is incorrect will produce an instant failure;
23382     # we should not go on looking
23383     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23384   fi
23385 
23386   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23387 
23388   if test "x$BOOT_JDK_FOUND" = xno; then
23389     # Now execute the test
23390 
23391   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23392     # First check at user selected default
23393 
23394   if test "x$BOOT_JDK_FOUND" = xno; then
23395     # Now execute the test
23396 
23397   if test -x /usr/libexec/java_home; then
23398     BOOT_JDK=`/usr/libexec/java_home `
23399     BOOT_JDK_FOUND=maybe
23400     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23401 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23402   fi
23403 
23404 
23405     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23406     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23407       # Do we have a bin/java?
23408       if test ! -x "$BOOT_JDK/bin/java"; then
23409         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23410 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23411         BOOT_JDK_FOUND=no
23412       else
23413         # Do we have a bin/javac?
23414         if test ! -x "$BOOT_JDK/bin/javac"; then
23415           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23416 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23417           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23418 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23419           BOOT_JDK_FOUND=no
23420         else
23421           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23422           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23423 
23424           # Extra M4 quote needed to protect [] in grep expression.
23425           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23426           if test "x$FOUND_CORRECT_VERSION" = x; then
23427             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23428 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23429             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23430 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23431             BOOT_JDK_FOUND=no
23432           else
23433             # We're done! :-)
23434             BOOT_JDK_FOUND=yes
23435 
23436   # Only process if variable expands to non-empty
23437 
23438   if test "x$BOOT_JDK" != x; then
23439     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23440 
23441   # Input might be given as Windows format, start by converting to
23442   # unix format.
23443   path="$BOOT_JDK"
23444   new_path=`$CYGPATH -u "$path"`
23445 
23446   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23447   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23448   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23449   # "foo.exe" is OK but "foo" is an error.
23450   #
23451   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23452   # It is also a way to make sure we got the proper file name for the real test later on.
23453   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23454   if test "x$test_shortpath" = x; then
23455     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23456 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23457     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23458   fi
23459 
23460   # Call helper function which possibly converts this using DOS-style short mode.
23461   # If so, the updated path is stored in $new_path.
23462 
23463   input_path="$new_path"
23464   # Check if we need to convert this using DOS-style short mode. If the path
23465   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23466   # take no chances and rewrite it.
23467   # Note: m4 eats our [], so we need to use [ and ] instead.
23468   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23469   if test "x$has_forbidden_chars" != x; then
23470     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23471     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23472     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23473     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23474       # Going to short mode and back again did indeed matter. Since short mode is
23475       # case insensitive, let's make it lowercase to improve readability.
23476       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23477       # Now convert it back to Unix-style (cygpath)
23478       input_path=`$CYGPATH -u "$shortmode_path"`
23479       new_path="$input_path"
23480     fi
23481   fi
23482 
23483   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23484   if test "x$test_cygdrive_prefix" = x; then
23485     # As a simple fix, exclude /usr/bin since it's not a real path.
23486     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23487       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23488       # a path prefixed by /cygdrive for fixpath to work.
23489       new_path="$CYGWIN_ROOT_PATH$input_path"
23490     fi
23491   fi
23492 
23493 
23494   if test "x$path" != "x$new_path"; then
23495     BOOT_JDK="$new_path"
23496     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23497 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23498   fi
23499 
23500     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23501 
23502   path="$BOOT_JDK"
23503   has_colon=`$ECHO $path | $GREP ^.:`
23504   new_path="$path"
23505   if test "x$has_colon" = x; then
23506     # Not in mixed or Windows style, start by that.
23507     new_path=`cmd //c echo $path`
23508   fi
23509 
23510 
23511   input_path="$new_path"
23512   # Check if we need to convert this using DOS-style short mode. If the path
23513   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23514   # take no chances and rewrite it.
23515   # Note: m4 eats our [], so we need to use [ and ] instead.
23516   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23517   if test "x$has_forbidden_chars" != x; then
23518     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23519     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23520   fi
23521 
23522 
23523   windows_path="$new_path"
23524   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23525     unix_path=`$CYGPATH -u "$windows_path"`
23526     new_path="$unix_path"
23527   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23528     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23529     new_path="$unix_path"
23530   fi
23531 
23532   if test "x$path" != "x$new_path"; then
23533     BOOT_JDK="$new_path"
23534     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23535 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23536   fi
23537 
23538   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23539   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23540 
23541     else
23542       # We're on a unix platform. Hooray! :)
23543       path="$BOOT_JDK"
23544       has_space=`$ECHO "$path" | $GREP " "`
23545       if test "x$has_space" != x; then
23546         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23547 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23548         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23549       fi
23550 
23551       # Use eval to expand a potential ~
23552       eval path="$path"
23553       if test ! -f "$path" && test ! -d "$path"; then
23554         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23555       fi
23556 
23557       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23558     fi
23559   fi
23560 
23561             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23562 $as_echo_n "checking for Boot JDK... " >&6; }
23563             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23564 $as_echo "$BOOT_JDK" >&6; }
23565             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23566 $as_echo_n "checking Boot JDK version... " >&6; }
23567             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23568             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23569 $as_echo "$BOOT_JDK_VERSION" >&6; }
23570           fi # end check jdk version
23571         fi # end check javac
23572       fi # end check java
23573     fi # end check boot jdk found
23574   fi
23575 
23576     # If that did not work out (e.g. too old), try explicit versions instead
23577 
23578   if test "x$BOOT_JDK_FOUND" = xno; then
23579     # Now execute the test
23580 
23581   if test -x /usr/libexec/java_home; then
23582     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
23583     BOOT_JDK_FOUND=maybe
23584     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
23585 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
23586   fi
23587 
23588 
23589     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23590     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23591       # Do we have a bin/java?
23592       if test ! -x "$BOOT_JDK/bin/java"; then
23593         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23594 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23595         BOOT_JDK_FOUND=no
23596       else
23597         # Do we have a bin/javac?
23598         if test ! -x "$BOOT_JDK/bin/javac"; then
23599           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23600 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23601           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23602 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23603           BOOT_JDK_FOUND=no
23604         else
23605           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23606           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23607 
23608           # Extra M4 quote needed to protect [] in grep expression.
23609           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23610           if test "x$FOUND_CORRECT_VERSION" = x; then
23611             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23612 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23613             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23614 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23615             BOOT_JDK_FOUND=no
23616           else
23617             # We're done! :-)
23618             BOOT_JDK_FOUND=yes
23619 
23620   # Only process if variable expands to non-empty
23621 
23622   if test "x$BOOT_JDK" != x; then
23623     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23624 
23625   # Input might be given as Windows format, start by converting to
23626   # unix format.
23627   path="$BOOT_JDK"
23628   new_path=`$CYGPATH -u "$path"`
23629 
23630   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23631   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23632   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23633   # "foo.exe" is OK but "foo" is an error.
23634   #
23635   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23636   # It is also a way to make sure we got the proper file name for the real test later on.
23637   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23638   if test "x$test_shortpath" = x; then
23639     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23640 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23641     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23642   fi
23643 
23644   # Call helper function which possibly converts this using DOS-style short mode.
23645   # If so, the updated path is stored in $new_path.
23646 
23647   input_path="$new_path"
23648   # Check if we need to convert this using DOS-style short mode. If the path
23649   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23650   # take no chances and rewrite it.
23651   # Note: m4 eats our [], so we need to use [ and ] instead.
23652   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23653   if test "x$has_forbidden_chars" != x; then
23654     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23655     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23656     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23657     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23658       # Going to short mode and back again did indeed matter. Since short mode is
23659       # case insensitive, let's make it lowercase to improve readability.
23660       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23661       # Now convert it back to Unix-style (cygpath)
23662       input_path=`$CYGPATH -u "$shortmode_path"`
23663       new_path="$input_path"
23664     fi
23665   fi
23666 
23667   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23668   if test "x$test_cygdrive_prefix" = x; then
23669     # As a simple fix, exclude /usr/bin since it's not a real path.
23670     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23671       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23672       # a path prefixed by /cygdrive for fixpath to work.
23673       new_path="$CYGWIN_ROOT_PATH$input_path"
23674     fi
23675   fi
23676 
23677 
23678   if test "x$path" != "x$new_path"; then
23679     BOOT_JDK="$new_path"
23680     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23681 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23682   fi
23683 
23684     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23685 
23686   path="$BOOT_JDK"
23687   has_colon=`$ECHO $path | $GREP ^.:`
23688   new_path="$path"
23689   if test "x$has_colon" = x; then
23690     # Not in mixed or Windows style, start by that.
23691     new_path=`cmd //c echo $path`
23692   fi
23693 
23694 
23695   input_path="$new_path"
23696   # Check if we need to convert this using DOS-style short mode. If the path
23697   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23698   # take no chances and rewrite it.
23699   # Note: m4 eats our [], so we need to use [ and ] instead.
23700   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23701   if test "x$has_forbidden_chars" != x; then
23702     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23703     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23704   fi
23705 
23706 
23707   windows_path="$new_path"
23708   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23709     unix_path=`$CYGPATH -u "$windows_path"`
23710     new_path="$unix_path"
23711   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23712     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23713     new_path="$unix_path"
23714   fi
23715 
23716   if test "x$path" != "x$new_path"; then
23717     BOOT_JDK="$new_path"
23718     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23719 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23720   fi
23721 
23722   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23723   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23724 
23725     else
23726       # We're on a unix platform. Hooray! :)
23727       path="$BOOT_JDK"
23728       has_space=`$ECHO "$path" | $GREP " "`
23729       if test "x$has_space" != x; then
23730         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23731 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23732         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23733       fi
23734 
23735       # Use eval to expand a potential ~
23736       eval path="$path"
23737       if test ! -f "$path" && test ! -d "$path"; then
23738         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23739       fi
23740 
23741       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23742     fi
23743   fi
23744 
23745             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23746 $as_echo_n "checking for Boot JDK... " >&6; }
23747             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23748 $as_echo "$BOOT_JDK" >&6; }
23749             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23750 $as_echo_n "checking Boot JDK version... " >&6; }
23751             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23752             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23753 $as_echo "$BOOT_JDK_VERSION" >&6; }
23754           fi # end check jdk version
23755         fi # end check javac
23756       fi # end check java
23757     fi # end check boot jdk found
23758   fi
23759 
23760 
23761   if test "x$BOOT_JDK_FOUND" = xno; then
23762     # Now execute the test
23763 
23764   if test -x /usr/libexec/java_home; then
23765     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
23766     BOOT_JDK_FOUND=maybe
23767     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
23768 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
23769   fi
23770 
23771 
23772     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23773     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23774       # Do we have a bin/java?
23775       if test ! -x "$BOOT_JDK/bin/java"; then
23776         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23777 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23778         BOOT_JDK_FOUND=no
23779       else
23780         # Do we have a bin/javac?
23781         if test ! -x "$BOOT_JDK/bin/javac"; then
23782           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23783 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23784           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23785 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23786           BOOT_JDK_FOUND=no
23787         else
23788           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23789           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23790 
23791           # Extra M4 quote needed to protect [] in grep expression.
23792           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23793           if test "x$FOUND_CORRECT_VERSION" = x; then
23794             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23795 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23796             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23797 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23798             BOOT_JDK_FOUND=no
23799           else
23800             # We're done! :-)
23801             BOOT_JDK_FOUND=yes
23802 
23803   # Only process if variable expands to non-empty
23804 
23805   if test "x$BOOT_JDK" != x; then
23806     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23807 
23808   # Input might be given as Windows format, start by converting to
23809   # unix format.
23810   path="$BOOT_JDK"
23811   new_path=`$CYGPATH -u "$path"`
23812 
23813   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23814   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23815   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23816   # "foo.exe" is OK but "foo" is an error.
23817   #
23818   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23819   # It is also a way to make sure we got the proper file name for the real test later on.
23820   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23821   if test "x$test_shortpath" = x; then
23822     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23823 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23824     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23825   fi
23826 
23827   # Call helper function which possibly converts this using DOS-style short mode.
23828   # If so, the updated path is stored in $new_path.
23829 
23830   input_path="$new_path"
23831   # Check if we need to convert this using DOS-style short mode. If the path
23832   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23833   # take no chances and rewrite it.
23834   # Note: m4 eats our [], so we need to use [ and ] instead.
23835   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23836   if test "x$has_forbidden_chars" != x; then
23837     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23838     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23839     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23840     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23841       # Going to short mode and back again did indeed matter. Since short mode is
23842       # case insensitive, let's make it lowercase to improve readability.
23843       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23844       # Now convert it back to Unix-style (cygpath)
23845       input_path=`$CYGPATH -u "$shortmode_path"`
23846       new_path="$input_path"
23847     fi
23848   fi
23849 
23850   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23851   if test "x$test_cygdrive_prefix" = x; then
23852     # As a simple fix, exclude /usr/bin since it's not a real path.
23853     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23854       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23855       # a path prefixed by /cygdrive for fixpath to work.
23856       new_path="$CYGWIN_ROOT_PATH$input_path"
23857     fi
23858   fi
23859 
23860 
23861   if test "x$path" != "x$new_path"; then
23862     BOOT_JDK="$new_path"
23863     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23864 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23865   fi
23866 
23867     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23868 
23869   path="$BOOT_JDK"
23870   has_colon=`$ECHO $path | $GREP ^.:`
23871   new_path="$path"
23872   if test "x$has_colon" = x; then
23873     # Not in mixed or Windows style, start by that.
23874     new_path=`cmd //c echo $path`
23875   fi
23876 
23877 
23878   input_path="$new_path"
23879   # Check if we need to convert this using DOS-style short mode. If the path
23880   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23881   # take no chances and rewrite it.
23882   # Note: m4 eats our [], so we need to use [ and ] instead.
23883   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23884   if test "x$has_forbidden_chars" != x; then
23885     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23886     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23887   fi
23888 
23889 
23890   windows_path="$new_path"
23891   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23892     unix_path=`$CYGPATH -u "$windows_path"`
23893     new_path="$unix_path"
23894   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23895     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23896     new_path="$unix_path"
23897   fi
23898 
23899   if test "x$path" != "x$new_path"; then
23900     BOOT_JDK="$new_path"
23901     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23902 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23903   fi
23904 
23905   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23906   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23907 
23908     else
23909       # We're on a unix platform. Hooray! :)
23910       path="$BOOT_JDK"
23911       has_space=`$ECHO "$path" | $GREP " "`
23912       if test "x$has_space" != x; then
23913         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23914 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23915         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23916       fi
23917 
23918       # Use eval to expand a potential ~
23919       eval path="$path"
23920       if test ! -f "$path" && test ! -d "$path"; then
23921         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23922       fi
23923 
23924       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23925     fi
23926   fi
23927 
23928             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23929 $as_echo_n "checking for Boot JDK... " >&6; }
23930             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23931 $as_echo "$BOOT_JDK" >&6; }
23932             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23933 $as_echo_n "checking Boot JDK version... " >&6; }
23934             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23935             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23936 $as_echo "$BOOT_JDK_VERSION" >&6; }
23937           fi # end check jdk version
23938         fi # end check javac
23939       fi # end check java
23940     fi # end check boot jdk found
23941   fi
23942 
23943 
23944   if test "x$BOOT_JDK_FOUND" = xno; then
23945     # Now execute the test
23946 
23947   if test -x /usr/libexec/java_home; then
23948     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
23949     BOOT_JDK_FOUND=maybe
23950     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
23951 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
23952   fi
23953 
23954 
23955     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23956     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23957       # Do we have a bin/java?
23958       if test ! -x "$BOOT_JDK/bin/java"; then
23959         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23960 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23961         BOOT_JDK_FOUND=no
23962       else
23963         # Do we have a bin/javac?
23964         if test ! -x "$BOOT_JDK/bin/javac"; then
23965           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23966 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23967           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23968 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23969           BOOT_JDK_FOUND=no
23970         else
23971           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23972           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23973 
23974           # Extra M4 quote needed to protect [] in grep expression.
23975           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23976           if test "x$FOUND_CORRECT_VERSION" = x; then
23977             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23978 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23979             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23980 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23981             BOOT_JDK_FOUND=no
23982           else
23983             # We're done! :-)
23984             BOOT_JDK_FOUND=yes
23985 
23986   # Only process if variable expands to non-empty
23987 
23988   if test "x$BOOT_JDK" != x; then
23989     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23990 
23991   # Input might be given as Windows format, start by converting to
23992   # unix format.
23993   path="$BOOT_JDK"
23994   new_path=`$CYGPATH -u "$path"`
23995 
23996   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23997   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23998   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23999   # "foo.exe" is OK but "foo" is an error.
24000   #
24001   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24002   # It is also a way to make sure we got the proper file name for the real test later on.
24003   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24004   if test "x$test_shortpath" = x; then
24005     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24006 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24007     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24008   fi
24009 
24010   # Call helper function which possibly converts this using DOS-style short mode.
24011   # If so, the updated path is stored in $new_path.
24012 
24013   input_path="$new_path"
24014   # Check if we need to convert this using DOS-style short mode. If the path
24015   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24016   # take no chances and rewrite it.
24017   # Note: m4 eats our [], so we need to use [ and ] instead.
24018   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24019   if test "x$has_forbidden_chars" != x; then
24020     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24021     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24022     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24023     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24024       # Going to short mode and back again did indeed matter. Since short mode is
24025       # case insensitive, let's make it lowercase to improve readability.
24026       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24027       # Now convert it back to Unix-style (cygpath)
24028       input_path=`$CYGPATH -u "$shortmode_path"`
24029       new_path="$input_path"
24030     fi
24031   fi
24032 
24033   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24034   if test "x$test_cygdrive_prefix" = x; then
24035     # As a simple fix, exclude /usr/bin since it's not a real path.
24036     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24037       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24038       # a path prefixed by /cygdrive for fixpath to work.
24039       new_path="$CYGWIN_ROOT_PATH$input_path"
24040     fi
24041   fi
24042 
24043 
24044   if test "x$path" != "x$new_path"; then
24045     BOOT_JDK="$new_path"
24046     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24047 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24048   fi
24049 
24050     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24051 
24052   path="$BOOT_JDK"
24053   has_colon=`$ECHO $path | $GREP ^.:`
24054   new_path="$path"
24055   if test "x$has_colon" = x; then
24056     # Not in mixed or Windows style, start by that.
24057     new_path=`cmd //c echo $path`
24058   fi
24059 
24060 
24061   input_path="$new_path"
24062   # Check if we need to convert this using DOS-style short mode. If the path
24063   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24064   # take no chances and rewrite it.
24065   # Note: m4 eats our [], so we need to use [ and ] instead.
24066   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24067   if test "x$has_forbidden_chars" != x; then
24068     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24069     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24070   fi
24071 
24072 
24073   windows_path="$new_path"
24074   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24075     unix_path=`$CYGPATH -u "$windows_path"`
24076     new_path="$unix_path"
24077   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24078     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24079     new_path="$unix_path"
24080   fi
24081 
24082   if test "x$path" != "x$new_path"; then
24083     BOOT_JDK="$new_path"
24084     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24085 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24086   fi
24087 
24088   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24089   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24090 
24091     else
24092       # We're on a unix platform. Hooray! :)
24093       path="$BOOT_JDK"
24094       has_space=`$ECHO "$path" | $GREP " "`
24095       if test "x$has_space" != x; then
24096         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24097 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24098         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24099       fi
24100 
24101       # Use eval to expand a potential ~
24102       eval path="$path"
24103       if test ! -f "$path" && test ! -d "$path"; then
24104         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24105       fi
24106 
24107       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24108     fi
24109   fi
24110 
24111             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24112 $as_echo_n "checking for Boot JDK... " >&6; }
24113             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24114 $as_echo "$BOOT_JDK" >&6; }
24115             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24116 $as_echo_n "checking Boot JDK version... " >&6; }
24117             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24118             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24119 $as_echo "$BOOT_JDK_VERSION" >&6; }
24120           fi # end check jdk version
24121         fi # end check javac
24122       fi # end check java
24123     fi # end check boot jdk found
24124   fi
24125 
24126   fi
24127 
24128 
24129     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24130     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24131       # Do we have a bin/java?
24132       if test ! -x "$BOOT_JDK/bin/java"; then
24133         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24134 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24135         BOOT_JDK_FOUND=no
24136       else
24137         # Do we have a bin/javac?
24138         if test ! -x "$BOOT_JDK/bin/javac"; then
24139           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24140 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24141           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24142 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24143           BOOT_JDK_FOUND=no
24144         else
24145           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24146           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24147 
24148           # Extra M4 quote needed to protect [] in grep expression.
24149           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24150           if test "x$FOUND_CORRECT_VERSION" = x; then
24151             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24152 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24153             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24154 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24155             BOOT_JDK_FOUND=no
24156           else
24157             # We're done! :-)
24158             BOOT_JDK_FOUND=yes
24159 
24160   # Only process if variable expands to non-empty
24161 
24162   if test "x$BOOT_JDK" != x; then
24163     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24164 
24165   # Input might be given as Windows format, start by converting to
24166   # unix format.
24167   path="$BOOT_JDK"
24168   new_path=`$CYGPATH -u "$path"`
24169 
24170   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24171   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24172   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24173   # "foo.exe" is OK but "foo" is an error.
24174   #
24175   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24176   # It is also a way to make sure we got the proper file name for the real test later on.
24177   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24178   if test "x$test_shortpath" = x; then
24179     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24180 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24181     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24182   fi
24183 
24184   # Call helper function which possibly converts this using DOS-style short mode.
24185   # If so, the updated path is stored in $new_path.
24186 
24187   input_path="$new_path"
24188   # Check if we need to convert this using DOS-style short mode. If the path
24189   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24190   # take no chances and rewrite it.
24191   # Note: m4 eats our [], so we need to use [ and ] instead.
24192   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24193   if test "x$has_forbidden_chars" != x; then
24194     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24195     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24196     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24197     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24198       # Going to short mode and back again did indeed matter. Since short mode is
24199       # case insensitive, let's make it lowercase to improve readability.
24200       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24201       # Now convert it back to Unix-style (cygpath)
24202       input_path=`$CYGPATH -u "$shortmode_path"`
24203       new_path="$input_path"
24204     fi
24205   fi
24206 
24207   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24208   if test "x$test_cygdrive_prefix" = x; then
24209     # As a simple fix, exclude /usr/bin since it's not a real path.
24210     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24211       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24212       # a path prefixed by /cygdrive for fixpath to work.
24213       new_path="$CYGWIN_ROOT_PATH$input_path"
24214     fi
24215   fi
24216 
24217 
24218   if test "x$path" != "x$new_path"; then
24219     BOOT_JDK="$new_path"
24220     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24221 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24222   fi
24223 
24224     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24225 
24226   path="$BOOT_JDK"
24227   has_colon=`$ECHO $path | $GREP ^.:`
24228   new_path="$path"
24229   if test "x$has_colon" = x; then
24230     # Not in mixed or Windows style, start by that.
24231     new_path=`cmd //c echo $path`
24232   fi
24233 
24234 
24235   input_path="$new_path"
24236   # Check if we need to convert this using DOS-style short mode. If the path
24237   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24238   # take no chances and rewrite it.
24239   # Note: m4 eats our [], so we need to use [ and ] instead.
24240   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24241   if test "x$has_forbidden_chars" != x; then
24242     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24243     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24244   fi
24245 
24246 
24247   windows_path="$new_path"
24248   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24249     unix_path=`$CYGPATH -u "$windows_path"`
24250     new_path="$unix_path"
24251   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24252     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24253     new_path="$unix_path"
24254   fi
24255 
24256   if test "x$path" != "x$new_path"; then
24257     BOOT_JDK="$new_path"
24258     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24259 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24260   fi
24261 
24262   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24263   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24264 
24265     else
24266       # We're on a unix platform. Hooray! :)
24267       path="$BOOT_JDK"
24268       has_space=`$ECHO "$path" | $GREP " "`
24269       if test "x$has_space" != x; then
24270         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24271 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24272         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24273       fi
24274 
24275       # Use eval to expand a potential ~
24276       eval path="$path"
24277       if test ! -f "$path" && test ! -d "$path"; then
24278         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24279       fi
24280 
24281       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24282     fi
24283   fi
24284 
24285             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24286 $as_echo_n "checking for Boot JDK... " >&6; }
24287             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24288 $as_echo "$BOOT_JDK" >&6; }
24289             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24290 $as_echo_n "checking Boot JDK version... " >&6; }
24291             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24292             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24293 $as_echo "$BOOT_JDK_VERSION" >&6; }
24294           fi # end check jdk version
24295         fi # end check javac
24296       fi # end check java
24297     fi # end check boot jdk found
24298   fi
24299 
24300 
24301   # Test: Is $JAVA_HOME set?
24302 
24303   if test "x$BOOT_JDK_FOUND" = xno; then
24304     # Now execute the test
24305 
24306   if test "x$JAVA_HOME" != x; then
24307     JAVA_HOME_PROCESSED="$JAVA_HOME"
24308 
24309   # Only process if variable expands to non-empty
24310 
24311   if test "x$JAVA_HOME_PROCESSED" != x; then
24312     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24313 
24314   # Input might be given as Windows format, start by converting to
24315   # unix format.
24316   path="$JAVA_HOME_PROCESSED"
24317   new_path=`$CYGPATH -u "$path"`
24318 
24319   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24320   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24321   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24322   # "foo.exe" is OK but "foo" is an error.
24323   #
24324   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24325   # It is also a way to make sure we got the proper file name for the real test later on.
24326   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24327   if test "x$test_shortpath" = x; then
24328     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24329 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24330     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24331   fi
24332 
24333   # Call helper function which possibly converts this using DOS-style short mode.
24334   # If so, the updated path is stored in $new_path.
24335 
24336   input_path="$new_path"
24337   # Check if we need to convert this using DOS-style short mode. If the path
24338   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24339   # take no chances and rewrite it.
24340   # Note: m4 eats our [], so we need to use [ and ] instead.
24341   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24342   if test "x$has_forbidden_chars" != x; then
24343     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24344     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24345     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24346     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24347       # Going to short mode and back again did indeed matter. Since short mode is
24348       # case insensitive, let's make it lowercase to improve readability.
24349       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24350       # Now convert it back to Unix-style (cygpath)
24351       input_path=`$CYGPATH -u "$shortmode_path"`
24352       new_path="$input_path"
24353     fi
24354   fi
24355 
24356   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24357   if test "x$test_cygdrive_prefix" = x; then
24358     # As a simple fix, exclude /usr/bin since it's not a real path.
24359     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24360       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24361       # a path prefixed by /cygdrive for fixpath to work.
24362       new_path="$CYGWIN_ROOT_PATH$input_path"
24363     fi
24364   fi
24365 
24366 
24367   if test "x$path" != "x$new_path"; then
24368     JAVA_HOME_PROCESSED="$new_path"
24369     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24370 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24371   fi
24372 
24373     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24374 
24375   path="$JAVA_HOME_PROCESSED"
24376   has_colon=`$ECHO $path | $GREP ^.:`
24377   new_path="$path"
24378   if test "x$has_colon" = x; then
24379     # Not in mixed or Windows style, start by that.
24380     new_path=`cmd //c echo $path`
24381   fi
24382 
24383 
24384   input_path="$new_path"
24385   # Check if we need to convert this using DOS-style short mode. If the path
24386   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24387   # take no chances and rewrite it.
24388   # Note: m4 eats our [], so we need to use [ and ] instead.
24389   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24390   if test "x$has_forbidden_chars" != x; then
24391     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24392     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24393   fi
24394 
24395 
24396   windows_path="$new_path"
24397   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24398     unix_path=`$CYGPATH -u "$windows_path"`
24399     new_path="$unix_path"
24400   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24401     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24402     new_path="$unix_path"
24403   fi
24404 
24405   if test "x$path" != "x$new_path"; then
24406     JAVA_HOME_PROCESSED="$new_path"
24407     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24408 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24409   fi
24410 
24411   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24412   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24413 
24414     else
24415       # We're on a unix platform. Hooray! :)
24416       path="$JAVA_HOME_PROCESSED"
24417       has_space=`$ECHO "$path" | $GREP " "`
24418       if test "x$has_space" != x; then
24419         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24420 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24421         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24422       fi
24423 
24424       # Use eval to expand a potential ~
24425       eval path="$path"
24426       if test ! -f "$path" && test ! -d "$path"; then
24427         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
24428       fi
24429 
24430       JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
24431     fi
24432   fi
24433 
24434     if test ! -d "$JAVA_HOME_PROCESSED"; then
24435       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
24436 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
24437     else
24438       # Aha, the user has set a JAVA_HOME
24439       # let us use that as the Boot JDK.
24440       BOOT_JDK="$JAVA_HOME_PROCESSED"
24441       BOOT_JDK_FOUND=maybe
24442       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
24443 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
24444     fi
24445   fi
24446 
24447 
24448     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24449     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24450       # Do we have a bin/java?
24451       if test ! -x "$BOOT_JDK/bin/java"; then
24452         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24453 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24454         BOOT_JDK_FOUND=no
24455       else
24456         # Do we have a bin/javac?
24457         if test ! -x "$BOOT_JDK/bin/javac"; then
24458           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24459 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24460           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24461 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24462           BOOT_JDK_FOUND=no
24463         else
24464           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24465           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24466 
24467           # Extra M4 quote needed to protect [] in grep expression.
24468           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24469           if test "x$FOUND_CORRECT_VERSION" = x; then
24470             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24471 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24472             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24473 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24474             BOOT_JDK_FOUND=no
24475           else
24476             # We're done! :-)
24477             BOOT_JDK_FOUND=yes
24478 
24479   # Only process if variable expands to non-empty
24480 
24481   if test "x$BOOT_JDK" != x; then
24482     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24483 
24484   # Input might be given as Windows format, start by converting to
24485   # unix format.
24486   path="$BOOT_JDK"
24487   new_path=`$CYGPATH -u "$path"`
24488 
24489   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24490   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24491   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24492   # "foo.exe" is OK but "foo" is an error.
24493   #
24494   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24495   # It is also a way to make sure we got the proper file name for the real test later on.
24496   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24497   if test "x$test_shortpath" = x; then
24498     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24499 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24500     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24501   fi
24502 
24503   # Call helper function which possibly converts this using DOS-style short mode.
24504   # If so, the updated path is stored in $new_path.
24505 
24506   input_path="$new_path"
24507   # Check if we need to convert this using DOS-style short mode. If the path
24508   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24509   # take no chances and rewrite it.
24510   # Note: m4 eats our [], so we need to use [ and ] instead.
24511   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24512   if test "x$has_forbidden_chars" != x; then
24513     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24514     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24515     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24516     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24517       # Going to short mode and back again did indeed matter. Since short mode is
24518       # case insensitive, let's make it lowercase to improve readability.
24519       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24520       # Now convert it back to Unix-style (cygpath)
24521       input_path=`$CYGPATH -u "$shortmode_path"`
24522       new_path="$input_path"
24523     fi
24524   fi
24525 
24526   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24527   if test "x$test_cygdrive_prefix" = x; then
24528     # As a simple fix, exclude /usr/bin since it's not a real path.
24529     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24530       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24531       # a path prefixed by /cygdrive for fixpath to work.
24532       new_path="$CYGWIN_ROOT_PATH$input_path"
24533     fi
24534   fi
24535 
24536 
24537   if test "x$path" != "x$new_path"; then
24538     BOOT_JDK="$new_path"
24539     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24540 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24541   fi
24542 
24543     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24544 
24545   path="$BOOT_JDK"
24546   has_colon=`$ECHO $path | $GREP ^.:`
24547   new_path="$path"
24548   if test "x$has_colon" = x; then
24549     # Not in mixed or Windows style, start by that.
24550     new_path=`cmd //c echo $path`
24551   fi
24552 
24553 
24554   input_path="$new_path"
24555   # Check if we need to convert this using DOS-style short mode. If the path
24556   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24557   # take no chances and rewrite it.
24558   # Note: m4 eats our [], so we need to use [ and ] instead.
24559   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24560   if test "x$has_forbidden_chars" != x; then
24561     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24562     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24563   fi
24564 
24565 
24566   windows_path="$new_path"
24567   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24568     unix_path=`$CYGPATH -u "$windows_path"`
24569     new_path="$unix_path"
24570   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24571     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24572     new_path="$unix_path"
24573   fi
24574 
24575   if test "x$path" != "x$new_path"; then
24576     BOOT_JDK="$new_path"
24577     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24578 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24579   fi
24580 
24581   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24582   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24583 
24584     else
24585       # We're on a unix platform. Hooray! :)
24586       path="$BOOT_JDK"
24587       has_space=`$ECHO "$path" | $GREP " "`
24588       if test "x$has_space" != x; then
24589         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24590 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24591         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24592       fi
24593 
24594       # Use eval to expand a potential ~
24595       eval path="$path"
24596       if test ! -f "$path" && test ! -d "$path"; then
24597         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24598       fi
24599 
24600       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24601     fi
24602   fi
24603 
24604             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24605 $as_echo_n "checking for Boot JDK... " >&6; }
24606             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24607 $as_echo "$BOOT_JDK" >&6; }
24608             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24609 $as_echo_n "checking Boot JDK version... " >&6; }
24610             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24611             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24612 $as_echo "$BOOT_JDK_VERSION" >&6; }
24613           fi # end check jdk version
24614         fi # end check javac
24615       fi # end check java
24616     fi # end check boot jdk found
24617   fi
24618 
24619 
24620   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
24621 
24622   if test "x$BOOT_JDK_FOUND" = xno; then
24623     # Now execute the test
24624 
24625   # Extract the first word of "javac", so it can be a program name with args.
24626 set dummy javac; ac_word=$2
24627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24628 $as_echo_n "checking for $ac_word... " >&6; }
24629 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
24630   $as_echo_n "(cached) " >&6
24631 else
24632   case $JAVAC_CHECK in
24633   [\\/]* | ?:[\\/]*)
24634   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
24635   ;;
24636   *)
24637   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24638 for as_dir in $PATH
24639 do
24640   IFS=$as_save_IFS
24641   test -z "$as_dir" && as_dir=.
24642     for ac_exec_ext in '' $ac_executable_extensions; do
24643   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24644     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
24645     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24646     break 2
24647   fi
24648 done
24649   done
24650 IFS=$as_save_IFS
24651 
24652   ;;
24653 esac
24654 fi
24655 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
24656 if test -n "$JAVAC_CHECK"; then
24657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
24658 $as_echo "$JAVAC_CHECK" >&6; }
24659 else
24660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24661 $as_echo "no" >&6; }
24662 fi
24663 
24664 
24665   # Extract the first word of "java", so it can be a program name with args.
24666 set dummy java; ac_word=$2
24667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24668 $as_echo_n "checking for $ac_word... " >&6; }
24669 if ${ac_cv_path_JAVA_CHECK+:} false; then :
24670   $as_echo_n "(cached) " >&6
24671 else
24672   case $JAVA_CHECK in
24673   [\\/]* | ?:[\\/]*)
24674   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
24675   ;;
24676   *)
24677   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24678 for as_dir in $PATH
24679 do
24680   IFS=$as_save_IFS
24681   test -z "$as_dir" && as_dir=.
24682     for ac_exec_ext in '' $ac_executable_extensions; do
24683   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24684     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
24685     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24686     break 2
24687   fi
24688 done
24689   done
24690 IFS=$as_save_IFS
24691 
24692   ;;
24693 esac
24694 fi
24695 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
24696 if test -n "$JAVA_CHECK"; then
24697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
24698 $as_echo "$JAVA_CHECK" >&6; }
24699 else
24700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24701 $as_echo "no" >&6; }
24702 fi
24703 
24704 
24705   BINARY="$JAVAC_CHECK"
24706   if test "x$JAVAC_CHECK" = x; then
24707     BINARY="$JAVA_CHECK"
24708   fi
24709   if test "x$BINARY" != x; then
24710     # So there is a java(c) binary, it might be part of a JDK.
24711     # Lets find the JDK/JRE directory by following symbolic links.
24712     # Linux/GNU systems often have links from /usr/bin/java to
24713     # /etc/alternatives/java to the real JDK binary.
24714 
24715   if test "x$OPENJDK_BUILD_OS" != xwindows; then
24716     # Follow a chain of symbolic links. Use readlink
24717     # where it exists, else fall back to horribly
24718     # complicated shell code.
24719     if test "x$READLINK_TESTED" != yes; then
24720       # On MacOSX there is a readlink tool with a different
24721       # purpose than the GNU readlink tool. Check the found readlink.
24722       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
24723       if test "x$ISGNU" = x; then
24724         # A readlink that we do not know how to use.
24725         # Are there other non-GNU readlinks out there?
24726         READLINK_TESTED=yes
24727         READLINK=
24728       fi
24729     fi
24730 
24731     if test "x$READLINK" != x; then
24732       BINARY=`$READLINK -f $BINARY`
24733     else
24734       # Save the current directory for restoring afterwards
24735       STARTDIR=$PWD
24736       COUNTER=0
24737       sym_link_dir=`$DIRNAME $BINARY`
24738       sym_link_file=`$BASENAME $BINARY`
24739       cd $sym_link_dir
24740       # Use -P flag to resolve symlinks in directories.
24741       cd `$THEPWDCMD -P`
24742       sym_link_dir=`$THEPWDCMD -P`
24743       # Resolve file symlinks
24744       while test $COUNTER -lt 20; do
24745         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
24746         if test "x$ISLINK" == x; then
24747           # This is not a symbolic link! We are done!
24748           break
24749         fi
24750         # Again resolve directory symlinks since the target of the just found
24751         # link could be in a different directory
24752         cd `$DIRNAME $ISLINK`
24753         sym_link_dir=`$THEPWDCMD -P`
24754         sym_link_file=`$BASENAME $ISLINK`
24755         let COUNTER=COUNTER+1
24756       done
24757       cd $STARTDIR
24758       BINARY=$sym_link_dir/$sym_link_file
24759     fi
24760   fi
24761 
24762     BOOT_JDK=`dirname "$BINARY"`
24763     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
24764     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
24765       # Looks like we found ourselves an JDK
24766       BOOT_JDK_FOUND=maybe
24767       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
24768 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
24769     fi
24770   fi
24771 
24772 
24773     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24774     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24775       # Do we have a bin/java?
24776       if test ! -x "$BOOT_JDK/bin/java"; then
24777         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24778 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24779         BOOT_JDK_FOUND=no
24780       else
24781         # Do we have a bin/javac?
24782         if test ! -x "$BOOT_JDK/bin/javac"; then
24783           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24784 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24785           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24786 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24787           BOOT_JDK_FOUND=no
24788         else
24789           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24790           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24791 
24792           # Extra M4 quote needed to protect [] in grep expression.
24793           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24794           if test "x$FOUND_CORRECT_VERSION" = x; then
24795             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24796 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24797             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24798 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24799             BOOT_JDK_FOUND=no
24800           else
24801             # We're done! :-)
24802             BOOT_JDK_FOUND=yes
24803 
24804   # Only process if variable expands to non-empty
24805 
24806   if test "x$BOOT_JDK" != x; then
24807     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24808 
24809   # Input might be given as Windows format, start by converting to
24810   # unix format.
24811   path="$BOOT_JDK"
24812   new_path=`$CYGPATH -u "$path"`
24813 
24814   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24815   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24816   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24817   # "foo.exe" is OK but "foo" is an error.
24818   #
24819   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24820   # It is also a way to make sure we got the proper file name for the real test later on.
24821   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24822   if test "x$test_shortpath" = x; then
24823     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24824 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24825     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24826   fi
24827 
24828   # Call helper function which possibly converts this using DOS-style short mode.
24829   # If so, the updated path is stored in $new_path.
24830 
24831   input_path="$new_path"
24832   # Check if we need to convert this using DOS-style short mode. If the path
24833   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24834   # take no chances and rewrite it.
24835   # Note: m4 eats our [], so we need to use [ and ] instead.
24836   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24837   if test "x$has_forbidden_chars" != x; then
24838     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24839     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24840     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24841     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24842       # Going to short mode and back again did indeed matter. Since short mode is
24843       # case insensitive, let's make it lowercase to improve readability.
24844       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24845       # Now convert it back to Unix-style (cygpath)
24846       input_path=`$CYGPATH -u "$shortmode_path"`
24847       new_path="$input_path"
24848     fi
24849   fi
24850 
24851   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24852   if test "x$test_cygdrive_prefix" = x; then
24853     # As a simple fix, exclude /usr/bin since it's not a real path.
24854     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24855       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24856       # a path prefixed by /cygdrive for fixpath to work.
24857       new_path="$CYGWIN_ROOT_PATH$input_path"
24858     fi
24859   fi
24860 
24861 
24862   if test "x$path" != "x$new_path"; then
24863     BOOT_JDK="$new_path"
24864     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24865 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24866   fi
24867 
24868     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24869 
24870   path="$BOOT_JDK"
24871   has_colon=`$ECHO $path | $GREP ^.:`
24872   new_path="$path"
24873   if test "x$has_colon" = x; then
24874     # Not in mixed or Windows style, start by that.
24875     new_path=`cmd //c echo $path`
24876   fi
24877 
24878 
24879   input_path="$new_path"
24880   # Check if we need to convert this using DOS-style short mode. If the path
24881   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24882   # take no chances and rewrite it.
24883   # Note: m4 eats our [], so we need to use [ and ] instead.
24884   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24885   if test "x$has_forbidden_chars" != x; then
24886     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24887     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24888   fi
24889 
24890 
24891   windows_path="$new_path"
24892   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24893     unix_path=`$CYGPATH -u "$windows_path"`
24894     new_path="$unix_path"
24895   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24896     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24897     new_path="$unix_path"
24898   fi
24899 
24900   if test "x$path" != "x$new_path"; then
24901     BOOT_JDK="$new_path"
24902     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24903 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24904   fi
24905 
24906   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24907   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24908 
24909     else
24910       # We're on a unix platform. Hooray! :)
24911       path="$BOOT_JDK"
24912       has_space=`$ECHO "$path" | $GREP " "`
24913       if test "x$has_space" != x; then
24914         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24915 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24916         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24917       fi
24918 
24919       # Use eval to expand a potential ~
24920       eval path="$path"
24921       if test ! -f "$path" && test ! -d "$path"; then
24922         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24923       fi
24924 
24925       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24926     fi
24927   fi
24928 
24929             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24930 $as_echo_n "checking for Boot JDK... " >&6; }
24931             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24932 $as_echo "$BOOT_JDK" >&6; }
24933             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24934 $as_echo_n "checking Boot JDK version... " >&6; }
24935             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24936             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24937 $as_echo "$BOOT_JDK_VERSION" >&6; }
24938           fi # end check jdk version
24939         fi # end check javac
24940       fi # end check java
24941     fi # end check boot jdk found
24942   fi
24943 
24944 
24945   # Test: Is there a JDK installed in default, well-known locations?
24946 
24947   if test "x$BOOT_JDK_FOUND" = xno; then
24948     # Now execute the test
24949 
24950   if test "x$OPENJDK_TARGET_OS" = xwindows; then
24951 
24952   if test "x$BOOT_JDK_FOUND" = xno; then
24953     # Now execute the test
24954 
24955   if test "x$ProgramW6432" != x; then
24956     VIRTUAL_DIR="$ProgramW6432/Java"
24957 
24958   windows_path="$VIRTUAL_DIR"
24959   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24960     unix_path=`$CYGPATH -u "$windows_path"`
24961     VIRTUAL_DIR="$unix_path"
24962   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24963     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24964     VIRTUAL_DIR="$unix_path"
24965   fi
24966 
24967 
24968   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
24969   BOOT_JDK_SUFFIX=""
24970   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24971   if test "x$ALL_JDKS_FOUND" != x; then
24972     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24973 
24974   if test "x$BOOT_JDK_FOUND" = xno; then
24975     # Now execute the test
24976 
24977         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24978         if test -d "$BOOT_JDK"; then
24979           BOOT_JDK_FOUND=maybe
24980           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24981 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24982         fi
24983 
24984 
24985     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24986     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24987       # Do we have a bin/java?
24988       if test ! -x "$BOOT_JDK/bin/java"; then
24989         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24990 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24991         BOOT_JDK_FOUND=no
24992       else
24993         # Do we have a bin/javac?
24994         if test ! -x "$BOOT_JDK/bin/javac"; then
24995           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24996 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24997           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24998 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24999           BOOT_JDK_FOUND=no
25000         else
25001           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25002           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25003 
25004           # Extra M4 quote needed to protect [] in grep expression.
25005           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25006           if test "x$FOUND_CORRECT_VERSION" = x; then
25007             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25008 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25009             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25010 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25011             BOOT_JDK_FOUND=no
25012           else
25013             # We're done! :-)
25014             BOOT_JDK_FOUND=yes
25015 
25016   # Only process if variable expands to non-empty
25017 
25018   if test "x$BOOT_JDK" != x; then
25019     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25020 
25021   # Input might be given as Windows format, start by converting to
25022   # unix format.
25023   path="$BOOT_JDK"
25024   new_path=`$CYGPATH -u "$path"`
25025 
25026   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25027   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25028   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25029   # "foo.exe" is OK but "foo" is an error.
25030   #
25031   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25032   # It is also a way to make sure we got the proper file name for the real test later on.
25033   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25034   if test "x$test_shortpath" = x; then
25035     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25036 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25037     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25038   fi
25039 
25040   # Call helper function which possibly converts this using DOS-style short mode.
25041   # If so, the updated path is stored in $new_path.
25042 
25043   input_path="$new_path"
25044   # Check if we need to convert this using DOS-style short mode. If the path
25045   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25046   # take no chances and rewrite it.
25047   # Note: m4 eats our [], so we need to use [ and ] instead.
25048   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25049   if test "x$has_forbidden_chars" != x; then
25050     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25051     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25052     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25053     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25054       # Going to short mode and back again did indeed matter. Since short mode is
25055       # case insensitive, let's make it lowercase to improve readability.
25056       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25057       # Now convert it back to Unix-style (cygpath)
25058       input_path=`$CYGPATH -u "$shortmode_path"`
25059       new_path="$input_path"
25060     fi
25061   fi
25062 
25063   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25064   if test "x$test_cygdrive_prefix" = x; then
25065     # As a simple fix, exclude /usr/bin since it's not a real path.
25066     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25067       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25068       # a path prefixed by /cygdrive for fixpath to work.
25069       new_path="$CYGWIN_ROOT_PATH$input_path"
25070     fi
25071   fi
25072 
25073 
25074   if test "x$path" != "x$new_path"; then
25075     BOOT_JDK="$new_path"
25076     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25077 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25078   fi
25079 
25080     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25081 
25082   path="$BOOT_JDK"
25083   has_colon=`$ECHO $path | $GREP ^.:`
25084   new_path="$path"
25085   if test "x$has_colon" = x; then
25086     # Not in mixed or Windows style, start by that.
25087     new_path=`cmd //c echo $path`
25088   fi
25089 
25090 
25091   input_path="$new_path"
25092   # Check if we need to convert this using DOS-style short mode. If the path
25093   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25094   # take no chances and rewrite it.
25095   # Note: m4 eats our [], so we need to use [ and ] instead.
25096   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25097   if test "x$has_forbidden_chars" != x; then
25098     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25099     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25100   fi
25101 
25102 
25103   windows_path="$new_path"
25104   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25105     unix_path=`$CYGPATH -u "$windows_path"`
25106     new_path="$unix_path"
25107   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25108     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25109     new_path="$unix_path"
25110   fi
25111 
25112   if test "x$path" != "x$new_path"; then
25113     BOOT_JDK="$new_path"
25114     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25115 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25116   fi
25117 
25118   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25119   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25120 
25121     else
25122       # We're on a unix platform. Hooray! :)
25123       path="$BOOT_JDK"
25124       has_space=`$ECHO "$path" | $GREP " "`
25125       if test "x$has_space" != x; then
25126         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25127 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25128         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25129       fi
25130 
25131       # Use eval to expand a potential ~
25132       eval path="$path"
25133       if test ! -f "$path" && test ! -d "$path"; then
25134         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25135       fi
25136 
25137       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25138     fi
25139   fi
25140 
25141             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25142 $as_echo_n "checking for Boot JDK... " >&6; }
25143             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25144 $as_echo "$BOOT_JDK" >&6; }
25145             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25146 $as_echo_n "checking Boot JDK version... " >&6; }
25147             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25148             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25149 $as_echo "$BOOT_JDK_VERSION" >&6; }
25150           fi # end check jdk version
25151         fi # end check javac
25152       fi # end check java
25153     fi # end check boot jdk found
25154   fi
25155 
25156     done
25157   fi
25158 
25159   fi
25160 
25161 
25162     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25163     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25164       # Do we have a bin/java?
25165       if test ! -x "$BOOT_JDK/bin/java"; then
25166         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25167 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25168         BOOT_JDK_FOUND=no
25169       else
25170         # Do we have a bin/javac?
25171         if test ! -x "$BOOT_JDK/bin/javac"; then
25172           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25173 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25174           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25175 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25176           BOOT_JDK_FOUND=no
25177         else
25178           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25179           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25180 
25181           # Extra M4 quote needed to protect [] in grep expression.
25182           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25183           if test "x$FOUND_CORRECT_VERSION" = x; then
25184             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25185 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25186             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25187 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25188             BOOT_JDK_FOUND=no
25189           else
25190             # We're done! :-)
25191             BOOT_JDK_FOUND=yes
25192 
25193   # Only process if variable expands to non-empty
25194 
25195   if test "x$BOOT_JDK" != x; then
25196     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25197 
25198   # Input might be given as Windows format, start by converting to
25199   # unix format.
25200   path="$BOOT_JDK"
25201   new_path=`$CYGPATH -u "$path"`
25202 
25203   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25204   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25205   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25206   # "foo.exe" is OK but "foo" is an error.
25207   #
25208   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25209   # It is also a way to make sure we got the proper file name for the real test later on.
25210   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25211   if test "x$test_shortpath" = x; then
25212     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25213 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25214     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25215   fi
25216 
25217   # Call helper function which possibly converts this using DOS-style short mode.
25218   # If so, the updated path is stored in $new_path.
25219 
25220   input_path="$new_path"
25221   # Check if we need to convert this using DOS-style short mode. If the path
25222   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25223   # take no chances and rewrite it.
25224   # Note: m4 eats our [], so we need to use [ and ] instead.
25225   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25226   if test "x$has_forbidden_chars" != x; then
25227     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25228     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25229     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25230     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25231       # Going to short mode and back again did indeed matter. Since short mode is
25232       # case insensitive, let's make it lowercase to improve readability.
25233       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25234       # Now convert it back to Unix-style (cygpath)
25235       input_path=`$CYGPATH -u "$shortmode_path"`
25236       new_path="$input_path"
25237     fi
25238   fi
25239 
25240   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25241   if test "x$test_cygdrive_prefix" = x; then
25242     # As a simple fix, exclude /usr/bin since it's not a real path.
25243     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25244       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25245       # a path prefixed by /cygdrive for fixpath to work.
25246       new_path="$CYGWIN_ROOT_PATH$input_path"
25247     fi
25248   fi
25249 
25250 
25251   if test "x$path" != "x$new_path"; then
25252     BOOT_JDK="$new_path"
25253     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25254 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25255   fi
25256 
25257     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25258 
25259   path="$BOOT_JDK"
25260   has_colon=`$ECHO $path | $GREP ^.:`
25261   new_path="$path"
25262   if test "x$has_colon" = x; then
25263     # Not in mixed or Windows style, start by that.
25264     new_path=`cmd //c echo $path`
25265   fi
25266 
25267 
25268   input_path="$new_path"
25269   # Check if we need to convert this using DOS-style short mode. If the path
25270   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25271   # take no chances and rewrite it.
25272   # Note: m4 eats our [], so we need to use [ and ] instead.
25273   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25274   if test "x$has_forbidden_chars" != x; then
25275     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25276     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25277   fi
25278 
25279 
25280   windows_path="$new_path"
25281   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25282     unix_path=`$CYGPATH -u "$windows_path"`
25283     new_path="$unix_path"
25284   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25285     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25286     new_path="$unix_path"
25287   fi
25288 
25289   if test "x$path" != "x$new_path"; then
25290     BOOT_JDK="$new_path"
25291     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25292 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25293   fi
25294 
25295   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25296   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25297 
25298     else
25299       # We're on a unix platform. Hooray! :)
25300       path="$BOOT_JDK"
25301       has_space=`$ECHO "$path" | $GREP " "`
25302       if test "x$has_space" != x; then
25303         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25304 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25305         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25306       fi
25307 
25308       # Use eval to expand a potential ~
25309       eval path="$path"
25310       if test ! -f "$path" && test ! -d "$path"; then
25311         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25312       fi
25313 
25314       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25315     fi
25316   fi
25317 
25318             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25319 $as_echo_n "checking for Boot JDK... " >&6; }
25320             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25321 $as_echo "$BOOT_JDK" >&6; }
25322             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25323 $as_echo_n "checking Boot JDK version... " >&6; }
25324             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25325             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25326 $as_echo "$BOOT_JDK_VERSION" >&6; }
25327           fi # end check jdk version
25328         fi # end check javac
25329       fi # end check java
25330     fi # end check boot jdk found
25331   fi
25332 
25333 
25334   if test "x$BOOT_JDK_FOUND" = xno; then
25335     # Now execute the test
25336 
25337   if test "x$PROGRAMW6432" != x; then
25338     VIRTUAL_DIR="$PROGRAMW6432/Java"
25339 
25340   windows_path="$VIRTUAL_DIR"
25341   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25342     unix_path=`$CYGPATH -u "$windows_path"`
25343     VIRTUAL_DIR="$unix_path"
25344   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25345     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25346     VIRTUAL_DIR="$unix_path"
25347   fi
25348 
25349 
25350   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25351   BOOT_JDK_SUFFIX=""
25352   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25353   if test "x$ALL_JDKS_FOUND" != x; then
25354     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25355 
25356   if test "x$BOOT_JDK_FOUND" = xno; then
25357     # Now execute the test
25358 
25359         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25360         if test -d "$BOOT_JDK"; then
25361           BOOT_JDK_FOUND=maybe
25362           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25363 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25364         fi
25365 
25366 
25367     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25368     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25369       # Do we have a bin/java?
25370       if test ! -x "$BOOT_JDK/bin/java"; then
25371         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25372 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25373         BOOT_JDK_FOUND=no
25374       else
25375         # Do we have a bin/javac?
25376         if test ! -x "$BOOT_JDK/bin/javac"; then
25377           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25378 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25379           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25380 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25381           BOOT_JDK_FOUND=no
25382         else
25383           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25384           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25385 
25386           # Extra M4 quote needed to protect [] in grep expression.
25387           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25388           if test "x$FOUND_CORRECT_VERSION" = x; then
25389             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25390 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25391             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25392 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25393             BOOT_JDK_FOUND=no
25394           else
25395             # We're done! :-)
25396             BOOT_JDK_FOUND=yes
25397 
25398   # Only process if variable expands to non-empty
25399 
25400   if test "x$BOOT_JDK" != x; then
25401     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25402 
25403   # Input might be given as Windows format, start by converting to
25404   # unix format.
25405   path="$BOOT_JDK"
25406   new_path=`$CYGPATH -u "$path"`
25407 
25408   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25409   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25410   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25411   # "foo.exe" is OK but "foo" is an error.
25412   #
25413   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25414   # It is also a way to make sure we got the proper file name for the real test later on.
25415   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25416   if test "x$test_shortpath" = x; then
25417     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25418 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25419     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25420   fi
25421 
25422   # Call helper function which possibly converts this using DOS-style short mode.
25423   # If so, the updated path is stored in $new_path.
25424 
25425   input_path="$new_path"
25426   # Check if we need to convert this using DOS-style short mode. If the path
25427   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25428   # take no chances and rewrite it.
25429   # Note: m4 eats our [], so we need to use [ and ] instead.
25430   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25431   if test "x$has_forbidden_chars" != x; then
25432     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25433     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25434     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25435     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25436       # Going to short mode and back again did indeed matter. Since short mode is
25437       # case insensitive, let's make it lowercase to improve readability.
25438       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25439       # Now convert it back to Unix-style (cygpath)
25440       input_path=`$CYGPATH -u "$shortmode_path"`
25441       new_path="$input_path"
25442     fi
25443   fi
25444 
25445   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25446   if test "x$test_cygdrive_prefix" = x; then
25447     # As a simple fix, exclude /usr/bin since it's not a real path.
25448     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25449       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25450       # a path prefixed by /cygdrive for fixpath to work.
25451       new_path="$CYGWIN_ROOT_PATH$input_path"
25452     fi
25453   fi
25454 
25455 
25456   if test "x$path" != "x$new_path"; then
25457     BOOT_JDK="$new_path"
25458     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25459 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25460   fi
25461 
25462     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25463 
25464   path="$BOOT_JDK"
25465   has_colon=`$ECHO $path | $GREP ^.:`
25466   new_path="$path"
25467   if test "x$has_colon" = x; then
25468     # Not in mixed or Windows style, start by that.
25469     new_path=`cmd //c echo $path`
25470   fi
25471 
25472 
25473   input_path="$new_path"
25474   # Check if we need to convert this using DOS-style short mode. If the path
25475   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25476   # take no chances and rewrite it.
25477   # Note: m4 eats our [], so we need to use [ and ] instead.
25478   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25479   if test "x$has_forbidden_chars" != x; then
25480     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25481     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25482   fi
25483 
25484 
25485   windows_path="$new_path"
25486   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25487     unix_path=`$CYGPATH -u "$windows_path"`
25488     new_path="$unix_path"
25489   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25490     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25491     new_path="$unix_path"
25492   fi
25493 
25494   if test "x$path" != "x$new_path"; then
25495     BOOT_JDK="$new_path"
25496     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25497 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25498   fi
25499 
25500   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25501   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25502 
25503     else
25504       # We're on a unix platform. Hooray! :)
25505       path="$BOOT_JDK"
25506       has_space=`$ECHO "$path" | $GREP " "`
25507       if test "x$has_space" != x; then
25508         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25509 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25510         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25511       fi
25512 
25513       # Use eval to expand a potential ~
25514       eval path="$path"
25515       if test ! -f "$path" && test ! -d "$path"; then
25516         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25517       fi
25518 
25519       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25520     fi
25521   fi
25522 
25523             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25524 $as_echo_n "checking for Boot JDK... " >&6; }
25525             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25526 $as_echo "$BOOT_JDK" >&6; }
25527             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25528 $as_echo_n "checking Boot JDK version... " >&6; }
25529             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25530             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25531 $as_echo "$BOOT_JDK_VERSION" >&6; }
25532           fi # end check jdk version
25533         fi # end check javac
25534       fi # end check java
25535     fi # end check boot jdk found
25536   fi
25537 
25538     done
25539   fi
25540 
25541   fi
25542 
25543 
25544     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25545     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25546       # Do we have a bin/java?
25547       if test ! -x "$BOOT_JDK/bin/java"; then
25548         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25549 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25550         BOOT_JDK_FOUND=no
25551       else
25552         # Do we have a bin/javac?
25553         if test ! -x "$BOOT_JDK/bin/javac"; then
25554           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25555 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25556           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25557 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25558           BOOT_JDK_FOUND=no
25559         else
25560           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25561           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25562 
25563           # Extra M4 quote needed to protect [] in grep expression.
25564           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25565           if test "x$FOUND_CORRECT_VERSION" = x; then
25566             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25567 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25568             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25569 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25570             BOOT_JDK_FOUND=no
25571           else
25572             # We're done! :-)
25573             BOOT_JDK_FOUND=yes
25574 
25575   # Only process if variable expands to non-empty
25576 
25577   if test "x$BOOT_JDK" != x; then
25578     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25579 
25580   # Input might be given as Windows format, start by converting to
25581   # unix format.
25582   path="$BOOT_JDK"
25583   new_path=`$CYGPATH -u "$path"`
25584 
25585   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25586   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25587   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25588   # "foo.exe" is OK but "foo" is an error.
25589   #
25590   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25591   # It is also a way to make sure we got the proper file name for the real test later on.
25592   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25593   if test "x$test_shortpath" = x; then
25594     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25595 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25596     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25597   fi
25598 
25599   # Call helper function which possibly converts this using DOS-style short mode.
25600   # If so, the updated path is stored in $new_path.
25601 
25602   input_path="$new_path"
25603   # Check if we need to convert this using DOS-style short mode. If the path
25604   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25605   # take no chances and rewrite it.
25606   # Note: m4 eats our [], so we need to use [ and ] instead.
25607   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25608   if test "x$has_forbidden_chars" != x; then
25609     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25610     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25611     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25612     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25613       # Going to short mode and back again did indeed matter. Since short mode is
25614       # case insensitive, let's make it lowercase to improve readability.
25615       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25616       # Now convert it back to Unix-style (cygpath)
25617       input_path=`$CYGPATH -u "$shortmode_path"`
25618       new_path="$input_path"
25619     fi
25620   fi
25621 
25622   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25623   if test "x$test_cygdrive_prefix" = x; then
25624     # As a simple fix, exclude /usr/bin since it's not a real path.
25625     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25626       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25627       # a path prefixed by /cygdrive for fixpath to work.
25628       new_path="$CYGWIN_ROOT_PATH$input_path"
25629     fi
25630   fi
25631 
25632 
25633   if test "x$path" != "x$new_path"; then
25634     BOOT_JDK="$new_path"
25635     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25636 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25637   fi
25638 
25639     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25640 
25641   path="$BOOT_JDK"
25642   has_colon=`$ECHO $path | $GREP ^.:`
25643   new_path="$path"
25644   if test "x$has_colon" = x; then
25645     # Not in mixed or Windows style, start by that.
25646     new_path=`cmd //c echo $path`
25647   fi
25648 
25649 
25650   input_path="$new_path"
25651   # Check if we need to convert this using DOS-style short mode. If the path
25652   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25653   # take no chances and rewrite it.
25654   # Note: m4 eats our [], so we need to use [ and ] instead.
25655   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25656   if test "x$has_forbidden_chars" != x; then
25657     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25658     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25659   fi
25660 
25661 
25662   windows_path="$new_path"
25663   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25664     unix_path=`$CYGPATH -u "$windows_path"`
25665     new_path="$unix_path"
25666   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25667     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25668     new_path="$unix_path"
25669   fi
25670 
25671   if test "x$path" != "x$new_path"; then
25672     BOOT_JDK="$new_path"
25673     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25674 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25675   fi
25676 
25677   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25678   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25679 
25680     else
25681       # We're on a unix platform. Hooray! :)
25682       path="$BOOT_JDK"
25683       has_space=`$ECHO "$path" | $GREP " "`
25684       if test "x$has_space" != x; then
25685         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25686 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25687         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25688       fi
25689 
25690       # Use eval to expand a potential ~
25691       eval path="$path"
25692       if test ! -f "$path" && test ! -d "$path"; then
25693         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25694       fi
25695 
25696       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25697     fi
25698   fi
25699 
25700             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25701 $as_echo_n "checking for Boot JDK... " >&6; }
25702             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25703 $as_echo "$BOOT_JDK" >&6; }
25704             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25705 $as_echo_n "checking Boot JDK version... " >&6; }
25706             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25707             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25708 $as_echo "$BOOT_JDK_VERSION" >&6; }
25709           fi # end check jdk version
25710         fi # end check javac
25711       fi # end check java
25712     fi # end check boot jdk found
25713   fi
25714 
25715 
25716   if test "x$BOOT_JDK_FOUND" = xno; then
25717     # Now execute the test
25718 
25719   if test "x$PROGRAMFILES" != x; then
25720     VIRTUAL_DIR="$PROGRAMFILES/Java"
25721 
25722   windows_path="$VIRTUAL_DIR"
25723   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25724     unix_path=`$CYGPATH -u "$windows_path"`
25725     VIRTUAL_DIR="$unix_path"
25726   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25727     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25728     VIRTUAL_DIR="$unix_path"
25729   fi
25730 
25731 
25732   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25733   BOOT_JDK_SUFFIX=""
25734   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25735   if test "x$ALL_JDKS_FOUND" != x; then
25736     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25737 
25738   if test "x$BOOT_JDK_FOUND" = xno; then
25739     # Now execute the test
25740 
25741         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25742         if test -d "$BOOT_JDK"; then
25743           BOOT_JDK_FOUND=maybe
25744           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25745 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25746         fi
25747 
25748 
25749     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25750     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25751       # Do we have a bin/java?
25752       if test ! -x "$BOOT_JDK/bin/java"; then
25753         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25754 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25755         BOOT_JDK_FOUND=no
25756       else
25757         # Do we have a bin/javac?
25758         if test ! -x "$BOOT_JDK/bin/javac"; then
25759           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25760 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25761           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25762 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25763           BOOT_JDK_FOUND=no
25764         else
25765           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25766           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25767 
25768           # Extra M4 quote needed to protect [] in grep expression.
25769           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25770           if test "x$FOUND_CORRECT_VERSION" = x; then
25771             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25772 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25773             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25774 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25775             BOOT_JDK_FOUND=no
25776           else
25777             # We're done! :-)
25778             BOOT_JDK_FOUND=yes
25779 
25780   # Only process if variable expands to non-empty
25781 
25782   if test "x$BOOT_JDK" != x; then
25783     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25784 
25785   # Input might be given as Windows format, start by converting to
25786   # unix format.
25787   path="$BOOT_JDK"
25788   new_path=`$CYGPATH -u "$path"`
25789 
25790   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25791   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25792   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25793   # "foo.exe" is OK but "foo" is an error.
25794   #
25795   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25796   # It is also a way to make sure we got the proper file name for the real test later on.
25797   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25798   if test "x$test_shortpath" = x; then
25799     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25800 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25801     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25802   fi
25803 
25804   # Call helper function which possibly converts this using DOS-style short mode.
25805   # If so, the updated path is stored in $new_path.
25806 
25807   input_path="$new_path"
25808   # Check if we need to convert this using DOS-style short mode. If the path
25809   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25810   # take no chances and rewrite it.
25811   # Note: m4 eats our [], so we need to use [ and ] instead.
25812   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25813   if test "x$has_forbidden_chars" != x; then
25814     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25815     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25816     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25817     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25818       # Going to short mode and back again did indeed matter. Since short mode is
25819       # case insensitive, let's make it lowercase to improve readability.
25820       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25821       # Now convert it back to Unix-style (cygpath)
25822       input_path=`$CYGPATH -u "$shortmode_path"`
25823       new_path="$input_path"
25824     fi
25825   fi
25826 
25827   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25828   if test "x$test_cygdrive_prefix" = x; then
25829     # As a simple fix, exclude /usr/bin since it's not a real path.
25830     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25831       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25832       # a path prefixed by /cygdrive for fixpath to work.
25833       new_path="$CYGWIN_ROOT_PATH$input_path"
25834     fi
25835   fi
25836 
25837 
25838   if test "x$path" != "x$new_path"; then
25839     BOOT_JDK="$new_path"
25840     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25841 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25842   fi
25843 
25844     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25845 
25846   path="$BOOT_JDK"
25847   has_colon=`$ECHO $path | $GREP ^.:`
25848   new_path="$path"
25849   if test "x$has_colon" = x; then
25850     # Not in mixed or Windows style, start by that.
25851     new_path=`cmd //c echo $path`
25852   fi
25853 
25854 
25855   input_path="$new_path"
25856   # Check if we need to convert this using DOS-style short mode. If the path
25857   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25858   # take no chances and rewrite it.
25859   # Note: m4 eats our [], so we need to use [ and ] instead.
25860   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25861   if test "x$has_forbidden_chars" != x; then
25862     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25863     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25864   fi
25865 
25866 
25867   windows_path="$new_path"
25868   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25869     unix_path=`$CYGPATH -u "$windows_path"`
25870     new_path="$unix_path"
25871   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25872     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25873     new_path="$unix_path"
25874   fi
25875 
25876   if test "x$path" != "x$new_path"; then
25877     BOOT_JDK="$new_path"
25878     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25879 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25880   fi
25881 
25882   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25883   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25884 
25885     else
25886       # We're on a unix platform. Hooray! :)
25887       path="$BOOT_JDK"
25888       has_space=`$ECHO "$path" | $GREP " "`
25889       if test "x$has_space" != x; then
25890         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25891 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25892         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25893       fi
25894 
25895       # Use eval to expand a potential ~
25896       eval path="$path"
25897       if test ! -f "$path" && test ! -d "$path"; then
25898         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25899       fi
25900 
25901       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25902     fi
25903   fi
25904 
25905             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25906 $as_echo_n "checking for Boot JDK... " >&6; }
25907             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25908 $as_echo "$BOOT_JDK" >&6; }
25909             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25910 $as_echo_n "checking Boot JDK version... " >&6; }
25911             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25912             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25913 $as_echo "$BOOT_JDK_VERSION" >&6; }
25914           fi # end check jdk version
25915         fi # end check javac
25916       fi # end check java
25917     fi # end check boot jdk found
25918   fi
25919 
25920     done
25921   fi
25922 
25923   fi
25924 
25925 
25926     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25927     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25928       # Do we have a bin/java?
25929       if test ! -x "$BOOT_JDK/bin/java"; then
25930         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25931 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25932         BOOT_JDK_FOUND=no
25933       else
25934         # Do we have a bin/javac?
25935         if test ! -x "$BOOT_JDK/bin/javac"; then
25936           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25937 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25938           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25939 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25940           BOOT_JDK_FOUND=no
25941         else
25942           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25943           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25944 
25945           # Extra M4 quote needed to protect [] in grep expression.
25946           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25947           if test "x$FOUND_CORRECT_VERSION" = x; then
25948             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25949 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25950             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25951 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25952             BOOT_JDK_FOUND=no
25953           else
25954             # We're done! :-)
25955             BOOT_JDK_FOUND=yes
25956 
25957   # Only process if variable expands to non-empty
25958 
25959   if test "x$BOOT_JDK" != x; then
25960     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25961 
25962   # Input might be given as Windows format, start by converting to
25963   # unix format.
25964   path="$BOOT_JDK"
25965   new_path=`$CYGPATH -u "$path"`
25966 
25967   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25968   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25969   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25970   # "foo.exe" is OK but "foo" is an error.
25971   #
25972   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25973   # It is also a way to make sure we got the proper file name for the real test later on.
25974   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25975   if test "x$test_shortpath" = x; then
25976     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25977 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25978     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25979   fi
25980 
25981   # Call helper function which possibly converts this using DOS-style short mode.
25982   # If so, the updated path is stored in $new_path.
25983 
25984   input_path="$new_path"
25985   # Check if we need to convert this using DOS-style short mode. If the path
25986   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25987   # take no chances and rewrite it.
25988   # Note: m4 eats our [], so we need to use [ and ] instead.
25989   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25990   if test "x$has_forbidden_chars" != x; then
25991     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25992     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25993     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25994     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25995       # Going to short mode and back again did indeed matter. Since short mode is
25996       # case insensitive, let's make it lowercase to improve readability.
25997       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25998       # Now convert it back to Unix-style (cygpath)
25999       input_path=`$CYGPATH -u "$shortmode_path"`
26000       new_path="$input_path"
26001     fi
26002   fi
26003 
26004   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26005   if test "x$test_cygdrive_prefix" = x; then
26006     # As a simple fix, exclude /usr/bin since it's not a real path.
26007     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26008       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26009       # a path prefixed by /cygdrive for fixpath to work.
26010       new_path="$CYGWIN_ROOT_PATH$input_path"
26011     fi
26012   fi
26013 
26014 
26015   if test "x$path" != "x$new_path"; then
26016     BOOT_JDK="$new_path"
26017     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26018 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26019   fi
26020 
26021     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26022 
26023   path="$BOOT_JDK"
26024   has_colon=`$ECHO $path | $GREP ^.:`
26025   new_path="$path"
26026   if test "x$has_colon" = x; then
26027     # Not in mixed or Windows style, start by that.
26028     new_path=`cmd //c echo $path`
26029   fi
26030 
26031 
26032   input_path="$new_path"
26033   # Check if we need to convert this using DOS-style short mode. If the path
26034   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26035   # take no chances and rewrite it.
26036   # Note: m4 eats our [], so we need to use [ and ] instead.
26037   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26038   if test "x$has_forbidden_chars" != x; then
26039     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26040     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26041   fi
26042 
26043 
26044   windows_path="$new_path"
26045   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26046     unix_path=`$CYGPATH -u "$windows_path"`
26047     new_path="$unix_path"
26048   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26049     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26050     new_path="$unix_path"
26051   fi
26052 
26053   if test "x$path" != "x$new_path"; then
26054     BOOT_JDK="$new_path"
26055     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26056 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26057   fi
26058 
26059   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26060   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26061 
26062     else
26063       # We're on a unix platform. Hooray! :)
26064       path="$BOOT_JDK"
26065       has_space=`$ECHO "$path" | $GREP " "`
26066       if test "x$has_space" != x; then
26067         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26068 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26069         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26070       fi
26071 
26072       # Use eval to expand a potential ~
26073       eval path="$path"
26074       if test ! -f "$path" && test ! -d "$path"; then
26075         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26076       fi
26077 
26078       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26079     fi
26080   fi
26081 
26082             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26083 $as_echo_n "checking for Boot JDK... " >&6; }
26084             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26085 $as_echo "$BOOT_JDK" >&6; }
26086             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26087 $as_echo_n "checking Boot JDK version... " >&6; }
26088             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26089             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26090 $as_echo "$BOOT_JDK_VERSION" >&6; }
26091           fi # end check jdk version
26092         fi # end check javac
26093       fi # end check java
26094     fi # end check boot jdk found
26095   fi
26096 
26097 
26098   if test "x$BOOT_JDK_FOUND" = xno; then
26099     # Now execute the test
26100 
26101   if test "x$ProgramFiles" != x; then
26102     VIRTUAL_DIR="$ProgramFiles/Java"
26103 
26104   windows_path="$VIRTUAL_DIR"
26105   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26106     unix_path=`$CYGPATH -u "$windows_path"`
26107     VIRTUAL_DIR="$unix_path"
26108   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26109     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26110     VIRTUAL_DIR="$unix_path"
26111   fi
26112 
26113 
26114   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26115   BOOT_JDK_SUFFIX=""
26116   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26117   if test "x$ALL_JDKS_FOUND" != x; then
26118     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26119 
26120   if test "x$BOOT_JDK_FOUND" = xno; then
26121     # Now execute the test
26122 
26123         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26124         if test -d "$BOOT_JDK"; then
26125           BOOT_JDK_FOUND=maybe
26126           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26127 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26128         fi
26129 
26130 
26131     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26132     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26133       # Do we have a bin/java?
26134       if test ! -x "$BOOT_JDK/bin/java"; then
26135         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26136 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26137         BOOT_JDK_FOUND=no
26138       else
26139         # Do we have a bin/javac?
26140         if test ! -x "$BOOT_JDK/bin/javac"; then
26141           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26142 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26143           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26144 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26145           BOOT_JDK_FOUND=no
26146         else
26147           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26148           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26149 
26150           # Extra M4 quote needed to protect [] in grep expression.
26151           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26152           if test "x$FOUND_CORRECT_VERSION" = x; then
26153             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26154 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26155             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26156 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26157             BOOT_JDK_FOUND=no
26158           else
26159             # We're done! :-)
26160             BOOT_JDK_FOUND=yes
26161 
26162   # Only process if variable expands to non-empty
26163 
26164   if test "x$BOOT_JDK" != x; then
26165     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26166 
26167   # Input might be given as Windows format, start by converting to
26168   # unix format.
26169   path="$BOOT_JDK"
26170   new_path=`$CYGPATH -u "$path"`
26171 
26172   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26173   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26174   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26175   # "foo.exe" is OK but "foo" is an error.
26176   #
26177   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26178   # It is also a way to make sure we got the proper file name for the real test later on.
26179   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26180   if test "x$test_shortpath" = x; then
26181     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26182 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26183     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26184   fi
26185 
26186   # Call helper function which possibly converts this using DOS-style short mode.
26187   # If so, the updated path is stored in $new_path.
26188 
26189   input_path="$new_path"
26190   # Check if we need to convert this using DOS-style short mode. If the path
26191   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26192   # take no chances and rewrite it.
26193   # Note: m4 eats our [], so we need to use [ and ] instead.
26194   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26195   if test "x$has_forbidden_chars" != x; then
26196     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26197     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26198     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26199     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26200       # Going to short mode and back again did indeed matter. Since short mode is
26201       # case insensitive, let's make it lowercase to improve readability.
26202       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26203       # Now convert it back to Unix-style (cygpath)
26204       input_path=`$CYGPATH -u "$shortmode_path"`
26205       new_path="$input_path"
26206     fi
26207   fi
26208 
26209   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26210   if test "x$test_cygdrive_prefix" = x; then
26211     # As a simple fix, exclude /usr/bin since it's not a real path.
26212     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26213       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26214       # a path prefixed by /cygdrive for fixpath to work.
26215       new_path="$CYGWIN_ROOT_PATH$input_path"
26216     fi
26217   fi
26218 
26219 
26220   if test "x$path" != "x$new_path"; then
26221     BOOT_JDK="$new_path"
26222     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26223 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26224   fi
26225 
26226     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26227 
26228   path="$BOOT_JDK"
26229   has_colon=`$ECHO $path | $GREP ^.:`
26230   new_path="$path"
26231   if test "x$has_colon" = x; then
26232     # Not in mixed or Windows style, start by that.
26233     new_path=`cmd //c echo $path`
26234   fi
26235 
26236 
26237   input_path="$new_path"
26238   # Check if we need to convert this using DOS-style short mode. If the path
26239   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26240   # take no chances and rewrite it.
26241   # Note: m4 eats our [], so we need to use [ and ] instead.
26242   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26243   if test "x$has_forbidden_chars" != x; then
26244     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26245     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26246   fi
26247 
26248 
26249   windows_path="$new_path"
26250   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26251     unix_path=`$CYGPATH -u "$windows_path"`
26252     new_path="$unix_path"
26253   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26254     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26255     new_path="$unix_path"
26256   fi
26257 
26258   if test "x$path" != "x$new_path"; then
26259     BOOT_JDK="$new_path"
26260     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26261 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26262   fi
26263 
26264   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26265   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26266 
26267     else
26268       # We're on a unix platform. Hooray! :)
26269       path="$BOOT_JDK"
26270       has_space=`$ECHO "$path" | $GREP " "`
26271       if test "x$has_space" != x; then
26272         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26273 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26274         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26275       fi
26276 
26277       # Use eval to expand a potential ~
26278       eval path="$path"
26279       if test ! -f "$path" && test ! -d "$path"; then
26280         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26281       fi
26282 
26283       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26284     fi
26285   fi
26286 
26287             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26288 $as_echo_n "checking for Boot JDK... " >&6; }
26289             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26290 $as_echo "$BOOT_JDK" >&6; }
26291             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26292 $as_echo_n "checking Boot JDK version... " >&6; }
26293             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26294             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26295 $as_echo "$BOOT_JDK_VERSION" >&6; }
26296           fi # end check jdk version
26297         fi # end check javac
26298       fi # end check java
26299     fi # end check boot jdk found
26300   fi
26301 
26302     done
26303   fi
26304 
26305   fi
26306 
26307 
26308     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26309     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26310       # Do we have a bin/java?
26311       if test ! -x "$BOOT_JDK/bin/java"; then
26312         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26313 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26314         BOOT_JDK_FOUND=no
26315       else
26316         # Do we have a bin/javac?
26317         if test ! -x "$BOOT_JDK/bin/javac"; then
26318           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26319 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26320           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26321 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26322           BOOT_JDK_FOUND=no
26323         else
26324           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26325           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26326 
26327           # Extra M4 quote needed to protect [] in grep expression.
26328           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26329           if test "x$FOUND_CORRECT_VERSION" = x; then
26330             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26331 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26332             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26333 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26334             BOOT_JDK_FOUND=no
26335           else
26336             # We're done! :-)
26337             BOOT_JDK_FOUND=yes
26338 
26339   # Only process if variable expands to non-empty
26340 
26341   if test "x$BOOT_JDK" != x; then
26342     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26343 
26344   # Input might be given as Windows format, start by converting to
26345   # unix format.
26346   path="$BOOT_JDK"
26347   new_path=`$CYGPATH -u "$path"`
26348 
26349   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26350   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26351   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26352   # "foo.exe" is OK but "foo" is an error.
26353   #
26354   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26355   # It is also a way to make sure we got the proper file name for the real test later on.
26356   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26357   if test "x$test_shortpath" = x; then
26358     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26359 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26360     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26361   fi
26362 
26363   # Call helper function which possibly converts this using DOS-style short mode.
26364   # If so, the updated path is stored in $new_path.
26365 
26366   input_path="$new_path"
26367   # Check if we need to convert this using DOS-style short mode. If the path
26368   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26369   # take no chances and rewrite it.
26370   # Note: m4 eats our [], so we need to use [ and ] instead.
26371   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26372   if test "x$has_forbidden_chars" != x; then
26373     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26374     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26375     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26376     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26377       # Going to short mode and back again did indeed matter. Since short mode is
26378       # case insensitive, let's make it lowercase to improve readability.
26379       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26380       # Now convert it back to Unix-style (cygpath)
26381       input_path=`$CYGPATH -u "$shortmode_path"`
26382       new_path="$input_path"
26383     fi
26384   fi
26385 
26386   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26387   if test "x$test_cygdrive_prefix" = x; then
26388     # As a simple fix, exclude /usr/bin since it's not a real path.
26389     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26390       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26391       # a path prefixed by /cygdrive for fixpath to work.
26392       new_path="$CYGWIN_ROOT_PATH$input_path"
26393     fi
26394   fi
26395 
26396 
26397   if test "x$path" != "x$new_path"; then
26398     BOOT_JDK="$new_path"
26399     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26400 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26401   fi
26402 
26403     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26404 
26405   path="$BOOT_JDK"
26406   has_colon=`$ECHO $path | $GREP ^.:`
26407   new_path="$path"
26408   if test "x$has_colon" = x; then
26409     # Not in mixed or Windows style, start by that.
26410     new_path=`cmd //c echo $path`
26411   fi
26412 
26413 
26414   input_path="$new_path"
26415   # Check if we need to convert this using DOS-style short mode. If the path
26416   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26417   # take no chances and rewrite it.
26418   # Note: m4 eats our [], so we need to use [ and ] instead.
26419   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26420   if test "x$has_forbidden_chars" != x; then
26421     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26422     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26423   fi
26424 
26425 
26426   windows_path="$new_path"
26427   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26428     unix_path=`$CYGPATH -u "$windows_path"`
26429     new_path="$unix_path"
26430   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26431     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26432     new_path="$unix_path"
26433   fi
26434 
26435   if test "x$path" != "x$new_path"; then
26436     BOOT_JDK="$new_path"
26437     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26438 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26439   fi
26440 
26441   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26442   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26443 
26444     else
26445       # We're on a unix platform. Hooray! :)
26446       path="$BOOT_JDK"
26447       has_space=`$ECHO "$path" | $GREP " "`
26448       if test "x$has_space" != x; then
26449         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26450 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26451         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26452       fi
26453 
26454       # Use eval to expand a potential ~
26455       eval path="$path"
26456       if test ! -f "$path" && test ! -d "$path"; then
26457         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26458       fi
26459 
26460       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26461     fi
26462   fi
26463 
26464             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26465 $as_echo_n "checking for Boot JDK... " >&6; }
26466             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26467 $as_echo "$BOOT_JDK" >&6; }
26468             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26469 $as_echo_n "checking Boot JDK version... " >&6; }
26470             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26471             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26472 $as_echo "$BOOT_JDK_VERSION" >&6; }
26473           fi # end check jdk version
26474         fi # end check javac
26475       fi # end check java
26476     fi # end check boot jdk found
26477   fi
26478 
26479 
26480   if test "x$BOOT_JDK_FOUND" = xno; then
26481     # Now execute the test
26482 
26483   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
26484   BOOT_JDK_SUFFIX=""
26485   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26486   if test "x$ALL_JDKS_FOUND" != x; then
26487     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26488 
26489   if test "x$BOOT_JDK_FOUND" = xno; then
26490     # Now execute the test
26491 
26492         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26493         if test -d "$BOOT_JDK"; then
26494           BOOT_JDK_FOUND=maybe
26495           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26496 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26497         fi
26498 
26499 
26500     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26501     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26502       # Do we have a bin/java?
26503       if test ! -x "$BOOT_JDK/bin/java"; then
26504         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26505 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26506         BOOT_JDK_FOUND=no
26507       else
26508         # Do we have a bin/javac?
26509         if test ! -x "$BOOT_JDK/bin/javac"; then
26510           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26511 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26512           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26513 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26514           BOOT_JDK_FOUND=no
26515         else
26516           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26517           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26518 
26519           # Extra M4 quote needed to protect [] in grep expression.
26520           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26521           if test "x$FOUND_CORRECT_VERSION" = x; then
26522             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26523 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26524             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26525 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26526             BOOT_JDK_FOUND=no
26527           else
26528             # We're done! :-)
26529             BOOT_JDK_FOUND=yes
26530 
26531   # Only process if variable expands to non-empty
26532 
26533   if test "x$BOOT_JDK" != x; then
26534     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26535 
26536   # Input might be given as Windows format, start by converting to
26537   # unix format.
26538   path="$BOOT_JDK"
26539   new_path=`$CYGPATH -u "$path"`
26540 
26541   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26542   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26543   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26544   # "foo.exe" is OK but "foo" is an error.
26545   #
26546   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26547   # It is also a way to make sure we got the proper file name for the real test later on.
26548   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26549   if test "x$test_shortpath" = x; then
26550     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26551 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26552     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26553   fi
26554 
26555   # Call helper function which possibly converts this using DOS-style short mode.
26556   # If so, the updated path is stored in $new_path.
26557 
26558   input_path="$new_path"
26559   # Check if we need to convert this using DOS-style short mode. If the path
26560   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26561   # take no chances and rewrite it.
26562   # Note: m4 eats our [], so we need to use [ and ] instead.
26563   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26564   if test "x$has_forbidden_chars" != x; then
26565     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26566     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26567     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26568     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26569       # Going to short mode and back again did indeed matter. Since short mode is
26570       # case insensitive, let's make it lowercase to improve readability.
26571       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26572       # Now convert it back to Unix-style (cygpath)
26573       input_path=`$CYGPATH -u "$shortmode_path"`
26574       new_path="$input_path"
26575     fi
26576   fi
26577 
26578   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26579   if test "x$test_cygdrive_prefix" = x; then
26580     # As a simple fix, exclude /usr/bin since it's not a real path.
26581     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26582       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26583       # a path prefixed by /cygdrive for fixpath to work.
26584       new_path="$CYGWIN_ROOT_PATH$input_path"
26585     fi
26586   fi
26587 
26588 
26589   if test "x$path" != "x$new_path"; then
26590     BOOT_JDK="$new_path"
26591     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26592 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26593   fi
26594 
26595     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26596 
26597   path="$BOOT_JDK"
26598   has_colon=`$ECHO $path | $GREP ^.:`
26599   new_path="$path"
26600   if test "x$has_colon" = x; then
26601     # Not in mixed or Windows style, start by that.
26602     new_path=`cmd //c echo $path`
26603   fi
26604 
26605 
26606   input_path="$new_path"
26607   # Check if we need to convert this using DOS-style short mode. If the path
26608   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26609   # take no chances and rewrite it.
26610   # Note: m4 eats our [], so we need to use [ and ] instead.
26611   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26612   if test "x$has_forbidden_chars" != x; then
26613     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26614     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26615   fi
26616 
26617 
26618   windows_path="$new_path"
26619   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26620     unix_path=`$CYGPATH -u "$windows_path"`
26621     new_path="$unix_path"
26622   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26623     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26624     new_path="$unix_path"
26625   fi
26626 
26627   if test "x$path" != "x$new_path"; then
26628     BOOT_JDK="$new_path"
26629     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26630 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26631   fi
26632 
26633   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26634   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26635 
26636     else
26637       # We're on a unix platform. Hooray! :)
26638       path="$BOOT_JDK"
26639       has_space=`$ECHO "$path" | $GREP " "`
26640       if test "x$has_space" != x; then
26641         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26642 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26643         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26644       fi
26645 
26646       # Use eval to expand a potential ~
26647       eval path="$path"
26648       if test ! -f "$path" && test ! -d "$path"; then
26649         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26650       fi
26651 
26652       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26653     fi
26654   fi
26655 
26656             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26657 $as_echo_n "checking for Boot JDK... " >&6; }
26658             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26659 $as_echo "$BOOT_JDK" >&6; }
26660             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26661 $as_echo_n "checking Boot JDK version... " >&6; }
26662             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26663             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26664 $as_echo "$BOOT_JDK_VERSION" >&6; }
26665           fi # end check jdk version
26666         fi # end check javac
26667       fi # end check java
26668     fi # end check boot jdk found
26669   fi
26670 
26671     done
26672   fi
26673 
26674 
26675     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26676     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26677       # Do we have a bin/java?
26678       if test ! -x "$BOOT_JDK/bin/java"; then
26679         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26680 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26681         BOOT_JDK_FOUND=no
26682       else
26683         # Do we have a bin/javac?
26684         if test ! -x "$BOOT_JDK/bin/javac"; then
26685           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26686 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26687           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26688 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26689           BOOT_JDK_FOUND=no
26690         else
26691           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26692           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26693 
26694           # Extra M4 quote needed to protect [] in grep expression.
26695           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26696           if test "x$FOUND_CORRECT_VERSION" = x; then
26697             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26698 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26699             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26700 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26701             BOOT_JDK_FOUND=no
26702           else
26703             # We're done! :-)
26704             BOOT_JDK_FOUND=yes
26705 
26706   # Only process if variable expands to non-empty
26707 
26708   if test "x$BOOT_JDK" != x; then
26709     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26710 
26711   # Input might be given as Windows format, start by converting to
26712   # unix format.
26713   path="$BOOT_JDK"
26714   new_path=`$CYGPATH -u "$path"`
26715 
26716   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26717   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26718   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26719   # "foo.exe" is OK but "foo" is an error.
26720   #
26721   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26722   # It is also a way to make sure we got the proper file name for the real test later on.
26723   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26724   if test "x$test_shortpath" = x; then
26725     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26726 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26727     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26728   fi
26729 
26730   # Call helper function which possibly converts this using DOS-style short mode.
26731   # If so, the updated path is stored in $new_path.
26732 
26733   input_path="$new_path"
26734   # Check if we need to convert this using DOS-style short mode. If the path
26735   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26736   # take no chances and rewrite it.
26737   # Note: m4 eats our [], so we need to use [ and ] instead.
26738   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26739   if test "x$has_forbidden_chars" != x; then
26740     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26741     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26742     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26743     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26744       # Going to short mode and back again did indeed matter. Since short mode is
26745       # case insensitive, let's make it lowercase to improve readability.
26746       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26747       # Now convert it back to Unix-style (cygpath)
26748       input_path=`$CYGPATH -u "$shortmode_path"`
26749       new_path="$input_path"
26750     fi
26751   fi
26752 
26753   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26754   if test "x$test_cygdrive_prefix" = x; then
26755     # As a simple fix, exclude /usr/bin since it's not a real path.
26756     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26757       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26758       # a path prefixed by /cygdrive for fixpath to work.
26759       new_path="$CYGWIN_ROOT_PATH$input_path"
26760     fi
26761   fi
26762 
26763 
26764   if test "x$path" != "x$new_path"; then
26765     BOOT_JDK="$new_path"
26766     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26767 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26768   fi
26769 
26770     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26771 
26772   path="$BOOT_JDK"
26773   has_colon=`$ECHO $path | $GREP ^.:`
26774   new_path="$path"
26775   if test "x$has_colon" = x; then
26776     # Not in mixed or Windows style, start by that.
26777     new_path=`cmd //c echo $path`
26778   fi
26779 
26780 
26781   input_path="$new_path"
26782   # Check if we need to convert this using DOS-style short mode. If the path
26783   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26784   # take no chances and rewrite it.
26785   # Note: m4 eats our [], so we need to use [ and ] instead.
26786   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26787   if test "x$has_forbidden_chars" != x; then
26788     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26789     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26790   fi
26791 
26792 
26793   windows_path="$new_path"
26794   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26795     unix_path=`$CYGPATH -u "$windows_path"`
26796     new_path="$unix_path"
26797   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26798     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26799     new_path="$unix_path"
26800   fi
26801 
26802   if test "x$path" != "x$new_path"; then
26803     BOOT_JDK="$new_path"
26804     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26805 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26806   fi
26807 
26808   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26809   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26810 
26811     else
26812       # We're on a unix platform. Hooray! :)
26813       path="$BOOT_JDK"
26814       has_space=`$ECHO "$path" | $GREP " "`
26815       if test "x$has_space" != x; then
26816         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26817 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26818         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26819       fi
26820 
26821       # Use eval to expand a potential ~
26822       eval path="$path"
26823       if test ! -f "$path" && test ! -d "$path"; then
26824         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26825       fi
26826 
26827       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26828     fi
26829   fi
26830 
26831             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26832 $as_echo_n "checking for Boot JDK... " >&6; }
26833             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26834 $as_echo "$BOOT_JDK" >&6; }
26835             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26836 $as_echo_n "checking Boot JDK version... " >&6; }
26837             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26838             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26839 $as_echo "$BOOT_JDK_VERSION" >&6; }
26840           fi # end check jdk version
26841         fi # end check javac
26842       fi # end check java
26843     fi # end check boot jdk found
26844   fi
26845 
26846   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
26847 
26848   if test "x$BOOT_JDK_FOUND" = xno; then
26849     # Now execute the test
26850 
26851   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
26852   BOOT_JDK_SUFFIX="/Contents/Home"
26853   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26854   if test "x$ALL_JDKS_FOUND" != x; then
26855     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26856 
26857   if test "x$BOOT_JDK_FOUND" = xno; then
26858     # Now execute the test
26859 
26860         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26861         if test -d "$BOOT_JDK"; then
26862           BOOT_JDK_FOUND=maybe
26863           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26864 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26865         fi
26866 
26867 
26868     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26869     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26870       # Do we have a bin/java?
26871       if test ! -x "$BOOT_JDK/bin/java"; then
26872         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26873 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26874         BOOT_JDK_FOUND=no
26875       else
26876         # Do we have a bin/javac?
26877         if test ! -x "$BOOT_JDK/bin/javac"; then
26878           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26879 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26880           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26881 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26882           BOOT_JDK_FOUND=no
26883         else
26884           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26885           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26886 
26887           # Extra M4 quote needed to protect [] in grep expression.
26888           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26889           if test "x$FOUND_CORRECT_VERSION" = x; then
26890             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26891 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26892             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26893 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26894             BOOT_JDK_FOUND=no
26895           else
26896             # We're done! :-)
26897             BOOT_JDK_FOUND=yes
26898 
26899   # Only process if variable expands to non-empty
26900 
26901   if test "x$BOOT_JDK" != x; then
26902     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26903 
26904   # Input might be given as Windows format, start by converting to
26905   # unix format.
26906   path="$BOOT_JDK"
26907   new_path=`$CYGPATH -u "$path"`
26908 
26909   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26910   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26911   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26912   # "foo.exe" is OK but "foo" is an error.
26913   #
26914   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26915   # It is also a way to make sure we got the proper file name for the real test later on.
26916   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26917   if test "x$test_shortpath" = x; then
26918     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26919 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26920     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26921   fi
26922 
26923   # Call helper function which possibly converts this using DOS-style short mode.
26924   # If so, the updated path is stored in $new_path.
26925 
26926   input_path="$new_path"
26927   # Check if we need to convert this using DOS-style short mode. If the path
26928   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26929   # take no chances and rewrite it.
26930   # Note: m4 eats our [], so we need to use [ and ] instead.
26931   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26932   if test "x$has_forbidden_chars" != x; then
26933     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26934     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26935     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26936     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26937       # Going to short mode and back again did indeed matter. Since short mode is
26938       # case insensitive, let's make it lowercase to improve readability.
26939       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26940       # Now convert it back to Unix-style (cygpath)
26941       input_path=`$CYGPATH -u "$shortmode_path"`
26942       new_path="$input_path"
26943     fi
26944   fi
26945 
26946   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26947   if test "x$test_cygdrive_prefix" = x; then
26948     # As a simple fix, exclude /usr/bin since it's not a real path.
26949     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26950       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26951       # a path prefixed by /cygdrive for fixpath to work.
26952       new_path="$CYGWIN_ROOT_PATH$input_path"
26953     fi
26954   fi
26955 
26956 
26957   if test "x$path" != "x$new_path"; then
26958     BOOT_JDK="$new_path"
26959     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26960 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26961   fi
26962 
26963     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26964 
26965   path="$BOOT_JDK"
26966   has_colon=`$ECHO $path | $GREP ^.:`
26967   new_path="$path"
26968   if test "x$has_colon" = x; then
26969     # Not in mixed or Windows style, start by that.
26970     new_path=`cmd //c echo $path`
26971   fi
26972 
26973 
26974   input_path="$new_path"
26975   # Check if we need to convert this using DOS-style short mode. If the path
26976   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26977   # take no chances and rewrite it.
26978   # Note: m4 eats our [], so we need to use [ and ] instead.
26979   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26980   if test "x$has_forbidden_chars" != x; then
26981     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26982     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26983   fi
26984 
26985 
26986   windows_path="$new_path"
26987   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26988     unix_path=`$CYGPATH -u "$windows_path"`
26989     new_path="$unix_path"
26990   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26991     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26992     new_path="$unix_path"
26993   fi
26994 
26995   if test "x$path" != "x$new_path"; then
26996     BOOT_JDK="$new_path"
26997     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26998 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26999   fi
27000 
27001   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27002   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27003 
27004     else
27005       # We're on a unix platform. Hooray! :)
27006       path="$BOOT_JDK"
27007       has_space=`$ECHO "$path" | $GREP " "`
27008       if test "x$has_space" != x; then
27009         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27010 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27011         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27012       fi
27013 
27014       # Use eval to expand a potential ~
27015       eval path="$path"
27016       if test ! -f "$path" && test ! -d "$path"; then
27017         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27018       fi
27019 
27020       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27021     fi
27022   fi
27023 
27024             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27025 $as_echo_n "checking for Boot JDK... " >&6; }
27026             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27027 $as_echo "$BOOT_JDK" >&6; }
27028             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27029 $as_echo_n "checking Boot JDK version... " >&6; }
27030             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27031             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27032 $as_echo "$BOOT_JDK_VERSION" >&6; }
27033           fi # end check jdk version
27034         fi # end check javac
27035       fi # end check java
27036     fi # end check boot jdk found
27037   fi
27038 
27039     done
27040   fi
27041 
27042 
27043     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27044     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27045       # Do we have a bin/java?
27046       if test ! -x "$BOOT_JDK/bin/java"; then
27047         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27048 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27049         BOOT_JDK_FOUND=no
27050       else
27051         # Do we have a bin/javac?
27052         if test ! -x "$BOOT_JDK/bin/javac"; then
27053           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27054 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27055           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27056 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27057           BOOT_JDK_FOUND=no
27058         else
27059           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27060           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27061 
27062           # Extra M4 quote needed to protect [] in grep expression.
27063           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27064           if test "x$FOUND_CORRECT_VERSION" = x; then
27065             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27066 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27067             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27068 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27069             BOOT_JDK_FOUND=no
27070           else
27071             # We're done! :-)
27072             BOOT_JDK_FOUND=yes
27073 
27074   # Only process if variable expands to non-empty
27075 
27076   if test "x$BOOT_JDK" != x; then
27077     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27078 
27079   # Input might be given as Windows format, start by converting to
27080   # unix format.
27081   path="$BOOT_JDK"
27082   new_path=`$CYGPATH -u "$path"`
27083 
27084   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27085   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27086   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27087   # "foo.exe" is OK but "foo" is an error.
27088   #
27089   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27090   # It is also a way to make sure we got the proper file name for the real test later on.
27091   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27092   if test "x$test_shortpath" = x; then
27093     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27094 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27095     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27096   fi
27097 
27098   # Call helper function which possibly converts this using DOS-style short mode.
27099   # If so, the updated path is stored in $new_path.
27100 
27101   input_path="$new_path"
27102   # Check if we need to convert this using DOS-style short mode. If the path
27103   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27104   # take no chances and rewrite it.
27105   # Note: m4 eats our [], so we need to use [ and ] instead.
27106   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27107   if test "x$has_forbidden_chars" != x; then
27108     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27109     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27110     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27111     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27112       # Going to short mode and back again did indeed matter. Since short mode is
27113       # case insensitive, let's make it lowercase to improve readability.
27114       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27115       # Now convert it back to Unix-style (cygpath)
27116       input_path=`$CYGPATH -u "$shortmode_path"`
27117       new_path="$input_path"
27118     fi
27119   fi
27120 
27121   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27122   if test "x$test_cygdrive_prefix" = x; then
27123     # As a simple fix, exclude /usr/bin since it's not a real path.
27124     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27125       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27126       # a path prefixed by /cygdrive for fixpath to work.
27127       new_path="$CYGWIN_ROOT_PATH$input_path"
27128     fi
27129   fi
27130 
27131 
27132   if test "x$path" != "x$new_path"; then
27133     BOOT_JDK="$new_path"
27134     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27135 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27136   fi
27137 
27138     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27139 
27140   path="$BOOT_JDK"
27141   has_colon=`$ECHO $path | $GREP ^.:`
27142   new_path="$path"
27143   if test "x$has_colon" = x; then
27144     # Not in mixed or Windows style, start by that.
27145     new_path=`cmd //c echo $path`
27146   fi
27147 
27148 
27149   input_path="$new_path"
27150   # Check if we need to convert this using DOS-style short mode. If the path
27151   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27152   # take no chances and rewrite it.
27153   # Note: m4 eats our [], so we need to use [ and ] instead.
27154   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27155   if test "x$has_forbidden_chars" != x; then
27156     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27157     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27158   fi
27159 
27160 
27161   windows_path="$new_path"
27162   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27163     unix_path=`$CYGPATH -u "$windows_path"`
27164     new_path="$unix_path"
27165   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27166     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27167     new_path="$unix_path"
27168   fi
27169 
27170   if test "x$path" != "x$new_path"; then
27171     BOOT_JDK="$new_path"
27172     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27173 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27174   fi
27175 
27176   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27177   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27178 
27179     else
27180       # We're on a unix platform. Hooray! :)
27181       path="$BOOT_JDK"
27182       has_space=`$ECHO "$path" | $GREP " "`
27183       if test "x$has_space" != x; then
27184         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27185 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27186         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27187       fi
27188 
27189       # Use eval to expand a potential ~
27190       eval path="$path"
27191       if test ! -f "$path" && test ! -d "$path"; then
27192         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27193       fi
27194 
27195       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27196     fi
27197   fi
27198 
27199             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27200 $as_echo_n "checking for Boot JDK... " >&6; }
27201             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27202 $as_echo "$BOOT_JDK" >&6; }
27203             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27204 $as_echo_n "checking Boot JDK version... " >&6; }
27205             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27206             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27207 $as_echo "$BOOT_JDK_VERSION" >&6; }
27208           fi # end check jdk version
27209         fi # end check javac
27210       fi # end check java
27211     fi # end check boot jdk found
27212   fi
27213 
27214 
27215   if test "x$BOOT_JDK_FOUND" = xno; then
27216     # Now execute the test
27217 
27218   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27219   BOOT_JDK_SUFFIX="/Contents/Home"
27220   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27221   if test "x$ALL_JDKS_FOUND" != x; then
27222     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27223 
27224   if test "x$BOOT_JDK_FOUND" = xno; then
27225     # Now execute the test
27226 
27227         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27228         if test -d "$BOOT_JDK"; then
27229           BOOT_JDK_FOUND=maybe
27230           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27231 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27232         fi
27233 
27234 
27235     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27236     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27237       # Do we have a bin/java?
27238       if test ! -x "$BOOT_JDK/bin/java"; then
27239         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27240 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27241         BOOT_JDK_FOUND=no
27242       else
27243         # Do we have a bin/javac?
27244         if test ! -x "$BOOT_JDK/bin/javac"; then
27245           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27246 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27247           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27248 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27249           BOOT_JDK_FOUND=no
27250         else
27251           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27252           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27253 
27254           # Extra M4 quote needed to protect [] in grep expression.
27255           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27256           if test "x$FOUND_CORRECT_VERSION" = x; then
27257             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27258 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27259             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27260 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27261             BOOT_JDK_FOUND=no
27262           else
27263             # We're done! :-)
27264             BOOT_JDK_FOUND=yes
27265 
27266   # Only process if variable expands to non-empty
27267 
27268   if test "x$BOOT_JDK" != x; then
27269     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27270 
27271   # Input might be given as Windows format, start by converting to
27272   # unix format.
27273   path="$BOOT_JDK"
27274   new_path=`$CYGPATH -u "$path"`
27275 
27276   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27277   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27278   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27279   # "foo.exe" is OK but "foo" is an error.
27280   #
27281   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27282   # It is also a way to make sure we got the proper file name for the real test later on.
27283   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27284   if test "x$test_shortpath" = x; then
27285     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27286 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27287     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27288   fi
27289 
27290   # Call helper function which possibly converts this using DOS-style short mode.
27291   # If so, the updated path is stored in $new_path.
27292 
27293   input_path="$new_path"
27294   # Check if we need to convert this using DOS-style short mode. If the path
27295   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27296   # take no chances and rewrite it.
27297   # Note: m4 eats our [], so we need to use [ and ] instead.
27298   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27299   if test "x$has_forbidden_chars" != x; then
27300     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27301     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27302     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27303     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27304       # Going to short mode and back again did indeed matter. Since short mode is
27305       # case insensitive, let's make it lowercase to improve readability.
27306       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27307       # Now convert it back to Unix-style (cygpath)
27308       input_path=`$CYGPATH -u "$shortmode_path"`
27309       new_path="$input_path"
27310     fi
27311   fi
27312 
27313   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27314   if test "x$test_cygdrive_prefix" = x; then
27315     # As a simple fix, exclude /usr/bin since it's not a real path.
27316     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27317       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27318       # a path prefixed by /cygdrive for fixpath to work.
27319       new_path="$CYGWIN_ROOT_PATH$input_path"
27320     fi
27321   fi
27322 
27323 
27324   if test "x$path" != "x$new_path"; then
27325     BOOT_JDK="$new_path"
27326     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27327 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27328   fi
27329 
27330     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27331 
27332   path="$BOOT_JDK"
27333   has_colon=`$ECHO $path | $GREP ^.:`
27334   new_path="$path"
27335   if test "x$has_colon" = x; then
27336     # Not in mixed or Windows style, start by that.
27337     new_path=`cmd //c echo $path`
27338   fi
27339 
27340 
27341   input_path="$new_path"
27342   # Check if we need to convert this using DOS-style short mode. If the path
27343   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27344   # take no chances and rewrite it.
27345   # Note: m4 eats our [], so we need to use [ and ] instead.
27346   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27347   if test "x$has_forbidden_chars" != x; then
27348     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27349     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27350   fi
27351 
27352 
27353   windows_path="$new_path"
27354   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27355     unix_path=`$CYGPATH -u "$windows_path"`
27356     new_path="$unix_path"
27357   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27358     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27359     new_path="$unix_path"
27360   fi
27361 
27362   if test "x$path" != "x$new_path"; then
27363     BOOT_JDK="$new_path"
27364     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27365 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27366   fi
27367 
27368   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27369   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27370 
27371     else
27372       # We're on a unix platform. Hooray! :)
27373       path="$BOOT_JDK"
27374       has_space=`$ECHO "$path" | $GREP " "`
27375       if test "x$has_space" != x; then
27376         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27377 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27378         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27379       fi
27380 
27381       # Use eval to expand a potential ~
27382       eval path="$path"
27383       if test ! -f "$path" && test ! -d "$path"; then
27384         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27385       fi
27386 
27387       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27388     fi
27389   fi
27390 
27391             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27392 $as_echo_n "checking for Boot JDK... " >&6; }
27393             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27394 $as_echo "$BOOT_JDK" >&6; }
27395             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27396 $as_echo_n "checking Boot JDK version... " >&6; }
27397             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27398             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27399 $as_echo "$BOOT_JDK_VERSION" >&6; }
27400           fi # end check jdk version
27401         fi # end check javac
27402       fi # end check java
27403     fi # end check boot jdk found
27404   fi
27405 
27406     done
27407   fi
27408 
27409 
27410     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27411     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27412       # Do we have a bin/java?
27413       if test ! -x "$BOOT_JDK/bin/java"; then
27414         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27415 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27416         BOOT_JDK_FOUND=no
27417       else
27418         # Do we have a bin/javac?
27419         if test ! -x "$BOOT_JDK/bin/javac"; then
27420           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27421 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27422           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27423 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27424           BOOT_JDK_FOUND=no
27425         else
27426           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27427           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27428 
27429           # Extra M4 quote needed to protect [] in grep expression.
27430           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27431           if test "x$FOUND_CORRECT_VERSION" = x; then
27432             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27433 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27434             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27435 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27436             BOOT_JDK_FOUND=no
27437           else
27438             # We're done! :-)
27439             BOOT_JDK_FOUND=yes
27440 
27441   # Only process if variable expands to non-empty
27442 
27443   if test "x$BOOT_JDK" != x; then
27444     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27445 
27446   # Input might be given as Windows format, start by converting to
27447   # unix format.
27448   path="$BOOT_JDK"
27449   new_path=`$CYGPATH -u "$path"`
27450 
27451   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27452   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27453   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27454   # "foo.exe" is OK but "foo" is an error.
27455   #
27456   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27457   # It is also a way to make sure we got the proper file name for the real test later on.
27458   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27459   if test "x$test_shortpath" = x; then
27460     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27461 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27462     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27463   fi
27464 
27465   # Call helper function which possibly converts this using DOS-style short mode.
27466   # If so, the updated path is stored in $new_path.
27467 
27468   input_path="$new_path"
27469   # Check if we need to convert this using DOS-style short mode. If the path
27470   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27471   # take no chances and rewrite it.
27472   # Note: m4 eats our [], so we need to use [ and ] instead.
27473   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27474   if test "x$has_forbidden_chars" != x; then
27475     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27476     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27477     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27478     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27479       # Going to short mode and back again did indeed matter. Since short mode is
27480       # case insensitive, let's make it lowercase to improve readability.
27481       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27482       # Now convert it back to Unix-style (cygpath)
27483       input_path=`$CYGPATH -u "$shortmode_path"`
27484       new_path="$input_path"
27485     fi
27486   fi
27487 
27488   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27489   if test "x$test_cygdrive_prefix" = x; then
27490     # As a simple fix, exclude /usr/bin since it's not a real path.
27491     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27492       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27493       # a path prefixed by /cygdrive for fixpath to work.
27494       new_path="$CYGWIN_ROOT_PATH$input_path"
27495     fi
27496   fi
27497 
27498 
27499   if test "x$path" != "x$new_path"; then
27500     BOOT_JDK="$new_path"
27501     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27502 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27503   fi
27504 
27505     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27506 
27507   path="$BOOT_JDK"
27508   has_colon=`$ECHO $path | $GREP ^.:`
27509   new_path="$path"
27510   if test "x$has_colon" = x; then
27511     # Not in mixed or Windows style, start by that.
27512     new_path=`cmd //c echo $path`
27513   fi
27514 
27515 
27516   input_path="$new_path"
27517   # Check if we need to convert this using DOS-style short mode. If the path
27518   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27519   # take no chances and rewrite it.
27520   # Note: m4 eats our [], so we need to use [ and ] instead.
27521   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27522   if test "x$has_forbidden_chars" != x; then
27523     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27524     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27525   fi
27526 
27527 
27528   windows_path="$new_path"
27529   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27530     unix_path=`$CYGPATH -u "$windows_path"`
27531     new_path="$unix_path"
27532   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27533     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27534     new_path="$unix_path"
27535   fi
27536 
27537   if test "x$path" != "x$new_path"; then
27538     BOOT_JDK="$new_path"
27539     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27540 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27541   fi
27542 
27543   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27544   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27545 
27546     else
27547       # We're on a unix platform. Hooray! :)
27548       path="$BOOT_JDK"
27549       has_space=`$ECHO "$path" | $GREP " "`
27550       if test "x$has_space" != x; then
27551         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27552 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27553         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27554       fi
27555 
27556       # Use eval to expand a potential ~
27557       eval path="$path"
27558       if test ! -f "$path" && test ! -d "$path"; then
27559         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27560       fi
27561 
27562       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27563     fi
27564   fi
27565 
27566             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27567 $as_echo_n "checking for Boot JDK... " >&6; }
27568             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27569 $as_echo "$BOOT_JDK" >&6; }
27570             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27571 $as_echo_n "checking Boot JDK version... " >&6; }
27572             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27573             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27574 $as_echo "$BOOT_JDK_VERSION" >&6; }
27575           fi # end check jdk version
27576         fi # end check javac
27577       fi # end check java
27578     fi # end check boot jdk found
27579   fi
27580 
27581   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
27582 
27583   if test "x$BOOT_JDK_FOUND" = xno; then
27584     # Now execute the test
27585 
27586   BOOT_JDK_PREFIX="/usr/lib/jvm"
27587   BOOT_JDK_SUFFIX=""
27588   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27589   if test "x$ALL_JDKS_FOUND" != x; then
27590     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27591 
27592   if test "x$BOOT_JDK_FOUND" = xno; then
27593     # Now execute the test
27594 
27595         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27596         if test -d "$BOOT_JDK"; then
27597           BOOT_JDK_FOUND=maybe
27598           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27599 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27600         fi
27601 
27602 
27603     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27604     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27605       # Do we have a bin/java?
27606       if test ! -x "$BOOT_JDK/bin/java"; then
27607         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27608 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27609         BOOT_JDK_FOUND=no
27610       else
27611         # Do we have a bin/javac?
27612         if test ! -x "$BOOT_JDK/bin/javac"; then
27613           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27614 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27615           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27616 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27617           BOOT_JDK_FOUND=no
27618         else
27619           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27620           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27621 
27622           # Extra M4 quote needed to protect [] in grep expression.
27623           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27624           if test "x$FOUND_CORRECT_VERSION" = x; then
27625             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27626 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27627             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27628 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27629             BOOT_JDK_FOUND=no
27630           else
27631             # We're done! :-)
27632             BOOT_JDK_FOUND=yes
27633 
27634   # Only process if variable expands to non-empty
27635 
27636   if test "x$BOOT_JDK" != x; then
27637     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27638 
27639   # Input might be given as Windows format, start by converting to
27640   # unix format.
27641   path="$BOOT_JDK"
27642   new_path=`$CYGPATH -u "$path"`
27643 
27644   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27645   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27646   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27647   # "foo.exe" is OK but "foo" is an error.
27648   #
27649   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27650   # It is also a way to make sure we got the proper file name for the real test later on.
27651   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27652   if test "x$test_shortpath" = x; then
27653     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27654 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27655     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27656   fi
27657 
27658   # Call helper function which possibly converts this using DOS-style short mode.
27659   # If so, the updated path is stored in $new_path.
27660 
27661   input_path="$new_path"
27662   # Check if we need to convert this using DOS-style short mode. If the path
27663   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27664   # take no chances and rewrite it.
27665   # Note: m4 eats our [], so we need to use [ and ] instead.
27666   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27667   if test "x$has_forbidden_chars" != x; then
27668     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27669     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27670     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27671     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27672       # Going to short mode and back again did indeed matter. Since short mode is
27673       # case insensitive, let's make it lowercase to improve readability.
27674       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27675       # Now convert it back to Unix-style (cygpath)
27676       input_path=`$CYGPATH -u "$shortmode_path"`
27677       new_path="$input_path"
27678     fi
27679   fi
27680 
27681   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27682   if test "x$test_cygdrive_prefix" = x; then
27683     # As a simple fix, exclude /usr/bin since it's not a real path.
27684     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27685       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27686       # a path prefixed by /cygdrive for fixpath to work.
27687       new_path="$CYGWIN_ROOT_PATH$input_path"
27688     fi
27689   fi
27690 
27691 
27692   if test "x$path" != "x$new_path"; then
27693     BOOT_JDK="$new_path"
27694     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27695 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27696   fi
27697 
27698     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27699 
27700   path="$BOOT_JDK"
27701   has_colon=`$ECHO $path | $GREP ^.:`
27702   new_path="$path"
27703   if test "x$has_colon" = x; then
27704     # Not in mixed or Windows style, start by that.
27705     new_path=`cmd //c echo $path`
27706   fi
27707 
27708 
27709   input_path="$new_path"
27710   # Check if we need to convert this using DOS-style short mode. If the path
27711   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27712   # take no chances and rewrite it.
27713   # Note: m4 eats our [], so we need to use [ and ] instead.
27714   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27715   if test "x$has_forbidden_chars" != x; then
27716     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27717     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27718   fi
27719 
27720 
27721   windows_path="$new_path"
27722   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27723     unix_path=`$CYGPATH -u "$windows_path"`
27724     new_path="$unix_path"
27725   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27726     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27727     new_path="$unix_path"
27728   fi
27729 
27730   if test "x$path" != "x$new_path"; then
27731     BOOT_JDK="$new_path"
27732     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27733 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27734   fi
27735 
27736   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27737   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27738 
27739     else
27740       # We're on a unix platform. Hooray! :)
27741       path="$BOOT_JDK"
27742       has_space=`$ECHO "$path" | $GREP " "`
27743       if test "x$has_space" != x; then
27744         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27745 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27746         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27747       fi
27748 
27749       # Use eval to expand a potential ~
27750       eval path="$path"
27751       if test ! -f "$path" && test ! -d "$path"; then
27752         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27753       fi
27754 
27755       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27756     fi
27757   fi
27758 
27759             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27760 $as_echo_n "checking for Boot JDK... " >&6; }
27761             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27762 $as_echo "$BOOT_JDK" >&6; }
27763             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27764 $as_echo_n "checking Boot JDK version... " >&6; }
27765             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27766             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27767 $as_echo "$BOOT_JDK_VERSION" >&6; }
27768           fi # end check jdk version
27769         fi # end check javac
27770       fi # end check java
27771     fi # end check boot jdk found
27772   fi
27773 
27774     done
27775   fi
27776 
27777 
27778     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27779     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27780       # Do we have a bin/java?
27781       if test ! -x "$BOOT_JDK/bin/java"; then
27782         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27783 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27784         BOOT_JDK_FOUND=no
27785       else
27786         # Do we have a bin/javac?
27787         if test ! -x "$BOOT_JDK/bin/javac"; then
27788           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27789 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27790           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27791 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27792           BOOT_JDK_FOUND=no
27793         else
27794           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27795           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27796 
27797           # Extra M4 quote needed to protect [] in grep expression.
27798           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27799           if test "x$FOUND_CORRECT_VERSION" = x; then
27800             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27801 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27802             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27803 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27804             BOOT_JDK_FOUND=no
27805           else
27806             # We're done! :-)
27807             BOOT_JDK_FOUND=yes
27808 
27809   # Only process if variable expands to non-empty
27810 
27811   if test "x$BOOT_JDK" != x; then
27812     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27813 
27814   # Input might be given as Windows format, start by converting to
27815   # unix format.
27816   path="$BOOT_JDK"
27817   new_path=`$CYGPATH -u "$path"`
27818 
27819   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27820   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27821   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27822   # "foo.exe" is OK but "foo" is an error.
27823   #
27824   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27825   # It is also a way to make sure we got the proper file name for the real test later on.
27826   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27827   if test "x$test_shortpath" = x; then
27828     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27829 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27830     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27831   fi
27832 
27833   # Call helper function which possibly converts this using DOS-style short mode.
27834   # If so, the updated path is stored in $new_path.
27835 
27836   input_path="$new_path"
27837   # Check if we need to convert this using DOS-style short mode. If the path
27838   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27839   # take no chances and rewrite it.
27840   # Note: m4 eats our [], so we need to use [ and ] instead.
27841   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27842   if test "x$has_forbidden_chars" != x; then
27843     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27844     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27845     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27846     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27847       # Going to short mode and back again did indeed matter. Since short mode is
27848       # case insensitive, let's make it lowercase to improve readability.
27849       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27850       # Now convert it back to Unix-style (cygpath)
27851       input_path=`$CYGPATH -u "$shortmode_path"`
27852       new_path="$input_path"
27853     fi
27854   fi
27855 
27856   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27857   if test "x$test_cygdrive_prefix" = x; then
27858     # As a simple fix, exclude /usr/bin since it's not a real path.
27859     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27860       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27861       # a path prefixed by /cygdrive for fixpath to work.
27862       new_path="$CYGWIN_ROOT_PATH$input_path"
27863     fi
27864   fi
27865 
27866 
27867   if test "x$path" != "x$new_path"; then
27868     BOOT_JDK="$new_path"
27869     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27870 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27871   fi
27872 
27873     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27874 
27875   path="$BOOT_JDK"
27876   has_colon=`$ECHO $path | $GREP ^.:`
27877   new_path="$path"
27878   if test "x$has_colon" = x; then
27879     # Not in mixed or Windows style, start by that.
27880     new_path=`cmd //c echo $path`
27881   fi
27882 
27883 
27884   input_path="$new_path"
27885   # Check if we need to convert this using DOS-style short mode. If the path
27886   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27887   # take no chances and rewrite it.
27888   # Note: m4 eats our [], so we need to use [ and ] instead.
27889   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27890   if test "x$has_forbidden_chars" != x; then
27891     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27892     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27893   fi
27894 
27895 
27896   windows_path="$new_path"
27897   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27898     unix_path=`$CYGPATH -u "$windows_path"`
27899     new_path="$unix_path"
27900   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27901     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27902     new_path="$unix_path"
27903   fi
27904 
27905   if test "x$path" != "x$new_path"; then
27906     BOOT_JDK="$new_path"
27907     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27908 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27909   fi
27910 
27911   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27912   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27913 
27914     else
27915       # We're on a unix platform. Hooray! :)
27916       path="$BOOT_JDK"
27917       has_space=`$ECHO "$path" | $GREP " "`
27918       if test "x$has_space" != x; then
27919         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27920 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27921         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27922       fi
27923 
27924       # Use eval to expand a potential ~
27925       eval path="$path"
27926       if test ! -f "$path" && test ! -d "$path"; then
27927         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27928       fi
27929 
27930       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27931     fi
27932   fi
27933 
27934             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27935 $as_echo_n "checking for Boot JDK... " >&6; }
27936             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27937 $as_echo "$BOOT_JDK" >&6; }
27938             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27939 $as_echo_n "checking Boot JDK version... " >&6; }
27940             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27941             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27942 $as_echo "$BOOT_JDK_VERSION" >&6; }
27943           fi # end check jdk version
27944         fi # end check javac
27945       fi # end check java
27946     fi # end check boot jdk found
27947   fi
27948 
27949   fi
27950 
27951 
27952     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27953     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27954       # Do we have a bin/java?
27955       if test ! -x "$BOOT_JDK/bin/java"; then
27956         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27957 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27958         BOOT_JDK_FOUND=no
27959       else
27960         # Do we have a bin/javac?
27961         if test ! -x "$BOOT_JDK/bin/javac"; then
27962           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27963 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27964           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27965 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27966           BOOT_JDK_FOUND=no
27967         else
27968           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27969           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27970 
27971           # Extra M4 quote needed to protect [] in grep expression.
27972           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27973           if test "x$FOUND_CORRECT_VERSION" = x; then
27974             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27975 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27976             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27977 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27978             BOOT_JDK_FOUND=no
27979           else
27980             # We're done! :-)
27981             BOOT_JDK_FOUND=yes
27982 
27983   # Only process if variable expands to non-empty
27984 
27985   if test "x$BOOT_JDK" != x; then
27986     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27987 
27988   # Input might be given as Windows format, start by converting to
27989   # unix format.
27990   path="$BOOT_JDK"
27991   new_path=`$CYGPATH -u "$path"`
27992 
27993   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27994   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27995   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27996   # "foo.exe" is OK but "foo" is an error.
27997   #
27998   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27999   # It is also a way to make sure we got the proper file name for the real test later on.
28000   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28001   if test "x$test_shortpath" = x; then
28002     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28003 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28004     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28005   fi
28006 
28007   # Call helper function which possibly converts this using DOS-style short mode.
28008   # If so, the updated path is stored in $new_path.
28009 
28010   input_path="$new_path"
28011   # Check if we need to convert this using DOS-style short mode. If the path
28012   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28013   # take no chances and rewrite it.
28014   # Note: m4 eats our [], so we need to use [ and ] instead.
28015   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28016   if test "x$has_forbidden_chars" != x; then
28017     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28018     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28019     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28020     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28021       # Going to short mode and back again did indeed matter. Since short mode is
28022       # case insensitive, let's make it lowercase to improve readability.
28023       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28024       # Now convert it back to Unix-style (cygpath)
28025       input_path=`$CYGPATH -u "$shortmode_path"`
28026       new_path="$input_path"
28027     fi
28028   fi
28029 
28030   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28031   if test "x$test_cygdrive_prefix" = x; then
28032     # As a simple fix, exclude /usr/bin since it's not a real path.
28033     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28034       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28035       # a path prefixed by /cygdrive for fixpath to work.
28036       new_path="$CYGWIN_ROOT_PATH$input_path"
28037     fi
28038   fi
28039 
28040 
28041   if test "x$path" != "x$new_path"; then
28042     BOOT_JDK="$new_path"
28043     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28044 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28045   fi
28046 
28047     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28048 
28049   path="$BOOT_JDK"
28050   has_colon=`$ECHO $path | $GREP ^.:`
28051   new_path="$path"
28052   if test "x$has_colon" = x; then
28053     # Not in mixed or Windows style, start by that.
28054     new_path=`cmd //c echo $path`
28055   fi
28056 
28057 
28058   input_path="$new_path"
28059   # Check if we need to convert this using DOS-style short mode. If the path
28060   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28061   # take no chances and rewrite it.
28062   # Note: m4 eats our [], so we need to use [ and ] instead.
28063   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28064   if test "x$has_forbidden_chars" != x; then
28065     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28066     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28067   fi
28068 
28069 
28070   windows_path="$new_path"
28071   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28072     unix_path=`$CYGPATH -u "$windows_path"`
28073     new_path="$unix_path"
28074   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28075     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28076     new_path="$unix_path"
28077   fi
28078 
28079   if test "x$path" != "x$new_path"; then
28080     BOOT_JDK="$new_path"
28081     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28082 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28083   fi
28084 
28085   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28086   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28087 
28088     else
28089       # We're on a unix platform. Hooray! :)
28090       path="$BOOT_JDK"
28091       has_space=`$ECHO "$path" | $GREP " "`
28092       if test "x$has_space" != x; then
28093         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28094 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28095         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28096       fi
28097 
28098       # Use eval to expand a potential ~
28099       eval path="$path"
28100       if test ! -f "$path" && test ! -d "$path"; then
28101         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28102       fi
28103 
28104       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28105     fi
28106   fi
28107 
28108             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28109 $as_echo_n "checking for Boot JDK... " >&6; }
28110             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28111 $as_echo "$BOOT_JDK" >&6; }
28112             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28113 $as_echo_n "checking Boot JDK version... " >&6; }
28114             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28115             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28116 $as_echo "$BOOT_JDK_VERSION" >&6; }
28117           fi # end check jdk version
28118         fi # end check javac
28119       fi # end check java
28120     fi # end check boot jdk found
28121   fi
28122 
28123 
28124   # If we haven't found anything yet, we've truly lost. Give up.
28125   if test "x$BOOT_JDK_FOUND" = xno; then
28126 
28127   # Print a helpful message on how to acquire the necessary build dependency.
28128   # openjdk is the help tag: freetype, cups, alsa etc
28129   MISSING_DEPENDENCY=openjdk
28130 
28131   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28132     cygwin_help $MISSING_DEPENDENCY
28133   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28134     msys_help $MISSING_DEPENDENCY
28135   else
28136     PKGHANDLER_COMMAND=
28137 
28138     case $PKGHANDLER in
28139       apt-get)
28140         apt_help     $MISSING_DEPENDENCY ;;
28141       yum)
28142         yum_help     $MISSING_DEPENDENCY ;;
28143       port)
28144         port_help    $MISSING_DEPENDENCY ;;
28145       pkgutil)
28146         pkgutil_help $MISSING_DEPENDENCY ;;
28147       pkgadd)
28148         pkgadd_help  $MISSING_DEPENDENCY ;;
28149     esac
28150 
28151     if test "x$PKGHANDLER_COMMAND" != x; then
28152       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28153     fi
28154   fi
28155 
28156     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28157 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28158     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28159 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28160     as_fn_error $? "Cannot continue" "$LINENO" 5
28161   fi
28162 
28163 
28164 
28165   # Setup tools from the Boot JDK.
28166 
28167   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28168 
28169   # Publish this variable in the help.
28170 
28171 
28172   if [ -z "${JAVA+x}" ]; then
28173     # The variable is not set by user, try to locate tool using the code snippet
28174 
28175       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28176 $as_echo_n "checking for java in Boot JDK... " >&6; }
28177       JAVA=$BOOT_JDK/bin/java
28178       if test ! -x $JAVA; then
28179         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28180 $as_echo "not found" >&6; }
28181         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28182 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28183         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28184       fi
28185       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28186 $as_echo "ok" >&6; }
28187 
28188 
28189   else
28190     # The variable is set, but is it from the command line or the environment?
28191 
28192     # Try to remove the string !JAVA! from our list.
28193     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28194     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28195       # If it failed, the variable was not from the command line. Ignore it,
28196       # but warn the user (except for BASH, which is always set by the calling BASH).
28197       if test "xJAVA" != xBASH; then
28198         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28199 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28200       fi
28201       # Try to locate tool using the code snippet
28202 
28203       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28204 $as_echo_n "checking for java in Boot JDK... " >&6; }
28205       JAVA=$BOOT_JDK/bin/java
28206       if test ! -x $JAVA; then
28207         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28208 $as_echo "not found" >&6; }
28209         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28210 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28211         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28212       fi
28213       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28214 $as_echo "ok" >&6; }
28215 
28216 
28217     else
28218       # If it succeeded, then it was overridden by the user. We will use it
28219       # for the tool.
28220 
28221       # First remove it from the list of overridden variables, so we can test
28222       # for unknown variables in the end.
28223       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28224 
28225       # Check if we try to supply an empty value
28226       if test "x$JAVA" = x; then
28227         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28228 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28229         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28230 $as_echo_n "checking for JAVA... " >&6; }
28231         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28232 $as_echo "disabled" >&6; }
28233       else
28234         # Check if the provided tool contains a complete path.
28235         tool_specified="$JAVA"
28236         tool_basename="${tool_specified##*/}"
28237         if test "x$tool_basename" = "x$tool_specified"; then
28238           # A command without a complete path is provided, search $PATH.
28239           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28240 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28241           # Extract the first word of "$tool_basename", so it can be a program name with args.
28242 set dummy $tool_basename; ac_word=$2
28243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28244 $as_echo_n "checking for $ac_word... " >&6; }
28245 if ${ac_cv_path_JAVA+:} false; then :
28246   $as_echo_n "(cached) " >&6
28247 else
28248   case $JAVA in
28249   [\\/]* | ?:[\\/]*)
28250   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28251   ;;
28252   *)
28253   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28254 for as_dir in $PATH
28255 do
28256   IFS=$as_save_IFS
28257   test -z "$as_dir" && as_dir=.
28258     for ac_exec_ext in '' $ac_executable_extensions; do
28259   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28260     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28261     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28262     break 2
28263   fi
28264 done
28265   done
28266 IFS=$as_save_IFS
28267 
28268   ;;
28269 esac
28270 fi
28271 JAVA=$ac_cv_path_JAVA
28272 if test -n "$JAVA"; then
28273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28274 $as_echo "$JAVA" >&6; }
28275 else
28276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28277 $as_echo "no" >&6; }
28278 fi
28279 
28280 
28281           if test "x$JAVA" = x; then
28282             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28283           fi
28284         else
28285           # Otherwise we believe it is a complete path. Use it as it is.
28286           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28287 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28288           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28289 $as_echo_n "checking for JAVA... " >&6; }
28290           if test ! -x "$tool_specified"; then
28291             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28292 $as_echo "not found" >&6; }
28293             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28294           fi
28295           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28296 $as_echo "$tool_specified" >&6; }
28297         fi
28298       fi
28299     fi
28300 
28301   fi
28302 
28303 
28304 
28305   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28306 
28307   # Publish this variable in the help.
28308 
28309 
28310   if [ -z "${JAVAC+x}" ]; then
28311     # The variable is not set by user, try to locate tool using the code snippet
28312 
28313       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28314 $as_echo_n "checking for javac in Boot JDK... " >&6; }
28315       JAVAC=$BOOT_JDK/bin/javac
28316       if test ! -x $JAVAC; then
28317         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28318 $as_echo "not found" >&6; }
28319         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28320 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28321         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28322       fi
28323       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28324 $as_echo "ok" >&6; }
28325 
28326 
28327   else
28328     # The variable is set, but is it from the command line or the environment?
28329 
28330     # Try to remove the string !JAVAC! from our list.
28331     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
28332     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28333       # If it failed, the variable was not from the command line. Ignore it,
28334       # but warn the user (except for BASH, which is always set by the calling BASH).
28335       if test "xJAVAC" != xBASH; then
28336         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
28337 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
28338       fi
28339       # Try to locate tool using the code snippet
28340 
28341       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28342 $as_echo_n "checking for javac in Boot JDK... " >&6; }
28343       JAVAC=$BOOT_JDK/bin/javac
28344       if test ! -x $JAVAC; then
28345         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28346 $as_echo "not found" >&6; }
28347         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28348 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28349         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28350       fi
28351       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28352 $as_echo "ok" >&6; }
28353 
28354 
28355     else
28356       # If it succeeded, then it was overridden by the user. We will use it
28357       # for the tool.
28358 
28359       # First remove it from the list of overridden variables, so we can test
28360       # for unknown variables in the end.
28361       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28362 
28363       # Check if we try to supply an empty value
28364       if test "x$JAVAC" = x; then
28365         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
28366 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
28367         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28368 $as_echo_n "checking for JAVAC... " >&6; }
28369         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28370 $as_echo "disabled" >&6; }
28371       else
28372         # Check if the provided tool contains a complete path.
28373         tool_specified="$JAVAC"
28374         tool_basename="${tool_specified##*/}"
28375         if test "x$tool_basename" = "x$tool_specified"; then
28376           # A command without a complete path is provided, search $PATH.
28377           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
28378 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
28379           # Extract the first word of "$tool_basename", so it can be a program name with args.
28380 set dummy $tool_basename; ac_word=$2
28381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28382 $as_echo_n "checking for $ac_word... " >&6; }
28383 if ${ac_cv_path_JAVAC+:} false; then :
28384   $as_echo_n "(cached) " >&6
28385 else
28386   case $JAVAC in
28387   [\\/]* | ?:[\\/]*)
28388   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
28389   ;;
28390   *)
28391   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28392 for as_dir in $PATH
28393 do
28394   IFS=$as_save_IFS
28395   test -z "$as_dir" && as_dir=.
28396     for ac_exec_ext in '' $ac_executable_extensions; do
28397   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28398     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
28399     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28400     break 2
28401   fi
28402 done
28403   done
28404 IFS=$as_save_IFS
28405 
28406   ;;
28407 esac
28408 fi
28409 JAVAC=$ac_cv_path_JAVAC
28410 if test -n "$JAVAC"; then
28411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
28412 $as_echo "$JAVAC" >&6; }
28413 else
28414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28415 $as_echo "no" >&6; }
28416 fi
28417 
28418 
28419           if test "x$JAVAC" = x; then
28420             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28421           fi
28422         else
28423           # Otherwise we believe it is a complete path. Use it as it is.
28424           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
28425 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
28426           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28427 $as_echo_n "checking for JAVAC... " >&6; }
28428           if test ! -x "$tool_specified"; then
28429             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28430 $as_echo "not found" >&6; }
28431             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
28432           fi
28433           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28434 $as_echo "$tool_specified" >&6; }
28435         fi
28436       fi
28437     fi
28438 
28439   fi
28440 
28441 
28442 
28443   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28444 
28445   # Publish this variable in the help.
28446 
28447 
28448   if [ -z "${JAVAH+x}" ]; then
28449     # The variable is not set by user, try to locate tool using the code snippet
28450 
28451       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28452 $as_echo_n "checking for javah in Boot JDK... " >&6; }
28453       JAVAH=$BOOT_JDK/bin/javah
28454       if test ! -x $JAVAH; then
28455         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28456 $as_echo "not found" >&6; }
28457         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28458 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28459         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28460       fi
28461       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28462 $as_echo "ok" >&6; }
28463 
28464 
28465   else
28466     # The variable is set, but is it from the command line or the environment?
28467 
28468     # Try to remove the string !JAVAH! from our list.
28469     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
28470     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28471       # If it failed, the variable was not from the command line. Ignore it,
28472       # but warn the user (except for BASH, which is always set by the calling BASH).
28473       if test "xJAVAH" != xBASH; then
28474         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
28475 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
28476       fi
28477       # Try to locate tool using the code snippet
28478 
28479       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28480 $as_echo_n "checking for javah in Boot JDK... " >&6; }
28481       JAVAH=$BOOT_JDK/bin/javah
28482       if test ! -x $JAVAH; then
28483         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28484 $as_echo "not found" >&6; }
28485         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28486 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28487         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28488       fi
28489       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28490 $as_echo "ok" >&6; }
28491 
28492 
28493     else
28494       # If it succeeded, then it was overridden by the user. We will use it
28495       # for the tool.
28496 
28497       # First remove it from the list of overridden variables, so we can test
28498       # for unknown variables in the end.
28499       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28500 
28501       # Check if we try to supply an empty value
28502       if test "x$JAVAH" = x; then
28503         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
28504 $as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
28505         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28506 $as_echo_n "checking for JAVAH... " >&6; }
28507         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28508 $as_echo "disabled" >&6; }
28509       else
28510         # Check if the provided tool contains a complete path.
28511         tool_specified="$JAVAH"
28512         tool_basename="${tool_specified##*/}"
28513         if test "x$tool_basename" = "x$tool_specified"; then
28514           # A command without a complete path is provided, search $PATH.
28515           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
28516 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
28517           # Extract the first word of "$tool_basename", so it can be a program name with args.
28518 set dummy $tool_basename; ac_word=$2
28519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28520 $as_echo_n "checking for $ac_word... " >&6; }
28521 if ${ac_cv_path_JAVAH+:} false; then :
28522   $as_echo_n "(cached) " >&6
28523 else
28524   case $JAVAH in
28525   [\\/]* | ?:[\\/]*)
28526   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
28527   ;;
28528   *)
28529   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28530 for as_dir in $PATH
28531 do
28532   IFS=$as_save_IFS
28533   test -z "$as_dir" && as_dir=.
28534     for ac_exec_ext in '' $ac_executable_extensions; do
28535   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28536     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
28537     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28538     break 2
28539   fi
28540 done
28541   done
28542 IFS=$as_save_IFS
28543 
28544   ;;
28545 esac
28546 fi
28547 JAVAH=$ac_cv_path_JAVAH
28548 if test -n "$JAVAH"; then
28549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
28550 $as_echo "$JAVAH" >&6; }
28551 else
28552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28553 $as_echo "no" >&6; }
28554 fi
28555 
28556 
28557           if test "x$JAVAH" = x; then
28558             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28559           fi
28560         else
28561           # Otherwise we believe it is a complete path. Use it as it is.
28562           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
28563 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
28564           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28565 $as_echo_n "checking for JAVAH... " >&6; }
28566           if test ! -x "$tool_specified"; then
28567             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28568 $as_echo "not found" >&6; }
28569             as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
28570           fi
28571           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28572 $as_echo "$tool_specified" >&6; }
28573         fi
28574       fi
28575     fi
28576 
28577   fi
28578 
28579 
28580 
28581   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28582 
28583   # Publish this variable in the help.
28584 
28585 
28586   if [ -z "${JAR+x}" ]; then
28587     # The variable is not set by user, try to locate tool using the code snippet
28588 
28589       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28590 $as_echo_n "checking for jar in Boot JDK... " >&6; }
28591       JAR=$BOOT_JDK/bin/jar
28592       if test ! -x $JAR; then
28593         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28594 $as_echo "not found" >&6; }
28595         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28596 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28597         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
28598       fi
28599       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28600 $as_echo "ok" >&6; }
28601 
28602 
28603   else
28604     # The variable is set, but is it from the command line or the environment?
28605 
28606     # Try to remove the string !JAR! from our list.
28607     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
28608     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28609       # If it failed, the variable was not from the command line. Ignore it,
28610       # but warn the user (except for BASH, which is always set by the calling BASH).
28611       if test "xJAR" != xBASH; then
28612         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
28613 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
28614       fi
28615       # Try to locate tool using the code snippet
28616 
28617       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28618 $as_echo_n "checking for jar in Boot JDK... " >&6; }
28619       JAR=$BOOT_JDK/bin/jar
28620       if test ! -x $JAR; then
28621         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28622 $as_echo "not found" >&6; }
28623         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28624 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28625         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
28626       fi
28627       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28628 $as_echo "ok" >&6; }
28629 
28630 
28631     else
28632       # If it succeeded, then it was overridden by the user. We will use it
28633       # for the tool.
28634 
28635       # First remove it from the list of overridden variables, so we can test
28636       # for unknown variables in the end.
28637       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28638 
28639       # Check if we try to supply an empty value
28640       if test "x$JAR" = x; then
28641         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
28642 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
28643         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
28644 $as_echo_n "checking for JAR... " >&6; }
28645         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28646 $as_echo "disabled" >&6; }
28647       else
28648         # Check if the provided tool contains a complete path.
28649         tool_specified="$JAR"
28650         tool_basename="${tool_specified##*/}"
28651         if test "x$tool_basename" = "x$tool_specified"; then
28652           # A command without a complete path is provided, search $PATH.
28653           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
28654 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
28655           # Extract the first word of "$tool_basename", so it can be a program name with args.
28656 set dummy $tool_basename; ac_word=$2
28657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28658 $as_echo_n "checking for $ac_word... " >&6; }
28659 if ${ac_cv_path_JAR+:} false; then :
28660   $as_echo_n "(cached) " >&6
28661 else
28662   case $JAR in
28663   [\\/]* | ?:[\\/]*)
28664   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
28665   ;;
28666   *)
28667   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28668 for as_dir in $PATH
28669 do
28670   IFS=$as_save_IFS
28671   test -z "$as_dir" && as_dir=.
28672     for ac_exec_ext in '' $ac_executable_extensions; do
28673   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28674     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
28675     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28676     break 2
28677   fi
28678 done
28679   done
28680 IFS=$as_save_IFS
28681 
28682   ;;
28683 esac
28684 fi
28685 JAR=$ac_cv_path_JAR
28686 if test -n "$JAR"; then
28687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
28688 $as_echo "$JAR" >&6; }
28689 else
28690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28691 $as_echo "no" >&6; }
28692 fi
28693 
28694 
28695           if test "x$JAR" = x; then
28696             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28697           fi
28698         else
28699           # Otherwise we believe it is a complete path. Use it as it is.
28700           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
28701 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
28702           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
28703 $as_echo_n "checking for JAR... " >&6; }
28704           if test ! -x "$tool_specified"; then
28705             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28706 $as_echo "not found" >&6; }
28707             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
28708           fi
28709           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28710 $as_echo "$tool_specified" >&6; }
28711         fi
28712       fi
28713     fi
28714 
28715   fi
28716 
28717 
28718 
28719   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28720 
28721   # Publish this variable in the help.
28722 
28723 
28724   if [ -z "${JARSIGNER+x}" ]; then
28725     # The variable is not set by user, try to locate tool using the code snippet
28726 
28727       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
28728 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
28729       JARSIGNER=$BOOT_JDK/bin/jarsigner
28730       if test ! -x $JARSIGNER; then
28731         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28732 $as_echo "not found" >&6; }
28733         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28734 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28735         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
28736       fi
28737       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28738 $as_echo "ok" >&6; }
28739 
28740 
28741   else
28742     # The variable is set, but is it from the command line or the environment?
28743 
28744     # Try to remove the string !JARSIGNER! from our list.
28745     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
28746     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28747       # If it failed, the variable was not from the command line. Ignore it,
28748       # but warn the user (except for BASH, which is always set by the calling BASH).
28749       if test "xJARSIGNER" != xBASH; then
28750         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
28751 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
28752       fi
28753       # Try to locate tool using the code snippet
28754 
28755       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
28756 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
28757       JARSIGNER=$BOOT_JDK/bin/jarsigner
28758       if test ! -x $JARSIGNER; then
28759         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28760 $as_echo "not found" >&6; }
28761         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28762 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28763         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
28764       fi
28765       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28766 $as_echo "ok" >&6; }
28767 
28768 
28769     else
28770       # If it succeeded, then it was overridden by the user. We will use it
28771       # for the tool.
28772 
28773       # First remove it from the list of overridden variables, so we can test
28774       # for unknown variables in the end.
28775       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28776 
28777       # Check if we try to supply an empty value
28778       if test "x$JARSIGNER" = x; then
28779         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
28780 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
28781         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
28782 $as_echo_n "checking for JARSIGNER... " >&6; }
28783         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28784 $as_echo "disabled" >&6; }
28785       else
28786         # Check if the provided tool contains a complete path.
28787         tool_specified="$JARSIGNER"
28788         tool_basename="${tool_specified##*/}"
28789         if test "x$tool_basename" = "x$tool_specified"; then
28790           # A command without a complete path is provided, search $PATH.
28791           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
28792 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
28793           # Extract the first word of "$tool_basename", so it can be a program name with args.
28794 set dummy $tool_basename; ac_word=$2
28795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28796 $as_echo_n "checking for $ac_word... " >&6; }
28797 if ${ac_cv_path_JARSIGNER+:} false; then :
28798   $as_echo_n "(cached) " >&6
28799 else
28800   case $JARSIGNER in
28801   [\\/]* | ?:[\\/]*)
28802   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
28803   ;;
28804   *)
28805   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28806 for as_dir in $PATH
28807 do
28808   IFS=$as_save_IFS
28809   test -z "$as_dir" && as_dir=.
28810     for ac_exec_ext in '' $ac_executable_extensions; do
28811   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28812     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
28813     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28814     break 2
28815   fi
28816 done
28817   done
28818 IFS=$as_save_IFS
28819 
28820   ;;
28821 esac
28822 fi
28823 JARSIGNER=$ac_cv_path_JARSIGNER
28824 if test -n "$JARSIGNER"; then
28825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
28826 $as_echo "$JARSIGNER" >&6; }
28827 else
28828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28829 $as_echo "no" >&6; }
28830 fi
28831 
28832 
28833           if test "x$JARSIGNER" = x; then
28834             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28835           fi
28836         else
28837           # Otherwise we believe it is a complete path. Use it as it is.
28838           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
28839 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
28840           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
28841 $as_echo_n "checking for JARSIGNER... " >&6; }
28842           if test ! -x "$tool_specified"; then
28843             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28844 $as_echo "not found" >&6; }
28845             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
28846           fi
28847           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28848 $as_echo "$tool_specified" >&6; }
28849         fi
28850       fi
28851     fi
28852 
28853   fi
28854 
28855 
28856 
28857   # Finally, set some other options...
28858 
28859   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
28860   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
28861 
28862 
28863 
28864   # Check if the boot jdk is 32 or 64 bit
28865   if "$JAVA" -d64 -version > /dev/null 2>&1; then
28866     BOOT_JDK_BITS="64"
28867   else
28868     BOOT_JDK_BITS="32"
28869   fi
28870   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
28871 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
28872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
28873 $as_echo "$BOOT_JDK_BITS" >&6; }
28874 
28875 
28876 
28877 ###############################################################################
28878 #
28879 # Configure the sources to use. We can add or override individual directories.
28880 #
28881 ###############################################################################
28882 
28883 
28884   # Where are the sources.
28885   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
28886   CORBA_TOPDIR="$SRC_ROOT/corba"
28887   JAXP_TOPDIR="$SRC_ROOT/jaxp"
28888   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
28889   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
28890   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
28891   JDK_TOPDIR="$SRC_ROOT/jdk"
28892 
28893 
28894 
28895 
28896 
28897 
28898 
28899 
28900 
28901   # This feature is no longer supported.
28902 
28903 
28904 
28905 # Check whether --with-add-source-root was given.
28906 if test "${with_add_source_root+set}" = set; then :
28907   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
28908 $as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
28909 fi
28910 
28911 
28912 
28913 
28914 # Check whether --with-override-source-root was given.
28915 if test "${with_override_source_root+set}" = set; then :
28916   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
28917 $as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
28918 fi
28919 
28920 
28921 
28922 
28923 # Check whether --with-adds-and-overrides was given.
28924 if test "${with_adds_and_overrides+set}" = set; then :
28925   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
28926 $as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
28927 fi
28928 
28929 
28930 
28931 
28932 # Check whether --with-override-langtools was given.
28933 if test "${with_override_langtools+set}" = set; then :
28934   withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
28935 $as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
28936 fi
28937 
28938 
28939 
28940 
28941 # Check whether --with-override-corba was given.
28942 if test "${with_override_corba+set}" = set; then :
28943   withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
28944 $as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
28945 fi
28946 
28947 
28948 
28949 
28950 # Check whether --with-override-jaxp was given.
28951 if test "${with_override_jaxp+set}" = set; then :
28952   withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
28953 $as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
28954 fi
28955 
28956 
28957 
28958 
28959 # Check whether --with-override-jaxws was given.
28960 if test "${with_override_jaxws+set}" = set; then :
28961   withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
28962 $as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
28963 fi
28964 
28965 
28966 
28967 
28968 # Check whether --with-override-hotspot was given.
28969 if test "${with_override_hotspot+set}" = set; then :
28970   withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
28971 $as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
28972 fi
28973 
28974 
28975 
28976 
28977 # Check whether --with-override-nashorn was given.
28978 if test "${with_override_nashorn+set}" = set; then :
28979   withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
28980 $as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
28981 fi
28982 
28983 
28984 
28985 
28986 # Check whether --with-override-jdk was given.
28987 if test "${with_override_jdk+set}" = set; then :
28988   withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
28989 $as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
28990 fi
28991 
28992 
28993 
28994 
28995   BUILD_OUTPUT="$OUTPUT_ROOT"
28996 
28997 
28998   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
28999   BUILD_HOTSPOT=true
29000 
29001 
29002 
29003 # Check whether --with-import-hotspot was given.
29004 if test "${with_import_hotspot+set}" = set; then :
29005   withval=$with_import_hotspot;
29006 fi
29007 
29008   if test "x$with_import_hotspot" != x; then
29009     CURDIR="$PWD"
29010     cd "$with_import_hotspot"
29011     HOTSPOT_DIST="`pwd`"
29012     cd "$CURDIR"
29013     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29014       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29015     fi
29016     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29017 $as_echo_n "checking if hotspot should be imported... " >&6; }
29018     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29019 $as_echo "yes from $HOTSPOT_DIST" >&6; }
29020     BUILD_HOTSPOT=false
29021   fi
29022 
29023   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29024 
29025 
29026 ###############################################################################
29027 #
29028 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
29029 # native code.
29030 #
29031 ###############################################################################
29032 
29033 # See if we are doing a complete static build or not
29034 
29035   # Check whether --enable-static-build was given.
29036 if test "${enable_static_build+set}" = set; then :
29037   enableval=$enable_static_build;
29038 fi
29039 
29040   STATIC_BUILD=false
29041   if test "x$enable_static_build" = "xyes"; then
29042     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29043 $as_echo_n "checking if static build is enabled... " >&6; }
29044     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29045 $as_echo "yes" >&6; }
29046     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29047       as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29048     fi
29049     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29050     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29051     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29052     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29053     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29054     STATIC_BUILD=true
29055   elif test "x$enable_static_build" = "xno"; then
29056     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29057 $as_echo_n "checking if static build is enabled... " >&6; }
29058     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29059 $as_echo "no" >&6; }
29060   elif test "x$enable_static_build" != "x"; then
29061     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29062   fi
29063 
29064 
29065 
29066 
29067 # First determine the toolchain type (compiler family)
29068 
29069 
29070 # Check whether --with-toolchain-type was given.
29071 if test "${with_toolchain_type+set}" = set; then :
29072   withval=$with_toolchain_type;
29073 fi
29074 
29075 
29076   # Use indirect variable referencing
29077   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29078   VALID_TOOLCHAINS=${!toolchain_var_name}
29079 
29080   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29081     if test -n "$XCODEBUILD"; then
29082       # On Mac OS X, default toolchain to clang after Xcode 5
29083       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29084       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29085       if test $? -ne 0; then
29086         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29087       fi
29088       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29089           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29090           $CUT -f 1 -d .`
29091       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29092 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29093       if test $XCODE_MAJOR_VERSION -ge 5; then
29094           DEFAULT_TOOLCHAIN="clang"
29095       else
29096           DEFAULT_TOOLCHAIN="gcc"
29097       fi
29098     else
29099       # If Xcode is not installed, but the command line tools are
29100       # then we can't run xcodebuild. On these systems we should
29101       # default to clang
29102       DEFAULT_TOOLCHAIN="clang"
29103     fi
29104   else
29105     # First toolchain type in the list is the default
29106     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29107   fi
29108 
29109   if test "x$with_toolchain_type" = xlist; then
29110     # List all toolchains
29111     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29112 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29113     for toolchain in $VALID_TOOLCHAINS; do
29114       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29115       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29116       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29117     done
29118 
29119     exit 0
29120   elif test "x$with_toolchain_type" != x; then
29121     # User override; check that it is valid
29122     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29123       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29124 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29125       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29126 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29127       as_fn_error $? "Cannot continue." "$LINENO" 5
29128     fi
29129     TOOLCHAIN_TYPE=$with_toolchain_type
29130   else
29131     # No flag given, use default
29132     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29133   fi
29134 
29135 
29136   TOOLCHAIN_CC_BINARY_clang="clang"
29137   TOOLCHAIN_CC_BINARY_gcc="gcc"
29138   TOOLCHAIN_CC_BINARY_microsoft="cl"
29139   TOOLCHAIN_CC_BINARY_solstudio="cc"
29140   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29141 
29142   TOOLCHAIN_CXX_BINARY_clang="clang++"
29143   TOOLCHAIN_CXX_BINARY_gcc="g++"
29144   TOOLCHAIN_CXX_BINARY_microsoft="cl"
29145   TOOLCHAIN_CXX_BINARY_solstudio="CC"
29146   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29147 
29148   # Use indirect variable referencing
29149   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29150   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29151   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29152   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29153   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29154   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29155 
29156 
29157   # Define filename patterns
29158   if test "x$OPENJDK_TARGET_OS" = xwindows; then
29159     LIBRARY_PREFIX=
29160     SHARED_LIBRARY_SUFFIX='.dll'
29161     STATIC_LIBRARY_SUFFIX='.lib'
29162     SHARED_LIBRARY='$1.dll'
29163     STATIC_LIBRARY='$1.lib'
29164     OBJ_SUFFIX='.obj'
29165     EXE_SUFFIX='.exe'
29166   else
29167     LIBRARY_PREFIX=lib
29168     SHARED_LIBRARY_SUFFIX='.so'
29169     STATIC_LIBRARY_SUFFIX='.a'
29170     SHARED_LIBRARY='lib$1.so'
29171     STATIC_LIBRARY='lib$1.a'
29172     OBJ_SUFFIX='.o'
29173     EXE_SUFFIX=''
29174     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29175       # For full static builds, we're overloading the SHARED_LIBRARY
29176       # variables in order to limit the amount of changes required.
29177       # It would be better to remove SHARED and just use LIBRARY and
29178       # LIBRARY_SUFFIX for libraries that can be built either
29179       # shared or static and use STATIC_* for libraries that are
29180       # always built statically.
29181       if test "x$STATIC_BUILD" = xtrue; then
29182         SHARED_LIBRARY='lib$1.a'
29183         SHARED_LIBRARY_SUFFIX='.a'
29184       else
29185         SHARED_LIBRARY='lib$1.dylib'
29186         SHARED_LIBRARY_SUFFIX='.dylib'
29187       fi
29188     fi
29189   fi
29190 
29191 
29192 
29193 
29194 
29195 
29196 
29197 
29198 
29199 
29200   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29201     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29202 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29203   else
29204     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29205 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29206   fi
29207 
29208 
29209 # User supplied flags should be used when configure detects compilers
29210 
29211   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29212     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29213 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29214   fi
29215 
29216   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29217     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29218 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29219   fi
29220 
29221   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29222     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29223 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29224   fi
29225 
29226 
29227 # Check whether --with-extra-cflags was given.
29228 if test "${with_extra_cflags+set}" = set; then :
29229   withval=$with_extra_cflags;
29230 fi
29231 
29232 
29233 
29234 # Check whether --with-extra-cxxflags was given.
29235 if test "${with_extra_cxxflags+set}" = set; then :
29236   withval=$with_extra_cxxflags;
29237 fi
29238 
29239 
29240 
29241 # Check whether --with-extra-ldflags was given.
29242 if test "${with_extra_ldflags+set}" = set; then :
29243   withval=$with_extra_ldflags;
29244 fi
29245 
29246 
29247   EXTRA_CFLAGS="$with_extra_cflags"
29248   EXTRA_CXXFLAGS="$with_extra_cxxflags"
29249   EXTRA_LDFLAGS="$with_extra_ldflags"
29250 
29251   # Hotspot needs these set in their legacy form
29252   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29253   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29254   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29255 
29256 
29257 
29258 
29259 
29260   # The global CFLAGS and LDLAGS variables are used by configure tests and
29261   # should include the extra parameters
29262   CFLAGS="$EXTRA_CFLAGS"
29263   CXXFLAGS="$EXTRA_CXXFLAGS"
29264   LDFLAGS="$EXTRA_LDFLAGS"
29265   CPPFLAGS=""
29266 
29267 # The sysroot cflags are needed for configure to be able to run the compilers
29268 
29269   if test "x$SYSROOT" != "x"; then
29270     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29271       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29272         # Solaris Studio does not have a concept of sysroot. Instead we must
29273         # make sure the default include and lib dirs are appended to each
29274         # compile and link command line.
29275         SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29276         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29277             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29278             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29279       fi
29280     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29281       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29282       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29283     elif test "x$TOOLCHAIN_TYPE" = xclang; then
29284       SYSROOT_CFLAGS="-isysroot $SYSROOT"
29285       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29286     fi
29287     # Propagate the sysroot args to hotspot
29288     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29289     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29290     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29291     # The global CFLAGS and LDFLAGS variables need these for configure to function
29292     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29293     CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29294     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29295     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29296   fi
29297 
29298   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29299     # We also need -iframework<path>/System/Library/Frameworks
29300     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29301     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29302     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
29303     # set this here so it doesn't have to be peppered throughout the forest
29304     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29305     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29306   fi
29307 
29308 
29309 
29310 
29311 
29312 # Then detect the actual binaries needed
29313 
29314   # FIXME: Is this needed?
29315   ac_ext=cpp
29316 ac_cpp='$CXXCPP $CPPFLAGS'
29317 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29318 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29319 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29320 
29321 
29322   # Store the CFLAGS etc passed to the configure script.
29323   ORG_CFLAGS="$CFLAGS"
29324   ORG_CXXFLAGS="$CXXFLAGS"
29325 
29326   # autoconf magic only relies on PATH, so update it if tools dir is specified
29327   OLD_PATH="$PATH"
29328 
29329   # On Windows, we need to detect the visual studio installation first.
29330   # This will change the PATH, but we need to keep that new PATH even
29331   # after toolchain detection is done, since the compiler (on x86) uses
29332   # it for DLL resolution in runtime.
29333   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
29334       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
29335 
29336   # Store path to cygwin link.exe to help excluding it when searching for
29337   # VS linker. This must be done before changing the PATH when looking for VS.
29338   # Extract the first word of "link", so it can be a program name with args.
29339 set dummy link; ac_word=$2
29340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29341 $as_echo_n "checking for $ac_word... " >&6; }
29342 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
29343   $as_echo_n "(cached) " >&6
29344 else
29345   case $CYGWIN_LINK in
29346   [\\/]* | ?:[\\/]*)
29347   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
29348   ;;
29349   *)
29350   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29351 for as_dir in $PATH
29352 do
29353   IFS=$as_save_IFS
29354   test -z "$as_dir" && as_dir=.
29355     for ac_exec_ext in '' $ac_executable_extensions; do
29356   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29357     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
29358     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29359     break 2
29360   fi
29361 done
29362   done
29363 IFS=$as_save_IFS
29364 
29365   ;;
29366 esac
29367 fi
29368 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
29369 if test -n "$CYGWIN_LINK"; then
29370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
29371 $as_echo "$CYGWIN_LINK" >&6; }
29372 else
29373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29374 $as_echo "no" >&6; }
29375 fi
29376 
29377 
29378   if test "x$CYGWIN_LINK" != x; then
29379     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
29380 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
29381     "$CYGWIN_LINK" --version > /dev/null
29382     if test $? -eq 0 ; then
29383       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29384 $as_echo "yes" >&6; }
29385     else
29386       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29387 $as_echo "no" >&6; }
29388       # This might be the VS linker. Don't exclude it later on.
29389       CYGWIN_LINK=""
29390     fi
29391   fi
29392 
29393   # First-hand choice is to locate and run the vsvars bat file.
29394 
29395 
29396 # Check whether --with-toolchain-version was given.
29397 if test "${with_toolchain_version+set}" = set; then :
29398   withval=$with_toolchain_version;
29399 fi
29400 
29401 
29402   if test "x$with_toolchain_version" = xlist; then
29403     # List all toolchains
29404     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
29405 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
29406     for version in $VALID_VS_VERSIONS; do
29407       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
29408       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
29409     done
29410 
29411     exit 0
29412   elif test "x$DEVKIT_VS_VERSION" != x; then
29413     VS_VERSION=$DEVKIT_VS_VERSION
29414     TOOLCHAIN_VERSION=$VS_VERSION
29415     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
29416     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
29417     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
29418     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
29419     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29420     VS_PATH="$TOOLCHAIN_PATH:$PATH"
29421 
29422     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
29423     # can still be exported as INCLUDE for compiler invocations without
29424     # SYSROOT_CFLAGS
29425     OLDIFS="$IFS"
29426     IFS=";"
29427     for i in $DEVKIT_VS_INCLUDE; do
29428       ipath=$i
29429 
29430   unix_path="$ipath"
29431   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29432     windows_path=`$CYGPATH -m "$unix_path"`
29433     ipath="$windows_path"
29434   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29435     windows_path=`cmd //c echo $unix_path`
29436     ipath="$windows_path"
29437   fi
29438 
29439       VS_INCLUDE="$VS_INCLUDE;$ipath"
29440     done
29441     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
29442     # as LIB for compiler invocations without SYSROOT_LDFLAGS
29443     for i in $DEVKIT_VS_LIB; do
29444       libpath=$i
29445 
29446   unix_path="$libpath"
29447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29448     windows_path=`$CYGPATH -m "$unix_path"`
29449     libpath="$windows_path"
29450   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29451     windows_path=`cmd //c echo $unix_path`
29452     libpath="$windows_path"
29453   fi
29454 
29455       VS_LIB="$VS_LIB;$libpath"
29456     done
29457     IFS="$OLDIFS"
29458 
29459     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
29460 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
29461 
29462   elif test "x$with_toolchain_version" != x; then
29463     # User override; check that it is valid
29464     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
29465       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
29466 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
29467       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
29468 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
29469       as_fn_error $? "Cannot continue." "$LINENO" 5
29470     fi
29471     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
29472   else
29473     # No flag given, use default
29474     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
29475   fi
29476 
29477   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
29478 
29479   VS_VERSION="$VS_VERSION"
29480   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
29481   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
29482   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
29483   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
29484 
29485   # When using --with-tools-dir, assume it points to the correct and default
29486   # version of Visual Studio or that --with-toolchain-version was also set.
29487   if test "x$with_tools_dir" != x; then
29488 
29489   if test "x$VS_ENV_CMD" = x; then
29490     VS_VERSION="${VS_VERSION}"
29491     VS_BASE="$with_tools_dir/../.."
29492     METHOD="--with-tools-dir"
29493 
29494     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29495       VCVARSFILE="vc/bin/vcvars32.bat"
29496     else
29497       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29498     fi
29499 
29500 
29501   windows_path="$VS_BASE"
29502   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29503     unix_path=`$CYGPATH -u "$windows_path"`
29504     VS_BASE="$unix_path"
29505   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29506     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29507     VS_BASE="$unix_path"
29508   fi
29509 
29510     if test -d "$VS_BASE"; then
29511       if test -f "$VS_BASE/$VCVARSFILE"; then
29512         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29513 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29514         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29515         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29516         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29517         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29518       else
29519         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29520 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29521         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29522 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29523       fi
29524     fi
29525   fi
29526 
29527 
29528   if test "x$VS_ENV_CMD" = x; then
29529     VS_VERSION="${VS_VERSION}"
29530     VS_BASE="$with_tools_dir/../../.."
29531     METHOD="--with-tools-dir"
29532 
29533     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29534       VCVARSFILE="vc/bin/vcvars32.bat"
29535     else
29536       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29537     fi
29538 
29539 
29540   windows_path="$VS_BASE"
29541   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29542     unix_path=`$CYGPATH -u "$windows_path"`
29543     VS_BASE="$unix_path"
29544   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29545     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29546     VS_BASE="$unix_path"
29547   fi
29548 
29549     if test -d "$VS_BASE"; then
29550       if test -f "$VS_BASE/$VCVARSFILE"; then
29551         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29552 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29553         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29554         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29555         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29556         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29557       else
29558         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29559 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29560         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29561 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29562       fi
29563     fi
29564   fi
29565 
29566     if test "x$VS_ENV_CMD" = x; then
29567       # Having specified an argument which is incorrect will produce an instant failure;
29568       # we should not go on looking
29569       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
29570 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
29571       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
29572 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
29573       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
29574 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
29575       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
29576     fi
29577   fi
29578 
29579   VS_ENV_CMD=""
29580   VS_ENV_ARGS=""
29581 
29582   if test "x$VS_COMNTOOLS" != x; then
29583 
29584   if test "x$VS_ENV_CMD" = x; then
29585     VS_VERSION="${VS_VERSION}"
29586     VS_BASE="$VS_COMNTOOLS/../.."
29587     METHOD="$VS_COMNTOOLS_VAR variable"
29588 
29589     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29590       VCVARSFILE="vc/bin/vcvars32.bat"
29591     else
29592       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29593     fi
29594 
29595 
29596   windows_path="$VS_BASE"
29597   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29598     unix_path=`$CYGPATH -u "$windows_path"`
29599     VS_BASE="$unix_path"
29600   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29601     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29602     VS_BASE="$unix_path"
29603   fi
29604 
29605     if test -d "$VS_BASE"; then
29606       if test -f "$VS_BASE/$VCVARSFILE"; then
29607         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29608 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29609         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29610         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29611         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29612         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29613       else
29614         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29615 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29616         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29617 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29618       fi
29619     fi
29620   fi
29621 
29622   fi
29623   if test "x$PROGRAMFILES" != x; then
29624 
29625   if test "x$VS_ENV_CMD" = x; then
29626     VS_VERSION="${VS_VERSION}"
29627     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
29628     METHOD="well-known name"
29629 
29630     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29631       VCVARSFILE="vc/bin/vcvars32.bat"
29632     else
29633       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29634     fi
29635 
29636 
29637   windows_path="$VS_BASE"
29638   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29639     unix_path=`$CYGPATH -u "$windows_path"`
29640     VS_BASE="$unix_path"
29641   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29642     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29643     VS_BASE="$unix_path"
29644   fi
29645 
29646     if test -d "$VS_BASE"; then
29647       if test -f "$VS_BASE/$VCVARSFILE"; then
29648         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29649 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29650         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29651         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29652         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29653         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29654       else
29655         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29656 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29657         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29658 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29659       fi
29660     fi
29661   fi
29662 
29663   fi
29664   # Work around the insanely named ProgramFiles(x86) env variable
29665   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
29666   if test "x$PROGRAMFILES_X86" != x; then
29667 
29668   if test "x$VS_ENV_CMD" = x; then
29669     VS_VERSION="${VS_VERSION}"
29670     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
29671     METHOD="well-known name"
29672 
29673     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29674       VCVARSFILE="vc/bin/vcvars32.bat"
29675     else
29676       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29677     fi
29678 
29679 
29680   windows_path="$VS_BASE"
29681   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29682     unix_path=`$CYGPATH -u "$windows_path"`
29683     VS_BASE="$unix_path"
29684   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29685     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29686     VS_BASE="$unix_path"
29687   fi
29688 
29689     if test -d "$VS_BASE"; then
29690       if test -f "$VS_BASE/$VCVARSFILE"; then
29691         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29692 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29693         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29694         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29695         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29696         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29697       else
29698         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29699 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29700         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29701 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29702       fi
29703     fi
29704   fi
29705 
29706   fi
29707 
29708   if test "x$VS_ENV_CMD" = x; then
29709     VS_VERSION="${VS_VERSION}"
29710     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
29711     METHOD="well-known name"
29712 
29713     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29714       VCVARSFILE="vc/bin/vcvars32.bat"
29715     else
29716       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29717     fi
29718 
29719 
29720   windows_path="$VS_BASE"
29721   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29722     unix_path=`$CYGPATH -u "$windows_path"`
29723     VS_BASE="$unix_path"
29724   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29725     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29726     VS_BASE="$unix_path"
29727   fi
29728 
29729     if test -d "$VS_BASE"; then
29730       if test -f "$VS_BASE/$VCVARSFILE"; then
29731         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29732 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29733         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29734         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29735         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29736         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29737       else
29738         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29739 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29740         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29741 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29742       fi
29743     fi
29744   fi
29745 
29746 
29747   if test "x$VS_ENV_CMD" = x; then
29748     VS_VERSION="${VS_VERSION}"
29749     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
29750     METHOD="well-known name"
29751 
29752     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29753       VCVARSFILE="vc/bin/vcvars32.bat"
29754     else
29755       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29756     fi
29757 
29758 
29759   windows_path="$VS_BASE"
29760   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29761     unix_path=`$CYGPATH -u "$windows_path"`
29762     VS_BASE="$unix_path"
29763   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29764     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29765     VS_BASE="$unix_path"
29766   fi
29767 
29768     if test -d "$VS_BASE"; then
29769       if test -f "$VS_BASE/$VCVARSFILE"; then
29770         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29771 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29772         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29773         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29774         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29775         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29776       else
29777         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29778 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29779         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29780 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29781       fi
29782     fi
29783   fi
29784 
29785 
29786   if test "x$SDK_INSTALL_DIR" != x; then
29787     if test "x$ProgramW6432" != x; then
29788 
29789   if test "x$VS_ENV_CMD" = x; then
29790     VS_VERSION="${VS_VERSION}"
29791     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
29792     METHOD="well-known name"
29793 
29794   windows_path="$WIN_SDK_BASE"
29795   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29796     unix_path=`$CYGPATH -u "$windows_path"`
29797     WIN_SDK_BASE="$unix_path"
29798   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29799     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29800     WIN_SDK_BASE="$unix_path"
29801   fi
29802 
29803     if test -d "$WIN_SDK_BASE"; then
29804       # There have been cases of partial or broken SDK installations. A missing
29805       # lib dir is not going to work.
29806       if test ! -d "$WIN_SDK_BASE/lib"; then
29807         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29808 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29809         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29810 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29811       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29812         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29813 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29814         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29815         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29816           VS_ENV_ARGS="/x86"
29817         else
29818           VS_ENV_ARGS="/x64"
29819         fi
29820         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29821         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29822         # TODO: improve detection for other versions of SDK
29823         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29824       else
29825         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29826 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29827         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29828 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29829       fi
29830     fi
29831   fi
29832 
29833     fi
29834     if test "x$PROGRAMW6432" != x; then
29835 
29836   if test "x$VS_ENV_CMD" = x; then
29837     VS_VERSION="${VS_VERSION}"
29838     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
29839     METHOD="well-known name"
29840 
29841   windows_path="$WIN_SDK_BASE"
29842   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29843     unix_path=`$CYGPATH -u "$windows_path"`
29844     WIN_SDK_BASE="$unix_path"
29845   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29846     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29847     WIN_SDK_BASE="$unix_path"
29848   fi
29849 
29850     if test -d "$WIN_SDK_BASE"; then
29851       # There have been cases of partial or broken SDK installations. A missing
29852       # lib dir is not going to work.
29853       if test ! -d "$WIN_SDK_BASE/lib"; then
29854         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29855 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29856         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29857 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29858       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29859         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29860 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29861         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29862         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29863           VS_ENV_ARGS="/x86"
29864         else
29865           VS_ENV_ARGS="/x64"
29866         fi
29867         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29868         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29869         # TODO: improve detection for other versions of SDK
29870         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29871       else
29872         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29873 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29874         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29875 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29876       fi
29877     fi
29878   fi
29879 
29880     fi
29881     if test "x$PROGRAMFILES" != x; then
29882 
29883   if test "x$VS_ENV_CMD" = x; then
29884     VS_VERSION="${VS_VERSION}"
29885     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
29886     METHOD="well-known name"
29887 
29888   windows_path="$WIN_SDK_BASE"
29889   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29890     unix_path=`$CYGPATH -u "$windows_path"`
29891     WIN_SDK_BASE="$unix_path"
29892   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29893     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29894     WIN_SDK_BASE="$unix_path"
29895   fi
29896 
29897     if test -d "$WIN_SDK_BASE"; then
29898       # There have been cases of partial or broken SDK installations. A missing
29899       # lib dir is not going to work.
29900       if test ! -d "$WIN_SDK_BASE/lib"; then
29901         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29902 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29903         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29904 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29905       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29906         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29907 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29908         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29909         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29910           VS_ENV_ARGS="/x86"
29911         else
29912           VS_ENV_ARGS="/x64"
29913         fi
29914         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29915         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29916         # TODO: improve detection for other versions of SDK
29917         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29918       else
29919         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29920 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29921         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29922 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29923       fi
29924     fi
29925   fi
29926 
29927     fi
29928 
29929   if test "x$VS_ENV_CMD" = x; then
29930     VS_VERSION="${VS_VERSION}"
29931     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
29932     METHOD="well-known name"
29933 
29934   windows_path="$WIN_SDK_BASE"
29935   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29936     unix_path=`$CYGPATH -u "$windows_path"`
29937     WIN_SDK_BASE="$unix_path"
29938   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29939     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29940     WIN_SDK_BASE="$unix_path"
29941   fi
29942 
29943     if test -d "$WIN_SDK_BASE"; then
29944       # There have been cases of partial or broken SDK installations. A missing
29945       # lib dir is not going to work.
29946       if test ! -d "$WIN_SDK_BASE/lib"; then
29947         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29948 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29949         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29950 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29951       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29952         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29953 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29954         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29955         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29956           VS_ENV_ARGS="/x86"
29957         else
29958           VS_ENV_ARGS="/x64"
29959         fi
29960         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29961         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29962         # TODO: improve detection for other versions of SDK
29963         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29964       else
29965         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29966 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29967         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29968 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29969       fi
29970     fi
29971   fi
29972 
29973 
29974   if test "x$VS_ENV_CMD" = x; then
29975     VS_VERSION="${VS_VERSION}"
29976     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
29977     METHOD="well-known name"
29978 
29979   windows_path="$WIN_SDK_BASE"
29980   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29981     unix_path=`$CYGPATH -u "$windows_path"`
29982     WIN_SDK_BASE="$unix_path"
29983   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29984     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29985     WIN_SDK_BASE="$unix_path"
29986   fi
29987 
29988     if test -d "$WIN_SDK_BASE"; then
29989       # There have been cases of partial or broken SDK installations. A missing
29990       # lib dir is not going to work.
29991       if test ! -d "$WIN_SDK_BASE/lib"; then
29992         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29993 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29994         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29995 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29996       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29997         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29998 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29999         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30000         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30001           VS_ENV_ARGS="/x86"
30002         else
30003           VS_ENV_ARGS="/x64"
30004         fi
30005         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30006         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30007         # TODO: improve detection for other versions of SDK
30008         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30009       else
30010         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30011 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30012         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30013 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30014       fi
30015     fi
30016   fi
30017 
30018   fi
30019 
30020     if test "x$VS_ENV_CMD" != x; then
30021       TOOLCHAIN_VERSION=$VS_VERSION
30022       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30023       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30024       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30025       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30026       # The rest of the variables are already evaled while probing
30027       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30028 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30029       break
30030     fi
30031   done
30032 
30033 
30034   # If we have a devkit, skip all of the below.
30035   if test "x$DEVKIT_VS_VERSION" = x; then
30036     if test "x$VS_ENV_CMD" != x; then
30037       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30038 
30039   # Only process if variable expands to non-empty
30040 
30041   if test "x$VS_ENV_CMD" != x; then
30042     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30043 
30044   # First separate the path from the arguments. This will split at the first
30045   # space.
30046   complete="$VS_ENV_CMD"
30047   path="${complete%% *}"
30048   tmp="$complete EOL"
30049   arguments="${tmp#* }"
30050 
30051   # Input might be given as Windows format, start by converting to
30052   # unix format.
30053   new_path=`$CYGPATH -u "$path"`
30054 
30055   # Now try to locate executable using which
30056   new_path=`$WHICH "$new_path" 2> /dev/null`
30057   # bat and cmd files are not always considered executable in cygwin causing which
30058   # to not find them
30059   if test "x$new_path" = x \
30060       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30061       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30062     new_path=`$CYGPATH -u "$path"`
30063   fi
30064   if test "x$new_path" = x; then
30065     # Oops. Which didn't find the executable.
30066     # The splitting of arguments from the executable at a space might have been incorrect,
30067     # since paths with space are more likely in Windows. Give it another try with the whole
30068     # argument.
30069     path="$complete"
30070     arguments="EOL"
30071     new_path=`$CYGPATH -u "$path"`
30072     new_path=`$WHICH "$new_path" 2> /dev/null`
30073     # bat and cmd files are not always considered executable in cygwin causing which
30074     # to not find them
30075     if test "x$new_path" = x \
30076         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30077         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30078       new_path=`$CYGPATH -u "$path"`
30079     fi
30080     if test "x$new_path" = x; then
30081       # It's still not found. Now this is an unrecoverable error.
30082       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30083 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30084       has_space=`$ECHO "$complete" | $GREP " "`
30085       if test "x$has_space" != x; then
30086         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30087 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30088       fi
30089       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30090     fi
30091   fi
30092 
30093   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30094   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30095   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30096   # "foo.exe" is OK but "foo" is an error.
30097   #
30098   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30099   # It is also a way to make sure we got the proper file name for the real test later on.
30100   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30101   if test "x$test_shortpath" = x; then
30102     # Short path failed, file does not exist as specified.
30103     # Try adding .exe or .cmd
30104     if test -f "${new_path}.exe"; then
30105       input_to_shortpath="${new_path}.exe"
30106     elif test -f "${new_path}.cmd"; then
30107       input_to_shortpath="${new_path}.cmd"
30108     else
30109       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30110 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30111       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30112 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30113       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30114     fi
30115   else
30116     input_to_shortpath="$new_path"
30117   fi
30118 
30119   # Call helper function which possibly converts this using DOS-style short mode.
30120   # If so, the updated path is stored in $new_path.
30121   new_path="$input_to_shortpath"
30122 
30123   input_path="$input_to_shortpath"
30124   # Check if we need to convert this using DOS-style short mode. If the path
30125   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30126   # take no chances and rewrite it.
30127   # Note: m4 eats our [], so we need to use [ and ] instead.
30128   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30129   if test "x$has_forbidden_chars" != x; then
30130     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30131     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30132     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30133     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30134       # Going to short mode and back again did indeed matter. Since short mode is
30135       # case insensitive, let's make it lowercase to improve readability.
30136       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30137       # Now convert it back to Unix-style (cygpath)
30138       input_path=`$CYGPATH -u "$shortmode_path"`
30139       new_path="$input_path"
30140     fi
30141   fi
30142 
30143   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30144   if test "x$test_cygdrive_prefix" = x; then
30145     # As a simple fix, exclude /usr/bin since it's not a real path.
30146     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30147       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30148       # a path prefixed by /cygdrive for fixpath to work.
30149       new_path="$CYGWIN_ROOT_PATH$input_path"
30150     fi
30151   fi
30152 
30153   # remove trailing .exe if any
30154   new_path="${new_path/%.exe/}"
30155 
30156     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30157 
30158   # First separate the path from the arguments. This will split at the first
30159   # space.
30160   complete="$VS_ENV_CMD"
30161   path="${complete%% *}"
30162   tmp="$complete EOL"
30163   arguments="${tmp#* }"
30164 
30165   # Input might be given as Windows format, start by converting to
30166   # unix format.
30167   new_path="$path"
30168 
30169   windows_path="$new_path"
30170   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30171     unix_path=`$CYGPATH -u "$windows_path"`
30172     new_path="$unix_path"
30173   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30174     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30175     new_path="$unix_path"
30176   fi
30177 
30178 
30179   # Now try to locate executable using which
30180   new_path=`$WHICH "$new_path" 2> /dev/null`
30181 
30182   if test "x$new_path" = x; then
30183     # Oops. Which didn't find the executable.
30184     # The splitting of arguments from the executable at a space might have been incorrect,
30185     # since paths with space are more likely in Windows. Give it another try with the whole
30186     # argument.
30187     path="$complete"
30188     arguments="EOL"
30189     new_path="$path"
30190 
30191   windows_path="$new_path"
30192   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30193     unix_path=`$CYGPATH -u "$windows_path"`
30194     new_path="$unix_path"
30195   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30196     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30197     new_path="$unix_path"
30198   fi
30199 
30200 
30201     new_path=`$WHICH "$new_path" 2> /dev/null`
30202     # bat and cmd files are not always considered executable in MSYS causing which
30203     # to not find them
30204     if test "x$new_path" = x \
30205         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30206         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30207       new_path="$path"
30208 
30209   windows_path="$new_path"
30210   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30211     unix_path=`$CYGPATH -u "$windows_path"`
30212     new_path="$unix_path"
30213   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30214     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30215     new_path="$unix_path"
30216   fi
30217 
30218     fi
30219 
30220     if test "x$new_path" = x; then
30221       # It's still not found. Now this is an unrecoverable error.
30222       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30223 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30224       has_space=`$ECHO "$complete" | $GREP " "`
30225       if test "x$has_space" != x; then
30226         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30227 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30228       fi
30229       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30230     fi
30231   fi
30232 
30233   # Now new_path has a complete unix path to the binary
30234   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30235     # Keep paths in /bin as-is, but remove trailing .exe if any
30236     new_path="${new_path/%.exe/}"
30237     # Do not save /bin paths to all_fixpath_prefixes!
30238   else
30239     # Not in mixed or Windows style, start by that.
30240     new_path=`cmd //c echo $new_path`
30241 
30242   input_path="$new_path"
30243   # Check if we need to convert this using DOS-style short mode. If the path
30244   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30245   # take no chances and rewrite it.
30246   # Note: m4 eats our [], so we need to use [ and ] instead.
30247   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30248   if test "x$has_forbidden_chars" != x; then
30249     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30250     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30251   fi
30252 
30253     # Output is in $new_path
30254 
30255   windows_path="$new_path"
30256   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30257     unix_path=`$CYGPATH -u "$windows_path"`
30258     new_path="$unix_path"
30259   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30260     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30261     new_path="$unix_path"
30262   fi
30263 
30264     # remove trailing .exe if any
30265     new_path="${new_path/%.exe/}"
30266 
30267     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30268     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30269   fi
30270 
30271     else
30272       # We're on a unix platform. Hooray! :)
30273       # First separate the path from the arguments. This will split at the first
30274       # space.
30275       complete="$VS_ENV_CMD"
30276       path="${complete%% *}"
30277       tmp="$complete EOL"
30278       arguments="${tmp#* }"
30279 
30280       # Cannot rely on the command "which" here since it doesn't always work.
30281       is_absolute_path=`$ECHO "$path" | $GREP ^/`
30282       if test -z "$is_absolute_path"; then
30283         # Path to executable is not absolute. Find it.
30284         IFS_save="$IFS"
30285         IFS=:
30286         for p in $PATH; do
30287           if test -f "$p/$path" && test -x "$p/$path"; then
30288             new_path="$p/$path"
30289             break
30290           fi
30291         done
30292         IFS="$IFS_save"
30293       else
30294         # This is an absolute path, we can use it without further modifications.
30295         new_path="$path"
30296       fi
30297 
30298       if test "x$new_path" = x; then
30299         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30300 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30301         has_space=`$ECHO "$complete" | $GREP " "`
30302         if test "x$has_space" != x; then
30303           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30304 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30305         fi
30306         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30307       fi
30308     fi
30309 
30310     # Now join together the path and the arguments once again
30311     if test "x$arguments" != xEOL; then
30312       new_complete="$new_path ${arguments% *}"
30313     else
30314       new_complete="$new_path"
30315     fi
30316 
30317     if test "x$complete" != "x$new_complete"; then
30318       VS_ENV_CMD="$new_complete"
30319       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
30320 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
30321     fi
30322   fi
30323 
30324 
30325       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
30326       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
30327 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
30328 
30329       # We need to create a couple of temporary files.
30330       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
30331       $MKDIR -p $VS_ENV_TMP_DIR
30332 
30333       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
30334       # Instead create a shell script which will set the relevant variables when run.
30335       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
30336 
30337   unix_path="$WINPATH_VS_ENV_CMD"
30338   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30339     windows_path=`$CYGPATH -m "$unix_path"`
30340     WINPATH_VS_ENV_CMD="$windows_path"
30341   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30342     windows_path=`cmd //c echo $unix_path`
30343     WINPATH_VS_ENV_CMD="$windows_path"
30344   fi
30345 
30346       WINPATH_BASH="$BASH"
30347 
30348   unix_path="$WINPATH_BASH"
30349   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30350     windows_path=`$CYGPATH -m "$unix_path"`
30351     WINPATH_BASH="$windows_path"
30352   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30353     windows_path=`cmd //c echo $unix_path`
30354     WINPATH_BASH="$windows_path"
30355   fi
30356 
30357 
30358       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
30359       # script (executable by bash) that will setup the important variables.
30360       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
30361       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
30362       # This will end up something like:
30363       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
30364       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
30365       # These will end up something like:
30366       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
30367       # The trailing space for everyone except PATH is no typo, but is needed due
30368       # to trailing \ in the Windows paths. These will be stripped later.
30369       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
30370           >> $EXTRACT_VC_ENV_BAT_FILE
30371       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
30372           >> $EXTRACT_VC_ENV_BAT_FILE
30373       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
30374           >> $EXTRACT_VC_ENV_BAT_FILE
30375       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
30376           >> $EXTRACT_VC_ENV_BAT_FILE
30377       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
30378           >> $EXTRACT_VC_ENV_BAT_FILE
30379       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
30380           >> $EXTRACT_VC_ENV_BAT_FILE
30381 
30382       # Now execute the newly created bat file.
30383       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
30384       # Change directory so we don't need to mess with Windows paths in redirects.
30385       cd $VS_ENV_TMP_DIR
30386       cmd /c extract-vs-env.bat | $CAT
30387       cd $CURDIR
30388 
30389       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
30390         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
30391 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
30392         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30393 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30394         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30395 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30396         as_fn_error $? "Cannot continue" "$LINENO" 5
30397       fi
30398 
30399       # Now set all paths and other env variables. This will allow the rest of
30400       # the configure script to find and run the compiler in the proper way.
30401       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
30402 $as_echo "$as_me: Setting extracted environment variables" >&6;}
30403       . $VS_ENV_TMP_DIR/set-vs-env.sh
30404       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
30405       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
30406     else
30407       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
30408       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
30409 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
30410     fi
30411   fi
30412 
30413   # At this point, we should have correct variables in the environment, or we can't continue.
30414   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
30415 $as_echo_n "checking for Visual Studio variables... " >&6; }
30416 
30417   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
30418       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
30419     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
30420       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
30421 $as_echo "present but broken" >&6; }
30422       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
30423     else
30424       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30425 $as_echo "ok" >&6; }
30426       # Remove any trailing "\" ";" and " " from the variables.
30427       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
30428       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
30429       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
30430       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
30431       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
30432       # Remove any paths containing # (typically F#) as that messes up make. This
30433       # is needed if visual studio was installed with F# support.
30434       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
30435 
30436 
30437 
30438 
30439 
30440       # Convert VS_INCLUDE into SYSROOT_CFLAGS
30441       OLDIFS="$IFS"
30442       IFS=";"
30443       for i in $VS_INCLUDE; do
30444         ipath=$i
30445         # Only process non-empty elements
30446         if test "x$ipath" != x; then
30447           IFS="$OLDIFS"
30448           # Check that directory exists before calling fixup_path
30449           testpath=$ipath
30450 
30451   windows_path="$testpath"
30452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30453     unix_path=`$CYGPATH -u "$windows_path"`
30454     testpath="$unix_path"
30455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30456     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30457     testpath="$unix_path"
30458   fi
30459 
30460           if test -d "$testpath"; then
30461 
30462   # Only process if variable expands to non-empty
30463 
30464   if test "x$ipath" != x; then
30465     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30466 
30467   # Input might be given as Windows format, start by converting to
30468   # unix format.
30469   path="$ipath"
30470   new_path=`$CYGPATH -u "$path"`
30471 
30472   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30473   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30474   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30475   # "foo.exe" is OK but "foo" is an error.
30476   #
30477   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30478   # It is also a way to make sure we got the proper file name for the real test later on.
30479   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30480   if test "x$test_shortpath" = x; then
30481     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30482 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30483     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
30484   fi
30485 
30486   # Call helper function which possibly converts this using DOS-style short mode.
30487   # If so, the updated path is stored in $new_path.
30488 
30489   input_path="$new_path"
30490   # Check if we need to convert this using DOS-style short mode. If the path
30491   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30492   # take no chances and rewrite it.
30493   # Note: m4 eats our [], so we need to use [ and ] instead.
30494   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30495   if test "x$has_forbidden_chars" != x; then
30496     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30497     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30498     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30499     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30500       # Going to short mode and back again did indeed matter. Since short mode is
30501       # case insensitive, let's make it lowercase to improve readability.
30502       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30503       # Now convert it back to Unix-style (cygpath)
30504       input_path=`$CYGPATH -u "$shortmode_path"`
30505       new_path="$input_path"
30506     fi
30507   fi
30508 
30509   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30510   if test "x$test_cygdrive_prefix" = x; then
30511     # As a simple fix, exclude /usr/bin since it's not a real path.
30512     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30513       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30514       # a path prefixed by /cygdrive for fixpath to work.
30515       new_path="$CYGWIN_ROOT_PATH$input_path"
30516     fi
30517   fi
30518 
30519 
30520   if test "x$path" != "x$new_path"; then
30521     ipath="$new_path"
30522     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30523 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30524   fi
30525 
30526     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30527 
30528   path="$ipath"
30529   has_colon=`$ECHO $path | $GREP ^.:`
30530   new_path="$path"
30531   if test "x$has_colon" = x; then
30532     # Not in mixed or Windows style, start by that.
30533     new_path=`cmd //c echo $path`
30534   fi
30535 
30536 
30537   input_path="$new_path"
30538   # Check if we need to convert this using DOS-style short mode. If the path
30539   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30540   # take no chances and rewrite it.
30541   # Note: m4 eats our [], so we need to use [ and ] instead.
30542   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30543   if test "x$has_forbidden_chars" != x; then
30544     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30545     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30546   fi
30547 
30548 
30549   windows_path="$new_path"
30550   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30551     unix_path=`$CYGPATH -u "$windows_path"`
30552     new_path="$unix_path"
30553   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30554     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30555     new_path="$unix_path"
30556   fi
30557 
30558   if test "x$path" != "x$new_path"; then
30559     ipath="$new_path"
30560     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30561 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30562   fi
30563 
30564   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30565   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30566 
30567     else
30568       # We're on a unix platform. Hooray! :)
30569       path="$ipath"
30570       has_space=`$ECHO "$path" | $GREP " "`
30571       if test "x$has_space" != x; then
30572         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30573 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30574         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30575       fi
30576 
30577       # Use eval to expand a potential ~
30578       eval path="$path"
30579       if test ! -f "$path" && test ! -d "$path"; then
30580         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
30581       fi
30582 
30583       ipath="`cd "$path"; $THEPWDCMD -L`"
30584     fi
30585   fi
30586 
30587             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
30588           fi
30589           IFS=";"
30590         fi
30591       done
30592       # Convert VS_LIB into SYSROOT_LDFLAGS
30593       for i in $VS_LIB; do
30594         libpath=$i
30595         # Only process non-empty elements
30596         if test "x$libpath" != x; then
30597           IFS="$OLDIFS"
30598           # Check that directory exists before calling fixup_path
30599           testpath=$libpath
30600 
30601   windows_path="$testpath"
30602   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30603     unix_path=`$CYGPATH -u "$windows_path"`
30604     testpath="$unix_path"
30605   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30606     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30607     testpath="$unix_path"
30608   fi
30609 
30610           if test -d "$testpath"; then
30611 
30612   # Only process if variable expands to non-empty
30613 
30614   if test "x$libpath" != x; then
30615     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30616 
30617   # Input might be given as Windows format, start by converting to
30618   # unix format.
30619   path="$libpath"
30620   new_path=`$CYGPATH -u "$path"`
30621 
30622   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30623   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30624   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30625   # "foo.exe" is OK but "foo" is an error.
30626   #
30627   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30628   # It is also a way to make sure we got the proper file name for the real test later on.
30629   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30630   if test "x$test_shortpath" = x; then
30631     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
30632 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
30633     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
30634   fi
30635 
30636   # Call helper function which possibly converts this using DOS-style short mode.
30637   # If so, the updated path is stored in $new_path.
30638 
30639   input_path="$new_path"
30640   # Check if we need to convert this using DOS-style short mode. If the path
30641   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30642   # take no chances and rewrite it.
30643   # Note: m4 eats our [], so we need to use [ and ] instead.
30644   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30645   if test "x$has_forbidden_chars" != x; then
30646     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30647     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30648     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30649     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30650       # Going to short mode and back again did indeed matter. Since short mode is
30651       # case insensitive, let's make it lowercase to improve readability.
30652       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30653       # Now convert it back to Unix-style (cygpath)
30654       input_path=`$CYGPATH -u "$shortmode_path"`
30655       new_path="$input_path"
30656     fi
30657   fi
30658 
30659   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30660   if test "x$test_cygdrive_prefix" = x; then
30661     # As a simple fix, exclude /usr/bin since it's not a real path.
30662     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30663       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30664       # a path prefixed by /cygdrive for fixpath to work.
30665       new_path="$CYGWIN_ROOT_PATH$input_path"
30666     fi
30667   fi
30668 
30669 
30670   if test "x$path" != "x$new_path"; then
30671     libpath="$new_path"
30672     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
30673 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
30674   fi
30675 
30676     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30677 
30678   path="$libpath"
30679   has_colon=`$ECHO $path | $GREP ^.:`
30680   new_path="$path"
30681   if test "x$has_colon" = x; then
30682     # Not in mixed or Windows style, start by that.
30683     new_path=`cmd //c echo $path`
30684   fi
30685 
30686 
30687   input_path="$new_path"
30688   # Check if we need to convert this using DOS-style short mode. If the path
30689   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30690   # take no chances and rewrite it.
30691   # Note: m4 eats our [], so we need to use [ and ] instead.
30692   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30693   if test "x$has_forbidden_chars" != x; then
30694     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30695     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30696   fi
30697 
30698 
30699   windows_path="$new_path"
30700   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30701     unix_path=`$CYGPATH -u "$windows_path"`
30702     new_path="$unix_path"
30703   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30704     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30705     new_path="$unix_path"
30706   fi
30707 
30708   if test "x$path" != "x$new_path"; then
30709     libpath="$new_path"
30710     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
30711 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
30712   fi
30713 
30714   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30715   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30716 
30717     else
30718       # We're on a unix platform. Hooray! :)
30719       path="$libpath"
30720       has_space=`$ECHO "$path" | $GREP " "`
30721       if test "x$has_space" != x; then
30722         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
30723 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
30724         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30725       fi
30726 
30727       # Use eval to expand a potential ~
30728       eval path="$path"
30729       if test ! -f "$path" && test ! -d "$path"; then
30730         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
30731       fi
30732 
30733       libpath="`cd "$path"; $THEPWDCMD -L`"
30734     fi
30735   fi
30736 
30737             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
30738           fi
30739           IFS=";"
30740         fi
30741       done
30742       IFS="$OLDIFS"
30743     fi
30744   else
30745     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30746 $as_echo "not found" >&6; }
30747 
30748     if test "x$VS_ENV_CMD" = x; then
30749       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
30750 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
30751       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
30752 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
30753     else
30754       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
30755 $as_echo "$as_me: Running the extraction script failed." >&6;}
30756     fi
30757     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30758 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30759     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30760 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30761     as_fn_error $? "Cannot continue" "$LINENO" 5
30762   fi
30763 
30764     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
30765     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
30766     PATH="$VS_PATH"
30767     # The microsoft toolchain also requires INCLUDE and LIB to be set.
30768     export INCLUDE="$VS_INCLUDE"
30769     export LIB="$VS_LIB"
30770   fi
30771 
30772   # For solaris we really need solaris tools, and not the GNU equivalent.
30773   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
30774   # so add that to path before starting to probe.
30775   # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
30776   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
30777     PATH="/usr/ccs/bin:$PATH"
30778   fi
30779 
30780   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
30781   # override all other locations.
30782   if test "x$TOOLCHAIN_PATH" != x; then
30783     PATH=$TOOLCHAIN_PATH:$PATH
30784   fi
30785 
30786 
30787   #
30788   # Setup the compilers (CC and CXX)
30789   #
30790 
30791   COMPILER_NAME=C
30792   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
30793 
30794   if test "x$CC" != x; then
30795     # User has supplied compiler name already, always let that override.
30796     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
30797 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
30798     if test "x`basename $CC`" = "x$CC"; then
30799       # A command without a complete path is provided, search $PATH.
30800 
30801       for ac_prog in $CC
30802 do
30803   # Extract the first word of "$ac_prog", so it can be a program name with args.
30804 set dummy $ac_prog; ac_word=$2
30805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30806 $as_echo_n "checking for $ac_word... " >&6; }
30807 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
30808   $as_echo_n "(cached) " >&6
30809 else
30810   case $POTENTIAL_CC in
30811   [\\/]* | ?:[\\/]*)
30812   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
30813   ;;
30814   *)
30815   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30816 for as_dir in $PATH
30817 do
30818   IFS=$as_save_IFS
30819   test -z "$as_dir" && as_dir=.
30820     for ac_exec_ext in '' $ac_executable_extensions; do
30821   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30822     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
30823     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30824     break 2
30825   fi
30826 done
30827   done
30828 IFS=$as_save_IFS
30829 
30830   ;;
30831 esac
30832 fi
30833 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
30834 if test -n "$POTENTIAL_CC"; then
30835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
30836 $as_echo "$POTENTIAL_CC" >&6; }
30837 else
30838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30839 $as_echo "no" >&6; }
30840 fi
30841 
30842 
30843   test -n "$POTENTIAL_CC" && break
30844 done
30845 
30846       if test "x$POTENTIAL_CC" != x; then
30847         CC=$POTENTIAL_CC
30848       else
30849         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
30850       fi
30851     else
30852       # Otherwise it might already be a complete path
30853       if test ! -x "$CC"; then
30854         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
30855       fi
30856     fi
30857   else
30858     # No user supplied value. Locate compiler ourselves.
30859 
30860     # If we are cross compiling, assume cross compilation tools follows the
30861     # cross compilation standard where they are prefixed with the autoconf
30862     # standard name for the target. For example the binary
30863     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30864     # If we are not cross compiling, then the default compiler name will be
30865     # used.
30866 
30867     CC=
30868     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30869     # before checking the rest of the PATH.
30870     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30871     # step, this should not be necessary.
30872     if test -n "$TOOLCHAIN_PATH"; then
30873       PATH_save="$PATH"
30874       PATH="$TOOLCHAIN_PATH"
30875       for ac_prog in $SEARCH_LIST
30876 do
30877   # Extract the first word of "$ac_prog", so it can be a program name with args.
30878 set dummy $ac_prog; ac_word=$2
30879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30880 $as_echo_n "checking for $ac_word... " >&6; }
30881 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
30882   $as_echo_n "(cached) " >&6
30883 else
30884   case $TOOLCHAIN_PATH_CC in
30885   [\\/]* | ?:[\\/]*)
30886   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
30887   ;;
30888   *)
30889   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30890 for as_dir in $PATH
30891 do
30892   IFS=$as_save_IFS
30893   test -z "$as_dir" && as_dir=.
30894     for ac_exec_ext in '' $ac_executable_extensions; do
30895   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30896     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
30897     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30898     break 2
30899   fi
30900 done
30901   done
30902 IFS=$as_save_IFS
30903 
30904   ;;
30905 esac
30906 fi
30907 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
30908 if test -n "$TOOLCHAIN_PATH_CC"; then
30909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
30910 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
30911 else
30912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30913 $as_echo "no" >&6; }
30914 fi
30915 
30916 
30917   test -n "$TOOLCHAIN_PATH_CC" && break
30918 done
30919 
30920       CC=$TOOLCHAIN_PATH_CC
30921       PATH="$PATH_save"
30922     fi
30923 
30924     # AC_PATH_PROGS can't be run multiple times with the same variable,
30925     # so create a new name for this run.
30926     if test "x$CC" = x; then
30927       for ac_prog in $SEARCH_LIST
30928 do
30929   # Extract the first word of "$ac_prog", so it can be a program name with args.
30930 set dummy $ac_prog; ac_word=$2
30931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30932 $as_echo_n "checking for $ac_word... " >&6; }
30933 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
30934   $as_echo_n "(cached) " >&6
30935 else
30936   case $POTENTIAL_CC in
30937   [\\/]* | ?:[\\/]*)
30938   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
30939   ;;
30940   *)
30941   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30942 for as_dir in $PATH
30943 do
30944   IFS=$as_save_IFS
30945   test -z "$as_dir" && as_dir=.
30946     for ac_exec_ext in '' $ac_executable_extensions; do
30947   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30948     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
30949     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30950     break 2
30951   fi
30952 done
30953   done
30954 IFS=$as_save_IFS
30955 
30956   ;;
30957 esac
30958 fi
30959 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
30960 if test -n "$POTENTIAL_CC"; then
30961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
30962 $as_echo "$POTENTIAL_CC" >&6; }
30963 else
30964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30965 $as_echo "no" >&6; }
30966 fi
30967 
30968 
30969   test -n "$POTENTIAL_CC" && break
30970 done
30971 
30972       CC=$POTENTIAL_CC
30973     fi
30974 
30975     if test "x$CC" = x; then
30976 
30977   # Print a helpful message on how to acquire the necessary build dependency.
30978   # devkit is the help tag: freetype, cups, alsa etc
30979   MISSING_DEPENDENCY=devkit
30980 
30981   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30982     cygwin_help $MISSING_DEPENDENCY
30983   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30984     msys_help $MISSING_DEPENDENCY
30985   else
30986     PKGHANDLER_COMMAND=
30987 
30988     case $PKGHANDLER in
30989       apt-get)
30990         apt_help     $MISSING_DEPENDENCY ;;
30991       yum)
30992         yum_help     $MISSING_DEPENDENCY ;;
30993       port)
30994         port_help    $MISSING_DEPENDENCY ;;
30995       pkgutil)
30996         pkgutil_help $MISSING_DEPENDENCY ;;
30997       pkgadd)
30998         pkgadd_help  $MISSING_DEPENDENCY ;;
30999     esac
31000 
31001     if test "x$PKGHANDLER_COMMAND" != x; then
31002       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31003     fi
31004   fi
31005 
31006       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31007     fi
31008   fi
31009 
31010   # Now we have a compiler binary in CC. Make sure it's okay.
31011 
31012   # Only process if variable expands to non-empty
31013 
31014   if test "x$CC" != x; then
31015     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31016 
31017   # First separate the path from the arguments. This will split at the first
31018   # space.
31019   complete="$CC"
31020   path="${complete%% *}"
31021   tmp="$complete EOL"
31022   arguments="${tmp#* }"
31023 
31024   # Input might be given as Windows format, start by converting to
31025   # unix format.
31026   new_path=`$CYGPATH -u "$path"`
31027 
31028   # Now try to locate executable using which
31029   new_path=`$WHICH "$new_path" 2> /dev/null`
31030   # bat and cmd files are not always considered executable in cygwin causing which
31031   # to not find them
31032   if test "x$new_path" = x \
31033       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31034       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31035     new_path=`$CYGPATH -u "$path"`
31036   fi
31037   if test "x$new_path" = x; then
31038     # Oops. Which didn't find the executable.
31039     # The splitting of arguments from the executable at a space might have been incorrect,
31040     # since paths with space are more likely in Windows. Give it another try with the whole
31041     # argument.
31042     path="$complete"
31043     arguments="EOL"
31044     new_path=`$CYGPATH -u "$path"`
31045     new_path=`$WHICH "$new_path" 2> /dev/null`
31046     # bat and cmd files are not always considered executable in cygwin causing which
31047     # to not find them
31048     if test "x$new_path" = x \
31049         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31050         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31051       new_path=`$CYGPATH -u "$path"`
31052     fi
31053     if test "x$new_path" = x; then
31054       # It's still not found. Now this is an unrecoverable error.
31055       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31056 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31057       has_space=`$ECHO "$complete" | $GREP " "`
31058       if test "x$has_space" != x; then
31059         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31060 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31061       fi
31062       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31063     fi
31064   fi
31065 
31066   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31067   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31068   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31069   # "foo.exe" is OK but "foo" is an error.
31070   #
31071   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31072   # It is also a way to make sure we got the proper file name for the real test later on.
31073   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31074   if test "x$test_shortpath" = x; then
31075     # Short path failed, file does not exist as specified.
31076     # Try adding .exe or .cmd
31077     if test -f "${new_path}.exe"; then
31078       input_to_shortpath="${new_path}.exe"
31079     elif test -f "${new_path}.cmd"; then
31080       input_to_shortpath="${new_path}.cmd"
31081     else
31082       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31083 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31084       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31085 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31086       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31087     fi
31088   else
31089     input_to_shortpath="$new_path"
31090   fi
31091 
31092   # Call helper function which possibly converts this using DOS-style short mode.
31093   # If so, the updated path is stored in $new_path.
31094   new_path="$input_to_shortpath"
31095 
31096   input_path="$input_to_shortpath"
31097   # Check if we need to convert this using DOS-style short mode. If the path
31098   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31099   # take no chances and rewrite it.
31100   # Note: m4 eats our [], so we need to use [ and ] instead.
31101   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31102   if test "x$has_forbidden_chars" != x; then
31103     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31104     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31105     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31106     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31107       # Going to short mode and back again did indeed matter. Since short mode is
31108       # case insensitive, let's make it lowercase to improve readability.
31109       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31110       # Now convert it back to Unix-style (cygpath)
31111       input_path=`$CYGPATH -u "$shortmode_path"`
31112       new_path="$input_path"
31113     fi
31114   fi
31115 
31116   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31117   if test "x$test_cygdrive_prefix" = x; then
31118     # As a simple fix, exclude /usr/bin since it's not a real path.
31119     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31120       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31121       # a path prefixed by /cygdrive for fixpath to work.
31122       new_path="$CYGWIN_ROOT_PATH$input_path"
31123     fi
31124   fi
31125 
31126   # remove trailing .exe if any
31127   new_path="${new_path/%.exe/}"
31128 
31129     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31130 
31131   # First separate the path from the arguments. This will split at the first
31132   # space.
31133   complete="$CC"
31134   path="${complete%% *}"
31135   tmp="$complete EOL"
31136   arguments="${tmp#* }"
31137 
31138   # Input might be given as Windows format, start by converting to
31139   # unix format.
31140   new_path="$path"
31141 
31142   windows_path="$new_path"
31143   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31144     unix_path=`$CYGPATH -u "$windows_path"`
31145     new_path="$unix_path"
31146   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31147     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31148     new_path="$unix_path"
31149   fi
31150 
31151 
31152   # Now try to locate executable using which
31153   new_path=`$WHICH "$new_path" 2> /dev/null`
31154 
31155   if test "x$new_path" = x; then
31156     # Oops. Which didn't find the executable.
31157     # The splitting of arguments from the executable at a space might have been incorrect,
31158     # since paths with space are more likely in Windows. Give it another try with the whole
31159     # argument.
31160     path="$complete"
31161     arguments="EOL"
31162     new_path="$path"
31163 
31164   windows_path="$new_path"
31165   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31166     unix_path=`$CYGPATH -u "$windows_path"`
31167     new_path="$unix_path"
31168   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31169     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31170     new_path="$unix_path"
31171   fi
31172 
31173 
31174     new_path=`$WHICH "$new_path" 2> /dev/null`
31175     # bat and cmd files are not always considered executable in MSYS causing which
31176     # to not find them
31177     if test "x$new_path" = x \
31178         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31179         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31180       new_path="$path"
31181 
31182   windows_path="$new_path"
31183   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31184     unix_path=`$CYGPATH -u "$windows_path"`
31185     new_path="$unix_path"
31186   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31187     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31188     new_path="$unix_path"
31189   fi
31190 
31191     fi
31192 
31193     if test "x$new_path" = x; then
31194       # It's still not found. Now this is an unrecoverable error.
31195       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31196 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31197       has_space=`$ECHO "$complete" | $GREP " "`
31198       if test "x$has_space" != x; then
31199         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31200 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31201       fi
31202       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31203     fi
31204   fi
31205 
31206   # Now new_path has a complete unix path to the binary
31207   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31208     # Keep paths in /bin as-is, but remove trailing .exe if any
31209     new_path="${new_path/%.exe/}"
31210     # Do not save /bin paths to all_fixpath_prefixes!
31211   else
31212     # Not in mixed or Windows style, start by that.
31213     new_path=`cmd //c echo $new_path`
31214 
31215   input_path="$new_path"
31216   # Check if we need to convert this using DOS-style short mode. If the path
31217   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31218   # take no chances and rewrite it.
31219   # Note: m4 eats our [], so we need to use [ and ] instead.
31220   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31221   if test "x$has_forbidden_chars" != x; then
31222     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31223     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31224   fi
31225 
31226     # Output is in $new_path
31227 
31228   windows_path="$new_path"
31229   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31230     unix_path=`$CYGPATH -u "$windows_path"`
31231     new_path="$unix_path"
31232   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31233     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31234     new_path="$unix_path"
31235   fi
31236 
31237     # remove trailing .exe if any
31238     new_path="${new_path/%.exe/}"
31239 
31240     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31241     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31242   fi
31243 
31244     else
31245       # We're on a unix platform. Hooray! :)
31246       # First separate the path from the arguments. This will split at the first
31247       # space.
31248       complete="$CC"
31249       path="${complete%% *}"
31250       tmp="$complete EOL"
31251       arguments="${tmp#* }"
31252 
31253       # Cannot rely on the command "which" here since it doesn't always work.
31254       is_absolute_path=`$ECHO "$path" | $GREP ^/`
31255       if test -z "$is_absolute_path"; then
31256         # Path to executable is not absolute. Find it.
31257         IFS_save="$IFS"
31258         IFS=:
31259         for p in $PATH; do
31260           if test -f "$p/$path" && test -x "$p/$path"; then
31261             new_path="$p/$path"
31262             break
31263           fi
31264         done
31265         IFS="$IFS_save"
31266       else
31267         # This is an absolute path, we can use it without further modifications.
31268         new_path="$path"
31269       fi
31270 
31271       if test "x$new_path" = x; then
31272         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31273 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31274         has_space=`$ECHO "$complete" | $GREP " "`
31275         if test "x$has_space" != x; then
31276           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31277 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31278         fi
31279         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31280       fi
31281     fi
31282 
31283     # Now join together the path and the arguments once again
31284     if test "x$arguments" != xEOL; then
31285       new_complete="$new_path ${arguments% *}"
31286     else
31287       new_complete="$new_path"
31288     fi
31289 
31290     if test "x$complete" != "x$new_complete"; then
31291       CC="$new_complete"
31292       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
31293 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
31294     fi
31295   fi
31296 
31297   TEST_COMPILER="$CC"
31298   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31299   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31300   if test "x$OPENJDK_BUILD_OS" != xaix; then
31301     # FIXME: This test should not be needed anymore; we don't do that for any platform.
31302     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
31303 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
31304 
31305   if test "x$OPENJDK_BUILD_OS" != xwindows; then
31306     # Follow a chain of symbolic links. Use readlink
31307     # where it exists, else fall back to horribly
31308     # complicated shell code.
31309     if test "x$READLINK_TESTED" != yes; then
31310       # On MacOSX there is a readlink tool with a different
31311       # purpose than the GNU readlink tool. Check the found readlink.
31312       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31313       if test "x$ISGNU" = x; then
31314         # A readlink that we do not know how to use.
31315         # Are there other non-GNU readlinks out there?
31316         READLINK_TESTED=yes
31317         READLINK=
31318       fi
31319     fi
31320 
31321     if test "x$READLINK" != x; then
31322       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31323     else
31324       # Save the current directory for restoring afterwards
31325       STARTDIR=$PWD
31326       COUNTER=0
31327       sym_link_dir=`$DIRNAME $TEST_COMPILER`
31328       sym_link_file=`$BASENAME $TEST_COMPILER`
31329       cd $sym_link_dir
31330       # Use -P flag to resolve symlinks in directories.
31331       cd `$THEPWDCMD -P`
31332       sym_link_dir=`$THEPWDCMD -P`
31333       # Resolve file symlinks
31334       while test $COUNTER -lt 20; do
31335         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31336         if test "x$ISLINK" == x; then
31337           # This is not a symbolic link! We are done!
31338           break
31339         fi
31340         # Again resolve directory symlinks since the target of the just found
31341         # link could be in a different directory
31342         cd `$DIRNAME $ISLINK`
31343         sym_link_dir=`$THEPWDCMD -P`
31344         sym_link_file=`$BASENAME $ISLINK`
31345         let COUNTER=COUNTER+1
31346       done
31347       cd $STARTDIR
31348       TEST_COMPILER=$sym_link_dir/$sym_link_file
31349     fi
31350   fi
31351 
31352     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31353 $as_echo "$TEST_COMPILER" >&6; }
31354   fi
31355   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
31356 $as_echo_n "checking if CC is disguised ccache... " >&6; }
31357 
31358   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31359   if test "x$COMPILER_BASENAME" = "xccache"; then
31360     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31361 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31362     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31363     # We want to control ccache invocation ourselves, so ignore this cc and try
31364     # searching again.
31365 
31366     # Remove the path to the fake ccache cc from the PATH
31367     RETRY_COMPILER_SAVED_PATH="$PATH"
31368     COMPILER_DIRNAME=`$DIRNAME $CC`
31369     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31370 
31371     # Try again looking for our compiler
31372     if test -n "$ac_tool_prefix"; then
31373   for ac_prog in $TOOLCHAIN_CC_BINARY
31374   do
31375     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31376 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31378 $as_echo_n "checking for $ac_word... " >&6; }
31379 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
31380   $as_echo_n "(cached) " >&6
31381 else
31382   if test -n "$PROPER_COMPILER_CC"; then
31383   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
31384 else
31385 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31386 for as_dir in $PATH
31387 do
31388   IFS=$as_save_IFS
31389   test -z "$as_dir" && as_dir=.
31390     for ac_exec_ext in '' $ac_executable_extensions; do
31391   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31392     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
31393     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31394     break 2
31395   fi
31396 done
31397   done
31398 IFS=$as_save_IFS
31399 
31400 fi
31401 fi
31402 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
31403 if test -n "$PROPER_COMPILER_CC"; then
31404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31405 $as_echo "$PROPER_COMPILER_CC" >&6; }
31406 else
31407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31408 $as_echo "no" >&6; }
31409 fi
31410 
31411 
31412     test -n "$PROPER_COMPILER_CC" && break
31413   done
31414 fi
31415 if test -z "$PROPER_COMPILER_CC"; then
31416   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
31417   for ac_prog in $TOOLCHAIN_CC_BINARY
31418 do
31419   # Extract the first word of "$ac_prog", so it can be a program name with args.
31420 set dummy $ac_prog; ac_word=$2
31421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31422 $as_echo_n "checking for $ac_word... " >&6; }
31423 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
31424   $as_echo_n "(cached) " >&6
31425 else
31426   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31427   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
31428 else
31429 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31430 for as_dir in $PATH
31431 do
31432   IFS=$as_save_IFS
31433   test -z "$as_dir" && as_dir=.
31434     for ac_exec_ext in '' $ac_executable_extensions; do
31435   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31436     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
31437     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31438     break 2
31439   fi
31440 done
31441   done
31442 IFS=$as_save_IFS
31443 
31444 fi
31445 fi
31446 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
31447 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
31449 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
31450 else
31451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31452 $as_echo "no" >&6; }
31453 fi
31454 
31455 
31456   test -n "$ac_ct_PROPER_COMPILER_CC" && break
31457 done
31458 
31459   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
31460     PROPER_COMPILER_CC=""
31461   else
31462     case $cross_compiling:$ac_tool_warned in
31463 yes:)
31464 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31465 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31466 ac_tool_warned=yes ;;
31467 esac
31468     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
31469   fi
31470 fi
31471 
31472 
31473   # Only process if variable expands to non-empty
31474 
31475   if test "x$PROPER_COMPILER_CC" != x; then
31476     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31477 
31478   # First separate the path from the arguments. This will split at the first
31479   # space.
31480   complete="$PROPER_COMPILER_CC"
31481   path="${complete%% *}"
31482   tmp="$complete EOL"
31483   arguments="${tmp#* }"
31484 
31485   # Input might be given as Windows format, start by converting to
31486   # unix format.
31487   new_path=`$CYGPATH -u "$path"`
31488 
31489   # Now try to locate executable using which
31490   new_path=`$WHICH "$new_path" 2> /dev/null`
31491   # bat and cmd files are not always considered executable in cygwin causing which
31492   # to not find them
31493   if test "x$new_path" = x \
31494       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31495       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31496     new_path=`$CYGPATH -u "$path"`
31497   fi
31498   if test "x$new_path" = x; then
31499     # Oops. Which didn't find the executable.
31500     # The splitting of arguments from the executable at a space might have been incorrect,
31501     # since paths with space are more likely in Windows. Give it another try with the whole
31502     # argument.
31503     path="$complete"
31504     arguments="EOL"
31505     new_path=`$CYGPATH -u "$path"`
31506     new_path=`$WHICH "$new_path" 2> /dev/null`
31507     # bat and cmd files are not always considered executable in cygwin causing which
31508     # to not find them
31509     if test "x$new_path" = x \
31510         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31511         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31512       new_path=`$CYGPATH -u "$path"`
31513     fi
31514     if test "x$new_path" = x; then
31515       # It's still not found. Now this is an unrecoverable error.
31516       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31517 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31518       has_space=`$ECHO "$complete" | $GREP " "`
31519       if test "x$has_space" != x; then
31520         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31521 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31522       fi
31523       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31524     fi
31525   fi
31526 
31527   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31528   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31529   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31530   # "foo.exe" is OK but "foo" is an error.
31531   #
31532   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31533   # It is also a way to make sure we got the proper file name for the real test later on.
31534   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31535   if test "x$test_shortpath" = x; then
31536     # Short path failed, file does not exist as specified.
31537     # Try adding .exe or .cmd
31538     if test -f "${new_path}.exe"; then
31539       input_to_shortpath="${new_path}.exe"
31540     elif test -f "${new_path}.cmd"; then
31541       input_to_shortpath="${new_path}.cmd"
31542     else
31543       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
31544 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
31545       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31546 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31547       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31548     fi
31549   else
31550     input_to_shortpath="$new_path"
31551   fi
31552 
31553   # Call helper function which possibly converts this using DOS-style short mode.
31554   # If so, the updated path is stored in $new_path.
31555   new_path="$input_to_shortpath"
31556 
31557   input_path="$input_to_shortpath"
31558   # Check if we need to convert this using DOS-style short mode. If the path
31559   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31560   # take no chances and rewrite it.
31561   # Note: m4 eats our [], so we need to use [ and ] instead.
31562   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31563   if test "x$has_forbidden_chars" != x; then
31564     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31565     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31566     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31567     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31568       # Going to short mode and back again did indeed matter. Since short mode is
31569       # case insensitive, let's make it lowercase to improve readability.
31570       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31571       # Now convert it back to Unix-style (cygpath)
31572       input_path=`$CYGPATH -u "$shortmode_path"`
31573       new_path="$input_path"
31574     fi
31575   fi
31576 
31577   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31578   if test "x$test_cygdrive_prefix" = x; then
31579     # As a simple fix, exclude /usr/bin since it's not a real path.
31580     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31581       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31582       # a path prefixed by /cygdrive for fixpath to work.
31583       new_path="$CYGWIN_ROOT_PATH$input_path"
31584     fi
31585   fi
31586 
31587   # remove trailing .exe if any
31588   new_path="${new_path/%.exe/}"
31589 
31590     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31591 
31592   # First separate the path from the arguments. This will split at the first
31593   # space.
31594   complete="$PROPER_COMPILER_CC"
31595   path="${complete%% *}"
31596   tmp="$complete EOL"
31597   arguments="${tmp#* }"
31598 
31599   # Input might be given as Windows format, start by converting to
31600   # unix format.
31601   new_path="$path"
31602 
31603   windows_path="$new_path"
31604   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31605     unix_path=`$CYGPATH -u "$windows_path"`
31606     new_path="$unix_path"
31607   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31608     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31609     new_path="$unix_path"
31610   fi
31611 
31612 
31613   # Now try to locate executable using which
31614   new_path=`$WHICH "$new_path" 2> /dev/null`
31615 
31616   if test "x$new_path" = x; then
31617     # Oops. Which didn't find the executable.
31618     # The splitting of arguments from the executable at a space might have been incorrect,
31619     # since paths with space are more likely in Windows. Give it another try with the whole
31620     # argument.
31621     path="$complete"
31622     arguments="EOL"
31623     new_path="$path"
31624 
31625   windows_path="$new_path"
31626   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31627     unix_path=`$CYGPATH -u "$windows_path"`
31628     new_path="$unix_path"
31629   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31630     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31631     new_path="$unix_path"
31632   fi
31633 
31634 
31635     new_path=`$WHICH "$new_path" 2> /dev/null`
31636     # bat and cmd files are not always considered executable in MSYS causing which
31637     # to not find them
31638     if test "x$new_path" = x \
31639         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31640         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31641       new_path="$path"
31642 
31643   windows_path="$new_path"
31644   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31645     unix_path=`$CYGPATH -u "$windows_path"`
31646     new_path="$unix_path"
31647   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31648     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31649     new_path="$unix_path"
31650   fi
31651 
31652     fi
31653 
31654     if test "x$new_path" = x; then
31655       # It's still not found. Now this is an unrecoverable error.
31656       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31657 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31658       has_space=`$ECHO "$complete" | $GREP " "`
31659       if test "x$has_space" != x; then
31660         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31661 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31662       fi
31663       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31664     fi
31665   fi
31666 
31667   # Now new_path has a complete unix path to the binary
31668   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31669     # Keep paths in /bin as-is, but remove trailing .exe if any
31670     new_path="${new_path/%.exe/}"
31671     # Do not save /bin paths to all_fixpath_prefixes!
31672   else
31673     # Not in mixed or Windows style, start by that.
31674     new_path=`cmd //c echo $new_path`
31675 
31676   input_path="$new_path"
31677   # Check if we need to convert this using DOS-style short mode. If the path
31678   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31679   # take no chances and rewrite it.
31680   # Note: m4 eats our [], so we need to use [ and ] instead.
31681   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31682   if test "x$has_forbidden_chars" != x; then
31683     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31684     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31685   fi
31686 
31687     # Output is in $new_path
31688 
31689   windows_path="$new_path"
31690   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31691     unix_path=`$CYGPATH -u "$windows_path"`
31692     new_path="$unix_path"
31693   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31694     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31695     new_path="$unix_path"
31696   fi
31697 
31698     # remove trailing .exe if any
31699     new_path="${new_path/%.exe/}"
31700 
31701     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31702     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31703   fi
31704 
31705     else
31706       # We're on a unix platform. Hooray! :)
31707       # First separate the path from the arguments. This will split at the first
31708       # space.
31709       complete="$PROPER_COMPILER_CC"
31710       path="${complete%% *}"
31711       tmp="$complete EOL"
31712       arguments="${tmp#* }"
31713 
31714       # Cannot rely on the command "which" here since it doesn't always work.
31715       is_absolute_path=`$ECHO "$path" | $GREP ^/`
31716       if test -z "$is_absolute_path"; then
31717         # Path to executable is not absolute. Find it.
31718         IFS_save="$IFS"
31719         IFS=:
31720         for p in $PATH; do
31721           if test -f "$p/$path" && test -x "$p/$path"; then
31722             new_path="$p/$path"
31723             break
31724           fi
31725         done
31726         IFS="$IFS_save"
31727       else
31728         # This is an absolute path, we can use it without further modifications.
31729         new_path="$path"
31730       fi
31731 
31732       if test "x$new_path" = x; then
31733         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31734 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31735         has_space=`$ECHO "$complete" | $GREP " "`
31736         if test "x$has_space" != x; then
31737           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31738 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31739         fi
31740         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31741       fi
31742     fi
31743 
31744     # Now join together the path and the arguments once again
31745     if test "x$arguments" != xEOL; then
31746       new_complete="$new_path ${arguments% *}"
31747     else
31748       new_complete="$new_path"
31749     fi
31750 
31751     if test "x$complete" != "x$new_complete"; then
31752       PROPER_COMPILER_CC="$new_complete"
31753       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
31754 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
31755     fi
31756   fi
31757 
31758     PATH="$RETRY_COMPILER_SAVED_PATH"
31759 
31760     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
31761 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
31762 
31763   if test "x$OPENJDK_BUILD_OS" != xwindows; then
31764     # Follow a chain of symbolic links. Use readlink
31765     # where it exists, else fall back to horribly
31766     # complicated shell code.
31767     if test "x$READLINK_TESTED" != yes; then
31768       # On MacOSX there is a readlink tool with a different
31769       # purpose than the GNU readlink tool. Check the found readlink.
31770       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31771       if test "x$ISGNU" = x; then
31772         # A readlink that we do not know how to use.
31773         # Are there other non-GNU readlinks out there?
31774         READLINK_TESTED=yes
31775         READLINK=
31776       fi
31777     fi
31778 
31779     if test "x$READLINK" != x; then
31780       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
31781     else
31782       # Save the current directory for restoring afterwards
31783       STARTDIR=$PWD
31784       COUNTER=0
31785       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
31786       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
31787       cd $sym_link_dir
31788       # Use -P flag to resolve symlinks in directories.
31789       cd `$THEPWDCMD -P`
31790       sym_link_dir=`$THEPWDCMD -P`
31791       # Resolve file symlinks
31792       while test $COUNTER -lt 20; do
31793         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31794         if test "x$ISLINK" == x; then
31795           # This is not a symbolic link! We are done!
31796           break
31797         fi
31798         # Again resolve directory symlinks since the target of the just found
31799         # link could be in a different directory
31800         cd `$DIRNAME $ISLINK`
31801         sym_link_dir=`$THEPWDCMD -P`
31802         sym_link_file=`$BASENAME $ISLINK`
31803         let COUNTER=COUNTER+1
31804       done
31805       cd $STARTDIR
31806       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
31807     fi
31808   fi
31809 
31810     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31811 $as_echo "$PROPER_COMPILER_CC" >&6; }
31812     CC="$PROPER_COMPILER_CC"
31813   else
31814     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
31815 $as_echo "no, keeping CC" >&6; }
31816   fi
31817 
31818 
31819   COMPILER=$CC
31820   COMPILER_NAME=$COMPILER_NAME
31821 
31822   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31823     # cc -V output typically looks like
31824     #     cc: Sun C 5.12 Linux_i386 2011/11/16
31825     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31826     # Check that this is likely to be the Solaris Studio cc.
31827     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31828     if test $? -ne 0; then
31829       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31830       { $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
31831 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31832       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31833 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31834       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31835 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31836       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31837     fi
31838     # Remove usage instructions (if present), and
31839     # collapse compiler output into a single line
31840     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31841         $SED -e 's/ *[Uu]sage:.*//'`
31842     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31843         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31844   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31845     # xlc -qversion output typically looks like
31846     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31847     #     Version: 11.01.0000.0015
31848     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31849     # Check that this is likely to be the IBM XL C compiler.
31850     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31851     if test $? -ne 0; then
31852       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31853       { $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
31854 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31855       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31856 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31857       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31858 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31859       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31860     fi
31861     # Collapse compiler output into a single line
31862     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31863     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31864         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31865   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31866     # There is no specific version flag, but all output starts with a version string.
31867     # First line typically looks something like:
31868     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31869     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31870     # Check that this is likely to be Microsoft CL.EXE.
31871     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31872     if test $? -ne 0; then
31873       { $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
31874 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31875       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31876 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31877       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31878     fi
31879     # Collapse compiler output into a single line
31880     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31881     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31882         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31883   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31884     # gcc --version output typically looks like
31885     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31886     #     Copyright (C) 2013 Free Software Foundation, Inc.
31887     #     This is free software; see the source for copying conditions.  There is NO
31888     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31889     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31890     # Check that this is likely to be GCC.
31891     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31892     if test $? -ne 0; then
31893       { $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
31894 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31895       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31896 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31897       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31898     fi
31899     # Remove Copyright and legalese from version string, and
31900     # collapse into a single line
31901     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31902         $SED -e 's/ *Copyright .*//'`
31903     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31904         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31905   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
31906     # clang --version output typically looks like
31907     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31908     #    clang version 3.3 (tags/RELEASE_33/final)
31909     # or
31910     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31911     #    Target: x86_64-pc-linux-gnu
31912     #    Thread model: posix
31913     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31914     # Check that this is likely to be clang
31915     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31916     if test $? -ne 0; then
31917       { $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
31918 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31919       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31920 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31921       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31922     fi
31923     # Collapse compiler output into a single line
31924     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31925     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31926         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31927   else
31928       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31929   fi
31930   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31931   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31932   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31933   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
31934 
31935   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31936 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31937 
31938 
31939   # Now that we have resolved CC ourself, let autoconf have its go at it
31940   ac_ext=c
31941 ac_cpp='$CPP $CPPFLAGS'
31942 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31943 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31944 ac_compiler_gnu=$ac_cv_c_compiler_gnu
31945 if test -n "$ac_tool_prefix"; then
31946   for ac_prog in $CC
31947   do
31948     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31949 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31951 $as_echo_n "checking for $ac_word... " >&6; }
31952 if ${ac_cv_prog_CC+:} false; then :
31953   $as_echo_n "(cached) " >&6
31954 else
31955   if test -n "$CC"; then
31956   ac_cv_prog_CC="$CC" # Let the user override the test.
31957 else
31958 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31959 for as_dir in $PATH
31960 do
31961   IFS=$as_save_IFS
31962   test -z "$as_dir" && as_dir=.
31963     for ac_exec_ext in '' $ac_executable_extensions; do
31964   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31965     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
31966     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31967     break 2
31968   fi
31969 done
31970   done
31971 IFS=$as_save_IFS
31972 
31973 fi
31974 fi
31975 CC=$ac_cv_prog_CC
31976 if test -n "$CC"; then
31977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
31978 $as_echo "$CC" >&6; }
31979 else
31980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31981 $as_echo "no" >&6; }
31982 fi
31983 
31984 
31985     test -n "$CC" && break
31986   done
31987 fi
31988 if test -z "$CC"; then
31989   ac_ct_CC=$CC
31990   for ac_prog in $CC
31991 do
31992   # Extract the first word of "$ac_prog", so it can be a program name with args.
31993 set dummy $ac_prog; ac_word=$2
31994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31995 $as_echo_n "checking for $ac_word... " >&6; }
31996 if ${ac_cv_prog_ac_ct_CC+:} false; then :
31997   $as_echo_n "(cached) " >&6
31998 else
31999   if test -n "$ac_ct_CC"; then
32000   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32001 else
32002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32003 for as_dir in $PATH
32004 do
32005   IFS=$as_save_IFS
32006   test -z "$as_dir" && as_dir=.
32007     for ac_exec_ext in '' $ac_executable_extensions; do
32008   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32009     ac_cv_prog_ac_ct_CC="$ac_prog"
32010     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32011     break 2
32012   fi
32013 done
32014   done
32015 IFS=$as_save_IFS
32016 
32017 fi
32018 fi
32019 ac_ct_CC=$ac_cv_prog_ac_ct_CC
32020 if test -n "$ac_ct_CC"; then
32021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32022 $as_echo "$ac_ct_CC" >&6; }
32023 else
32024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32025 $as_echo "no" >&6; }
32026 fi
32027 
32028 
32029   test -n "$ac_ct_CC" && break
32030 done
32031 
32032   if test "x$ac_ct_CC" = x; then
32033     CC=""
32034   else
32035     case $cross_compiling:$ac_tool_warned in
32036 yes:)
32037 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32038 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32039 ac_tool_warned=yes ;;
32040 esac
32041     CC=$ac_ct_CC
32042   fi
32043 fi
32044 
32045 
32046 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32047 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32048 as_fn_error $? "no acceptable C compiler found in \$PATH
32049 See \`config.log' for more details" "$LINENO" 5; }
32050 
32051 # Provide some information about the compiler.
32052 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32053 set X $ac_compile
32054 ac_compiler=$2
32055 for ac_option in --version -v -V -qversion; do
32056   { { ac_try="$ac_compiler $ac_option >&5"
32057 case "(($ac_try" in
32058   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32059   *) ac_try_echo=$ac_try;;
32060 esac
32061 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32062 $as_echo "$ac_try_echo"; } >&5
32063   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32064   ac_status=$?
32065   if test -s conftest.err; then
32066     sed '10a\
32067 ... rest of stderr output deleted ...
32068          10q' conftest.err >conftest.er1
32069     cat conftest.er1 >&5
32070   fi
32071   rm -f conftest.er1 conftest.err
32072   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32073   test $ac_status = 0; }
32074 done
32075 
32076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32077 /* end confdefs.h.  */
32078 
32079 int
32080 main ()
32081 {
32082 
32083   ;
32084   return 0;
32085 }
32086 _ACEOF
32087 ac_clean_files_save=$ac_clean_files
32088 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32089 # Try to create an executable without -o first, disregard a.out.
32090 # It will help us diagnose broken compilers, and finding out an intuition
32091 # of exeext.
32092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32093 $as_echo_n "checking whether the C compiler works... " >&6; }
32094 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32095 
32096 # The possible output files:
32097 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32098 
32099 ac_rmfiles=
32100 for ac_file in $ac_files
32101 do
32102   case $ac_file in
32103     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32104     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32105   esac
32106 done
32107 rm -f $ac_rmfiles
32108 
32109 if { { ac_try="$ac_link_default"
32110 case "(($ac_try" in
32111   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32112   *) ac_try_echo=$ac_try;;
32113 esac
32114 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32115 $as_echo "$ac_try_echo"; } >&5
32116   (eval "$ac_link_default") 2>&5
32117   ac_status=$?
32118   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32119   test $ac_status = 0; }; then :
32120   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32121 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32122 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
32123 # so that the user can short-circuit this test for compilers unknown to
32124 # Autoconf.
32125 for ac_file in $ac_files ''
32126 do
32127   test -f "$ac_file" || continue
32128   case $ac_file in
32129     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32130         ;;
32131     [ab].out )
32132         # We found the default executable, but exeext='' is most
32133         # certainly right.
32134         break;;
32135     *.* )
32136         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32137         then :; else
32138            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32139         fi
32140         # We set ac_cv_exeext here because the later test for it is not
32141         # safe: cross compilers may not add the suffix if given an `-o'
32142         # argument, so we may need to know it at that point already.
32143         # Even if this section looks crufty: it has the advantage of
32144         # actually working.
32145         break;;
32146     * )
32147         break;;
32148   esac
32149 done
32150 test "$ac_cv_exeext" = no && ac_cv_exeext=
32151 
32152 else
32153   ac_file=''
32154 fi
32155 if test -z "$ac_file"; then :
32156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32157 $as_echo "no" >&6; }
32158 $as_echo "$as_me: failed program was:" >&5
32159 sed 's/^/| /' conftest.$ac_ext >&5
32160 
32161 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32162 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32163 as_fn_error 77 "C compiler cannot create executables
32164 See \`config.log' for more details" "$LINENO" 5; }
32165 else
32166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32167 $as_echo "yes" >&6; }
32168 fi
32169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32170 $as_echo_n "checking for C compiler default output file name... " >&6; }
32171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32172 $as_echo "$ac_file" >&6; }
32173 ac_exeext=$ac_cv_exeext
32174 
32175 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32176 ac_clean_files=$ac_clean_files_save
32177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32178 $as_echo_n "checking for suffix of executables... " >&6; }
32179 if { { ac_try="$ac_link"
32180 case "(($ac_try" in
32181   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32182   *) ac_try_echo=$ac_try;;
32183 esac
32184 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32185 $as_echo "$ac_try_echo"; } >&5
32186   (eval "$ac_link") 2>&5
32187   ac_status=$?
32188   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32189   test $ac_status = 0; }; then :
32190   # If both `conftest.exe' and `conftest' are `present' (well, observable)
32191 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32192 # work properly (i.e., refer to `conftest.exe'), while it won't with
32193 # `rm'.
32194 for ac_file in conftest.exe conftest conftest.*; do
32195   test -f "$ac_file" || continue
32196   case $ac_file in
32197     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32198     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32199           break;;
32200     * ) break;;
32201   esac
32202 done
32203 else
32204   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32205 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32206 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32207 See \`config.log' for more details" "$LINENO" 5; }
32208 fi
32209 rm -f conftest conftest$ac_cv_exeext
32210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32211 $as_echo "$ac_cv_exeext" >&6; }
32212 
32213 rm -f conftest.$ac_ext
32214 EXEEXT=$ac_cv_exeext
32215 ac_exeext=$EXEEXT
32216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32217 /* end confdefs.h.  */
32218 #include <stdio.h>
32219 int
32220 main ()
32221 {
32222 FILE *f = fopen ("conftest.out", "w");
32223  return ferror (f) || fclose (f) != 0;
32224 
32225   ;
32226   return 0;
32227 }
32228 _ACEOF
32229 ac_clean_files="$ac_clean_files conftest.out"
32230 # Check that the compiler produces executables we can run.  If not, either
32231 # the compiler is broken, or we cross compile.
32232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32233 $as_echo_n "checking whether we are cross compiling... " >&6; }
32234 if test "$cross_compiling" != yes; then
32235   { { ac_try="$ac_link"
32236 case "(($ac_try" in
32237   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32238   *) ac_try_echo=$ac_try;;
32239 esac
32240 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32241 $as_echo "$ac_try_echo"; } >&5
32242   (eval "$ac_link") 2>&5
32243   ac_status=$?
32244   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32245   test $ac_status = 0; }
32246   if { ac_try='./conftest$ac_cv_exeext'
32247   { { case "(($ac_try" in
32248   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32249   *) ac_try_echo=$ac_try;;
32250 esac
32251 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32252 $as_echo "$ac_try_echo"; } >&5
32253   (eval "$ac_try") 2>&5
32254   ac_status=$?
32255   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32256   test $ac_status = 0; }; }; then
32257     cross_compiling=no
32258   else
32259     if test "$cross_compiling" = maybe; then
32260         cross_compiling=yes
32261     else
32262         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32263 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32264 as_fn_error $? "cannot run C compiled programs.
32265 If you meant to cross compile, use \`--host'.
32266 See \`config.log' for more details" "$LINENO" 5; }
32267     fi
32268   fi
32269 fi
32270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32271 $as_echo "$cross_compiling" >&6; }
32272 
32273 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32274 ac_clean_files=$ac_clean_files_save
32275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32276 $as_echo_n "checking for suffix of object files... " >&6; }
32277 if ${ac_cv_objext+:} false; then :
32278   $as_echo_n "(cached) " >&6
32279 else
32280   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32281 /* end confdefs.h.  */
32282 
32283 int
32284 main ()
32285 {
32286 
32287   ;
32288   return 0;
32289 }
32290 _ACEOF
32291 rm -f conftest.o conftest.obj
32292 if { { ac_try="$ac_compile"
32293 case "(($ac_try" in
32294   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32295   *) ac_try_echo=$ac_try;;
32296 esac
32297 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32298 $as_echo "$ac_try_echo"; } >&5
32299   (eval "$ac_compile") 2>&5
32300   ac_status=$?
32301   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32302   test $ac_status = 0; }; then :
32303   for ac_file in conftest.o conftest.obj conftest.*; do
32304   test -f "$ac_file" || continue;
32305   case $ac_file in
32306     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32307     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32308        break;;
32309   esac
32310 done
32311 else
32312   $as_echo "$as_me: failed program was:" >&5
32313 sed 's/^/| /' conftest.$ac_ext >&5
32314 
32315 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32316 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32317 as_fn_error $? "cannot compute suffix of object files: cannot compile
32318 See \`config.log' for more details" "$LINENO" 5; }
32319 fi
32320 rm -f conftest.$ac_cv_objext conftest.$ac_ext
32321 fi
32322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32323 $as_echo "$ac_cv_objext" >&6; }
32324 OBJEXT=$ac_cv_objext
32325 ac_objext=$OBJEXT
32326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32327 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32328 if ${ac_cv_c_compiler_gnu+:} false; then :
32329   $as_echo_n "(cached) " >&6
32330 else
32331   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32332 /* end confdefs.h.  */
32333 
32334 int
32335 main ()
32336 {
32337 #ifndef __GNUC__
32338        choke me
32339 #endif
32340 
32341   ;
32342   return 0;
32343 }
32344 _ACEOF
32345 if ac_fn_c_try_compile "$LINENO"; then :
32346   ac_compiler_gnu=yes
32347 else
32348   ac_compiler_gnu=no
32349 fi
32350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32351 ac_cv_c_compiler_gnu=$ac_compiler_gnu
32352 
32353 fi
32354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
32355 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
32356 if test $ac_compiler_gnu = yes; then
32357   GCC=yes
32358 else
32359   GCC=
32360 fi
32361 ac_test_CFLAGS=${CFLAGS+set}
32362 ac_save_CFLAGS=$CFLAGS
32363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
32364 $as_echo_n "checking whether $CC accepts -g... " >&6; }
32365 if ${ac_cv_prog_cc_g+:} false; then :
32366   $as_echo_n "(cached) " >&6
32367 else
32368   ac_save_c_werror_flag=$ac_c_werror_flag
32369    ac_c_werror_flag=yes
32370    ac_cv_prog_cc_g=no
32371    CFLAGS="-g"
32372    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32373 /* end confdefs.h.  */
32374 
32375 int
32376 main ()
32377 {
32378 
32379   ;
32380   return 0;
32381 }
32382 _ACEOF
32383 if ac_fn_c_try_compile "$LINENO"; then :
32384   ac_cv_prog_cc_g=yes
32385 else
32386   CFLAGS=""
32387       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32388 /* end confdefs.h.  */
32389 
32390 int
32391 main ()
32392 {
32393 
32394   ;
32395   return 0;
32396 }
32397 _ACEOF
32398 if ac_fn_c_try_compile "$LINENO"; then :
32399 
32400 else
32401   ac_c_werror_flag=$ac_save_c_werror_flag
32402          CFLAGS="-g"
32403          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32404 /* end confdefs.h.  */
32405 
32406 int
32407 main ()
32408 {
32409 
32410   ;
32411   return 0;
32412 }
32413 _ACEOF
32414 if ac_fn_c_try_compile "$LINENO"; then :
32415   ac_cv_prog_cc_g=yes
32416 fi
32417 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32418 fi
32419 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32420 fi
32421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32422    ac_c_werror_flag=$ac_save_c_werror_flag
32423 fi
32424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
32425 $as_echo "$ac_cv_prog_cc_g" >&6; }
32426 if test "$ac_test_CFLAGS" = set; then
32427   CFLAGS=$ac_save_CFLAGS
32428 elif test $ac_cv_prog_cc_g = yes; then
32429   if test "$GCC" = yes; then
32430     CFLAGS="-g -O2"
32431   else
32432     CFLAGS="-g"
32433   fi
32434 else
32435   if test "$GCC" = yes; then
32436     CFLAGS="-O2"
32437   else
32438     CFLAGS=
32439   fi
32440 fi
32441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
32442 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
32443 if ${ac_cv_prog_cc_c89+:} false; then :
32444   $as_echo_n "(cached) " >&6
32445 else
32446   ac_cv_prog_cc_c89=no
32447 ac_save_CC=$CC
32448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32449 /* end confdefs.h.  */
32450 #include <stdarg.h>
32451 #include <stdio.h>
32452 struct stat;
32453 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
32454 struct buf { int x; };
32455 FILE * (*rcsopen) (struct buf *, struct stat *, int);
32456 static char *e (p, i)
32457      char **p;
32458      int i;
32459 {
32460   return p[i];
32461 }
32462 static char *f (char * (*g) (char **, int), char **p, ...)
32463 {
32464   char *s;
32465   va_list v;
32466   va_start (v,p);
32467   s = g (p, va_arg (v,int));
32468   va_end (v);
32469   return s;
32470 }
32471 
32472 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
32473    function prototypes and stuff, but not '\xHH' hex character constants.
32474    These don't provoke an error unfortunately, instead are silently treated
32475    as 'x'.  The following induces an error, until -std is added to get
32476    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
32477    array size at least.  It's necessary to write '\x00'==0 to get something
32478    that's true only with -std.  */
32479 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
32480 
32481 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
32482    inside strings and character constants.  */
32483 #define FOO(x) 'x'
32484 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
32485 
32486 int test (int i, double x);
32487 struct s1 {int (*f) (int a);};
32488 struct s2 {int (*f) (double a);};
32489 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
32490 int argc;
32491 char **argv;
32492 int
32493 main ()
32494 {
32495 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
32496   ;
32497   return 0;
32498 }
32499 _ACEOF
32500 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
32501         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
32502 do
32503   CC="$ac_save_CC $ac_arg"
32504   if ac_fn_c_try_compile "$LINENO"; then :
32505   ac_cv_prog_cc_c89=$ac_arg
32506 fi
32507 rm -f core conftest.err conftest.$ac_objext
32508   test "x$ac_cv_prog_cc_c89" != "xno" && break
32509 done
32510 rm -f conftest.$ac_ext
32511 CC=$ac_save_CC
32512 
32513 fi
32514 # AC_CACHE_VAL
32515 case "x$ac_cv_prog_cc_c89" in
32516   x)
32517     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
32518 $as_echo "none needed" >&6; } ;;
32519   xno)
32520     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
32521 $as_echo "unsupported" >&6; } ;;
32522   *)
32523     CC="$CC $ac_cv_prog_cc_c89"
32524     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
32525 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
32526 esac
32527 if test "x$ac_cv_prog_cc_c89" != xno; then :
32528 
32529 fi
32530 
32531 ac_ext=cpp
32532 ac_cpp='$CXXCPP $CPPFLAGS'
32533 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32534 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32535 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32536 
32537 
32538 
32539   COMPILER_NAME=C++
32540   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
32541 
32542   if test "x$CXX" != x; then
32543     # User has supplied compiler name already, always let that override.
32544     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
32545 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
32546     if test "x`basename $CXX`" = "x$CXX"; then
32547       # A command without a complete path is provided, search $PATH.
32548 
32549       for ac_prog in $CXX
32550 do
32551   # Extract the first word of "$ac_prog", so it can be a program name with args.
32552 set dummy $ac_prog; ac_word=$2
32553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32554 $as_echo_n "checking for $ac_word... " >&6; }
32555 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32556   $as_echo_n "(cached) " >&6
32557 else
32558   case $POTENTIAL_CXX in
32559   [\\/]* | ?:[\\/]*)
32560   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32561   ;;
32562   *)
32563   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32564 for as_dir in $PATH
32565 do
32566   IFS=$as_save_IFS
32567   test -z "$as_dir" && as_dir=.
32568     for ac_exec_ext in '' $ac_executable_extensions; do
32569   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32570     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32571     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32572     break 2
32573   fi
32574 done
32575   done
32576 IFS=$as_save_IFS
32577 
32578   ;;
32579 esac
32580 fi
32581 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32582 if test -n "$POTENTIAL_CXX"; then
32583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32584 $as_echo "$POTENTIAL_CXX" >&6; }
32585 else
32586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32587 $as_echo "no" >&6; }
32588 fi
32589 
32590 
32591   test -n "$POTENTIAL_CXX" && break
32592 done
32593 
32594       if test "x$POTENTIAL_CXX" != x; then
32595         CXX=$POTENTIAL_CXX
32596       else
32597         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
32598       fi
32599     else
32600       # Otherwise it might already be a complete path
32601       if test ! -x "$CXX"; then
32602         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
32603       fi
32604     fi
32605   else
32606     # No user supplied value. Locate compiler ourselves.
32607 
32608     # If we are cross compiling, assume cross compilation tools follows the
32609     # cross compilation standard where they are prefixed with the autoconf
32610     # standard name for the target. For example the binary
32611     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32612     # If we are not cross compiling, then the default compiler name will be
32613     # used.
32614 
32615     CXX=
32616     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32617     # before checking the rest of the PATH.
32618     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32619     # step, this should not be necessary.
32620     if test -n "$TOOLCHAIN_PATH"; then
32621       PATH_save="$PATH"
32622       PATH="$TOOLCHAIN_PATH"
32623       for ac_prog in $SEARCH_LIST
32624 do
32625   # Extract the first word of "$ac_prog", so it can be a program name with args.
32626 set dummy $ac_prog; ac_word=$2
32627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32628 $as_echo_n "checking for $ac_word... " >&6; }
32629 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
32630   $as_echo_n "(cached) " >&6
32631 else
32632   case $TOOLCHAIN_PATH_CXX in
32633   [\\/]* | ?:[\\/]*)
32634   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
32635   ;;
32636   *)
32637   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32638 for as_dir in $PATH
32639 do
32640   IFS=$as_save_IFS
32641   test -z "$as_dir" && as_dir=.
32642     for ac_exec_ext in '' $ac_executable_extensions; do
32643   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32644     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
32645     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32646     break 2
32647   fi
32648 done
32649   done
32650 IFS=$as_save_IFS
32651 
32652   ;;
32653 esac
32654 fi
32655 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
32656 if test -n "$TOOLCHAIN_PATH_CXX"; then
32657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
32658 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
32659 else
32660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32661 $as_echo "no" >&6; }
32662 fi
32663 
32664 
32665   test -n "$TOOLCHAIN_PATH_CXX" && break
32666 done
32667 
32668       CXX=$TOOLCHAIN_PATH_CXX
32669       PATH="$PATH_save"
32670     fi
32671 
32672     # AC_PATH_PROGS can't be run multiple times with the same variable,
32673     # so create a new name for this run.
32674     if test "x$CXX" = x; then
32675       for ac_prog in $SEARCH_LIST
32676 do
32677   # Extract the first word of "$ac_prog", so it can be a program name with args.
32678 set dummy $ac_prog; ac_word=$2
32679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32680 $as_echo_n "checking for $ac_word... " >&6; }
32681 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32682   $as_echo_n "(cached) " >&6
32683 else
32684   case $POTENTIAL_CXX in
32685   [\\/]* | ?:[\\/]*)
32686   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32687   ;;
32688   *)
32689   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32690 for as_dir in $PATH
32691 do
32692   IFS=$as_save_IFS
32693   test -z "$as_dir" && as_dir=.
32694     for ac_exec_ext in '' $ac_executable_extensions; do
32695   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32696     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32698     break 2
32699   fi
32700 done
32701   done
32702 IFS=$as_save_IFS
32703 
32704   ;;
32705 esac
32706 fi
32707 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32708 if test -n "$POTENTIAL_CXX"; then
32709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32710 $as_echo "$POTENTIAL_CXX" >&6; }
32711 else
32712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32713 $as_echo "no" >&6; }
32714 fi
32715 
32716 
32717   test -n "$POTENTIAL_CXX" && break
32718 done
32719 
32720       CXX=$POTENTIAL_CXX
32721     fi
32722 
32723     if test "x$CXX" = x; then
32724 
32725   # Print a helpful message on how to acquire the necessary build dependency.
32726   # devkit is the help tag: freetype, cups, alsa etc
32727   MISSING_DEPENDENCY=devkit
32728 
32729   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32730     cygwin_help $MISSING_DEPENDENCY
32731   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32732     msys_help $MISSING_DEPENDENCY
32733   else
32734     PKGHANDLER_COMMAND=
32735 
32736     case $PKGHANDLER in
32737       apt-get)
32738         apt_help     $MISSING_DEPENDENCY ;;
32739       yum)
32740         yum_help     $MISSING_DEPENDENCY ;;
32741       port)
32742         port_help    $MISSING_DEPENDENCY ;;
32743       pkgutil)
32744         pkgutil_help $MISSING_DEPENDENCY ;;
32745       pkgadd)
32746         pkgadd_help  $MISSING_DEPENDENCY ;;
32747     esac
32748 
32749     if test "x$PKGHANDLER_COMMAND" != x; then
32750       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32751     fi
32752   fi
32753 
32754       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32755     fi
32756   fi
32757 
32758   # Now we have a compiler binary in CXX. Make sure it's okay.
32759 
32760   # Only process if variable expands to non-empty
32761 
32762   if test "x$CXX" != x; then
32763     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32764 
32765   # First separate the path from the arguments. This will split at the first
32766   # space.
32767   complete="$CXX"
32768   path="${complete%% *}"
32769   tmp="$complete EOL"
32770   arguments="${tmp#* }"
32771 
32772   # Input might be given as Windows format, start by converting to
32773   # unix format.
32774   new_path=`$CYGPATH -u "$path"`
32775 
32776   # Now try to locate executable using which
32777   new_path=`$WHICH "$new_path" 2> /dev/null`
32778   # bat and cmd files are not always considered executable in cygwin causing which
32779   # to not find them
32780   if test "x$new_path" = x \
32781       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32782       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32783     new_path=`$CYGPATH -u "$path"`
32784   fi
32785   if test "x$new_path" = x; then
32786     # Oops. Which didn't find the executable.
32787     # The splitting of arguments from the executable at a space might have been incorrect,
32788     # since paths with space are more likely in Windows. Give it another try with the whole
32789     # argument.
32790     path="$complete"
32791     arguments="EOL"
32792     new_path=`$CYGPATH -u "$path"`
32793     new_path=`$WHICH "$new_path" 2> /dev/null`
32794     # bat and cmd files are not always considered executable in cygwin causing which
32795     # to not find them
32796     if test "x$new_path" = x \
32797         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32798         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32799       new_path=`$CYGPATH -u "$path"`
32800     fi
32801     if test "x$new_path" = x; then
32802       # It's still not found. Now this is an unrecoverable error.
32803       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
32804 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
32805       has_space=`$ECHO "$complete" | $GREP " "`
32806       if test "x$has_space" != x; then
32807         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32808 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32809       fi
32810       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32811     fi
32812   fi
32813 
32814   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32815   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32816   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32817   # "foo.exe" is OK but "foo" is an error.
32818   #
32819   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32820   # It is also a way to make sure we got the proper file name for the real test later on.
32821   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32822   if test "x$test_shortpath" = x; then
32823     # Short path failed, file does not exist as specified.
32824     # Try adding .exe or .cmd
32825     if test -f "${new_path}.exe"; then
32826       input_to_shortpath="${new_path}.exe"
32827     elif test -f "${new_path}.cmd"; then
32828       input_to_shortpath="${new_path}.cmd"
32829     else
32830       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
32831 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
32832       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32833 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32834       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32835     fi
32836   else
32837     input_to_shortpath="$new_path"
32838   fi
32839 
32840   # Call helper function which possibly converts this using DOS-style short mode.
32841   # If so, the updated path is stored in $new_path.
32842   new_path="$input_to_shortpath"
32843 
32844   input_path="$input_to_shortpath"
32845   # Check if we need to convert this using DOS-style short mode. If the path
32846   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32847   # take no chances and rewrite it.
32848   # Note: m4 eats our [], so we need to use [ and ] instead.
32849   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32850   if test "x$has_forbidden_chars" != x; then
32851     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32852     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32853     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32854     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32855       # Going to short mode and back again did indeed matter. Since short mode is
32856       # case insensitive, let's make it lowercase to improve readability.
32857       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32858       # Now convert it back to Unix-style (cygpath)
32859       input_path=`$CYGPATH -u "$shortmode_path"`
32860       new_path="$input_path"
32861     fi
32862   fi
32863 
32864   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32865   if test "x$test_cygdrive_prefix" = x; then
32866     # As a simple fix, exclude /usr/bin since it's not a real path.
32867     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32868       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32869       # a path prefixed by /cygdrive for fixpath to work.
32870       new_path="$CYGWIN_ROOT_PATH$input_path"
32871     fi
32872   fi
32873 
32874   # remove trailing .exe if any
32875   new_path="${new_path/%.exe/}"
32876 
32877     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32878 
32879   # First separate the path from the arguments. This will split at the first
32880   # space.
32881   complete="$CXX"
32882   path="${complete%% *}"
32883   tmp="$complete EOL"
32884   arguments="${tmp#* }"
32885 
32886   # Input might be given as Windows format, start by converting to
32887   # unix format.
32888   new_path="$path"
32889 
32890   windows_path="$new_path"
32891   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32892     unix_path=`$CYGPATH -u "$windows_path"`
32893     new_path="$unix_path"
32894   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32895     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32896     new_path="$unix_path"
32897   fi
32898 
32899 
32900   # Now try to locate executable using which
32901   new_path=`$WHICH "$new_path" 2> /dev/null`
32902 
32903   if test "x$new_path" = x; then
32904     # Oops. Which didn't find the executable.
32905     # The splitting of arguments from the executable at a space might have been incorrect,
32906     # since paths with space are more likely in Windows. Give it another try with the whole
32907     # argument.
32908     path="$complete"
32909     arguments="EOL"
32910     new_path="$path"
32911 
32912   windows_path="$new_path"
32913   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32914     unix_path=`$CYGPATH -u "$windows_path"`
32915     new_path="$unix_path"
32916   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32917     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32918     new_path="$unix_path"
32919   fi
32920 
32921 
32922     new_path=`$WHICH "$new_path" 2> /dev/null`
32923     # bat and cmd files are not always considered executable in MSYS causing which
32924     # to not find them
32925     if test "x$new_path" = x \
32926         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32927         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32928       new_path="$path"
32929 
32930   windows_path="$new_path"
32931   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32932     unix_path=`$CYGPATH -u "$windows_path"`
32933     new_path="$unix_path"
32934   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32935     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32936     new_path="$unix_path"
32937   fi
32938 
32939     fi
32940 
32941     if test "x$new_path" = x; then
32942       # It's still not found. Now this is an unrecoverable error.
32943       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
32944 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
32945       has_space=`$ECHO "$complete" | $GREP " "`
32946       if test "x$has_space" != x; then
32947         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32948 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32949       fi
32950       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32951     fi
32952   fi
32953 
32954   # Now new_path has a complete unix path to the binary
32955   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32956     # Keep paths in /bin as-is, but remove trailing .exe if any
32957     new_path="${new_path/%.exe/}"
32958     # Do not save /bin paths to all_fixpath_prefixes!
32959   else
32960     # Not in mixed or Windows style, start by that.
32961     new_path=`cmd //c echo $new_path`
32962 
32963   input_path="$new_path"
32964   # Check if we need to convert this using DOS-style short mode. If the path
32965   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32966   # take no chances and rewrite it.
32967   # Note: m4 eats our [], so we need to use [ and ] instead.
32968   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32969   if test "x$has_forbidden_chars" != x; then
32970     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32971     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32972   fi
32973 
32974     # Output is in $new_path
32975 
32976   windows_path="$new_path"
32977   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32978     unix_path=`$CYGPATH -u "$windows_path"`
32979     new_path="$unix_path"
32980   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32981     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32982     new_path="$unix_path"
32983   fi
32984 
32985     # remove trailing .exe if any
32986     new_path="${new_path/%.exe/}"
32987 
32988     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32989     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32990   fi
32991 
32992     else
32993       # We're on a unix platform. Hooray! :)
32994       # First separate the path from the arguments. This will split at the first
32995       # space.
32996       complete="$CXX"
32997       path="${complete%% *}"
32998       tmp="$complete EOL"
32999       arguments="${tmp#* }"
33000 
33001       # Cannot rely on the command "which" here since it doesn't always work.
33002       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33003       if test -z "$is_absolute_path"; then
33004         # Path to executable is not absolute. Find it.
33005         IFS_save="$IFS"
33006         IFS=:
33007         for p in $PATH; do
33008           if test -f "$p/$path" && test -x "$p/$path"; then
33009             new_path="$p/$path"
33010             break
33011           fi
33012         done
33013         IFS="$IFS_save"
33014       else
33015         # This is an absolute path, we can use it without further modifications.
33016         new_path="$path"
33017       fi
33018 
33019       if test "x$new_path" = x; then
33020         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33021 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33022         has_space=`$ECHO "$complete" | $GREP " "`
33023         if test "x$has_space" != x; then
33024           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33025 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33026         fi
33027         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33028       fi
33029     fi
33030 
33031     # Now join together the path and the arguments once again
33032     if test "x$arguments" != xEOL; then
33033       new_complete="$new_path ${arguments% *}"
33034     else
33035       new_complete="$new_path"
33036     fi
33037 
33038     if test "x$complete" != "x$new_complete"; then
33039       CXX="$new_complete"
33040       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33041 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33042     fi
33043   fi
33044 
33045   TEST_COMPILER="$CXX"
33046   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
33047   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
33048   if test "x$OPENJDK_BUILD_OS" != xaix; then
33049     # FIXME: This test should not be needed anymore; we don't do that for any platform.
33050     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33051 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33052 
33053   if test "x$OPENJDK_BUILD_OS" != xwindows; then
33054     # Follow a chain of symbolic links. Use readlink
33055     # where it exists, else fall back to horribly
33056     # complicated shell code.
33057     if test "x$READLINK_TESTED" != yes; then
33058       # On MacOSX there is a readlink tool with a different
33059       # purpose than the GNU readlink tool. Check the found readlink.
33060       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33061       if test "x$ISGNU" = x; then
33062         # A readlink that we do not know how to use.
33063         # Are there other non-GNU readlinks out there?
33064         READLINK_TESTED=yes
33065         READLINK=
33066       fi
33067     fi
33068 
33069     if test "x$READLINK" != x; then
33070       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
33071     else
33072       # Save the current directory for restoring afterwards
33073       STARTDIR=$PWD
33074       COUNTER=0
33075       sym_link_dir=`$DIRNAME $TEST_COMPILER`
33076       sym_link_file=`$BASENAME $TEST_COMPILER`
33077       cd $sym_link_dir
33078       # Use -P flag to resolve symlinks in directories.
33079       cd `$THEPWDCMD -P`
33080       sym_link_dir=`$THEPWDCMD -P`
33081       # Resolve file symlinks
33082       while test $COUNTER -lt 20; do
33083         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33084         if test "x$ISLINK" == x; then
33085           # This is not a symbolic link! We are done!
33086           break
33087         fi
33088         # Again resolve directory symlinks since the target of the just found
33089         # link could be in a different directory
33090         cd `$DIRNAME $ISLINK`
33091         sym_link_dir=`$THEPWDCMD -P`
33092         sym_link_file=`$BASENAME $ISLINK`
33093         let COUNTER=COUNTER+1
33094       done
33095       cd $STARTDIR
33096       TEST_COMPILER=$sym_link_dir/$sym_link_file
33097     fi
33098   fi
33099 
33100     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
33101 $as_echo "$TEST_COMPILER" >&6; }
33102   fi
33103   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
33104 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
33105 
33106   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
33107   if test "x$COMPILER_BASENAME" = "xccache"; then
33108     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
33109 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
33110     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
33111     # We want to control ccache invocation ourselves, so ignore this cc and try
33112     # searching again.
33113 
33114     # Remove the path to the fake ccache cc from the PATH
33115     RETRY_COMPILER_SAVED_PATH="$PATH"
33116     COMPILER_DIRNAME=`$DIRNAME $CXX`
33117     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
33118 
33119     # Try again looking for our compiler
33120     if test -n "$ac_tool_prefix"; then
33121   for ac_prog in $TOOLCHAIN_CXX_BINARY
33122   do
33123     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33124 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33126 $as_echo_n "checking for $ac_word... " >&6; }
33127 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
33128   $as_echo_n "(cached) " >&6
33129 else
33130   if test -n "$PROPER_COMPILER_CXX"; then
33131   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
33132 else
33133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33134 for as_dir in $PATH
33135 do
33136   IFS=$as_save_IFS
33137   test -z "$as_dir" && as_dir=.
33138     for ac_exec_ext in '' $ac_executable_extensions; do
33139   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33140     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
33141     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33142     break 2
33143   fi
33144 done
33145   done
33146 IFS=$as_save_IFS
33147 
33148 fi
33149 fi
33150 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
33151 if test -n "$PROPER_COMPILER_CXX"; then
33152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33153 $as_echo "$PROPER_COMPILER_CXX" >&6; }
33154 else
33155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33156 $as_echo "no" >&6; }
33157 fi
33158 
33159 
33160     test -n "$PROPER_COMPILER_CXX" && break
33161   done
33162 fi
33163 if test -z "$PROPER_COMPILER_CXX"; then
33164   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
33165   for ac_prog in $TOOLCHAIN_CXX_BINARY
33166 do
33167   # Extract the first word of "$ac_prog", so it can be a program name with args.
33168 set dummy $ac_prog; ac_word=$2
33169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33170 $as_echo_n "checking for $ac_word... " >&6; }
33171 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
33172   $as_echo_n "(cached) " >&6
33173 else
33174   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33175   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
33176 else
33177 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33178 for as_dir in $PATH
33179 do
33180   IFS=$as_save_IFS
33181   test -z "$as_dir" && as_dir=.
33182     for ac_exec_ext in '' $ac_executable_extensions; do
33183   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33184     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
33185     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33186     break 2
33187   fi
33188 done
33189   done
33190 IFS=$as_save_IFS
33191 
33192 fi
33193 fi
33194 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
33195 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
33197 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
33198 else
33199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33200 $as_echo "no" >&6; }
33201 fi
33202 
33203 
33204   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
33205 done
33206 
33207   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
33208     PROPER_COMPILER_CXX=""
33209   else
33210     case $cross_compiling:$ac_tool_warned in
33211 yes:)
33212 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33213 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33214 ac_tool_warned=yes ;;
33215 esac
33216     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
33217   fi
33218 fi
33219 
33220 
33221   # Only process if variable expands to non-empty
33222 
33223   if test "x$PROPER_COMPILER_CXX" != x; then
33224     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33225 
33226   # First separate the path from the arguments. This will split at the first
33227   # space.
33228   complete="$PROPER_COMPILER_CXX"
33229   path="${complete%% *}"
33230   tmp="$complete EOL"
33231   arguments="${tmp#* }"
33232 
33233   # Input might be given as Windows format, start by converting to
33234   # unix format.
33235   new_path=`$CYGPATH -u "$path"`
33236 
33237   # Now try to locate executable using which
33238   new_path=`$WHICH "$new_path" 2> /dev/null`
33239   # bat and cmd files are not always considered executable in cygwin causing which
33240   # to not find them
33241   if test "x$new_path" = x \
33242       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33243       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33244     new_path=`$CYGPATH -u "$path"`
33245   fi
33246   if test "x$new_path" = x; then
33247     # Oops. Which didn't find the executable.
33248     # The splitting of arguments from the executable at a space might have been incorrect,
33249     # since paths with space are more likely in Windows. Give it another try with the whole
33250     # argument.
33251     path="$complete"
33252     arguments="EOL"
33253     new_path=`$CYGPATH -u "$path"`
33254     new_path=`$WHICH "$new_path" 2> /dev/null`
33255     # bat and cmd files are not always considered executable in cygwin causing which
33256     # to not find them
33257     if test "x$new_path" = x \
33258         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33259         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33260       new_path=`$CYGPATH -u "$path"`
33261     fi
33262     if test "x$new_path" = x; then
33263       # It's still not found. Now this is an unrecoverable error.
33264       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33265 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33266       has_space=`$ECHO "$complete" | $GREP " "`
33267       if test "x$has_space" != x; then
33268         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33269 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33270       fi
33271       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33272     fi
33273   fi
33274 
33275   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33276   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33277   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33278   # "foo.exe" is OK but "foo" is an error.
33279   #
33280   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33281   # It is also a way to make sure we got the proper file name for the real test later on.
33282   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33283   if test "x$test_shortpath" = x; then
33284     # Short path failed, file does not exist as specified.
33285     # Try adding .exe or .cmd
33286     if test -f "${new_path}.exe"; then
33287       input_to_shortpath="${new_path}.exe"
33288     elif test -f "${new_path}.cmd"; then
33289       input_to_shortpath="${new_path}.cmd"
33290     else
33291       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
33292 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
33293       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33294 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33295       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33296     fi
33297   else
33298     input_to_shortpath="$new_path"
33299   fi
33300 
33301   # Call helper function which possibly converts this using DOS-style short mode.
33302   # If so, the updated path is stored in $new_path.
33303   new_path="$input_to_shortpath"
33304 
33305   input_path="$input_to_shortpath"
33306   # Check if we need to convert this using DOS-style short mode. If the path
33307   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33308   # take no chances and rewrite it.
33309   # Note: m4 eats our [], so we need to use [ and ] instead.
33310   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33311   if test "x$has_forbidden_chars" != x; then
33312     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33313     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33314     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33315     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33316       # Going to short mode and back again did indeed matter. Since short mode is
33317       # case insensitive, let's make it lowercase to improve readability.
33318       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33319       # Now convert it back to Unix-style (cygpath)
33320       input_path=`$CYGPATH -u "$shortmode_path"`
33321       new_path="$input_path"
33322     fi
33323   fi
33324 
33325   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33326   if test "x$test_cygdrive_prefix" = x; then
33327     # As a simple fix, exclude /usr/bin since it's not a real path.
33328     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33329       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33330       # a path prefixed by /cygdrive for fixpath to work.
33331       new_path="$CYGWIN_ROOT_PATH$input_path"
33332     fi
33333   fi
33334 
33335   # remove trailing .exe if any
33336   new_path="${new_path/%.exe/}"
33337 
33338     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33339 
33340   # First separate the path from the arguments. This will split at the first
33341   # space.
33342   complete="$PROPER_COMPILER_CXX"
33343   path="${complete%% *}"
33344   tmp="$complete EOL"
33345   arguments="${tmp#* }"
33346 
33347   # Input might be given as Windows format, start by converting to
33348   # unix format.
33349   new_path="$path"
33350 
33351   windows_path="$new_path"
33352   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33353     unix_path=`$CYGPATH -u "$windows_path"`
33354     new_path="$unix_path"
33355   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33356     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33357     new_path="$unix_path"
33358   fi
33359 
33360 
33361   # Now try to locate executable using which
33362   new_path=`$WHICH "$new_path" 2> /dev/null`
33363 
33364   if test "x$new_path" = x; then
33365     # Oops. Which didn't find the executable.
33366     # The splitting of arguments from the executable at a space might have been incorrect,
33367     # since paths with space are more likely in Windows. Give it another try with the whole
33368     # argument.
33369     path="$complete"
33370     arguments="EOL"
33371     new_path="$path"
33372 
33373   windows_path="$new_path"
33374   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33375     unix_path=`$CYGPATH -u "$windows_path"`
33376     new_path="$unix_path"
33377   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33378     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33379     new_path="$unix_path"
33380   fi
33381 
33382 
33383     new_path=`$WHICH "$new_path" 2> /dev/null`
33384     # bat and cmd files are not always considered executable in MSYS causing which
33385     # to not find them
33386     if test "x$new_path" = x \
33387         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33388         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33389       new_path="$path"
33390 
33391   windows_path="$new_path"
33392   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33393     unix_path=`$CYGPATH -u "$windows_path"`
33394     new_path="$unix_path"
33395   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33396     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33397     new_path="$unix_path"
33398   fi
33399 
33400     fi
33401 
33402     if test "x$new_path" = x; then
33403       # It's still not found. Now this is an unrecoverable error.
33404       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33405 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33406       has_space=`$ECHO "$complete" | $GREP " "`
33407       if test "x$has_space" != x; then
33408         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33409 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33410       fi
33411       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33412     fi
33413   fi
33414 
33415   # Now new_path has a complete unix path to the binary
33416   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33417     # Keep paths in /bin as-is, but remove trailing .exe if any
33418     new_path="${new_path/%.exe/}"
33419     # Do not save /bin paths to all_fixpath_prefixes!
33420   else
33421     # Not in mixed or Windows style, start by that.
33422     new_path=`cmd //c echo $new_path`
33423 
33424   input_path="$new_path"
33425   # Check if we need to convert this using DOS-style short mode. If the path
33426   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33427   # take no chances and rewrite it.
33428   # Note: m4 eats our [], so we need to use [ and ] instead.
33429   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33430   if test "x$has_forbidden_chars" != x; then
33431     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33432     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33433   fi
33434 
33435     # Output is in $new_path
33436 
33437   windows_path="$new_path"
33438   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33439     unix_path=`$CYGPATH -u "$windows_path"`
33440     new_path="$unix_path"
33441   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33442     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33443     new_path="$unix_path"
33444   fi
33445 
33446     # remove trailing .exe if any
33447     new_path="${new_path/%.exe/}"
33448 
33449     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33450     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33451   fi
33452 
33453     else
33454       # We're on a unix platform. Hooray! :)
33455       # First separate the path from the arguments. This will split at the first
33456       # space.
33457       complete="$PROPER_COMPILER_CXX"
33458       path="${complete%% *}"
33459       tmp="$complete EOL"
33460       arguments="${tmp#* }"
33461 
33462       # Cannot rely on the command "which" here since it doesn't always work.
33463       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33464       if test -z "$is_absolute_path"; then
33465         # Path to executable is not absolute. Find it.
33466         IFS_save="$IFS"
33467         IFS=:
33468         for p in $PATH; do
33469           if test -f "$p/$path" && test -x "$p/$path"; then
33470             new_path="$p/$path"
33471             break
33472           fi
33473         done
33474         IFS="$IFS_save"
33475       else
33476         # This is an absolute path, we can use it without further modifications.
33477         new_path="$path"
33478       fi
33479 
33480       if test "x$new_path" = x; then
33481         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33482 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33483         has_space=`$ECHO "$complete" | $GREP " "`
33484         if test "x$has_space" != x; then
33485           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33486 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33487         fi
33488         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33489       fi
33490     fi
33491 
33492     # Now join together the path and the arguments once again
33493     if test "x$arguments" != xEOL; then
33494       new_complete="$new_path ${arguments% *}"
33495     else
33496       new_complete="$new_path"
33497     fi
33498 
33499     if test "x$complete" != "x$new_complete"; then
33500       PROPER_COMPILER_CXX="$new_complete"
33501       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
33502 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
33503     fi
33504   fi
33505 
33506     PATH="$RETRY_COMPILER_SAVED_PATH"
33507 
33508     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
33509 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
33510 
33511   if test "x$OPENJDK_BUILD_OS" != xwindows; then
33512     # Follow a chain of symbolic links. Use readlink
33513     # where it exists, else fall back to horribly
33514     # complicated shell code.
33515     if test "x$READLINK_TESTED" != yes; then
33516       # On MacOSX there is a readlink tool with a different
33517       # purpose than the GNU readlink tool. Check the found readlink.
33518       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33519       if test "x$ISGNU" = x; then
33520         # A readlink that we do not know how to use.
33521         # Are there other non-GNU readlinks out there?
33522         READLINK_TESTED=yes
33523         READLINK=
33524       fi
33525     fi
33526 
33527     if test "x$READLINK" != x; then
33528       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
33529     else
33530       # Save the current directory for restoring afterwards
33531       STARTDIR=$PWD
33532       COUNTER=0
33533       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
33534       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
33535       cd $sym_link_dir
33536       # Use -P flag to resolve symlinks in directories.
33537       cd `$THEPWDCMD -P`
33538       sym_link_dir=`$THEPWDCMD -P`
33539       # Resolve file symlinks
33540       while test $COUNTER -lt 20; do
33541         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33542         if test "x$ISLINK" == x; then
33543           # This is not a symbolic link! We are done!
33544           break
33545         fi
33546         # Again resolve directory symlinks since the target of the just found
33547         # link could be in a different directory
33548         cd `$DIRNAME $ISLINK`
33549         sym_link_dir=`$THEPWDCMD -P`
33550         sym_link_file=`$BASENAME $ISLINK`
33551         let COUNTER=COUNTER+1
33552       done
33553       cd $STARTDIR
33554       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
33555     fi
33556   fi
33557 
33558     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33559 $as_echo "$PROPER_COMPILER_CXX" >&6; }
33560     CXX="$PROPER_COMPILER_CXX"
33561   else
33562     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
33563 $as_echo "no, keeping CXX" >&6; }
33564   fi
33565 
33566 
33567   COMPILER=$CXX
33568   COMPILER_NAME=$COMPILER_NAME
33569 
33570   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33571     # cc -V output typically looks like
33572     #     cc: Sun C 5.12 Linux_i386 2011/11/16
33573     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33574     # Check that this is likely to be the Solaris Studio cc.
33575     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33576     if test $? -ne 0; then
33577       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33578       { $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
33579 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33580       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33581 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33582       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33583 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33584       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33585     fi
33586     # Remove usage instructions (if present), and
33587     # collapse compiler output into a single line
33588     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33589         $SED -e 's/ *[Uu]sage:.*//'`
33590     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33591         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33592   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33593     # xlc -qversion output typically looks like
33594     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33595     #     Version: 11.01.0000.0015
33596     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33597     # Check that this is likely to be the IBM XL C compiler.
33598     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33599     if test $? -ne 0; then
33600       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33601       { $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
33602 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33603       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33604 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33605       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33606 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33607       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33608     fi
33609     # Collapse compiler output into a single line
33610     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33611     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33612         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33613   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33614     # There is no specific version flag, but all output starts with a version string.
33615     # First line typically looks something like:
33616     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33617     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33618     # Check that this is likely to be Microsoft CL.EXE.
33619     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33620     if test $? -ne 0; then
33621       { $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
33622 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33623       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33624 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33625       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33626     fi
33627     # Collapse compiler output into a single line
33628     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33629     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33630         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33631   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33632     # gcc --version output typically looks like
33633     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33634     #     Copyright (C) 2013 Free Software Foundation, Inc.
33635     #     This is free software; see the source for copying conditions.  There is NO
33636     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33637     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33638     # Check that this is likely to be GCC.
33639     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33640     if test $? -ne 0; then
33641       { $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
33642 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33643       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33644 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33645       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33646     fi
33647     # Remove Copyright and legalese from version string, and
33648     # collapse into a single line
33649     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33650         $SED -e 's/ *Copyright .*//'`
33651     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33652         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
33653   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33654     # clang --version output typically looks like
33655     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33656     #    clang version 3.3 (tags/RELEASE_33/final)
33657     # or
33658     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33659     #    Target: x86_64-pc-linux-gnu
33660     #    Thread model: posix
33661     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33662     # Check that this is likely to be clang
33663     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33664     if test $? -ne 0; then
33665       { $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
33666 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33667       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33668 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33669       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33670     fi
33671     # Collapse compiler output into a single line
33672     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33673     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33674         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
33675   else
33676       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33677   fi
33678   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33679   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33680   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33681   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
33682 
33683   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33684 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33685 
33686 
33687   # Now that we have resolved CXX ourself, let autoconf have its go at it
33688   ac_ext=cpp
33689 ac_cpp='$CXXCPP $CPPFLAGS'
33690 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33691 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33692 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33693 if test -z "$CXX"; then
33694   if test -n "$CCC"; then
33695     CXX=$CCC
33696   else
33697     if test -n "$ac_tool_prefix"; then
33698   for ac_prog in $CXX
33699   do
33700     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33701 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33703 $as_echo_n "checking for $ac_word... " >&6; }
33704 if ${ac_cv_prog_CXX+:} false; then :
33705   $as_echo_n "(cached) " >&6
33706 else
33707   if test -n "$CXX"; then
33708   ac_cv_prog_CXX="$CXX" # Let the user override the test.
33709 else
33710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33711 for as_dir in $PATH
33712 do
33713   IFS=$as_save_IFS
33714   test -z "$as_dir" && as_dir=.
33715     for ac_exec_ext in '' $ac_executable_extensions; do
33716   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33717     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
33718     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33719     break 2
33720   fi
33721 done
33722   done
33723 IFS=$as_save_IFS
33724 
33725 fi
33726 fi
33727 CXX=$ac_cv_prog_CXX
33728 if test -n "$CXX"; then
33729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
33730 $as_echo "$CXX" >&6; }
33731 else
33732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33733 $as_echo "no" >&6; }
33734 fi
33735 
33736 
33737     test -n "$CXX" && break
33738   done
33739 fi
33740 if test -z "$CXX"; then
33741   ac_ct_CXX=$CXX
33742   for ac_prog in $CXX
33743 do
33744   # Extract the first word of "$ac_prog", so it can be a program name with args.
33745 set dummy $ac_prog; ac_word=$2
33746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33747 $as_echo_n "checking for $ac_word... " >&6; }
33748 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
33749   $as_echo_n "(cached) " >&6
33750 else
33751   if test -n "$ac_ct_CXX"; then
33752   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
33753 else
33754 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33755 for as_dir in $PATH
33756 do
33757   IFS=$as_save_IFS
33758   test -z "$as_dir" && as_dir=.
33759     for ac_exec_ext in '' $ac_executable_extensions; do
33760   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33761     ac_cv_prog_ac_ct_CXX="$ac_prog"
33762     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33763     break 2
33764   fi
33765 done
33766   done
33767 IFS=$as_save_IFS
33768 
33769 fi
33770 fi
33771 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
33772 if test -n "$ac_ct_CXX"; then
33773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
33774 $as_echo "$ac_ct_CXX" >&6; }
33775 else
33776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33777 $as_echo "no" >&6; }
33778 fi
33779 
33780 
33781   test -n "$ac_ct_CXX" && break
33782 done
33783 
33784   if test "x$ac_ct_CXX" = x; then
33785     CXX="g++"
33786   else
33787     case $cross_compiling:$ac_tool_warned in
33788 yes:)
33789 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33790 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33791 ac_tool_warned=yes ;;
33792 esac
33793     CXX=$ac_ct_CXX
33794   fi
33795 fi
33796 
33797   fi
33798 fi
33799 # Provide some information about the compiler.
33800 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
33801 set X $ac_compile
33802 ac_compiler=$2
33803 for ac_option in --version -v -V -qversion; do
33804   { { ac_try="$ac_compiler $ac_option >&5"
33805 case "(($ac_try" in
33806   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33807   *) ac_try_echo=$ac_try;;
33808 esac
33809 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33810 $as_echo "$ac_try_echo"; } >&5
33811   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33812   ac_status=$?
33813   if test -s conftest.err; then
33814     sed '10a\
33815 ... rest of stderr output deleted ...
33816          10q' conftest.err >conftest.er1
33817     cat conftest.er1 >&5
33818   fi
33819   rm -f conftest.er1 conftest.err
33820   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33821   test $ac_status = 0; }
33822 done
33823 
33824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
33825 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
33826 if ${ac_cv_cxx_compiler_gnu+:} false; then :
33827   $as_echo_n "(cached) " >&6
33828 else
33829   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33830 /* end confdefs.h.  */
33831 
33832 int
33833 main ()
33834 {
33835 #ifndef __GNUC__
33836        choke me
33837 #endif
33838 
33839   ;
33840   return 0;
33841 }
33842 _ACEOF
33843 if ac_fn_cxx_try_compile "$LINENO"; then :
33844   ac_compiler_gnu=yes
33845 else
33846   ac_compiler_gnu=no
33847 fi
33848 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33849 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
33850 
33851 fi
33852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
33853 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
33854 if test $ac_compiler_gnu = yes; then
33855   GXX=yes
33856 else
33857   GXX=
33858 fi
33859 ac_test_CXXFLAGS=${CXXFLAGS+set}
33860 ac_save_CXXFLAGS=$CXXFLAGS
33861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
33862 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
33863 if ${ac_cv_prog_cxx_g+:} false; then :
33864   $as_echo_n "(cached) " >&6
33865 else
33866   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
33867    ac_cxx_werror_flag=yes
33868    ac_cv_prog_cxx_g=no
33869    CXXFLAGS="-g"
33870    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33871 /* end confdefs.h.  */
33872 
33873 int
33874 main ()
33875 {
33876 
33877   ;
33878   return 0;
33879 }
33880 _ACEOF
33881 if ac_fn_cxx_try_compile "$LINENO"; then :
33882   ac_cv_prog_cxx_g=yes
33883 else
33884   CXXFLAGS=""
33885       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33886 /* end confdefs.h.  */
33887 
33888 int
33889 main ()
33890 {
33891 
33892   ;
33893   return 0;
33894 }
33895 _ACEOF
33896 if ac_fn_cxx_try_compile "$LINENO"; then :
33897 
33898 else
33899   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33900          CXXFLAGS="-g"
33901          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33902 /* end confdefs.h.  */
33903 
33904 int
33905 main ()
33906 {
33907 
33908   ;
33909   return 0;
33910 }
33911 _ACEOF
33912 if ac_fn_cxx_try_compile "$LINENO"; then :
33913   ac_cv_prog_cxx_g=yes
33914 fi
33915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33916 fi
33917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33918 fi
33919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33920    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33921 fi
33922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
33923 $as_echo "$ac_cv_prog_cxx_g" >&6; }
33924 if test "$ac_test_CXXFLAGS" = set; then
33925   CXXFLAGS=$ac_save_CXXFLAGS
33926 elif test $ac_cv_prog_cxx_g = yes; then
33927   if test "$GXX" = yes; then
33928     CXXFLAGS="-g -O2"
33929   else
33930     CXXFLAGS="-g"
33931   fi
33932 else
33933   if test "$GXX" = yes; then
33934     CXXFLAGS="-O2"
33935   else
33936     CXXFLAGS=
33937   fi
33938 fi
33939 ac_ext=cpp
33940 ac_cpp='$CXXCPP $CPPFLAGS'
33941 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33942 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33943 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33944 
33945 
33946   #
33947   # Setup the preprocessor (CPP and CXXCPP)
33948   #
33949   ac_ext=c
33950 ac_cpp='$CPP $CPPFLAGS'
33951 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33952 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33953 ac_compiler_gnu=$ac_cv_c_compiler_gnu
33954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
33955 $as_echo_n "checking how to run the C preprocessor... " >&6; }
33956 # On Suns, sometimes $CPP names a directory.
33957 if test -n "$CPP" && test -d "$CPP"; then
33958   CPP=
33959 fi
33960 if test -z "$CPP"; then
33961   if ${ac_cv_prog_CPP+:} false; then :
33962   $as_echo_n "(cached) " >&6
33963 else
33964       # Double quotes because CPP needs to be expanded
33965     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
33966     do
33967       ac_preproc_ok=false
33968 for ac_c_preproc_warn_flag in '' yes
33969 do
33970   # Use a header file that comes with gcc, so configuring glibc
33971   # with a fresh cross-compiler works.
33972   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33973   # <limits.h> exists even on freestanding compilers.
33974   # On the NeXT, cc -E runs the code through the compiler's parser,
33975   # not just through cpp. "Syntax error" is here to catch this case.
33976   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33977 /* end confdefs.h.  */
33978 #ifdef __STDC__
33979 # include <limits.h>
33980 #else
33981 # include <assert.h>
33982 #endif
33983                      Syntax error
33984 _ACEOF
33985 if ac_fn_c_try_cpp "$LINENO"; then :
33986 
33987 else
33988   # Broken: fails on valid input.
33989 continue
33990 fi
33991 rm -f conftest.err conftest.i conftest.$ac_ext
33992 
33993   # OK, works on sane cases.  Now check whether nonexistent headers
33994   # can be detected and how.
33995   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33996 /* end confdefs.h.  */
33997 #include <ac_nonexistent.h>
33998 _ACEOF
33999 if ac_fn_c_try_cpp "$LINENO"; then :
34000   # Broken: success on invalid input.
34001 continue
34002 else
34003   # Passes both tests.
34004 ac_preproc_ok=:
34005 break
34006 fi
34007 rm -f conftest.err conftest.i conftest.$ac_ext
34008 
34009 done
34010 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34011 rm -f conftest.i conftest.err conftest.$ac_ext
34012 if $ac_preproc_ok; then :
34013   break
34014 fi
34015 
34016     done
34017     ac_cv_prog_CPP=$CPP
34018 
34019 fi
34020   CPP=$ac_cv_prog_CPP
34021 else
34022   ac_cv_prog_CPP=$CPP
34023 fi
34024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34025 $as_echo "$CPP" >&6; }
34026 ac_preproc_ok=false
34027 for ac_c_preproc_warn_flag in '' yes
34028 do
34029   # Use a header file that comes with gcc, so configuring glibc
34030   # with a fresh cross-compiler works.
34031   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34032   # <limits.h> exists even on freestanding compilers.
34033   # On the NeXT, cc -E runs the code through the compiler's parser,
34034   # not just through cpp. "Syntax error" is here to catch this case.
34035   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34036 /* end confdefs.h.  */
34037 #ifdef __STDC__
34038 # include <limits.h>
34039 #else
34040 # include <assert.h>
34041 #endif
34042                      Syntax error
34043 _ACEOF
34044 if ac_fn_c_try_cpp "$LINENO"; then :
34045 
34046 else
34047   # Broken: fails on valid input.
34048 continue
34049 fi
34050 rm -f conftest.err conftest.i conftest.$ac_ext
34051 
34052   # OK, works on sane cases.  Now check whether nonexistent headers
34053   # can be detected and how.
34054   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34055 /* end confdefs.h.  */
34056 #include <ac_nonexistent.h>
34057 _ACEOF
34058 if ac_fn_c_try_cpp "$LINENO"; then :
34059   # Broken: success on invalid input.
34060 continue
34061 else
34062   # Passes both tests.
34063 ac_preproc_ok=:
34064 break
34065 fi
34066 rm -f conftest.err conftest.i conftest.$ac_ext
34067 
34068 done
34069 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34070 rm -f conftest.i conftest.err conftest.$ac_ext
34071 if $ac_preproc_ok; then :
34072 
34073 else
34074   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34075 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34076 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34077 See \`config.log' for more details" "$LINENO" 5; }
34078 fi
34079 
34080 ac_ext=cpp
34081 ac_cpp='$CXXCPP $CPPFLAGS'
34082 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34083 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34084 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34085 
34086 
34087   # Only process if variable expands to non-empty
34088 
34089   if test "x$CPP" != x; then
34090     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34091 
34092   # First separate the path from the arguments. This will split at the first
34093   # space.
34094   complete="$CPP"
34095   path="${complete%% *}"
34096   tmp="$complete EOL"
34097   arguments="${tmp#* }"
34098 
34099   # Input might be given as Windows format, start by converting to
34100   # unix format.
34101   new_path=`$CYGPATH -u "$path"`
34102 
34103   # Now try to locate executable using which
34104   new_path=`$WHICH "$new_path" 2> /dev/null`
34105   # bat and cmd files are not always considered executable in cygwin causing which
34106   # to not find them
34107   if test "x$new_path" = x \
34108       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34109       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34110     new_path=`$CYGPATH -u "$path"`
34111   fi
34112   if test "x$new_path" = x; then
34113     # Oops. Which didn't find the executable.
34114     # The splitting of arguments from the executable at a space might have been incorrect,
34115     # since paths with space are more likely in Windows. Give it another try with the whole
34116     # argument.
34117     path="$complete"
34118     arguments="EOL"
34119     new_path=`$CYGPATH -u "$path"`
34120     new_path=`$WHICH "$new_path" 2> /dev/null`
34121     # bat and cmd files are not always considered executable in cygwin causing which
34122     # to not find them
34123     if test "x$new_path" = x \
34124         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34125         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34126       new_path=`$CYGPATH -u "$path"`
34127     fi
34128     if test "x$new_path" = x; then
34129       # It's still not found. Now this is an unrecoverable error.
34130       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34131 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34132       has_space=`$ECHO "$complete" | $GREP " "`
34133       if test "x$has_space" != x; then
34134         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34135 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34136       fi
34137       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34138     fi
34139   fi
34140 
34141   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34142   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34143   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34144   # "foo.exe" is OK but "foo" is an error.
34145   #
34146   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34147   # It is also a way to make sure we got the proper file name for the real test later on.
34148   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34149   if test "x$test_shortpath" = x; then
34150     # Short path failed, file does not exist as specified.
34151     # Try adding .exe or .cmd
34152     if test -f "${new_path}.exe"; then
34153       input_to_shortpath="${new_path}.exe"
34154     elif test -f "${new_path}.cmd"; then
34155       input_to_shortpath="${new_path}.cmd"
34156     else
34157       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34158 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34159       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34160 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34161       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34162     fi
34163   else
34164     input_to_shortpath="$new_path"
34165   fi
34166 
34167   # Call helper function which possibly converts this using DOS-style short mode.
34168   # If so, the updated path is stored in $new_path.
34169   new_path="$input_to_shortpath"
34170 
34171   input_path="$input_to_shortpath"
34172   # Check if we need to convert this using DOS-style short mode. If the path
34173   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34174   # take no chances and rewrite it.
34175   # Note: m4 eats our [], so we need to use [ and ] instead.
34176   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34177   if test "x$has_forbidden_chars" != x; then
34178     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34179     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34180     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34181     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34182       # Going to short mode and back again did indeed matter. Since short mode is
34183       # case insensitive, let's make it lowercase to improve readability.
34184       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34185       # Now convert it back to Unix-style (cygpath)
34186       input_path=`$CYGPATH -u "$shortmode_path"`
34187       new_path="$input_path"
34188     fi
34189   fi
34190 
34191   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34192   if test "x$test_cygdrive_prefix" = x; then
34193     # As a simple fix, exclude /usr/bin since it's not a real path.
34194     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34195       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34196       # a path prefixed by /cygdrive for fixpath to work.
34197       new_path="$CYGWIN_ROOT_PATH$input_path"
34198     fi
34199   fi
34200 
34201   # remove trailing .exe if any
34202   new_path="${new_path/%.exe/}"
34203 
34204     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34205 
34206   # First separate the path from the arguments. This will split at the first
34207   # space.
34208   complete="$CPP"
34209   path="${complete%% *}"
34210   tmp="$complete EOL"
34211   arguments="${tmp#* }"
34212 
34213   # Input might be given as Windows format, start by converting to
34214   # unix format.
34215   new_path="$path"
34216 
34217   windows_path="$new_path"
34218   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34219     unix_path=`$CYGPATH -u "$windows_path"`
34220     new_path="$unix_path"
34221   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34222     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34223     new_path="$unix_path"
34224   fi
34225 
34226 
34227   # Now try to locate executable using which
34228   new_path=`$WHICH "$new_path" 2> /dev/null`
34229 
34230   if test "x$new_path" = x; then
34231     # Oops. Which didn't find the executable.
34232     # The splitting of arguments from the executable at a space might have been incorrect,
34233     # since paths with space are more likely in Windows. Give it another try with the whole
34234     # argument.
34235     path="$complete"
34236     arguments="EOL"
34237     new_path="$path"
34238 
34239   windows_path="$new_path"
34240   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34241     unix_path=`$CYGPATH -u "$windows_path"`
34242     new_path="$unix_path"
34243   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34244     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34245     new_path="$unix_path"
34246   fi
34247 
34248 
34249     new_path=`$WHICH "$new_path" 2> /dev/null`
34250     # bat and cmd files are not always considered executable in MSYS causing which
34251     # to not find them
34252     if test "x$new_path" = x \
34253         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34254         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34255       new_path="$path"
34256 
34257   windows_path="$new_path"
34258   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34259     unix_path=`$CYGPATH -u "$windows_path"`
34260     new_path="$unix_path"
34261   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34262     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34263     new_path="$unix_path"
34264   fi
34265 
34266     fi
34267 
34268     if test "x$new_path" = x; then
34269       # It's still not found. Now this is an unrecoverable error.
34270       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34271 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34272       has_space=`$ECHO "$complete" | $GREP " "`
34273       if test "x$has_space" != x; then
34274         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34275 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34276       fi
34277       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34278     fi
34279   fi
34280 
34281   # Now new_path has a complete unix path to the binary
34282   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34283     # Keep paths in /bin as-is, but remove trailing .exe if any
34284     new_path="${new_path/%.exe/}"
34285     # Do not save /bin paths to all_fixpath_prefixes!
34286   else
34287     # Not in mixed or Windows style, start by that.
34288     new_path=`cmd //c echo $new_path`
34289 
34290   input_path="$new_path"
34291   # Check if we need to convert this using DOS-style short mode. If the path
34292   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34293   # take no chances and rewrite it.
34294   # Note: m4 eats our [], so we need to use [ and ] instead.
34295   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34296   if test "x$has_forbidden_chars" != x; then
34297     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34298     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34299   fi
34300 
34301     # Output is in $new_path
34302 
34303   windows_path="$new_path"
34304   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34305     unix_path=`$CYGPATH -u "$windows_path"`
34306     new_path="$unix_path"
34307   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34308     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34309     new_path="$unix_path"
34310   fi
34311 
34312     # remove trailing .exe if any
34313     new_path="${new_path/%.exe/}"
34314 
34315     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34316     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34317   fi
34318 
34319     else
34320       # We're on a unix platform. Hooray! :)
34321       # First separate the path from the arguments. This will split at the first
34322       # space.
34323       complete="$CPP"
34324       path="${complete%% *}"
34325       tmp="$complete EOL"
34326       arguments="${tmp#* }"
34327 
34328       # Cannot rely on the command "which" here since it doesn't always work.
34329       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34330       if test -z "$is_absolute_path"; then
34331         # Path to executable is not absolute. Find it.
34332         IFS_save="$IFS"
34333         IFS=:
34334         for p in $PATH; do
34335           if test -f "$p/$path" && test -x "$p/$path"; then
34336             new_path="$p/$path"
34337             break
34338           fi
34339         done
34340         IFS="$IFS_save"
34341       else
34342         # This is an absolute path, we can use it without further modifications.
34343         new_path="$path"
34344       fi
34345 
34346       if test "x$new_path" = x; then
34347         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34348 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34349         has_space=`$ECHO "$complete" | $GREP " "`
34350         if test "x$has_space" != x; then
34351           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34352 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34353         fi
34354         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34355       fi
34356     fi
34357 
34358     # Now join together the path and the arguments once again
34359     if test "x$arguments" != xEOL; then
34360       new_complete="$new_path ${arguments% *}"
34361     else
34362       new_complete="$new_path"
34363     fi
34364 
34365     if test "x$complete" != "x$new_complete"; then
34366       CPP="$new_complete"
34367       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34368 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34369     fi
34370   fi
34371 
34372   ac_ext=cpp
34373 ac_cpp='$CXXCPP $CPPFLAGS'
34374 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34375 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34376 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34378 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34379 if test -z "$CXXCPP"; then
34380   if ${ac_cv_prog_CXXCPP+:} false; then :
34381   $as_echo_n "(cached) " >&6
34382 else
34383       # Double quotes because CXXCPP needs to be expanded
34384     for CXXCPP in "$CXX -E" "/lib/cpp"
34385     do
34386       ac_preproc_ok=false
34387 for ac_cxx_preproc_warn_flag in '' yes
34388 do
34389   # Use a header file that comes with gcc, so configuring glibc
34390   # with a fresh cross-compiler works.
34391   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34392   # <limits.h> exists even on freestanding compilers.
34393   # On the NeXT, cc -E runs the code through the compiler's parser,
34394   # not just through cpp. "Syntax error" is here to catch this case.
34395   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34396 /* end confdefs.h.  */
34397 #ifdef __STDC__
34398 # include <limits.h>
34399 #else
34400 # include <assert.h>
34401 #endif
34402                      Syntax error
34403 _ACEOF
34404 if ac_fn_cxx_try_cpp "$LINENO"; then :
34405 
34406 else
34407   # Broken: fails on valid input.
34408 continue
34409 fi
34410 rm -f conftest.err conftest.i conftest.$ac_ext
34411 
34412   # OK, works on sane cases.  Now check whether nonexistent headers
34413   # can be detected and how.
34414   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34415 /* end confdefs.h.  */
34416 #include <ac_nonexistent.h>
34417 _ACEOF
34418 if ac_fn_cxx_try_cpp "$LINENO"; then :
34419   # Broken: success on invalid input.
34420 continue
34421 else
34422   # Passes both tests.
34423 ac_preproc_ok=:
34424 break
34425 fi
34426 rm -f conftest.err conftest.i conftest.$ac_ext
34427 
34428 done
34429 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34430 rm -f conftest.i conftest.err conftest.$ac_ext
34431 if $ac_preproc_ok; then :
34432   break
34433 fi
34434 
34435     done
34436     ac_cv_prog_CXXCPP=$CXXCPP
34437 
34438 fi
34439   CXXCPP=$ac_cv_prog_CXXCPP
34440 else
34441   ac_cv_prog_CXXCPP=$CXXCPP
34442 fi
34443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34444 $as_echo "$CXXCPP" >&6; }
34445 ac_preproc_ok=false
34446 for ac_cxx_preproc_warn_flag in '' yes
34447 do
34448   # Use a header file that comes with gcc, so configuring glibc
34449   # with a fresh cross-compiler works.
34450   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34451   # <limits.h> exists even on freestanding compilers.
34452   # On the NeXT, cc -E runs the code through the compiler's parser,
34453   # not just through cpp. "Syntax error" is here to catch this case.
34454   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34455 /* end confdefs.h.  */
34456 #ifdef __STDC__
34457 # include <limits.h>
34458 #else
34459 # include <assert.h>
34460 #endif
34461                      Syntax error
34462 _ACEOF
34463 if ac_fn_cxx_try_cpp "$LINENO"; then :
34464 
34465 else
34466   # Broken: fails on valid input.
34467 continue
34468 fi
34469 rm -f conftest.err conftest.i conftest.$ac_ext
34470 
34471   # OK, works on sane cases.  Now check whether nonexistent headers
34472   # can be detected and how.
34473   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34474 /* end confdefs.h.  */
34475 #include <ac_nonexistent.h>
34476 _ACEOF
34477 if ac_fn_cxx_try_cpp "$LINENO"; then :
34478   # Broken: success on invalid input.
34479 continue
34480 else
34481   # Passes both tests.
34482 ac_preproc_ok=:
34483 break
34484 fi
34485 rm -f conftest.err conftest.i conftest.$ac_ext
34486 
34487 done
34488 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34489 rm -f conftest.i conftest.err conftest.$ac_ext
34490 if $ac_preproc_ok; then :
34491 
34492 else
34493   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34494 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34495 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
34496 See \`config.log' for more details" "$LINENO" 5; }
34497 fi
34498 
34499 ac_ext=cpp
34500 ac_cpp='$CXXCPP $CPPFLAGS'
34501 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34502 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34503 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34504 
34505 
34506   # Only process if variable expands to non-empty
34507 
34508   if test "x$CXXCPP" != x; then
34509     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34510 
34511   # First separate the path from the arguments. This will split at the first
34512   # space.
34513   complete="$CXXCPP"
34514   path="${complete%% *}"
34515   tmp="$complete EOL"
34516   arguments="${tmp#* }"
34517 
34518   # Input might be given as Windows format, start by converting to
34519   # unix format.
34520   new_path=`$CYGPATH -u "$path"`
34521 
34522   # Now try to locate executable using which
34523   new_path=`$WHICH "$new_path" 2> /dev/null`
34524   # bat and cmd files are not always considered executable in cygwin causing which
34525   # to not find them
34526   if test "x$new_path" = x \
34527       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34528       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34529     new_path=`$CYGPATH -u "$path"`
34530   fi
34531   if test "x$new_path" = x; then
34532     # Oops. Which didn't find the executable.
34533     # The splitting of arguments from the executable at a space might have been incorrect,
34534     # since paths with space are more likely in Windows. Give it another try with the whole
34535     # argument.
34536     path="$complete"
34537     arguments="EOL"
34538     new_path=`$CYGPATH -u "$path"`
34539     new_path=`$WHICH "$new_path" 2> /dev/null`
34540     # bat and cmd files are not always considered executable in cygwin causing which
34541     # to not find them
34542     if test "x$new_path" = x \
34543         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34544         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34545       new_path=`$CYGPATH -u "$path"`
34546     fi
34547     if test "x$new_path" = x; then
34548       # It's still not found. Now this is an unrecoverable error.
34549       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34550 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34551       has_space=`$ECHO "$complete" | $GREP " "`
34552       if test "x$has_space" != x; then
34553         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34554 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34555       fi
34556       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34557     fi
34558   fi
34559 
34560   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34561   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34562   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34563   # "foo.exe" is OK but "foo" is an error.
34564   #
34565   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34566   # It is also a way to make sure we got the proper file name for the real test later on.
34567   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34568   if test "x$test_shortpath" = x; then
34569     # Short path failed, file does not exist as specified.
34570     # Try adding .exe or .cmd
34571     if test -f "${new_path}.exe"; then
34572       input_to_shortpath="${new_path}.exe"
34573     elif test -f "${new_path}.cmd"; then
34574       input_to_shortpath="${new_path}.cmd"
34575     else
34576       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
34577 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
34578       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34579 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34580       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34581     fi
34582   else
34583     input_to_shortpath="$new_path"
34584   fi
34585 
34586   # Call helper function which possibly converts this using DOS-style short mode.
34587   # If so, the updated path is stored in $new_path.
34588   new_path="$input_to_shortpath"
34589 
34590   input_path="$input_to_shortpath"
34591   # Check if we need to convert this using DOS-style short mode. If the path
34592   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34593   # take no chances and rewrite it.
34594   # Note: m4 eats our [], so we need to use [ and ] instead.
34595   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34596   if test "x$has_forbidden_chars" != x; then
34597     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34598     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34599     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34600     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34601       # Going to short mode and back again did indeed matter. Since short mode is
34602       # case insensitive, let's make it lowercase to improve readability.
34603       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34604       # Now convert it back to Unix-style (cygpath)
34605       input_path=`$CYGPATH -u "$shortmode_path"`
34606       new_path="$input_path"
34607     fi
34608   fi
34609 
34610   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34611   if test "x$test_cygdrive_prefix" = x; then
34612     # As a simple fix, exclude /usr/bin since it's not a real path.
34613     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34614       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34615       # a path prefixed by /cygdrive for fixpath to work.
34616       new_path="$CYGWIN_ROOT_PATH$input_path"
34617     fi
34618   fi
34619 
34620   # remove trailing .exe if any
34621   new_path="${new_path/%.exe/}"
34622 
34623     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34624 
34625   # First separate the path from the arguments. This will split at the first
34626   # space.
34627   complete="$CXXCPP"
34628   path="${complete%% *}"
34629   tmp="$complete EOL"
34630   arguments="${tmp#* }"
34631 
34632   # Input might be given as Windows format, start by converting to
34633   # unix format.
34634   new_path="$path"
34635 
34636   windows_path="$new_path"
34637   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34638     unix_path=`$CYGPATH -u "$windows_path"`
34639     new_path="$unix_path"
34640   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34641     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34642     new_path="$unix_path"
34643   fi
34644 
34645 
34646   # Now try to locate executable using which
34647   new_path=`$WHICH "$new_path" 2> /dev/null`
34648 
34649   if test "x$new_path" = x; then
34650     # Oops. Which didn't find the executable.
34651     # The splitting of arguments from the executable at a space might have been incorrect,
34652     # since paths with space are more likely in Windows. Give it another try with the whole
34653     # argument.
34654     path="$complete"
34655     arguments="EOL"
34656     new_path="$path"
34657 
34658   windows_path="$new_path"
34659   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34660     unix_path=`$CYGPATH -u "$windows_path"`
34661     new_path="$unix_path"
34662   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34663     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34664     new_path="$unix_path"
34665   fi
34666 
34667 
34668     new_path=`$WHICH "$new_path" 2> /dev/null`
34669     # bat and cmd files are not always considered executable in MSYS causing which
34670     # to not find them
34671     if test "x$new_path" = x \
34672         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34673         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34674       new_path="$path"
34675 
34676   windows_path="$new_path"
34677   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34678     unix_path=`$CYGPATH -u "$windows_path"`
34679     new_path="$unix_path"
34680   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34681     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34682     new_path="$unix_path"
34683   fi
34684 
34685     fi
34686 
34687     if test "x$new_path" = x; then
34688       # It's still not found. Now this is an unrecoverable error.
34689       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34690 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34691       has_space=`$ECHO "$complete" | $GREP " "`
34692       if test "x$has_space" != x; then
34693         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34694 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34695       fi
34696       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34697     fi
34698   fi
34699 
34700   # Now new_path has a complete unix path to the binary
34701   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34702     # Keep paths in /bin as-is, but remove trailing .exe if any
34703     new_path="${new_path/%.exe/}"
34704     # Do not save /bin paths to all_fixpath_prefixes!
34705   else
34706     # Not in mixed or Windows style, start by that.
34707     new_path=`cmd //c echo $new_path`
34708 
34709   input_path="$new_path"
34710   # Check if we need to convert this using DOS-style short mode. If the path
34711   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34712   # take no chances and rewrite it.
34713   # Note: m4 eats our [], so we need to use [ and ] instead.
34714   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34715   if test "x$has_forbidden_chars" != x; then
34716     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34717     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34718   fi
34719 
34720     # Output is in $new_path
34721 
34722   windows_path="$new_path"
34723   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34724     unix_path=`$CYGPATH -u "$windows_path"`
34725     new_path="$unix_path"
34726   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34727     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34728     new_path="$unix_path"
34729   fi
34730 
34731     # remove trailing .exe if any
34732     new_path="${new_path/%.exe/}"
34733 
34734     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34735     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34736   fi
34737 
34738     else
34739       # We're on a unix platform. Hooray! :)
34740       # First separate the path from the arguments. This will split at the first
34741       # space.
34742       complete="$CXXCPP"
34743       path="${complete%% *}"
34744       tmp="$complete EOL"
34745       arguments="${tmp#* }"
34746 
34747       # Cannot rely on the command "which" here since it doesn't always work.
34748       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34749       if test -z "$is_absolute_path"; then
34750         # Path to executable is not absolute. Find it.
34751         IFS_save="$IFS"
34752         IFS=:
34753         for p in $PATH; do
34754           if test -f "$p/$path" && test -x "$p/$path"; then
34755             new_path="$p/$path"
34756             break
34757           fi
34758         done
34759         IFS="$IFS_save"
34760       else
34761         # This is an absolute path, we can use it without further modifications.
34762         new_path="$path"
34763       fi
34764 
34765       if test "x$new_path" = x; then
34766         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34767 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34768         has_space=`$ECHO "$complete" | $GREP " "`
34769         if test "x$has_space" != x; then
34770           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34771 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34772         fi
34773         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34774       fi
34775     fi
34776 
34777     # Now join together the path and the arguments once again
34778     if test "x$arguments" != xEOL; then
34779       new_complete="$new_path ${arguments% *}"
34780     else
34781       new_complete="$new_path"
34782     fi
34783 
34784     if test "x$complete" != "x$new_complete"; then
34785       CXXCPP="$new_complete"
34786       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
34787 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
34788     fi
34789   fi
34790 
34791 
34792   #
34793   # Setup the linker (LD)
34794   #
34795   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34796     # In the Microsoft toolchain we have a separate LD command "link".
34797     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
34798     # a cygwin program for something completely different.
34799     # Extract the first word of "link", so it can be a program name with args.
34800 set dummy link; ac_word=$2
34801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34802 $as_echo_n "checking for $ac_word... " >&6; }
34803 if ${ac_cv_prog_LD+:} false; then :
34804   $as_echo_n "(cached) " >&6
34805 else
34806   if test -n "$LD"; then
34807   ac_cv_prog_LD="$LD" # Let the user override the test.
34808 else
34809   ac_prog_rejected=no
34810 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34811 for as_dir in $PATH
34812 do
34813   IFS=$as_save_IFS
34814   test -z "$as_dir" && as_dir=.
34815     for ac_exec_ext in '' $ac_executable_extensions; do
34816   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34817     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
34818        ac_prog_rejected=yes
34819        continue
34820      fi
34821     ac_cv_prog_LD="link"
34822     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34823     break 2
34824   fi
34825 done
34826   done
34827 IFS=$as_save_IFS
34828 
34829 if test $ac_prog_rejected = yes; then
34830   # We found a bogon in the path, so make sure we never use it.
34831   set dummy $ac_cv_prog_LD
34832   shift
34833   if test $# != 0; then
34834     # We chose a different compiler from the bogus one.
34835     # However, it has the same basename, so the bogon will be chosen
34836     # first if we set LD to just the basename; use the full file name.
34837     shift
34838     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
34839   fi
34840 fi
34841 fi
34842 fi
34843 LD=$ac_cv_prog_LD
34844 if test -n "$LD"; then
34845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
34846 $as_echo "$LD" >&6; }
34847 else
34848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34849 $as_echo "no" >&6; }
34850 fi
34851 
34852 
34853 
34854   # Only process if variable expands to non-empty
34855 
34856   if test "x$LD" != x; then
34857     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34858 
34859   # First separate the path from the arguments. This will split at the first
34860   # space.
34861   complete="$LD"
34862   path="${complete%% *}"
34863   tmp="$complete EOL"
34864   arguments="${tmp#* }"
34865 
34866   # Input might be given as Windows format, start by converting to
34867   # unix format.
34868   new_path=`$CYGPATH -u "$path"`
34869 
34870   # Now try to locate executable using which
34871   new_path=`$WHICH "$new_path" 2> /dev/null`
34872   # bat and cmd files are not always considered executable in cygwin causing which
34873   # to not find them
34874   if test "x$new_path" = x \
34875       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34876       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34877     new_path=`$CYGPATH -u "$path"`
34878   fi
34879   if test "x$new_path" = x; then
34880     # Oops. Which didn't find the executable.
34881     # The splitting of arguments from the executable at a space might have been incorrect,
34882     # since paths with space are more likely in Windows. Give it another try with the whole
34883     # argument.
34884     path="$complete"
34885     arguments="EOL"
34886     new_path=`$CYGPATH -u "$path"`
34887     new_path=`$WHICH "$new_path" 2> /dev/null`
34888     # bat and cmd files are not always considered executable in cygwin causing which
34889     # to not find them
34890     if test "x$new_path" = x \
34891         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34892         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34893       new_path=`$CYGPATH -u "$path"`
34894     fi
34895     if test "x$new_path" = x; then
34896       # It's still not found. Now this is an unrecoverable error.
34897       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
34898 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
34899       has_space=`$ECHO "$complete" | $GREP " "`
34900       if test "x$has_space" != x; then
34901         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34902 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34903       fi
34904       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34905     fi
34906   fi
34907 
34908   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34909   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34910   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34911   # "foo.exe" is OK but "foo" is an error.
34912   #
34913   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34914   # It is also a way to make sure we got the proper file name for the real test later on.
34915   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34916   if test "x$test_shortpath" = x; then
34917     # Short path failed, file does not exist as specified.
34918     # Try adding .exe or .cmd
34919     if test -f "${new_path}.exe"; then
34920       input_to_shortpath="${new_path}.exe"
34921     elif test -f "${new_path}.cmd"; then
34922       input_to_shortpath="${new_path}.cmd"
34923     else
34924       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
34925 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
34926       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34927 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34928       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34929     fi
34930   else
34931     input_to_shortpath="$new_path"
34932   fi
34933 
34934   # Call helper function which possibly converts this using DOS-style short mode.
34935   # If so, the updated path is stored in $new_path.
34936   new_path="$input_to_shortpath"
34937 
34938   input_path="$input_to_shortpath"
34939   # Check if we need to convert this using DOS-style short mode. If the path
34940   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34941   # take no chances and rewrite it.
34942   # Note: m4 eats our [], so we need to use [ and ] instead.
34943   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34944   if test "x$has_forbidden_chars" != x; then
34945     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34946     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34947     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34948     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34949       # Going to short mode and back again did indeed matter. Since short mode is
34950       # case insensitive, let's make it lowercase to improve readability.
34951       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34952       # Now convert it back to Unix-style (cygpath)
34953       input_path=`$CYGPATH -u "$shortmode_path"`
34954       new_path="$input_path"
34955     fi
34956   fi
34957 
34958   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34959   if test "x$test_cygdrive_prefix" = x; then
34960     # As a simple fix, exclude /usr/bin since it's not a real path.
34961     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34962       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34963       # a path prefixed by /cygdrive for fixpath to work.
34964       new_path="$CYGWIN_ROOT_PATH$input_path"
34965     fi
34966   fi
34967 
34968   # remove trailing .exe if any
34969   new_path="${new_path/%.exe/}"
34970 
34971     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34972 
34973   # First separate the path from the arguments. This will split at the first
34974   # space.
34975   complete="$LD"
34976   path="${complete%% *}"
34977   tmp="$complete EOL"
34978   arguments="${tmp#* }"
34979 
34980   # Input might be given as Windows format, start by converting to
34981   # unix format.
34982   new_path="$path"
34983 
34984   windows_path="$new_path"
34985   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34986     unix_path=`$CYGPATH -u "$windows_path"`
34987     new_path="$unix_path"
34988   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34989     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34990     new_path="$unix_path"
34991   fi
34992 
34993 
34994   # Now try to locate executable using which
34995   new_path=`$WHICH "$new_path" 2> /dev/null`
34996 
34997   if test "x$new_path" = x; then
34998     # Oops. Which didn't find the executable.
34999     # The splitting of arguments from the executable at a space might have been incorrect,
35000     # since paths with space are more likely in Windows. Give it another try with the whole
35001     # argument.
35002     path="$complete"
35003     arguments="EOL"
35004     new_path="$path"
35005 
35006   windows_path="$new_path"
35007   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35008     unix_path=`$CYGPATH -u "$windows_path"`
35009     new_path="$unix_path"
35010   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35011     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35012     new_path="$unix_path"
35013   fi
35014 
35015 
35016     new_path=`$WHICH "$new_path" 2> /dev/null`
35017     # bat and cmd files are not always considered executable in MSYS causing which
35018     # to not find them
35019     if test "x$new_path" = x \
35020         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35021         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35022       new_path="$path"
35023 
35024   windows_path="$new_path"
35025   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35026     unix_path=`$CYGPATH -u "$windows_path"`
35027     new_path="$unix_path"
35028   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35029     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35030     new_path="$unix_path"
35031   fi
35032 
35033     fi
35034 
35035     if test "x$new_path" = x; then
35036       # It's still not found. Now this is an unrecoverable error.
35037       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35038 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35039       has_space=`$ECHO "$complete" | $GREP " "`
35040       if test "x$has_space" != x; then
35041         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35042 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35043       fi
35044       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35045     fi
35046   fi
35047 
35048   # Now new_path has a complete unix path to the binary
35049   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35050     # Keep paths in /bin as-is, but remove trailing .exe if any
35051     new_path="${new_path/%.exe/}"
35052     # Do not save /bin paths to all_fixpath_prefixes!
35053   else
35054     # Not in mixed or Windows style, start by that.
35055     new_path=`cmd //c echo $new_path`
35056 
35057   input_path="$new_path"
35058   # Check if we need to convert this using DOS-style short mode. If the path
35059   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35060   # take no chances and rewrite it.
35061   # Note: m4 eats our [], so we need to use [ and ] instead.
35062   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35063   if test "x$has_forbidden_chars" != x; then
35064     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35065     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35066   fi
35067 
35068     # Output is in $new_path
35069 
35070   windows_path="$new_path"
35071   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35072     unix_path=`$CYGPATH -u "$windows_path"`
35073     new_path="$unix_path"
35074   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35075     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35076     new_path="$unix_path"
35077   fi
35078 
35079     # remove trailing .exe if any
35080     new_path="${new_path/%.exe/}"
35081 
35082     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35083     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35084   fi
35085 
35086     else
35087       # We're on a unix platform. Hooray! :)
35088       # First separate the path from the arguments. This will split at the first
35089       # space.
35090       complete="$LD"
35091       path="${complete%% *}"
35092       tmp="$complete EOL"
35093       arguments="${tmp#* }"
35094 
35095       # Cannot rely on the command "which" here since it doesn't always work.
35096       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35097       if test -z "$is_absolute_path"; then
35098         # Path to executable is not absolute. Find it.
35099         IFS_save="$IFS"
35100         IFS=:
35101         for p in $PATH; do
35102           if test -f "$p/$path" && test -x "$p/$path"; then
35103             new_path="$p/$path"
35104             break
35105           fi
35106         done
35107         IFS="$IFS_save"
35108       else
35109         # This is an absolute path, we can use it without further modifications.
35110         new_path="$path"
35111       fi
35112 
35113       if test "x$new_path" = x; then
35114         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35115 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35116         has_space=`$ECHO "$complete" | $GREP " "`
35117         if test "x$has_space" != x; then
35118           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35119 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35120         fi
35121         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35122       fi
35123     fi
35124 
35125     # Now join together the path and the arguments once again
35126     if test "x$arguments" != xEOL; then
35127       new_complete="$new_path ${arguments% *}"
35128     else
35129       new_complete="$new_path"
35130     fi
35131 
35132     if test "x$complete" != "x$new_complete"; then
35133       LD="$new_complete"
35134       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35135 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35136     fi
35137   fi
35138 
35139     # Verify that we indeed succeeded with this trick.
35140     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35141 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35142     "$LD" --version > /dev/null
35143     if test $? -eq 0 ; then
35144       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35145 $as_echo "no" >&6; }
35146       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35147     else
35148       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35149 $as_echo "yes" >&6; }
35150     fi
35151     LDCXX="$LD"
35152   else
35153     # All other toolchains use the compiler to link.
35154     LD="$CC"
35155     LDCXX="$CXX"
35156   fi
35157 
35158   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35159 
35160 
35161   #
35162   # Setup the assembler (AS)
35163   #
35164   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35165     # FIXME: should this really be solaris, or solstudio?
35166 
35167 
35168   # Publish this variable in the help.
35169 
35170 
35171   if [ -z "${AS+x}" ]; then
35172     # The variable is not set by user, try to locate tool using the code snippet
35173     for ac_prog in as
35174 do
35175   # Extract the first word of "$ac_prog", so it can be a program name with args.
35176 set dummy $ac_prog; ac_word=$2
35177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35178 $as_echo_n "checking for $ac_word... " >&6; }
35179 if ${ac_cv_path_AS+:} false; then :
35180   $as_echo_n "(cached) " >&6
35181 else
35182   case $AS in
35183   [\\/]* | ?:[\\/]*)
35184   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35185   ;;
35186   *)
35187   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35188 for as_dir in $PATH
35189 do
35190   IFS=$as_save_IFS
35191   test -z "$as_dir" && as_dir=.
35192     for ac_exec_ext in '' $ac_executable_extensions; do
35193   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35194     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35195     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35196     break 2
35197   fi
35198 done
35199   done
35200 IFS=$as_save_IFS
35201 
35202   ;;
35203 esac
35204 fi
35205 AS=$ac_cv_path_AS
35206 if test -n "$AS"; then
35207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35208 $as_echo "$AS" >&6; }
35209 else
35210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35211 $as_echo "no" >&6; }
35212 fi
35213 
35214 
35215   test -n "$AS" && break
35216 done
35217 
35218   else
35219     # The variable is set, but is it from the command line or the environment?
35220 
35221     # Try to remove the string !AS! from our list.
35222     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35223     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35224       # If it failed, the variable was not from the command line. Ignore it,
35225       # but warn the user (except for BASH, which is always set by the calling BASH).
35226       if test "xAS" != xBASH; then
35227         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35228 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35229       fi
35230       # Try to locate tool using the code snippet
35231       for ac_prog in as
35232 do
35233   # Extract the first word of "$ac_prog", so it can be a program name with args.
35234 set dummy $ac_prog; ac_word=$2
35235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35236 $as_echo_n "checking for $ac_word... " >&6; }
35237 if ${ac_cv_path_AS+:} false; then :
35238   $as_echo_n "(cached) " >&6
35239 else
35240   case $AS in
35241   [\\/]* | ?:[\\/]*)
35242   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35243   ;;
35244   *)
35245   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35246 for as_dir in $PATH
35247 do
35248   IFS=$as_save_IFS
35249   test -z "$as_dir" && as_dir=.
35250     for ac_exec_ext in '' $ac_executable_extensions; do
35251   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35252     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35253     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35254     break 2
35255   fi
35256 done
35257   done
35258 IFS=$as_save_IFS
35259 
35260   ;;
35261 esac
35262 fi
35263 AS=$ac_cv_path_AS
35264 if test -n "$AS"; then
35265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35266 $as_echo "$AS" >&6; }
35267 else
35268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35269 $as_echo "no" >&6; }
35270 fi
35271 
35272 
35273   test -n "$AS" && break
35274 done
35275 
35276     else
35277       # If it succeeded, then it was overridden by the user. We will use it
35278       # for the tool.
35279 
35280       # First remove it from the list of overridden variables, so we can test
35281       # for unknown variables in the end.
35282       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35283 
35284       # Check if we try to supply an empty value
35285       if test "x$AS" = x; then
35286         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35287 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35288         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35289 $as_echo_n "checking for AS... " >&6; }
35290         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35291 $as_echo "disabled" >&6; }
35292       else
35293         # Check if the provided tool contains a complete path.
35294         tool_specified="$AS"
35295         tool_basename="${tool_specified##*/}"
35296         if test "x$tool_basename" = "x$tool_specified"; then
35297           # A command without a complete path is provided, search $PATH.
35298           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35299 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35300           # Extract the first word of "$tool_basename", so it can be a program name with args.
35301 set dummy $tool_basename; ac_word=$2
35302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35303 $as_echo_n "checking for $ac_word... " >&6; }
35304 if ${ac_cv_path_AS+:} false; then :
35305   $as_echo_n "(cached) " >&6
35306 else
35307   case $AS in
35308   [\\/]* | ?:[\\/]*)
35309   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35310   ;;
35311   *)
35312   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35313 for as_dir in $PATH
35314 do
35315   IFS=$as_save_IFS
35316   test -z "$as_dir" && as_dir=.
35317     for ac_exec_ext in '' $ac_executable_extensions; do
35318   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35319     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35320     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35321     break 2
35322   fi
35323 done
35324   done
35325 IFS=$as_save_IFS
35326 
35327   ;;
35328 esac
35329 fi
35330 AS=$ac_cv_path_AS
35331 if test -n "$AS"; then
35332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35333 $as_echo "$AS" >&6; }
35334 else
35335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35336 $as_echo "no" >&6; }
35337 fi
35338 
35339 
35340           if test "x$AS" = x; then
35341             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35342           fi
35343         else
35344           # Otherwise we believe it is a complete path. Use it as it is.
35345           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35346 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35347           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35348 $as_echo_n "checking for AS... " >&6; }
35349           if test ! -x "$tool_specified"; then
35350             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35351 $as_echo "not found" >&6; }
35352             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35353           fi
35354           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35355 $as_echo "$tool_specified" >&6; }
35356         fi
35357       fi
35358     fi
35359 
35360   fi
35361 
35362 
35363 
35364   # Only process if variable expands to non-empty
35365 
35366   if test "x$AS" != x; then
35367     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35368 
35369   # First separate the path from the arguments. This will split at the first
35370   # space.
35371   complete="$AS"
35372   path="${complete%% *}"
35373   tmp="$complete EOL"
35374   arguments="${tmp#* }"
35375 
35376   # Input might be given as Windows format, start by converting to
35377   # unix format.
35378   new_path=`$CYGPATH -u "$path"`
35379 
35380   # Now try to locate executable using which
35381   new_path=`$WHICH "$new_path" 2> /dev/null`
35382   # bat and cmd files are not always considered executable in cygwin causing which
35383   # to not find them
35384   if test "x$new_path" = x \
35385       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35386       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35387     new_path=`$CYGPATH -u "$path"`
35388   fi
35389   if test "x$new_path" = x; then
35390     # Oops. Which didn't find the executable.
35391     # The splitting of arguments from the executable at a space might have been incorrect,
35392     # since paths with space are more likely in Windows. Give it another try with the whole
35393     # argument.
35394     path="$complete"
35395     arguments="EOL"
35396     new_path=`$CYGPATH -u "$path"`
35397     new_path=`$WHICH "$new_path" 2> /dev/null`
35398     # bat and cmd files are not always considered executable in cygwin causing which
35399     # to not find them
35400     if test "x$new_path" = x \
35401         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35402         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35403       new_path=`$CYGPATH -u "$path"`
35404     fi
35405     if test "x$new_path" = x; then
35406       # It's still not found. Now this is an unrecoverable error.
35407       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35408 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35409       has_space=`$ECHO "$complete" | $GREP " "`
35410       if test "x$has_space" != x; then
35411         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35412 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35413       fi
35414       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35415     fi
35416   fi
35417 
35418   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35419   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35420   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35421   # "foo.exe" is OK but "foo" is an error.
35422   #
35423   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35424   # It is also a way to make sure we got the proper file name for the real test later on.
35425   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35426   if test "x$test_shortpath" = x; then
35427     # Short path failed, file does not exist as specified.
35428     # Try adding .exe or .cmd
35429     if test -f "${new_path}.exe"; then
35430       input_to_shortpath="${new_path}.exe"
35431     elif test -f "${new_path}.cmd"; then
35432       input_to_shortpath="${new_path}.cmd"
35433     else
35434       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
35435 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
35436       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35437 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35438       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35439     fi
35440   else
35441     input_to_shortpath="$new_path"
35442   fi
35443 
35444   # Call helper function which possibly converts this using DOS-style short mode.
35445   # If so, the updated path is stored in $new_path.
35446   new_path="$input_to_shortpath"
35447 
35448   input_path="$input_to_shortpath"
35449   # Check if we need to convert this using DOS-style short mode. If the path
35450   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35451   # take no chances and rewrite it.
35452   # Note: m4 eats our [], so we need to use [ and ] instead.
35453   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35454   if test "x$has_forbidden_chars" != x; then
35455     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35456     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35457     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35458     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35459       # Going to short mode and back again did indeed matter. Since short mode is
35460       # case insensitive, let's make it lowercase to improve readability.
35461       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35462       # Now convert it back to Unix-style (cygpath)
35463       input_path=`$CYGPATH -u "$shortmode_path"`
35464       new_path="$input_path"
35465     fi
35466   fi
35467 
35468   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35469   if test "x$test_cygdrive_prefix" = x; then
35470     # As a simple fix, exclude /usr/bin since it's not a real path.
35471     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35472       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35473       # a path prefixed by /cygdrive for fixpath to work.
35474       new_path="$CYGWIN_ROOT_PATH$input_path"
35475     fi
35476   fi
35477 
35478   # remove trailing .exe if any
35479   new_path="${new_path/%.exe/}"
35480 
35481     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35482 
35483   # First separate the path from the arguments. This will split at the first
35484   # space.
35485   complete="$AS"
35486   path="${complete%% *}"
35487   tmp="$complete EOL"
35488   arguments="${tmp#* }"
35489 
35490   # Input might be given as Windows format, start by converting to
35491   # unix format.
35492   new_path="$path"
35493 
35494   windows_path="$new_path"
35495   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35496     unix_path=`$CYGPATH -u "$windows_path"`
35497     new_path="$unix_path"
35498   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35499     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35500     new_path="$unix_path"
35501   fi
35502 
35503 
35504   # Now try to locate executable using which
35505   new_path=`$WHICH "$new_path" 2> /dev/null`
35506 
35507   if test "x$new_path" = x; then
35508     # Oops. Which didn't find the executable.
35509     # The splitting of arguments from the executable at a space might have been incorrect,
35510     # since paths with space are more likely in Windows. Give it another try with the whole
35511     # argument.
35512     path="$complete"
35513     arguments="EOL"
35514     new_path="$path"
35515 
35516   windows_path="$new_path"
35517   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35518     unix_path=`$CYGPATH -u "$windows_path"`
35519     new_path="$unix_path"
35520   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35521     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35522     new_path="$unix_path"
35523   fi
35524 
35525 
35526     new_path=`$WHICH "$new_path" 2> /dev/null`
35527     # bat and cmd files are not always considered executable in MSYS causing which
35528     # to not find them
35529     if test "x$new_path" = x \
35530         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35531         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35532       new_path="$path"
35533 
35534   windows_path="$new_path"
35535   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35536     unix_path=`$CYGPATH -u "$windows_path"`
35537     new_path="$unix_path"
35538   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35539     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35540     new_path="$unix_path"
35541   fi
35542 
35543     fi
35544 
35545     if test "x$new_path" = x; then
35546       # It's still not found. Now this is an unrecoverable error.
35547       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35548 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35549       has_space=`$ECHO "$complete" | $GREP " "`
35550       if test "x$has_space" != x; then
35551         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35552 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35553       fi
35554       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35555     fi
35556   fi
35557 
35558   # Now new_path has a complete unix path to the binary
35559   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35560     # Keep paths in /bin as-is, but remove trailing .exe if any
35561     new_path="${new_path/%.exe/}"
35562     # Do not save /bin paths to all_fixpath_prefixes!
35563   else
35564     # Not in mixed or Windows style, start by that.
35565     new_path=`cmd //c echo $new_path`
35566 
35567   input_path="$new_path"
35568   # Check if we need to convert this using DOS-style short mode. If the path
35569   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35570   # take no chances and rewrite it.
35571   # Note: m4 eats our [], so we need to use [ and ] instead.
35572   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35573   if test "x$has_forbidden_chars" != x; then
35574     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35575     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35576   fi
35577 
35578     # Output is in $new_path
35579 
35580   windows_path="$new_path"
35581   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35582     unix_path=`$CYGPATH -u "$windows_path"`
35583     new_path="$unix_path"
35584   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35585     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35586     new_path="$unix_path"
35587   fi
35588 
35589     # remove trailing .exe if any
35590     new_path="${new_path/%.exe/}"
35591 
35592     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35593     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35594   fi
35595 
35596     else
35597       # We're on a unix platform. Hooray! :)
35598       # First separate the path from the arguments. This will split at the first
35599       # space.
35600       complete="$AS"
35601       path="${complete%% *}"
35602       tmp="$complete EOL"
35603       arguments="${tmp#* }"
35604 
35605       # Cannot rely on the command "which" here since it doesn't always work.
35606       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35607       if test -z "$is_absolute_path"; then
35608         # Path to executable is not absolute. Find it.
35609         IFS_save="$IFS"
35610         IFS=:
35611         for p in $PATH; do
35612           if test -f "$p/$path" && test -x "$p/$path"; then
35613             new_path="$p/$path"
35614             break
35615           fi
35616         done
35617         IFS="$IFS_save"
35618       else
35619         # This is an absolute path, we can use it without further modifications.
35620         new_path="$path"
35621       fi
35622 
35623       if test "x$new_path" = x; then
35624         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35625 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35626         has_space=`$ECHO "$complete" | $GREP " "`
35627         if test "x$has_space" != x; then
35628           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35629 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35630         fi
35631         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35632       fi
35633     fi
35634 
35635     # Now join together the path and the arguments once again
35636     if test "x$arguments" != xEOL; then
35637       new_complete="$new_path ${arguments% *}"
35638     else
35639       new_complete="$new_path"
35640     fi
35641 
35642     if test "x$complete" != "x$new_complete"; then
35643       AS="$new_complete"
35644       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
35645 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
35646     fi
35647   fi
35648 
35649   else
35650     # FIXME: is this correct for microsoft?
35651     AS="$CC -c"
35652   fi
35653 
35654 
35655   #
35656   # Setup the archiver (AR)
35657   #
35658   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35659     # The corresponding ar tool is lib.exe (used to create static libraries)
35660     # Extract the first word of "lib", so it can be a program name with args.
35661 set dummy lib; ac_word=$2
35662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35663 $as_echo_n "checking for $ac_word... " >&6; }
35664 if ${ac_cv_prog_AR+:} false; then :
35665   $as_echo_n "(cached) " >&6
35666 else
35667   if test -n "$AR"; then
35668   ac_cv_prog_AR="$AR" # Let the user override the test.
35669 else
35670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35671 for as_dir in $PATH
35672 do
35673   IFS=$as_save_IFS
35674   test -z "$as_dir" && as_dir=.
35675     for ac_exec_ext in '' $ac_executable_extensions; do
35676   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35677     ac_cv_prog_AR="lib"
35678     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35679     break 2
35680   fi
35681 done
35682   done
35683 IFS=$as_save_IFS
35684 
35685 fi
35686 fi
35687 AR=$ac_cv_prog_AR
35688 if test -n "$AR"; then
35689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35690 $as_echo "$AR" >&6; }
35691 else
35692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35693 $as_echo "no" >&6; }
35694 fi
35695 
35696 
35697   else
35698 
35699 
35700   # Publish this variable in the help.
35701 
35702 
35703   if [ -z "${AR+x}" ]; then
35704     # The variable is not set by user, try to locate tool using the code snippet
35705     if test -n "$ac_tool_prefix"; then
35706   for ac_prog in ar
35707   do
35708     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35709 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35711 $as_echo_n "checking for $ac_word... " >&6; }
35712 if ${ac_cv_prog_AR+:} false; then :
35713   $as_echo_n "(cached) " >&6
35714 else
35715   if test -n "$AR"; then
35716   ac_cv_prog_AR="$AR" # Let the user override the test.
35717 else
35718 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35719 for as_dir in $PATH
35720 do
35721   IFS=$as_save_IFS
35722   test -z "$as_dir" && as_dir=.
35723     for ac_exec_ext in '' $ac_executable_extensions; do
35724   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35725     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35726     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35727     break 2
35728   fi
35729 done
35730   done
35731 IFS=$as_save_IFS
35732 
35733 fi
35734 fi
35735 AR=$ac_cv_prog_AR
35736 if test -n "$AR"; then
35737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35738 $as_echo "$AR" >&6; }
35739 else
35740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35741 $as_echo "no" >&6; }
35742 fi
35743 
35744 
35745     test -n "$AR" && break
35746   done
35747 fi
35748 if test -z "$AR"; then
35749   ac_ct_AR=$AR
35750   for ac_prog in ar
35751 do
35752   # Extract the first word of "$ac_prog", so it can be a program name with args.
35753 set dummy $ac_prog; ac_word=$2
35754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35755 $as_echo_n "checking for $ac_word... " >&6; }
35756 if ${ac_cv_prog_ac_ct_AR+:} false; then :
35757   $as_echo_n "(cached) " >&6
35758 else
35759   if test -n "$ac_ct_AR"; then
35760   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35761 else
35762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35763 for as_dir in $PATH
35764 do
35765   IFS=$as_save_IFS
35766   test -z "$as_dir" && as_dir=.
35767     for ac_exec_ext in '' $ac_executable_extensions; do
35768   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35769     ac_cv_prog_ac_ct_AR="$ac_prog"
35770     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35771     break 2
35772   fi
35773 done
35774   done
35775 IFS=$as_save_IFS
35776 
35777 fi
35778 fi
35779 ac_ct_AR=$ac_cv_prog_ac_ct_AR
35780 if test -n "$ac_ct_AR"; then
35781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35782 $as_echo "$ac_ct_AR" >&6; }
35783 else
35784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35785 $as_echo "no" >&6; }
35786 fi
35787 
35788 
35789   test -n "$ac_ct_AR" && break
35790 done
35791 
35792   if test "x$ac_ct_AR" = x; then
35793     AR=""
35794   else
35795     case $cross_compiling:$ac_tool_warned in
35796 yes:)
35797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35798 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35799 ac_tool_warned=yes ;;
35800 esac
35801     AR=$ac_ct_AR
35802   fi
35803 fi
35804 
35805   else
35806     # The variable is set, but is it from the command line or the environment?
35807 
35808     # Try to remove the string !AR! from our list.
35809     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
35810     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35811       # If it failed, the variable was not from the command line. Ignore it,
35812       # but warn the user (except for BASH, which is always set by the calling BASH).
35813       if test "xAR" != xBASH; then
35814         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
35815 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
35816       fi
35817       # Try to locate tool using the code snippet
35818       if test -n "$ac_tool_prefix"; then
35819   for ac_prog in ar
35820   do
35821     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35822 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35824 $as_echo_n "checking for $ac_word... " >&6; }
35825 if ${ac_cv_prog_AR+:} false; then :
35826   $as_echo_n "(cached) " >&6
35827 else
35828   if test -n "$AR"; then
35829   ac_cv_prog_AR="$AR" # Let the user override the test.
35830 else
35831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35832 for as_dir in $PATH
35833 do
35834   IFS=$as_save_IFS
35835   test -z "$as_dir" && as_dir=.
35836     for ac_exec_ext in '' $ac_executable_extensions; do
35837   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35838     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35840     break 2
35841   fi
35842 done
35843   done
35844 IFS=$as_save_IFS
35845 
35846 fi
35847 fi
35848 AR=$ac_cv_prog_AR
35849 if test -n "$AR"; then
35850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35851 $as_echo "$AR" >&6; }
35852 else
35853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35854 $as_echo "no" >&6; }
35855 fi
35856 
35857 
35858     test -n "$AR" && break
35859   done
35860 fi
35861 if test -z "$AR"; then
35862   ac_ct_AR=$AR
35863   for ac_prog in ar
35864 do
35865   # Extract the first word of "$ac_prog", so it can be a program name with args.
35866 set dummy $ac_prog; ac_word=$2
35867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35868 $as_echo_n "checking for $ac_word... " >&6; }
35869 if ${ac_cv_prog_ac_ct_AR+:} false; then :
35870   $as_echo_n "(cached) " >&6
35871 else
35872   if test -n "$ac_ct_AR"; then
35873   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35874 else
35875 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35876 for as_dir in $PATH
35877 do
35878   IFS=$as_save_IFS
35879   test -z "$as_dir" && as_dir=.
35880     for ac_exec_ext in '' $ac_executable_extensions; do
35881   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35882     ac_cv_prog_ac_ct_AR="$ac_prog"
35883     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35884     break 2
35885   fi
35886 done
35887   done
35888 IFS=$as_save_IFS
35889 
35890 fi
35891 fi
35892 ac_ct_AR=$ac_cv_prog_ac_ct_AR
35893 if test -n "$ac_ct_AR"; then
35894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35895 $as_echo "$ac_ct_AR" >&6; }
35896 else
35897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35898 $as_echo "no" >&6; }
35899 fi
35900 
35901 
35902   test -n "$ac_ct_AR" && break
35903 done
35904 
35905   if test "x$ac_ct_AR" = x; then
35906     AR=""
35907   else
35908     case $cross_compiling:$ac_tool_warned in
35909 yes:)
35910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35911 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35912 ac_tool_warned=yes ;;
35913 esac
35914     AR=$ac_ct_AR
35915   fi
35916 fi
35917 
35918     else
35919       # If it succeeded, then it was overridden by the user. We will use it
35920       # for the tool.
35921 
35922       # First remove it from the list of overridden variables, so we can test
35923       # for unknown variables in the end.
35924       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35925 
35926       # Check if we try to supply an empty value
35927       if test "x$AR" = x; then
35928         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
35929 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
35930         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35931 $as_echo_n "checking for AR... " >&6; }
35932         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35933 $as_echo "disabled" >&6; }
35934       else
35935         # Check if the provided tool contains a complete path.
35936         tool_specified="$AR"
35937         tool_basename="${tool_specified##*/}"
35938         if test "x$tool_basename" = "x$tool_specified"; then
35939           # A command without a complete path is provided, search $PATH.
35940           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
35941 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
35942           # Extract the first word of "$tool_basename", so it can be a program name with args.
35943 set dummy $tool_basename; ac_word=$2
35944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35945 $as_echo_n "checking for $ac_word... " >&6; }
35946 if ${ac_cv_path_AR+:} false; then :
35947   $as_echo_n "(cached) " >&6
35948 else
35949   case $AR in
35950   [\\/]* | ?:[\\/]*)
35951   ac_cv_path_AR="$AR" # Let the user override the test with a path.
35952   ;;
35953   *)
35954   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35955 for as_dir in $PATH
35956 do
35957   IFS=$as_save_IFS
35958   test -z "$as_dir" && as_dir=.
35959     for ac_exec_ext in '' $ac_executable_extensions; do
35960   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35961     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
35962     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35963     break 2
35964   fi
35965 done
35966   done
35967 IFS=$as_save_IFS
35968 
35969   ;;
35970 esac
35971 fi
35972 AR=$ac_cv_path_AR
35973 if test -n "$AR"; then
35974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35975 $as_echo "$AR" >&6; }
35976 else
35977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35978 $as_echo "no" >&6; }
35979 fi
35980 
35981 
35982           if test "x$AR" = x; then
35983             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35984           fi
35985         else
35986           # Otherwise we believe it is a complete path. Use it as it is.
35987           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
35988 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
35989           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35990 $as_echo_n "checking for AR... " >&6; }
35991           if test ! -x "$tool_specified"; then
35992             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35993 $as_echo "not found" >&6; }
35994             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
35995           fi
35996           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35997 $as_echo "$tool_specified" >&6; }
35998         fi
35999       fi
36000     fi
36001 
36002   fi
36003 
36004 
36005   fi
36006 
36007   # Only process if variable expands to non-empty
36008 
36009   if test "x$AR" != x; then
36010     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36011 
36012   # First separate the path from the arguments. This will split at the first
36013   # space.
36014   complete="$AR"
36015   path="${complete%% *}"
36016   tmp="$complete EOL"
36017   arguments="${tmp#* }"
36018 
36019   # Input might be given as Windows format, start by converting to
36020   # unix format.
36021   new_path=`$CYGPATH -u "$path"`
36022 
36023   # Now try to locate executable using which
36024   new_path=`$WHICH "$new_path" 2> /dev/null`
36025   # bat and cmd files are not always considered executable in cygwin causing which
36026   # to not find them
36027   if test "x$new_path" = x \
36028       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36029       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36030     new_path=`$CYGPATH -u "$path"`
36031   fi
36032   if test "x$new_path" = x; then
36033     # Oops. Which didn't find the executable.
36034     # The splitting of arguments from the executable at a space might have been incorrect,
36035     # since paths with space are more likely in Windows. Give it another try with the whole
36036     # argument.
36037     path="$complete"
36038     arguments="EOL"
36039     new_path=`$CYGPATH -u "$path"`
36040     new_path=`$WHICH "$new_path" 2> /dev/null`
36041     # bat and cmd files are not always considered executable in cygwin causing which
36042     # to not find them
36043     if test "x$new_path" = x \
36044         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36045         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36046       new_path=`$CYGPATH -u "$path"`
36047     fi
36048     if test "x$new_path" = x; then
36049       # It's still not found. Now this is an unrecoverable error.
36050       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36051 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36052       has_space=`$ECHO "$complete" | $GREP " "`
36053       if test "x$has_space" != x; then
36054         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36055 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36056       fi
36057       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36058     fi
36059   fi
36060 
36061   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36062   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36063   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36064   # "foo.exe" is OK but "foo" is an error.
36065   #
36066   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36067   # It is also a way to make sure we got the proper file name for the real test later on.
36068   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36069   if test "x$test_shortpath" = x; then
36070     # Short path failed, file does not exist as specified.
36071     # Try adding .exe or .cmd
36072     if test -f "${new_path}.exe"; then
36073       input_to_shortpath="${new_path}.exe"
36074     elif test -f "${new_path}.cmd"; then
36075       input_to_shortpath="${new_path}.cmd"
36076     else
36077       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36078 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36079       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36080 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36081       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36082     fi
36083   else
36084     input_to_shortpath="$new_path"
36085   fi
36086 
36087   # Call helper function which possibly converts this using DOS-style short mode.
36088   # If so, the updated path is stored in $new_path.
36089   new_path="$input_to_shortpath"
36090 
36091   input_path="$input_to_shortpath"
36092   # Check if we need to convert this using DOS-style short mode. If the path
36093   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36094   # take no chances and rewrite it.
36095   # Note: m4 eats our [], so we need to use [ and ] instead.
36096   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36097   if test "x$has_forbidden_chars" != x; then
36098     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36099     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36100     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36101     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36102       # Going to short mode and back again did indeed matter. Since short mode is
36103       # case insensitive, let's make it lowercase to improve readability.
36104       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36105       # Now convert it back to Unix-style (cygpath)
36106       input_path=`$CYGPATH -u "$shortmode_path"`
36107       new_path="$input_path"
36108     fi
36109   fi
36110 
36111   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36112   if test "x$test_cygdrive_prefix" = x; then
36113     # As a simple fix, exclude /usr/bin since it's not a real path.
36114     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36115       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36116       # a path prefixed by /cygdrive for fixpath to work.
36117       new_path="$CYGWIN_ROOT_PATH$input_path"
36118     fi
36119   fi
36120 
36121   # remove trailing .exe if any
36122   new_path="${new_path/%.exe/}"
36123 
36124     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36125 
36126   # First separate the path from the arguments. This will split at the first
36127   # space.
36128   complete="$AR"
36129   path="${complete%% *}"
36130   tmp="$complete EOL"
36131   arguments="${tmp#* }"
36132 
36133   # Input might be given as Windows format, start by converting to
36134   # unix format.
36135   new_path="$path"
36136 
36137   windows_path="$new_path"
36138   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36139     unix_path=`$CYGPATH -u "$windows_path"`
36140     new_path="$unix_path"
36141   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36142     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36143     new_path="$unix_path"
36144   fi
36145 
36146 
36147   # Now try to locate executable using which
36148   new_path=`$WHICH "$new_path" 2> /dev/null`
36149 
36150   if test "x$new_path" = x; then
36151     # Oops. Which didn't find the executable.
36152     # The splitting of arguments from the executable at a space might have been incorrect,
36153     # since paths with space are more likely in Windows. Give it another try with the whole
36154     # argument.
36155     path="$complete"
36156     arguments="EOL"
36157     new_path="$path"
36158 
36159   windows_path="$new_path"
36160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36161     unix_path=`$CYGPATH -u "$windows_path"`
36162     new_path="$unix_path"
36163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36164     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36165     new_path="$unix_path"
36166   fi
36167 
36168 
36169     new_path=`$WHICH "$new_path" 2> /dev/null`
36170     # bat and cmd files are not always considered executable in MSYS causing which
36171     # to not find them
36172     if test "x$new_path" = x \
36173         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36174         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36175       new_path="$path"
36176 
36177   windows_path="$new_path"
36178   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36179     unix_path=`$CYGPATH -u "$windows_path"`
36180     new_path="$unix_path"
36181   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36182     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36183     new_path="$unix_path"
36184   fi
36185 
36186     fi
36187 
36188     if test "x$new_path" = x; then
36189       # It's still not found. Now this is an unrecoverable error.
36190       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36191 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36192       has_space=`$ECHO "$complete" | $GREP " "`
36193       if test "x$has_space" != x; then
36194         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36195 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36196       fi
36197       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36198     fi
36199   fi
36200 
36201   # Now new_path has a complete unix path to the binary
36202   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36203     # Keep paths in /bin as-is, but remove trailing .exe if any
36204     new_path="${new_path/%.exe/}"
36205     # Do not save /bin paths to all_fixpath_prefixes!
36206   else
36207     # Not in mixed or Windows style, start by that.
36208     new_path=`cmd //c echo $new_path`
36209 
36210   input_path="$new_path"
36211   # Check if we need to convert this using DOS-style short mode. If the path
36212   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36213   # take no chances and rewrite it.
36214   # Note: m4 eats our [], so we need to use [ and ] instead.
36215   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36216   if test "x$has_forbidden_chars" != x; then
36217     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36218     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36219   fi
36220 
36221     # Output is in $new_path
36222 
36223   windows_path="$new_path"
36224   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36225     unix_path=`$CYGPATH -u "$windows_path"`
36226     new_path="$unix_path"
36227   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36228     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36229     new_path="$unix_path"
36230   fi
36231 
36232     # remove trailing .exe if any
36233     new_path="${new_path/%.exe/}"
36234 
36235     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36236     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36237   fi
36238 
36239     else
36240       # We're on a unix platform. Hooray! :)
36241       # First separate the path from the arguments. This will split at the first
36242       # space.
36243       complete="$AR"
36244       path="${complete%% *}"
36245       tmp="$complete EOL"
36246       arguments="${tmp#* }"
36247 
36248       # Cannot rely on the command "which" here since it doesn't always work.
36249       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36250       if test -z "$is_absolute_path"; then
36251         # Path to executable is not absolute. Find it.
36252         IFS_save="$IFS"
36253         IFS=:
36254         for p in $PATH; do
36255           if test -f "$p/$path" && test -x "$p/$path"; then
36256             new_path="$p/$path"
36257             break
36258           fi
36259         done
36260         IFS="$IFS_save"
36261       else
36262         # This is an absolute path, we can use it without further modifications.
36263         new_path="$path"
36264       fi
36265 
36266       if test "x$new_path" = x; then
36267         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36268 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36269         has_space=`$ECHO "$complete" | $GREP " "`
36270         if test "x$has_space" != x; then
36271           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36272 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36273         fi
36274         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36275       fi
36276     fi
36277 
36278     # Now join together the path and the arguments once again
36279     if test "x$arguments" != xEOL; then
36280       new_complete="$new_path ${arguments% *}"
36281     else
36282       new_complete="$new_path"
36283     fi
36284 
36285     if test "x$complete" != "x$new_complete"; then
36286       AR="$new_complete"
36287       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
36288 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
36289     fi
36290   fi
36291 
36292 
36293 
36294   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
36295 
36296 
36297   # Publish this variable in the help.
36298 
36299 
36300   if [ -z "${LIPO+x}" ]; then
36301     # The variable is not set by user, try to locate tool using the code snippet
36302     for ac_prog in lipo
36303 do
36304   # Extract the first word of "$ac_prog", so it can be a program name with args.
36305 set dummy $ac_prog; ac_word=$2
36306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36307 $as_echo_n "checking for $ac_word... " >&6; }
36308 if ${ac_cv_path_LIPO+:} false; then :
36309   $as_echo_n "(cached) " >&6
36310 else
36311   case $LIPO in
36312   [\\/]* | ?:[\\/]*)
36313   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36314   ;;
36315   *)
36316   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36317 for as_dir in $PATH
36318 do
36319   IFS=$as_save_IFS
36320   test -z "$as_dir" && as_dir=.
36321     for ac_exec_ext in '' $ac_executable_extensions; do
36322   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36323     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36324     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36325     break 2
36326   fi
36327 done
36328   done
36329 IFS=$as_save_IFS
36330 
36331   ;;
36332 esac
36333 fi
36334 LIPO=$ac_cv_path_LIPO
36335 if test -n "$LIPO"; then
36336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36337 $as_echo "$LIPO" >&6; }
36338 else
36339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36340 $as_echo "no" >&6; }
36341 fi
36342 
36343 
36344   test -n "$LIPO" && break
36345 done
36346 
36347   else
36348     # The variable is set, but is it from the command line or the environment?
36349 
36350     # Try to remove the string !LIPO! from our list.
36351     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
36352     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36353       # If it failed, the variable was not from the command line. Ignore it,
36354       # but warn the user (except for BASH, which is always set by the calling BASH).
36355       if test "xLIPO" != xBASH; then
36356         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
36357 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
36358       fi
36359       # Try to locate tool using the code snippet
36360       for ac_prog in lipo
36361 do
36362   # Extract the first word of "$ac_prog", so it can be a program name with args.
36363 set dummy $ac_prog; ac_word=$2
36364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36365 $as_echo_n "checking for $ac_word... " >&6; }
36366 if ${ac_cv_path_LIPO+:} false; then :
36367   $as_echo_n "(cached) " >&6
36368 else
36369   case $LIPO in
36370   [\\/]* | ?:[\\/]*)
36371   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36372   ;;
36373   *)
36374   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36375 for as_dir in $PATH
36376 do
36377   IFS=$as_save_IFS
36378   test -z "$as_dir" && as_dir=.
36379     for ac_exec_ext in '' $ac_executable_extensions; do
36380   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36381     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36383     break 2
36384   fi
36385 done
36386   done
36387 IFS=$as_save_IFS
36388 
36389   ;;
36390 esac
36391 fi
36392 LIPO=$ac_cv_path_LIPO
36393 if test -n "$LIPO"; then
36394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36395 $as_echo "$LIPO" >&6; }
36396 else
36397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36398 $as_echo "no" >&6; }
36399 fi
36400 
36401 
36402   test -n "$LIPO" && break
36403 done
36404 
36405     else
36406       # If it succeeded, then it was overridden by the user. We will use it
36407       # for the tool.
36408 
36409       # First remove it from the list of overridden variables, so we can test
36410       # for unknown variables in the end.
36411       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36412 
36413       # Check if we try to supply an empty value
36414       if test "x$LIPO" = x; then
36415         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
36416 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
36417         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36418 $as_echo_n "checking for LIPO... " >&6; }
36419         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36420 $as_echo "disabled" >&6; }
36421       else
36422         # Check if the provided tool contains a complete path.
36423         tool_specified="$LIPO"
36424         tool_basename="${tool_specified##*/}"
36425         if test "x$tool_basename" = "x$tool_specified"; then
36426           # A command without a complete path is provided, search $PATH.
36427           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
36428 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
36429           # Extract the first word of "$tool_basename", so it can be a program name with args.
36430 set dummy $tool_basename; ac_word=$2
36431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36432 $as_echo_n "checking for $ac_word... " >&6; }
36433 if ${ac_cv_path_LIPO+:} false; then :
36434   $as_echo_n "(cached) " >&6
36435 else
36436   case $LIPO in
36437   [\\/]* | ?:[\\/]*)
36438   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36439   ;;
36440   *)
36441   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36442 for as_dir in $PATH
36443 do
36444   IFS=$as_save_IFS
36445   test -z "$as_dir" && as_dir=.
36446     for ac_exec_ext in '' $ac_executable_extensions; do
36447   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36448     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36449     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36450     break 2
36451   fi
36452 done
36453   done
36454 IFS=$as_save_IFS
36455 
36456   ;;
36457 esac
36458 fi
36459 LIPO=$ac_cv_path_LIPO
36460 if test -n "$LIPO"; then
36461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36462 $as_echo "$LIPO" >&6; }
36463 else
36464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36465 $as_echo "no" >&6; }
36466 fi
36467 
36468 
36469           if test "x$LIPO" = x; then
36470             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36471           fi
36472         else
36473           # Otherwise we believe it is a complete path. Use it as it is.
36474           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
36475 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
36476           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36477 $as_echo_n "checking for LIPO... " >&6; }
36478           if test ! -x "$tool_specified"; then
36479             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36480 $as_echo "not found" >&6; }
36481             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
36482           fi
36483           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36484 $as_echo "$tool_specified" >&6; }
36485         fi
36486       fi
36487     fi
36488 
36489   fi
36490 
36491 
36492 
36493   # Only process if variable expands to non-empty
36494 
36495   if test "x$LIPO" != x; then
36496     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36497 
36498   # First separate the path from the arguments. This will split at the first
36499   # space.
36500   complete="$LIPO"
36501   path="${complete%% *}"
36502   tmp="$complete EOL"
36503   arguments="${tmp#* }"
36504 
36505   # Input might be given as Windows format, start by converting to
36506   # unix format.
36507   new_path=`$CYGPATH -u "$path"`
36508 
36509   # Now try to locate executable using which
36510   new_path=`$WHICH "$new_path" 2> /dev/null`
36511   # bat and cmd files are not always considered executable in cygwin causing which
36512   # to not find them
36513   if test "x$new_path" = x \
36514       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36515       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36516     new_path=`$CYGPATH -u "$path"`
36517   fi
36518   if test "x$new_path" = x; then
36519     # Oops. Which didn't find the executable.
36520     # The splitting of arguments from the executable at a space might have been incorrect,
36521     # since paths with space are more likely in Windows. Give it another try with the whole
36522     # argument.
36523     path="$complete"
36524     arguments="EOL"
36525     new_path=`$CYGPATH -u "$path"`
36526     new_path=`$WHICH "$new_path" 2> /dev/null`
36527     # bat and cmd files are not always considered executable in cygwin causing which
36528     # to not find them
36529     if test "x$new_path" = x \
36530         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36531         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36532       new_path=`$CYGPATH -u "$path"`
36533     fi
36534     if test "x$new_path" = x; then
36535       # It's still not found. Now this is an unrecoverable error.
36536       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36537 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36538       has_space=`$ECHO "$complete" | $GREP " "`
36539       if test "x$has_space" != x; then
36540         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36541 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36542       fi
36543       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36544     fi
36545   fi
36546 
36547   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36548   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36549   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36550   # "foo.exe" is OK but "foo" is an error.
36551   #
36552   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36553   # It is also a way to make sure we got the proper file name for the real test later on.
36554   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36555   if test "x$test_shortpath" = x; then
36556     # Short path failed, file does not exist as specified.
36557     # Try adding .exe or .cmd
36558     if test -f "${new_path}.exe"; then
36559       input_to_shortpath="${new_path}.exe"
36560     elif test -f "${new_path}.cmd"; then
36561       input_to_shortpath="${new_path}.cmd"
36562     else
36563       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
36564 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
36565       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36566 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36567       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36568     fi
36569   else
36570     input_to_shortpath="$new_path"
36571   fi
36572 
36573   # Call helper function which possibly converts this using DOS-style short mode.
36574   # If so, the updated path is stored in $new_path.
36575   new_path="$input_to_shortpath"
36576 
36577   input_path="$input_to_shortpath"
36578   # Check if we need to convert this using DOS-style short mode. If the path
36579   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36580   # take no chances and rewrite it.
36581   # Note: m4 eats our [], so we need to use [ and ] instead.
36582   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36583   if test "x$has_forbidden_chars" != x; then
36584     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36585     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36586     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36587     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36588       # Going to short mode and back again did indeed matter. Since short mode is
36589       # case insensitive, let's make it lowercase to improve readability.
36590       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36591       # Now convert it back to Unix-style (cygpath)
36592       input_path=`$CYGPATH -u "$shortmode_path"`
36593       new_path="$input_path"
36594     fi
36595   fi
36596 
36597   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36598   if test "x$test_cygdrive_prefix" = x; then
36599     # As a simple fix, exclude /usr/bin since it's not a real path.
36600     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36601       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36602       # a path prefixed by /cygdrive for fixpath to work.
36603       new_path="$CYGWIN_ROOT_PATH$input_path"
36604     fi
36605   fi
36606 
36607   # remove trailing .exe if any
36608   new_path="${new_path/%.exe/}"
36609 
36610     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36611 
36612   # First separate the path from the arguments. This will split at the first
36613   # space.
36614   complete="$LIPO"
36615   path="${complete%% *}"
36616   tmp="$complete EOL"
36617   arguments="${tmp#* }"
36618 
36619   # Input might be given as Windows format, start by converting to
36620   # unix format.
36621   new_path="$path"
36622 
36623   windows_path="$new_path"
36624   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36625     unix_path=`$CYGPATH -u "$windows_path"`
36626     new_path="$unix_path"
36627   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36628     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36629     new_path="$unix_path"
36630   fi
36631 
36632 
36633   # Now try to locate executable using which
36634   new_path=`$WHICH "$new_path" 2> /dev/null`
36635 
36636   if test "x$new_path" = x; then
36637     # Oops. Which didn't find the executable.
36638     # The splitting of arguments from the executable at a space might have been incorrect,
36639     # since paths with space are more likely in Windows. Give it another try with the whole
36640     # argument.
36641     path="$complete"
36642     arguments="EOL"
36643     new_path="$path"
36644 
36645   windows_path="$new_path"
36646   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36647     unix_path=`$CYGPATH -u "$windows_path"`
36648     new_path="$unix_path"
36649   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36650     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36651     new_path="$unix_path"
36652   fi
36653 
36654 
36655     new_path=`$WHICH "$new_path" 2> /dev/null`
36656     # bat and cmd files are not always considered executable in MSYS causing which
36657     # to not find them
36658     if test "x$new_path" = x \
36659         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36660         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36661       new_path="$path"
36662 
36663   windows_path="$new_path"
36664   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36665     unix_path=`$CYGPATH -u "$windows_path"`
36666     new_path="$unix_path"
36667   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36668     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36669     new_path="$unix_path"
36670   fi
36671 
36672     fi
36673 
36674     if test "x$new_path" = x; then
36675       # It's still not found. Now this is an unrecoverable error.
36676       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36677 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36678       has_space=`$ECHO "$complete" | $GREP " "`
36679       if test "x$has_space" != x; then
36680         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36681 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36682       fi
36683       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36684     fi
36685   fi
36686 
36687   # Now new_path has a complete unix path to the binary
36688   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36689     # Keep paths in /bin as-is, but remove trailing .exe if any
36690     new_path="${new_path/%.exe/}"
36691     # Do not save /bin paths to all_fixpath_prefixes!
36692   else
36693     # Not in mixed or Windows style, start by that.
36694     new_path=`cmd //c echo $new_path`
36695 
36696   input_path="$new_path"
36697   # Check if we need to convert this using DOS-style short mode. If the path
36698   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36699   # take no chances and rewrite it.
36700   # Note: m4 eats our [], so we need to use [ and ] instead.
36701   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36702   if test "x$has_forbidden_chars" != x; then
36703     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36704     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36705   fi
36706 
36707     # Output is in $new_path
36708 
36709   windows_path="$new_path"
36710   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36711     unix_path=`$CYGPATH -u "$windows_path"`
36712     new_path="$unix_path"
36713   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36714     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36715     new_path="$unix_path"
36716   fi
36717 
36718     # remove trailing .exe if any
36719     new_path="${new_path/%.exe/}"
36720 
36721     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36722     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36723   fi
36724 
36725     else
36726       # We're on a unix platform. Hooray! :)
36727       # First separate the path from the arguments. This will split at the first
36728       # space.
36729       complete="$LIPO"
36730       path="${complete%% *}"
36731       tmp="$complete EOL"
36732       arguments="${tmp#* }"
36733 
36734       # Cannot rely on the command "which" here since it doesn't always work.
36735       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36736       if test -z "$is_absolute_path"; then
36737         # Path to executable is not absolute. Find it.
36738         IFS_save="$IFS"
36739         IFS=:
36740         for p in $PATH; do
36741           if test -f "$p/$path" && test -x "$p/$path"; then
36742             new_path="$p/$path"
36743             break
36744           fi
36745         done
36746         IFS="$IFS_save"
36747       else
36748         # This is an absolute path, we can use it without further modifications.
36749         new_path="$path"
36750       fi
36751 
36752       if test "x$new_path" = x; then
36753         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36754 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36755         has_space=`$ECHO "$complete" | $GREP " "`
36756         if test "x$has_space" != x; then
36757           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36758 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36759         fi
36760         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36761       fi
36762     fi
36763 
36764     # Now join together the path and the arguments once again
36765     if test "x$arguments" != xEOL; then
36766       new_complete="$new_path ${arguments% *}"
36767     else
36768       new_complete="$new_path"
36769     fi
36770 
36771     if test "x$complete" != "x$new_complete"; then
36772       LIPO="$new_complete"
36773       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
36774 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
36775     fi
36776   fi
36777 
36778   fi
36779 
36780   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36781     # Extract the first word of "mt", so it can be a program name with args.
36782 set dummy mt; ac_word=$2
36783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36784 $as_echo_n "checking for $ac_word... " >&6; }
36785 if ${ac_cv_prog_MT+:} false; then :
36786   $as_echo_n "(cached) " >&6
36787 else
36788   if test -n "$MT"; then
36789   ac_cv_prog_MT="$MT" # Let the user override the test.
36790 else
36791   ac_prog_rejected=no
36792 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36793 for as_dir in $PATH
36794 do
36795   IFS=$as_save_IFS
36796   test -z "$as_dir" && as_dir=.
36797     for ac_exec_ext in '' $ac_executable_extensions; do
36798   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36799     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
36800        ac_prog_rejected=yes
36801        continue
36802      fi
36803     ac_cv_prog_MT="mt"
36804     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36805     break 2
36806   fi
36807 done
36808   done
36809 IFS=$as_save_IFS
36810 
36811 if test $ac_prog_rejected = yes; then
36812   # We found a bogon in the path, so make sure we never use it.
36813   set dummy $ac_cv_prog_MT
36814   shift
36815   if test $# != 0; then
36816     # We chose a different compiler from the bogus one.
36817     # However, it has the same basename, so the bogon will be chosen
36818     # first if we set MT to just the basename; use the full file name.
36819     shift
36820     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
36821   fi
36822 fi
36823 fi
36824 fi
36825 MT=$ac_cv_prog_MT
36826 if test -n "$MT"; then
36827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
36828 $as_echo "$MT" >&6; }
36829 else
36830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36831 $as_echo "no" >&6; }
36832 fi
36833 
36834 
36835 
36836   # Only process if variable expands to non-empty
36837 
36838   if test "x$MT" != x; then
36839     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36840 
36841   # First separate the path from the arguments. This will split at the first
36842   # space.
36843   complete="$MT"
36844   path="${complete%% *}"
36845   tmp="$complete EOL"
36846   arguments="${tmp#* }"
36847 
36848   # Input might be given as Windows format, start by converting to
36849   # unix format.
36850   new_path=`$CYGPATH -u "$path"`
36851 
36852   # Now try to locate executable using which
36853   new_path=`$WHICH "$new_path" 2> /dev/null`
36854   # bat and cmd files are not always considered executable in cygwin causing which
36855   # to not find them
36856   if test "x$new_path" = x \
36857       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36858       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36859     new_path=`$CYGPATH -u "$path"`
36860   fi
36861   if test "x$new_path" = x; then
36862     # Oops. Which didn't find the executable.
36863     # The splitting of arguments from the executable at a space might have been incorrect,
36864     # since paths with space are more likely in Windows. Give it another try with the whole
36865     # argument.
36866     path="$complete"
36867     arguments="EOL"
36868     new_path=`$CYGPATH -u "$path"`
36869     new_path=`$WHICH "$new_path" 2> /dev/null`
36870     # bat and cmd files are not always considered executable in cygwin causing which
36871     # to not find them
36872     if test "x$new_path" = x \
36873         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36874         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36875       new_path=`$CYGPATH -u "$path"`
36876     fi
36877     if test "x$new_path" = x; then
36878       # It's still not found. Now this is an unrecoverable error.
36879       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
36880 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
36881       has_space=`$ECHO "$complete" | $GREP " "`
36882       if test "x$has_space" != x; then
36883         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36884 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36885       fi
36886       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
36887     fi
36888   fi
36889 
36890   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36891   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36892   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36893   # "foo.exe" is OK but "foo" is an error.
36894   #
36895   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36896   # It is also a way to make sure we got the proper file name for the real test later on.
36897   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36898   if test "x$test_shortpath" = x; then
36899     # Short path failed, file does not exist as specified.
36900     # Try adding .exe or .cmd
36901     if test -f "${new_path}.exe"; then
36902       input_to_shortpath="${new_path}.exe"
36903     elif test -f "${new_path}.cmd"; then
36904       input_to_shortpath="${new_path}.cmd"
36905     else
36906       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
36907 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
36908       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36909 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36910       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
36911     fi
36912   else
36913     input_to_shortpath="$new_path"
36914   fi
36915 
36916   # Call helper function which possibly converts this using DOS-style short mode.
36917   # If so, the updated path is stored in $new_path.
36918   new_path="$input_to_shortpath"
36919 
36920   input_path="$input_to_shortpath"
36921   # Check if we need to convert this using DOS-style short mode. If the path
36922   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36923   # take no chances and rewrite it.
36924   # Note: m4 eats our [], so we need to use [ and ] instead.
36925   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36926   if test "x$has_forbidden_chars" != x; then
36927     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36928     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36929     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36930     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36931       # Going to short mode and back again did indeed matter. Since short mode is
36932       # case insensitive, let's make it lowercase to improve readability.
36933       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36934       # Now convert it back to Unix-style (cygpath)
36935       input_path=`$CYGPATH -u "$shortmode_path"`
36936       new_path="$input_path"
36937     fi
36938   fi
36939 
36940   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36941   if test "x$test_cygdrive_prefix" = x; then
36942     # As a simple fix, exclude /usr/bin since it's not a real path.
36943     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36944       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36945       # a path prefixed by /cygdrive for fixpath to work.
36946       new_path="$CYGWIN_ROOT_PATH$input_path"
36947     fi
36948   fi
36949 
36950   # remove trailing .exe if any
36951   new_path="${new_path/%.exe/}"
36952 
36953     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36954 
36955   # First separate the path from the arguments. This will split at the first
36956   # space.
36957   complete="$MT"
36958   path="${complete%% *}"
36959   tmp="$complete EOL"
36960   arguments="${tmp#* }"
36961 
36962   # Input might be given as Windows format, start by converting to
36963   # unix format.
36964   new_path="$path"
36965 
36966   windows_path="$new_path"
36967   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36968     unix_path=`$CYGPATH -u "$windows_path"`
36969     new_path="$unix_path"
36970   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36971     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36972     new_path="$unix_path"
36973   fi
36974 
36975 
36976   # Now try to locate executable using which
36977   new_path=`$WHICH "$new_path" 2> /dev/null`
36978 
36979   if test "x$new_path" = x; then
36980     # Oops. Which didn't find the executable.
36981     # The splitting of arguments from the executable at a space might have been incorrect,
36982     # since paths with space are more likely in Windows. Give it another try with the whole
36983     # argument.
36984     path="$complete"
36985     arguments="EOL"
36986     new_path="$path"
36987 
36988   windows_path="$new_path"
36989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36990     unix_path=`$CYGPATH -u "$windows_path"`
36991     new_path="$unix_path"
36992   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36993     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36994     new_path="$unix_path"
36995   fi
36996 
36997 
36998     new_path=`$WHICH "$new_path" 2> /dev/null`
36999     # bat and cmd files are not always considered executable in MSYS causing which
37000     # to not find them
37001     if test "x$new_path" = x \
37002         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37003         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37004       new_path="$path"
37005 
37006   windows_path="$new_path"
37007   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37008     unix_path=`$CYGPATH -u "$windows_path"`
37009     new_path="$unix_path"
37010   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37011     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37012     new_path="$unix_path"
37013   fi
37014 
37015     fi
37016 
37017     if test "x$new_path" = x; then
37018       # It's still not found. Now this is an unrecoverable error.
37019       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37020 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37021       has_space=`$ECHO "$complete" | $GREP " "`
37022       if test "x$has_space" != x; then
37023         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37024 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37025       fi
37026       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37027     fi
37028   fi
37029 
37030   # Now new_path has a complete unix path to the binary
37031   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37032     # Keep paths in /bin as-is, but remove trailing .exe if any
37033     new_path="${new_path/%.exe/}"
37034     # Do not save /bin paths to all_fixpath_prefixes!
37035   else
37036     # Not in mixed or Windows style, start by that.
37037     new_path=`cmd //c echo $new_path`
37038 
37039   input_path="$new_path"
37040   # Check if we need to convert this using DOS-style short mode. If the path
37041   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37042   # take no chances and rewrite it.
37043   # Note: m4 eats our [], so we need to use [ and ] instead.
37044   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37045   if test "x$has_forbidden_chars" != x; then
37046     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37047     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37048   fi
37049 
37050     # Output is in $new_path
37051 
37052   windows_path="$new_path"
37053   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37054     unix_path=`$CYGPATH -u "$windows_path"`
37055     new_path="$unix_path"
37056   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37057     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37058     new_path="$unix_path"
37059   fi
37060 
37061     # remove trailing .exe if any
37062     new_path="${new_path/%.exe/}"
37063 
37064     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37065     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37066   fi
37067 
37068     else
37069       # We're on a unix platform. Hooray! :)
37070       # First separate the path from the arguments. This will split at the first
37071       # space.
37072       complete="$MT"
37073       path="${complete%% *}"
37074       tmp="$complete EOL"
37075       arguments="${tmp#* }"
37076 
37077       # Cannot rely on the command "which" here since it doesn't always work.
37078       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37079       if test -z "$is_absolute_path"; then
37080         # Path to executable is not absolute. Find it.
37081         IFS_save="$IFS"
37082         IFS=:
37083         for p in $PATH; do
37084           if test -f "$p/$path" && test -x "$p/$path"; then
37085             new_path="$p/$path"
37086             break
37087           fi
37088         done
37089         IFS="$IFS_save"
37090       else
37091         # This is an absolute path, we can use it without further modifications.
37092         new_path="$path"
37093       fi
37094 
37095       if test "x$new_path" = x; then
37096         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37097 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37098         has_space=`$ECHO "$complete" | $GREP " "`
37099         if test "x$has_space" != x; then
37100           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37101 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37102         fi
37103         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37104       fi
37105     fi
37106 
37107     # Now join together the path and the arguments once again
37108     if test "x$arguments" != xEOL; then
37109       new_complete="$new_path ${arguments% *}"
37110     else
37111       new_complete="$new_path"
37112     fi
37113 
37114     if test "x$complete" != "x$new_complete"; then
37115       MT="$new_complete"
37116       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
37117 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
37118     fi
37119   fi
37120 
37121     # Setup the resource compiler (RC)
37122     # Extract the first word of "rc", so it can be a program name with args.
37123 set dummy rc; ac_word=$2
37124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37125 $as_echo_n "checking for $ac_word... " >&6; }
37126 if ${ac_cv_prog_RC+:} false; then :
37127   $as_echo_n "(cached) " >&6
37128 else
37129   if test -n "$RC"; then
37130   ac_cv_prog_RC="$RC" # Let the user override the test.
37131 else
37132   ac_prog_rejected=no
37133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37134 for as_dir in $PATH
37135 do
37136   IFS=$as_save_IFS
37137   test -z "$as_dir" && as_dir=.
37138     for ac_exec_ext in '' $ac_executable_extensions; do
37139   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37140     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
37141        ac_prog_rejected=yes
37142        continue
37143      fi
37144     ac_cv_prog_RC="rc"
37145     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37146     break 2
37147   fi
37148 done
37149   done
37150 IFS=$as_save_IFS
37151 
37152 if test $ac_prog_rejected = yes; then
37153   # We found a bogon in the path, so make sure we never use it.
37154   set dummy $ac_cv_prog_RC
37155   shift
37156   if test $# != 0; then
37157     # We chose a different compiler from the bogus one.
37158     # However, it has the same basename, so the bogon will be chosen
37159     # first if we set RC to just the basename; use the full file name.
37160     shift
37161     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
37162   fi
37163 fi
37164 fi
37165 fi
37166 RC=$ac_cv_prog_RC
37167 if test -n "$RC"; then
37168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
37169 $as_echo "$RC" >&6; }
37170 else
37171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37172 $as_echo "no" >&6; }
37173 fi
37174 
37175 
37176 
37177   # Only process if variable expands to non-empty
37178 
37179   if test "x$RC" != x; then
37180     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37181 
37182   # First separate the path from the arguments. This will split at the first
37183   # space.
37184   complete="$RC"
37185   path="${complete%% *}"
37186   tmp="$complete EOL"
37187   arguments="${tmp#* }"
37188 
37189   # Input might be given as Windows format, start by converting to
37190   # unix format.
37191   new_path=`$CYGPATH -u "$path"`
37192 
37193   # Now try to locate executable using which
37194   new_path=`$WHICH "$new_path" 2> /dev/null`
37195   # bat and cmd files are not always considered executable in cygwin causing which
37196   # to not find them
37197   if test "x$new_path" = x \
37198       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37199       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37200     new_path=`$CYGPATH -u "$path"`
37201   fi
37202   if test "x$new_path" = x; then
37203     # Oops. Which didn't find the executable.
37204     # The splitting of arguments from the executable at a space might have been incorrect,
37205     # since paths with space are more likely in Windows. Give it another try with the whole
37206     # argument.
37207     path="$complete"
37208     arguments="EOL"
37209     new_path=`$CYGPATH -u "$path"`
37210     new_path=`$WHICH "$new_path" 2> /dev/null`
37211     # bat and cmd files are not always considered executable in cygwin causing which
37212     # to not find them
37213     if test "x$new_path" = x \
37214         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37215         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37216       new_path=`$CYGPATH -u "$path"`
37217     fi
37218     if test "x$new_path" = x; then
37219       # It's still not found. Now this is an unrecoverable error.
37220       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37221 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37222       has_space=`$ECHO "$complete" | $GREP " "`
37223       if test "x$has_space" != x; then
37224         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37225 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37226       fi
37227       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37228     fi
37229   fi
37230 
37231   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37232   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37233   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37234   # "foo.exe" is OK but "foo" is an error.
37235   #
37236   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37237   # It is also a way to make sure we got the proper file name for the real test later on.
37238   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37239   if test "x$test_shortpath" = x; then
37240     # Short path failed, file does not exist as specified.
37241     # Try adding .exe or .cmd
37242     if test -f "${new_path}.exe"; then
37243       input_to_shortpath="${new_path}.exe"
37244     elif test -f "${new_path}.cmd"; then
37245       input_to_shortpath="${new_path}.cmd"
37246     else
37247       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
37248 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
37249       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37250 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37251       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37252     fi
37253   else
37254     input_to_shortpath="$new_path"
37255   fi
37256 
37257   # Call helper function which possibly converts this using DOS-style short mode.
37258   # If so, the updated path is stored in $new_path.
37259   new_path="$input_to_shortpath"
37260 
37261   input_path="$input_to_shortpath"
37262   # Check if we need to convert this using DOS-style short mode. If the path
37263   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37264   # take no chances and rewrite it.
37265   # Note: m4 eats our [], so we need to use [ and ] instead.
37266   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37267   if test "x$has_forbidden_chars" != x; then
37268     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37269     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37270     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37271     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37272       # Going to short mode and back again did indeed matter. Since short mode is
37273       # case insensitive, let's make it lowercase to improve readability.
37274       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37275       # Now convert it back to Unix-style (cygpath)
37276       input_path=`$CYGPATH -u "$shortmode_path"`
37277       new_path="$input_path"
37278     fi
37279   fi
37280 
37281   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37282   if test "x$test_cygdrive_prefix" = x; then
37283     # As a simple fix, exclude /usr/bin since it's not a real path.
37284     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37285       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37286       # a path prefixed by /cygdrive for fixpath to work.
37287       new_path="$CYGWIN_ROOT_PATH$input_path"
37288     fi
37289   fi
37290 
37291   # remove trailing .exe if any
37292   new_path="${new_path/%.exe/}"
37293 
37294     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37295 
37296   # First separate the path from the arguments. This will split at the first
37297   # space.
37298   complete="$RC"
37299   path="${complete%% *}"
37300   tmp="$complete EOL"
37301   arguments="${tmp#* }"
37302 
37303   # Input might be given as Windows format, start by converting to
37304   # unix format.
37305   new_path="$path"
37306 
37307   windows_path="$new_path"
37308   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37309     unix_path=`$CYGPATH -u "$windows_path"`
37310     new_path="$unix_path"
37311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37312     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37313     new_path="$unix_path"
37314   fi
37315 
37316 
37317   # Now try to locate executable using which
37318   new_path=`$WHICH "$new_path" 2> /dev/null`
37319 
37320   if test "x$new_path" = x; then
37321     # Oops. Which didn't find the executable.
37322     # The splitting of arguments from the executable at a space might have been incorrect,
37323     # since paths with space are more likely in Windows. Give it another try with the whole
37324     # argument.
37325     path="$complete"
37326     arguments="EOL"
37327     new_path="$path"
37328 
37329   windows_path="$new_path"
37330   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37331     unix_path=`$CYGPATH -u "$windows_path"`
37332     new_path="$unix_path"
37333   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37334     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37335     new_path="$unix_path"
37336   fi
37337 
37338 
37339     new_path=`$WHICH "$new_path" 2> /dev/null`
37340     # bat and cmd files are not always considered executable in MSYS causing which
37341     # to not find them
37342     if test "x$new_path" = x \
37343         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37344         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37345       new_path="$path"
37346 
37347   windows_path="$new_path"
37348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37349     unix_path=`$CYGPATH -u "$windows_path"`
37350     new_path="$unix_path"
37351   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37352     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37353     new_path="$unix_path"
37354   fi
37355 
37356     fi
37357 
37358     if test "x$new_path" = x; then
37359       # It's still not found. Now this is an unrecoverable error.
37360       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37361 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37362       has_space=`$ECHO "$complete" | $GREP " "`
37363       if test "x$has_space" != x; then
37364         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37365 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37366       fi
37367       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37368     fi
37369   fi
37370 
37371   # Now new_path has a complete unix path to the binary
37372   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37373     # Keep paths in /bin as-is, but remove trailing .exe if any
37374     new_path="${new_path/%.exe/}"
37375     # Do not save /bin paths to all_fixpath_prefixes!
37376   else
37377     # Not in mixed or Windows style, start by that.
37378     new_path=`cmd //c echo $new_path`
37379 
37380   input_path="$new_path"
37381   # Check if we need to convert this using DOS-style short mode. If the path
37382   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37383   # take no chances and rewrite it.
37384   # Note: m4 eats our [], so we need to use [ and ] instead.
37385   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37386   if test "x$has_forbidden_chars" != x; then
37387     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37388     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37389   fi
37390 
37391     # Output is in $new_path
37392 
37393   windows_path="$new_path"
37394   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37395     unix_path=`$CYGPATH -u "$windows_path"`
37396     new_path="$unix_path"
37397   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37398     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37399     new_path="$unix_path"
37400   fi
37401 
37402     # remove trailing .exe if any
37403     new_path="${new_path/%.exe/}"
37404 
37405     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37406     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37407   fi
37408 
37409     else
37410       # We're on a unix platform. Hooray! :)
37411       # First separate the path from the arguments. This will split at the first
37412       # space.
37413       complete="$RC"
37414       path="${complete%% *}"
37415       tmp="$complete EOL"
37416       arguments="${tmp#* }"
37417 
37418       # Cannot rely on the command "which" here since it doesn't always work.
37419       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37420       if test -z "$is_absolute_path"; then
37421         # Path to executable is not absolute. Find it.
37422         IFS_save="$IFS"
37423         IFS=:
37424         for p in $PATH; do
37425           if test -f "$p/$path" && test -x "$p/$path"; then
37426             new_path="$p/$path"
37427             break
37428           fi
37429         done
37430         IFS="$IFS_save"
37431       else
37432         # This is an absolute path, we can use it without further modifications.
37433         new_path="$path"
37434       fi
37435 
37436       if test "x$new_path" = x; then
37437         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37438 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37439         has_space=`$ECHO "$complete" | $GREP " "`
37440         if test "x$has_space" != x; then
37441           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37442 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37443         fi
37444         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37445       fi
37446     fi
37447 
37448     # Now join together the path and the arguments once again
37449     if test "x$arguments" != xEOL; then
37450       new_complete="$new_path ${arguments% *}"
37451     else
37452       new_complete="$new_path"
37453     fi
37454 
37455     if test "x$complete" != "x$new_complete"; then
37456       RC="$new_complete"
37457       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
37458 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
37459     fi
37460   fi
37461 
37462     # Extract the first word of "dumpbin", so it can be a program name with args.
37463 set dummy dumpbin; ac_word=$2
37464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37465 $as_echo_n "checking for $ac_word... " >&6; }
37466 if ${ac_cv_prog_DUMPBIN+:} false; then :
37467   $as_echo_n "(cached) " >&6
37468 else
37469   if test -n "$DUMPBIN"; then
37470   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
37471 else
37472 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37473 for as_dir in $PATH
37474 do
37475   IFS=$as_save_IFS
37476   test -z "$as_dir" && as_dir=.
37477     for ac_exec_ext in '' $ac_executable_extensions; do
37478   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37479     ac_cv_prog_DUMPBIN="dumpbin"
37480     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37481     break 2
37482   fi
37483 done
37484   done
37485 IFS=$as_save_IFS
37486 
37487 fi
37488 fi
37489 DUMPBIN=$ac_cv_prog_DUMPBIN
37490 if test -n "$DUMPBIN"; then
37491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
37492 $as_echo "$DUMPBIN" >&6; }
37493 else
37494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37495 $as_echo "no" >&6; }
37496 fi
37497 
37498 
37499 
37500   # Only process if variable expands to non-empty
37501 
37502   if test "x$DUMPBIN" != x; then
37503     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37504 
37505   # First separate the path from the arguments. This will split at the first
37506   # space.
37507   complete="$DUMPBIN"
37508   path="${complete%% *}"
37509   tmp="$complete EOL"
37510   arguments="${tmp#* }"
37511 
37512   # Input might be given as Windows format, start by converting to
37513   # unix format.
37514   new_path=`$CYGPATH -u "$path"`
37515 
37516   # Now try to locate executable using which
37517   new_path=`$WHICH "$new_path" 2> /dev/null`
37518   # bat and cmd files are not always considered executable in cygwin causing which
37519   # to not find them
37520   if test "x$new_path" = x \
37521       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37522       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37523     new_path=`$CYGPATH -u "$path"`
37524   fi
37525   if test "x$new_path" = x; then
37526     # Oops. Which didn't find the executable.
37527     # The splitting of arguments from the executable at a space might have been incorrect,
37528     # since paths with space are more likely in Windows. Give it another try with the whole
37529     # argument.
37530     path="$complete"
37531     arguments="EOL"
37532     new_path=`$CYGPATH -u "$path"`
37533     new_path=`$WHICH "$new_path" 2> /dev/null`
37534     # bat and cmd files are not always considered executable in cygwin causing which
37535     # to not find them
37536     if test "x$new_path" = x \
37537         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37538         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37539       new_path=`$CYGPATH -u "$path"`
37540     fi
37541     if test "x$new_path" = x; then
37542       # It's still not found. Now this is an unrecoverable error.
37543       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37544 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37545       has_space=`$ECHO "$complete" | $GREP " "`
37546       if test "x$has_space" != x; then
37547         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37548 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37549       fi
37550       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37551     fi
37552   fi
37553 
37554   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37555   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37556   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37557   # "foo.exe" is OK but "foo" is an error.
37558   #
37559   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37560   # It is also a way to make sure we got the proper file name for the real test later on.
37561   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37562   if test "x$test_shortpath" = x; then
37563     # Short path failed, file does not exist as specified.
37564     # Try adding .exe or .cmd
37565     if test -f "${new_path}.exe"; then
37566       input_to_shortpath="${new_path}.exe"
37567     elif test -f "${new_path}.cmd"; then
37568       input_to_shortpath="${new_path}.cmd"
37569     else
37570       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
37571 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
37572       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37573 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37574       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37575     fi
37576   else
37577     input_to_shortpath="$new_path"
37578   fi
37579 
37580   # Call helper function which possibly converts this using DOS-style short mode.
37581   # If so, the updated path is stored in $new_path.
37582   new_path="$input_to_shortpath"
37583 
37584   input_path="$input_to_shortpath"
37585   # Check if we need to convert this using DOS-style short mode. If the path
37586   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37587   # take no chances and rewrite it.
37588   # Note: m4 eats our [], so we need to use [ and ] instead.
37589   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37590   if test "x$has_forbidden_chars" != x; then
37591     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37592     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37593     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37594     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37595       # Going to short mode and back again did indeed matter. Since short mode is
37596       # case insensitive, let's make it lowercase to improve readability.
37597       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37598       # Now convert it back to Unix-style (cygpath)
37599       input_path=`$CYGPATH -u "$shortmode_path"`
37600       new_path="$input_path"
37601     fi
37602   fi
37603 
37604   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37605   if test "x$test_cygdrive_prefix" = x; then
37606     # As a simple fix, exclude /usr/bin since it's not a real path.
37607     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37608       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37609       # a path prefixed by /cygdrive for fixpath to work.
37610       new_path="$CYGWIN_ROOT_PATH$input_path"
37611     fi
37612   fi
37613 
37614   # remove trailing .exe if any
37615   new_path="${new_path/%.exe/}"
37616 
37617     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37618 
37619   # First separate the path from the arguments. This will split at the first
37620   # space.
37621   complete="$DUMPBIN"
37622   path="${complete%% *}"
37623   tmp="$complete EOL"
37624   arguments="${tmp#* }"
37625 
37626   # Input might be given as Windows format, start by converting to
37627   # unix format.
37628   new_path="$path"
37629 
37630   windows_path="$new_path"
37631   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37632     unix_path=`$CYGPATH -u "$windows_path"`
37633     new_path="$unix_path"
37634   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37635     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37636     new_path="$unix_path"
37637   fi
37638 
37639 
37640   # Now try to locate executable using which
37641   new_path=`$WHICH "$new_path" 2> /dev/null`
37642 
37643   if test "x$new_path" = x; then
37644     # Oops. Which didn't find the executable.
37645     # The splitting of arguments from the executable at a space might have been incorrect,
37646     # since paths with space are more likely in Windows. Give it another try with the whole
37647     # argument.
37648     path="$complete"
37649     arguments="EOL"
37650     new_path="$path"
37651 
37652   windows_path="$new_path"
37653   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37654     unix_path=`$CYGPATH -u "$windows_path"`
37655     new_path="$unix_path"
37656   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37657     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37658     new_path="$unix_path"
37659   fi
37660 
37661 
37662     new_path=`$WHICH "$new_path" 2> /dev/null`
37663     # bat and cmd files are not always considered executable in MSYS causing which
37664     # to not find them
37665     if test "x$new_path" = x \
37666         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37667         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37668       new_path="$path"
37669 
37670   windows_path="$new_path"
37671   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37672     unix_path=`$CYGPATH -u "$windows_path"`
37673     new_path="$unix_path"
37674   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37675     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37676     new_path="$unix_path"
37677   fi
37678 
37679     fi
37680 
37681     if test "x$new_path" = x; then
37682       # It's still not found. Now this is an unrecoverable error.
37683       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37684 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37685       has_space=`$ECHO "$complete" | $GREP " "`
37686       if test "x$has_space" != x; then
37687         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37688 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37689       fi
37690       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37691     fi
37692   fi
37693 
37694   # Now new_path has a complete unix path to the binary
37695   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37696     # Keep paths in /bin as-is, but remove trailing .exe if any
37697     new_path="${new_path/%.exe/}"
37698     # Do not save /bin paths to all_fixpath_prefixes!
37699   else
37700     # Not in mixed or Windows style, start by that.
37701     new_path=`cmd //c echo $new_path`
37702 
37703   input_path="$new_path"
37704   # Check if we need to convert this using DOS-style short mode. If the path
37705   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37706   # take no chances and rewrite it.
37707   # Note: m4 eats our [], so we need to use [ and ] instead.
37708   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37709   if test "x$has_forbidden_chars" != x; then
37710     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37711     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37712   fi
37713 
37714     # Output is in $new_path
37715 
37716   windows_path="$new_path"
37717   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37718     unix_path=`$CYGPATH -u "$windows_path"`
37719     new_path="$unix_path"
37720   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37721     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37722     new_path="$unix_path"
37723   fi
37724 
37725     # remove trailing .exe if any
37726     new_path="${new_path/%.exe/}"
37727 
37728     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37729     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37730   fi
37731 
37732     else
37733       # We're on a unix platform. Hooray! :)
37734       # First separate the path from the arguments. This will split at the first
37735       # space.
37736       complete="$DUMPBIN"
37737       path="${complete%% *}"
37738       tmp="$complete EOL"
37739       arguments="${tmp#* }"
37740 
37741       # Cannot rely on the command "which" here since it doesn't always work.
37742       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37743       if test -z "$is_absolute_path"; then
37744         # Path to executable is not absolute. Find it.
37745         IFS_save="$IFS"
37746         IFS=:
37747         for p in $PATH; do
37748           if test -f "$p/$path" && test -x "$p/$path"; then
37749             new_path="$p/$path"
37750             break
37751           fi
37752         done
37753         IFS="$IFS_save"
37754       else
37755         # This is an absolute path, we can use it without further modifications.
37756         new_path="$path"
37757       fi
37758 
37759       if test "x$new_path" = x; then
37760         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37761 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37762         has_space=`$ECHO "$complete" | $GREP " "`
37763         if test "x$has_space" != x; then
37764           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37765 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37766         fi
37767         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37768       fi
37769     fi
37770 
37771     # Now join together the path and the arguments once again
37772     if test "x$arguments" != xEOL; then
37773       new_complete="$new_path ${arguments% *}"
37774     else
37775       new_complete="$new_path"
37776     fi
37777 
37778     if test "x$complete" != "x$new_complete"; then
37779       DUMPBIN="$new_complete"
37780       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
37781 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
37782     fi
37783   fi
37784 
37785     # We need to check for 'msbuild.exe' because at the place where we expect to
37786     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
37787     # won't find the 'msbuild.exe' executable in that case (and the
37788     # 'ac_executable_extensions' is unusable due to performance reasons).
37789     # Notice that we intentionally don't fix up the path to MSBUILD because we
37790     # will call it in a DOS shell during freetype detection on Windows (see
37791     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
37792     # Extract the first word of "msbuild.exe", so it can be a program name with args.
37793 set dummy msbuild.exe; ac_word=$2
37794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37795 $as_echo_n "checking for $ac_word... " >&6; }
37796 if ${ac_cv_prog_MSBUILD+:} false; then :
37797   $as_echo_n "(cached) " >&6
37798 else
37799   if test -n "$MSBUILD"; then
37800   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
37801 else
37802 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37803 for as_dir in $PATH
37804 do
37805   IFS=$as_save_IFS
37806   test -z "$as_dir" && as_dir=.
37807     for ac_exec_ext in '' $ac_executable_extensions; do
37808   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37809     ac_cv_prog_MSBUILD="msbuild.exe"
37810     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37811     break 2
37812   fi
37813 done
37814   done
37815 IFS=$as_save_IFS
37816 
37817 fi
37818 fi
37819 MSBUILD=$ac_cv_prog_MSBUILD
37820 if test -n "$MSBUILD"; then
37821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
37822 $as_echo "$MSBUILD" >&6; }
37823 else
37824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37825 $as_echo "no" >&6; }
37826 fi
37827 
37828 
37829   fi
37830 
37831   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37832 
37833 
37834   # Publish this variable in the help.
37835 
37836 
37837   if [ -z "${STRIP+x}" ]; then
37838     # The variable is not set by user, try to locate tool using the code snippet
37839     for ac_prog in strip
37840 do
37841   # Extract the first word of "$ac_prog", so it can be a program name with args.
37842 set dummy $ac_prog; ac_word=$2
37843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37844 $as_echo_n "checking for $ac_word... " >&6; }
37845 if ${ac_cv_path_STRIP+:} false; then :
37846   $as_echo_n "(cached) " >&6
37847 else
37848   case $STRIP in
37849   [\\/]* | ?:[\\/]*)
37850   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37851   ;;
37852   *)
37853   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37854 for as_dir in $PATH
37855 do
37856   IFS=$as_save_IFS
37857   test -z "$as_dir" && as_dir=.
37858     for ac_exec_ext in '' $ac_executable_extensions; do
37859   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37860     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37861     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37862     break 2
37863   fi
37864 done
37865   done
37866 IFS=$as_save_IFS
37867 
37868   ;;
37869 esac
37870 fi
37871 STRIP=$ac_cv_path_STRIP
37872 if test -n "$STRIP"; then
37873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37874 $as_echo "$STRIP" >&6; }
37875 else
37876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37877 $as_echo "no" >&6; }
37878 fi
37879 
37880 
37881   test -n "$STRIP" && break
37882 done
37883 
37884   else
37885     # The variable is set, but is it from the command line or the environment?
37886 
37887     # Try to remove the string !STRIP! from our list.
37888     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37889     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37890       # If it failed, the variable was not from the command line. Ignore it,
37891       # but warn the user (except for BASH, which is always set by the calling BASH).
37892       if test "xSTRIP" != xBASH; then
37893         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37894 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37895       fi
37896       # Try to locate tool using the code snippet
37897       for ac_prog in strip
37898 do
37899   # Extract the first word of "$ac_prog", so it can be a program name with args.
37900 set dummy $ac_prog; ac_word=$2
37901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37902 $as_echo_n "checking for $ac_word... " >&6; }
37903 if ${ac_cv_path_STRIP+:} false; then :
37904   $as_echo_n "(cached) " >&6
37905 else
37906   case $STRIP in
37907   [\\/]* | ?:[\\/]*)
37908   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37909   ;;
37910   *)
37911   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37912 for as_dir in $PATH
37913 do
37914   IFS=$as_save_IFS
37915   test -z "$as_dir" && as_dir=.
37916     for ac_exec_ext in '' $ac_executable_extensions; do
37917   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37918     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37919     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37920     break 2
37921   fi
37922 done
37923   done
37924 IFS=$as_save_IFS
37925 
37926   ;;
37927 esac
37928 fi
37929 STRIP=$ac_cv_path_STRIP
37930 if test -n "$STRIP"; then
37931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37932 $as_echo "$STRIP" >&6; }
37933 else
37934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37935 $as_echo "no" >&6; }
37936 fi
37937 
37938 
37939   test -n "$STRIP" && break
37940 done
37941 
37942     else
37943       # If it succeeded, then it was overridden by the user. We will use it
37944       # for the tool.
37945 
37946       # First remove it from the list of overridden variables, so we can test
37947       # for unknown variables in the end.
37948       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37949 
37950       # Check if we try to supply an empty value
37951       if test "x$STRIP" = x; then
37952         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
37953 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
37954         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37955 $as_echo_n "checking for STRIP... " >&6; }
37956         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37957 $as_echo "disabled" >&6; }
37958       else
37959         # Check if the provided tool contains a complete path.
37960         tool_specified="$STRIP"
37961         tool_basename="${tool_specified##*/}"
37962         if test "x$tool_basename" = "x$tool_specified"; then
37963           # A command without a complete path is provided, search $PATH.
37964           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37965 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37966           # Extract the first word of "$tool_basename", so it can be a program name with args.
37967 set dummy $tool_basename; ac_word=$2
37968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37969 $as_echo_n "checking for $ac_word... " >&6; }
37970 if ${ac_cv_path_STRIP+:} false; then :
37971   $as_echo_n "(cached) " >&6
37972 else
37973   case $STRIP in
37974   [\\/]* | ?:[\\/]*)
37975   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37976   ;;
37977   *)
37978   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37979 for as_dir in $PATH
37980 do
37981   IFS=$as_save_IFS
37982   test -z "$as_dir" && as_dir=.
37983     for ac_exec_ext in '' $ac_executable_extensions; do
37984   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37985     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37986     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37987     break 2
37988   fi
37989 done
37990   done
37991 IFS=$as_save_IFS
37992 
37993   ;;
37994 esac
37995 fi
37996 STRIP=$ac_cv_path_STRIP
37997 if test -n "$STRIP"; then
37998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37999 $as_echo "$STRIP" >&6; }
38000 else
38001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38002 $as_echo "no" >&6; }
38003 fi
38004 
38005 
38006           if test "x$STRIP" = x; then
38007             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38008           fi
38009         else
38010           # Otherwise we believe it is a complete path. Use it as it is.
38011           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38012 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38013           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38014 $as_echo_n "checking for STRIP... " >&6; }
38015           if test ! -x "$tool_specified"; then
38016             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38017 $as_echo "not found" >&6; }
38018             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38019           fi
38020           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38021 $as_echo "$tool_specified" >&6; }
38022         fi
38023       fi
38024     fi
38025 
38026   fi
38027 
38028 
38029 
38030   # Only process if variable expands to non-empty
38031 
38032   if test "x$STRIP" != x; then
38033     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38034 
38035   # First separate the path from the arguments. This will split at the first
38036   # space.
38037   complete="$STRIP"
38038   path="${complete%% *}"
38039   tmp="$complete EOL"
38040   arguments="${tmp#* }"
38041 
38042   # Input might be given as Windows format, start by converting to
38043   # unix format.
38044   new_path=`$CYGPATH -u "$path"`
38045 
38046   # Now try to locate executable using which
38047   new_path=`$WHICH "$new_path" 2> /dev/null`
38048   # bat and cmd files are not always considered executable in cygwin causing which
38049   # to not find them
38050   if test "x$new_path" = x \
38051       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38052       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38053     new_path=`$CYGPATH -u "$path"`
38054   fi
38055   if test "x$new_path" = x; then
38056     # Oops. Which didn't find the executable.
38057     # The splitting of arguments from the executable at a space might have been incorrect,
38058     # since paths with space are more likely in Windows. Give it another try with the whole
38059     # argument.
38060     path="$complete"
38061     arguments="EOL"
38062     new_path=`$CYGPATH -u "$path"`
38063     new_path=`$WHICH "$new_path" 2> /dev/null`
38064     # bat and cmd files are not always considered executable in cygwin causing which
38065     # to not find them
38066     if test "x$new_path" = x \
38067         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38068         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38069       new_path=`$CYGPATH -u "$path"`
38070     fi
38071     if test "x$new_path" = x; then
38072       # It's still not found. Now this is an unrecoverable error.
38073       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38074 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38075       has_space=`$ECHO "$complete" | $GREP " "`
38076       if test "x$has_space" != x; then
38077         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38078 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38079       fi
38080       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38081     fi
38082   fi
38083 
38084   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38085   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38086   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38087   # "foo.exe" is OK but "foo" is an error.
38088   #
38089   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38090   # It is also a way to make sure we got the proper file name for the real test later on.
38091   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38092   if test "x$test_shortpath" = x; then
38093     # Short path failed, file does not exist as specified.
38094     # Try adding .exe or .cmd
38095     if test -f "${new_path}.exe"; then
38096       input_to_shortpath="${new_path}.exe"
38097     elif test -f "${new_path}.cmd"; then
38098       input_to_shortpath="${new_path}.cmd"
38099     else
38100       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38101 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38102       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38103 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38104       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38105     fi
38106   else
38107     input_to_shortpath="$new_path"
38108   fi
38109 
38110   # Call helper function which possibly converts this using DOS-style short mode.
38111   # If so, the updated path is stored in $new_path.
38112   new_path="$input_to_shortpath"
38113 
38114   input_path="$input_to_shortpath"
38115   # Check if we need to convert this using DOS-style short mode. If the path
38116   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38117   # take no chances and rewrite it.
38118   # Note: m4 eats our [], so we need to use [ and ] instead.
38119   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38120   if test "x$has_forbidden_chars" != x; then
38121     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38122     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38123     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38124     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38125       # Going to short mode and back again did indeed matter. Since short mode is
38126       # case insensitive, let's make it lowercase to improve readability.
38127       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38128       # Now convert it back to Unix-style (cygpath)
38129       input_path=`$CYGPATH -u "$shortmode_path"`
38130       new_path="$input_path"
38131     fi
38132   fi
38133 
38134   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38135   if test "x$test_cygdrive_prefix" = x; then
38136     # As a simple fix, exclude /usr/bin since it's not a real path.
38137     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38138       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38139       # a path prefixed by /cygdrive for fixpath to work.
38140       new_path="$CYGWIN_ROOT_PATH$input_path"
38141     fi
38142   fi
38143 
38144   # remove trailing .exe if any
38145   new_path="${new_path/%.exe/}"
38146 
38147     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38148 
38149   # First separate the path from the arguments. This will split at the first
38150   # space.
38151   complete="$STRIP"
38152   path="${complete%% *}"
38153   tmp="$complete EOL"
38154   arguments="${tmp#* }"
38155 
38156   # Input might be given as Windows format, start by converting to
38157   # unix format.
38158   new_path="$path"
38159 
38160   windows_path="$new_path"
38161   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38162     unix_path=`$CYGPATH -u "$windows_path"`
38163     new_path="$unix_path"
38164   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38165     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38166     new_path="$unix_path"
38167   fi
38168 
38169 
38170   # Now try to locate executable using which
38171   new_path=`$WHICH "$new_path" 2> /dev/null`
38172 
38173   if test "x$new_path" = x; then
38174     # Oops. Which didn't find the executable.
38175     # The splitting of arguments from the executable at a space might have been incorrect,
38176     # since paths with space are more likely in Windows. Give it another try with the whole
38177     # argument.
38178     path="$complete"
38179     arguments="EOL"
38180     new_path="$path"
38181 
38182   windows_path="$new_path"
38183   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38184     unix_path=`$CYGPATH -u "$windows_path"`
38185     new_path="$unix_path"
38186   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38187     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38188     new_path="$unix_path"
38189   fi
38190 
38191 
38192     new_path=`$WHICH "$new_path" 2> /dev/null`
38193     # bat and cmd files are not always considered executable in MSYS causing which
38194     # to not find them
38195     if test "x$new_path" = x \
38196         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38197         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38198       new_path="$path"
38199 
38200   windows_path="$new_path"
38201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38202     unix_path=`$CYGPATH -u "$windows_path"`
38203     new_path="$unix_path"
38204   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38205     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38206     new_path="$unix_path"
38207   fi
38208 
38209     fi
38210 
38211     if test "x$new_path" = x; then
38212       # It's still not found. Now this is an unrecoverable error.
38213       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38214 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38215       has_space=`$ECHO "$complete" | $GREP " "`
38216       if test "x$has_space" != x; then
38217         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38218 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38219       fi
38220       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38221     fi
38222   fi
38223 
38224   # Now new_path has a complete unix path to the binary
38225   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38226     # Keep paths in /bin as-is, but remove trailing .exe if any
38227     new_path="${new_path/%.exe/}"
38228     # Do not save /bin paths to all_fixpath_prefixes!
38229   else
38230     # Not in mixed or Windows style, start by that.
38231     new_path=`cmd //c echo $new_path`
38232 
38233   input_path="$new_path"
38234   # Check if we need to convert this using DOS-style short mode. If the path
38235   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38236   # take no chances and rewrite it.
38237   # Note: m4 eats our [], so we need to use [ and ] instead.
38238   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38239   if test "x$has_forbidden_chars" != x; then
38240     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38241     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38242   fi
38243 
38244     # Output is in $new_path
38245 
38246   windows_path="$new_path"
38247   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38248     unix_path=`$CYGPATH -u "$windows_path"`
38249     new_path="$unix_path"
38250   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38251     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38252     new_path="$unix_path"
38253   fi
38254 
38255     # remove trailing .exe if any
38256     new_path="${new_path/%.exe/}"
38257 
38258     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38259     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38260   fi
38261 
38262     else
38263       # We're on a unix platform. Hooray! :)
38264       # First separate the path from the arguments. This will split at the first
38265       # space.
38266       complete="$STRIP"
38267       path="${complete%% *}"
38268       tmp="$complete EOL"
38269       arguments="${tmp#* }"
38270 
38271       # Cannot rely on the command "which" here since it doesn't always work.
38272       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38273       if test -z "$is_absolute_path"; then
38274         # Path to executable is not absolute. Find it.
38275         IFS_save="$IFS"
38276         IFS=:
38277         for p in $PATH; do
38278           if test -f "$p/$path" && test -x "$p/$path"; then
38279             new_path="$p/$path"
38280             break
38281           fi
38282         done
38283         IFS="$IFS_save"
38284       else
38285         # This is an absolute path, we can use it without further modifications.
38286         new_path="$path"
38287       fi
38288 
38289       if test "x$new_path" = x; then
38290         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38291 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38292         has_space=`$ECHO "$complete" | $GREP " "`
38293         if test "x$has_space" != x; then
38294           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38295 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38296         fi
38297         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38298       fi
38299     fi
38300 
38301     # Now join together the path and the arguments once again
38302     if test "x$arguments" != xEOL; then
38303       new_complete="$new_path ${arguments% *}"
38304     else
38305       new_complete="$new_path"
38306     fi
38307 
38308     if test "x$complete" != "x$new_complete"; then
38309       STRIP="$new_complete"
38310       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38311 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38312     fi
38313   fi
38314 
38315 
38316 
38317   # Publish this variable in the help.
38318 
38319 
38320   if [ -z "${NM+x}" ]; then
38321     # The variable is not set by user, try to locate tool using the code snippet
38322     for ac_prog in nm
38323 do
38324   # Extract the first word of "$ac_prog", so it can be a program name with args.
38325 set dummy $ac_prog; ac_word=$2
38326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38327 $as_echo_n "checking for $ac_word... " >&6; }
38328 if ${ac_cv_path_NM+:} false; then :
38329   $as_echo_n "(cached) " >&6
38330 else
38331   case $NM in
38332   [\\/]* | ?:[\\/]*)
38333   ac_cv_path_NM="$NM" # Let the user override the test with a path.
38334   ;;
38335   *)
38336   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38337 for as_dir in $PATH
38338 do
38339   IFS=$as_save_IFS
38340   test -z "$as_dir" && as_dir=.
38341     for ac_exec_ext in '' $ac_executable_extensions; do
38342   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38343     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38344     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38345     break 2
38346   fi
38347 done
38348   done
38349 IFS=$as_save_IFS
38350 
38351   ;;
38352 esac
38353 fi
38354 NM=$ac_cv_path_NM
38355 if test -n "$NM"; then
38356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38357 $as_echo "$NM" >&6; }
38358 else
38359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38360 $as_echo "no" >&6; }
38361 fi
38362 
38363 
38364   test -n "$NM" && break
38365 done
38366 
38367   else
38368     # The variable is set, but is it from the command line or the environment?
38369 
38370     # Try to remove the string !NM! from our list.
38371     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38372     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38373       # If it failed, the variable was not from the command line. Ignore it,
38374       # but warn the user (except for BASH, which is always set by the calling BASH).
38375       if test "xNM" != xBASH; then
38376         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38377 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38378       fi
38379       # Try to locate tool using the code snippet
38380       for ac_prog in nm
38381 do
38382   # Extract the first word of "$ac_prog", so it can be a program name with args.
38383 set dummy $ac_prog; ac_word=$2
38384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38385 $as_echo_n "checking for $ac_word... " >&6; }
38386 if ${ac_cv_path_NM+:} false; then :
38387   $as_echo_n "(cached) " >&6
38388 else
38389   case $NM in
38390   [\\/]* | ?:[\\/]*)
38391   ac_cv_path_NM="$NM" # Let the user override the test with a path.
38392   ;;
38393   *)
38394   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38395 for as_dir in $PATH
38396 do
38397   IFS=$as_save_IFS
38398   test -z "$as_dir" && as_dir=.
38399     for ac_exec_ext in '' $ac_executable_extensions; do
38400   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38401     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38402     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38403     break 2
38404   fi
38405 done
38406   done
38407 IFS=$as_save_IFS
38408 
38409   ;;
38410 esac
38411 fi
38412 NM=$ac_cv_path_NM
38413 if test -n "$NM"; then
38414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38415 $as_echo "$NM" >&6; }
38416 else
38417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38418 $as_echo "no" >&6; }
38419 fi
38420 
38421 
38422   test -n "$NM" && break
38423 done
38424 
38425     else
38426       # If it succeeded, then it was overridden by the user. We will use it
38427       # for the tool.
38428 
38429       # First remove it from the list of overridden variables, so we can test
38430       # for unknown variables in the end.
38431       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38432 
38433       # Check if we try to supply an empty value
38434       if test "x$NM" = x; then
38435         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38436 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38437         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38438 $as_echo_n "checking for NM... " >&6; }
38439         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38440 $as_echo "disabled" >&6; }
38441       else
38442         # Check if the provided tool contains a complete path.
38443         tool_specified="$NM"
38444         tool_basename="${tool_specified##*/}"
38445         if test "x$tool_basename" = "x$tool_specified"; then
38446           # A command without a complete path is provided, search $PATH.
38447           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38448 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38449           # Extract the first word of "$tool_basename", so it can be a program name with args.
38450 set dummy $tool_basename; ac_word=$2
38451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38452 $as_echo_n "checking for $ac_word... " >&6; }
38453 if ${ac_cv_path_NM+:} false; then :
38454   $as_echo_n "(cached) " >&6
38455 else
38456   case $NM in
38457   [\\/]* | ?:[\\/]*)
38458   ac_cv_path_NM="$NM" # Let the user override the test with a path.
38459   ;;
38460   *)
38461   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38462 for as_dir in $PATH
38463 do
38464   IFS=$as_save_IFS
38465   test -z "$as_dir" && as_dir=.
38466     for ac_exec_ext in '' $ac_executable_extensions; do
38467   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38468     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38469     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38470     break 2
38471   fi
38472 done
38473   done
38474 IFS=$as_save_IFS
38475 
38476   ;;
38477 esac
38478 fi
38479 NM=$ac_cv_path_NM
38480 if test -n "$NM"; then
38481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38482 $as_echo "$NM" >&6; }
38483 else
38484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38485 $as_echo "no" >&6; }
38486 fi
38487 
38488 
38489           if test "x$NM" = x; then
38490             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38491           fi
38492         else
38493           # Otherwise we believe it is a complete path. Use it as it is.
38494           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38495 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38496           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38497 $as_echo_n "checking for NM... " >&6; }
38498           if test ! -x "$tool_specified"; then
38499             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38500 $as_echo "not found" >&6; }
38501             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38502           fi
38503           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38504 $as_echo "$tool_specified" >&6; }
38505         fi
38506       fi
38507     fi
38508 
38509   fi
38510 
38511 
38512 
38513   # Only process if variable expands to non-empty
38514 
38515   if test "x$NM" != x; then
38516     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38517 
38518   # First separate the path from the arguments. This will split at the first
38519   # space.
38520   complete="$NM"
38521   path="${complete%% *}"
38522   tmp="$complete EOL"
38523   arguments="${tmp#* }"
38524 
38525   # Input might be given as Windows format, start by converting to
38526   # unix format.
38527   new_path=`$CYGPATH -u "$path"`
38528 
38529   # Now try to locate executable using which
38530   new_path=`$WHICH "$new_path" 2> /dev/null`
38531   # bat and cmd files are not always considered executable in cygwin causing which
38532   # to not find them
38533   if test "x$new_path" = x \
38534       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38535       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38536     new_path=`$CYGPATH -u "$path"`
38537   fi
38538   if test "x$new_path" = x; then
38539     # Oops. Which didn't find the executable.
38540     # The splitting of arguments from the executable at a space might have been incorrect,
38541     # since paths with space are more likely in Windows. Give it another try with the whole
38542     # argument.
38543     path="$complete"
38544     arguments="EOL"
38545     new_path=`$CYGPATH -u "$path"`
38546     new_path=`$WHICH "$new_path" 2> /dev/null`
38547     # bat and cmd files are not always considered executable in cygwin causing which
38548     # to not find them
38549     if test "x$new_path" = x \
38550         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38551         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38552       new_path=`$CYGPATH -u "$path"`
38553     fi
38554     if test "x$new_path" = x; then
38555       # It's still not found. Now this is an unrecoverable error.
38556       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38557 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38558       has_space=`$ECHO "$complete" | $GREP " "`
38559       if test "x$has_space" != x; then
38560         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38561 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38562       fi
38563       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38564     fi
38565   fi
38566 
38567   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38568   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38569   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38570   # "foo.exe" is OK but "foo" is an error.
38571   #
38572   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38573   # It is also a way to make sure we got the proper file name for the real test later on.
38574   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38575   if test "x$test_shortpath" = x; then
38576     # Short path failed, file does not exist as specified.
38577     # Try adding .exe or .cmd
38578     if test -f "${new_path}.exe"; then
38579       input_to_shortpath="${new_path}.exe"
38580     elif test -f "${new_path}.cmd"; then
38581       input_to_shortpath="${new_path}.cmd"
38582     else
38583       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38584 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38585       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38586 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38587       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38588     fi
38589   else
38590     input_to_shortpath="$new_path"
38591   fi
38592 
38593   # Call helper function which possibly converts this using DOS-style short mode.
38594   # If so, the updated path is stored in $new_path.
38595   new_path="$input_to_shortpath"
38596 
38597   input_path="$input_to_shortpath"
38598   # Check if we need to convert this using DOS-style short mode. If the path
38599   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38600   # take no chances and rewrite it.
38601   # Note: m4 eats our [], so we need to use [ and ] instead.
38602   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38603   if test "x$has_forbidden_chars" != x; then
38604     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38605     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38606     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38607     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38608       # Going to short mode and back again did indeed matter. Since short mode is
38609       # case insensitive, let's make it lowercase to improve readability.
38610       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38611       # Now convert it back to Unix-style (cygpath)
38612       input_path=`$CYGPATH -u "$shortmode_path"`
38613       new_path="$input_path"
38614     fi
38615   fi
38616 
38617   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38618   if test "x$test_cygdrive_prefix" = x; then
38619     # As a simple fix, exclude /usr/bin since it's not a real path.
38620     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38621       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38622       # a path prefixed by /cygdrive for fixpath to work.
38623       new_path="$CYGWIN_ROOT_PATH$input_path"
38624     fi
38625   fi
38626 
38627   # remove trailing .exe if any
38628   new_path="${new_path/%.exe/}"
38629 
38630     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38631 
38632   # First separate the path from the arguments. This will split at the first
38633   # space.
38634   complete="$NM"
38635   path="${complete%% *}"
38636   tmp="$complete EOL"
38637   arguments="${tmp#* }"
38638 
38639   # Input might be given as Windows format, start by converting to
38640   # unix format.
38641   new_path="$path"
38642 
38643   windows_path="$new_path"
38644   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38645     unix_path=`$CYGPATH -u "$windows_path"`
38646     new_path="$unix_path"
38647   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38648     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38649     new_path="$unix_path"
38650   fi
38651 
38652 
38653   # Now try to locate executable using which
38654   new_path=`$WHICH "$new_path" 2> /dev/null`
38655 
38656   if test "x$new_path" = x; then
38657     # Oops. Which didn't find the executable.
38658     # The splitting of arguments from the executable at a space might have been incorrect,
38659     # since paths with space are more likely in Windows. Give it another try with the whole
38660     # argument.
38661     path="$complete"
38662     arguments="EOL"
38663     new_path="$path"
38664 
38665   windows_path="$new_path"
38666   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38667     unix_path=`$CYGPATH -u "$windows_path"`
38668     new_path="$unix_path"
38669   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38670     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38671     new_path="$unix_path"
38672   fi
38673 
38674 
38675     new_path=`$WHICH "$new_path" 2> /dev/null`
38676     # bat and cmd files are not always considered executable in MSYS causing which
38677     # to not find them
38678     if test "x$new_path" = x \
38679         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38680         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38681       new_path="$path"
38682 
38683   windows_path="$new_path"
38684   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38685     unix_path=`$CYGPATH -u "$windows_path"`
38686     new_path="$unix_path"
38687   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38688     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38689     new_path="$unix_path"
38690   fi
38691 
38692     fi
38693 
38694     if test "x$new_path" = x; then
38695       # It's still not found. Now this is an unrecoverable error.
38696       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38697 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38698       has_space=`$ECHO "$complete" | $GREP " "`
38699       if test "x$has_space" != x; then
38700         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38701 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38702       fi
38703       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38704     fi
38705   fi
38706 
38707   # Now new_path has a complete unix path to the binary
38708   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38709     # Keep paths in /bin as-is, but remove trailing .exe if any
38710     new_path="${new_path/%.exe/}"
38711     # Do not save /bin paths to all_fixpath_prefixes!
38712   else
38713     # Not in mixed or Windows style, start by that.
38714     new_path=`cmd //c echo $new_path`
38715 
38716   input_path="$new_path"
38717   # Check if we need to convert this using DOS-style short mode. If the path
38718   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38719   # take no chances and rewrite it.
38720   # Note: m4 eats our [], so we need to use [ and ] instead.
38721   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38722   if test "x$has_forbidden_chars" != x; then
38723     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38724     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38725   fi
38726 
38727     # Output is in $new_path
38728 
38729   windows_path="$new_path"
38730   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38731     unix_path=`$CYGPATH -u "$windows_path"`
38732     new_path="$unix_path"
38733   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38734     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38735     new_path="$unix_path"
38736   fi
38737 
38738     # remove trailing .exe if any
38739     new_path="${new_path/%.exe/}"
38740 
38741     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38742     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38743   fi
38744 
38745     else
38746       # We're on a unix platform. Hooray! :)
38747       # First separate the path from the arguments. This will split at the first
38748       # space.
38749       complete="$NM"
38750       path="${complete%% *}"
38751       tmp="$complete EOL"
38752       arguments="${tmp#* }"
38753 
38754       # Cannot rely on the command "which" here since it doesn't always work.
38755       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38756       if test -z "$is_absolute_path"; then
38757         # Path to executable is not absolute. Find it.
38758         IFS_save="$IFS"
38759         IFS=:
38760         for p in $PATH; do
38761           if test -f "$p/$path" && test -x "$p/$path"; then
38762             new_path="$p/$path"
38763             break
38764           fi
38765         done
38766         IFS="$IFS_save"
38767       else
38768         # This is an absolute path, we can use it without further modifications.
38769         new_path="$path"
38770       fi
38771 
38772       if test "x$new_path" = x; then
38773         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38774 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38775         has_space=`$ECHO "$complete" | $GREP " "`
38776         if test "x$has_space" != x; then
38777           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38778 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38779         fi
38780         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38781       fi
38782     fi
38783 
38784     # Now join together the path and the arguments once again
38785     if test "x$arguments" != xEOL; then
38786       new_complete="$new_path ${arguments% *}"
38787     else
38788       new_complete="$new_path"
38789     fi
38790 
38791     if test "x$complete" != "x$new_complete"; then
38792       NM="$new_complete"
38793       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38794 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38795     fi
38796   fi
38797 
38798 
38799 
38800   # Publish this variable in the help.
38801 
38802 
38803   if [ -z "${GNM+x}" ]; then
38804     # The variable is not set by user, try to locate tool using the code snippet
38805     for ac_prog in gnm
38806 do
38807   # Extract the first word of "$ac_prog", so it can be a program name with args.
38808 set dummy $ac_prog; ac_word=$2
38809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38810 $as_echo_n "checking for $ac_word... " >&6; }
38811 if ${ac_cv_path_GNM+:} false; then :
38812   $as_echo_n "(cached) " >&6
38813 else
38814   case $GNM in
38815   [\\/]* | ?:[\\/]*)
38816   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
38817   ;;
38818   *)
38819   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38820 for as_dir in $PATH
38821 do
38822   IFS=$as_save_IFS
38823   test -z "$as_dir" && as_dir=.
38824     for ac_exec_ext in '' $ac_executable_extensions; do
38825   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38826     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
38827     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38828     break 2
38829   fi
38830 done
38831   done
38832 IFS=$as_save_IFS
38833 
38834   ;;
38835 esac
38836 fi
38837 GNM=$ac_cv_path_GNM
38838 if test -n "$GNM"; then
38839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
38840 $as_echo "$GNM" >&6; }
38841 else
38842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38843 $as_echo "no" >&6; }
38844 fi
38845 
38846 
38847   test -n "$GNM" && break
38848 done
38849 
38850   else
38851     # The variable is set, but is it from the command line or the environment?
38852 
38853     # Try to remove the string !GNM! from our list.
38854     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
38855     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38856       # If it failed, the variable was not from the command line. Ignore it,
38857       # but warn the user (except for BASH, which is always set by the calling BASH).
38858       if test "xGNM" != xBASH; then
38859         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
38860 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
38861       fi
38862       # Try to locate tool using the code snippet
38863       for ac_prog in gnm
38864 do
38865   # Extract the first word of "$ac_prog", so it can be a program name with args.
38866 set dummy $ac_prog; ac_word=$2
38867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38868 $as_echo_n "checking for $ac_word... " >&6; }
38869 if ${ac_cv_path_GNM+:} false; then :
38870   $as_echo_n "(cached) " >&6
38871 else
38872   case $GNM in
38873   [\\/]* | ?:[\\/]*)
38874   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
38875   ;;
38876   *)
38877   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38878 for as_dir in $PATH
38879 do
38880   IFS=$as_save_IFS
38881   test -z "$as_dir" && as_dir=.
38882     for ac_exec_ext in '' $ac_executable_extensions; do
38883   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38884     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
38885     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38886     break 2
38887   fi
38888 done
38889   done
38890 IFS=$as_save_IFS
38891 
38892   ;;
38893 esac
38894 fi
38895 GNM=$ac_cv_path_GNM
38896 if test -n "$GNM"; then
38897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
38898 $as_echo "$GNM" >&6; }
38899 else
38900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38901 $as_echo "no" >&6; }
38902 fi
38903 
38904 
38905   test -n "$GNM" && break
38906 done
38907 
38908     else
38909       # If it succeeded, then it was overridden by the user. We will use it
38910       # for the tool.
38911 
38912       # First remove it from the list of overridden variables, so we can test
38913       # for unknown variables in the end.
38914       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38915 
38916       # Check if we try to supply an empty value
38917       if test "x$GNM" = x; then
38918         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
38919 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
38920         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
38921 $as_echo_n "checking for GNM... " >&6; }
38922         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38923 $as_echo "disabled" >&6; }
38924       else
38925         # Check if the provided tool contains a complete path.
38926         tool_specified="$GNM"
38927         tool_basename="${tool_specified##*/}"
38928         if test "x$tool_basename" = "x$tool_specified"; then
38929           # A command without a complete path is provided, search $PATH.
38930           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
38931 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
38932           # Extract the first word of "$tool_basename", so it can be a program name with args.
38933 set dummy $tool_basename; ac_word=$2
38934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38935 $as_echo_n "checking for $ac_word... " >&6; }
38936 if ${ac_cv_path_GNM+:} false; then :
38937   $as_echo_n "(cached) " >&6
38938 else
38939   case $GNM in
38940   [\\/]* | ?:[\\/]*)
38941   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
38942   ;;
38943   *)
38944   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38945 for as_dir in $PATH
38946 do
38947   IFS=$as_save_IFS
38948   test -z "$as_dir" && as_dir=.
38949     for ac_exec_ext in '' $ac_executable_extensions; do
38950   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38951     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
38952     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38953     break 2
38954   fi
38955 done
38956   done
38957 IFS=$as_save_IFS
38958 
38959   ;;
38960 esac
38961 fi
38962 GNM=$ac_cv_path_GNM
38963 if test -n "$GNM"; then
38964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
38965 $as_echo "$GNM" >&6; }
38966 else
38967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38968 $as_echo "no" >&6; }
38969 fi
38970 
38971 
38972           if test "x$GNM" = x; then
38973             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38974           fi
38975         else
38976           # Otherwise we believe it is a complete path. Use it as it is.
38977           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
38978 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
38979           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
38980 $as_echo_n "checking for GNM... " >&6; }
38981           if test ! -x "$tool_specified"; then
38982             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38983 $as_echo "not found" >&6; }
38984             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
38985           fi
38986           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38987 $as_echo "$tool_specified" >&6; }
38988         fi
38989       fi
38990     fi
38991 
38992   fi
38993 
38994 
38995 
38996   # Only process if variable expands to non-empty
38997 
38998   if test "x$GNM" != x; then
38999     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39000 
39001   # First separate the path from the arguments. This will split at the first
39002   # space.
39003   complete="$GNM"
39004   path="${complete%% *}"
39005   tmp="$complete EOL"
39006   arguments="${tmp#* }"
39007 
39008   # Input might be given as Windows format, start by converting to
39009   # unix format.
39010   new_path=`$CYGPATH -u "$path"`
39011 
39012   # Now try to locate executable using which
39013   new_path=`$WHICH "$new_path" 2> /dev/null`
39014   # bat and cmd files are not always considered executable in cygwin causing which
39015   # to not find them
39016   if test "x$new_path" = x \
39017       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39018       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39019     new_path=`$CYGPATH -u "$path"`
39020   fi
39021   if test "x$new_path" = x; then
39022     # Oops. Which didn't find the executable.
39023     # The splitting of arguments from the executable at a space might have been incorrect,
39024     # since paths with space are more likely in Windows. Give it another try with the whole
39025     # argument.
39026     path="$complete"
39027     arguments="EOL"
39028     new_path=`$CYGPATH -u "$path"`
39029     new_path=`$WHICH "$new_path" 2> /dev/null`
39030     # bat and cmd files are not always considered executable in cygwin causing which
39031     # to not find them
39032     if test "x$new_path" = x \
39033         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39034         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39035       new_path=`$CYGPATH -u "$path"`
39036     fi
39037     if test "x$new_path" = x; then
39038       # It's still not found. Now this is an unrecoverable error.
39039       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39040 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39041       has_space=`$ECHO "$complete" | $GREP " "`
39042       if test "x$has_space" != x; then
39043         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39044 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39045       fi
39046       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39047     fi
39048   fi
39049 
39050   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39051   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39052   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39053   # "foo.exe" is OK but "foo" is an error.
39054   #
39055   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39056   # It is also a way to make sure we got the proper file name for the real test later on.
39057   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39058   if test "x$test_shortpath" = x; then
39059     # Short path failed, file does not exist as specified.
39060     # Try adding .exe or .cmd
39061     if test -f "${new_path}.exe"; then
39062       input_to_shortpath="${new_path}.exe"
39063     elif test -f "${new_path}.cmd"; then
39064       input_to_shortpath="${new_path}.cmd"
39065     else
39066       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39067 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39068       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39069 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39070       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39071     fi
39072   else
39073     input_to_shortpath="$new_path"
39074   fi
39075 
39076   # Call helper function which possibly converts this using DOS-style short mode.
39077   # If so, the updated path is stored in $new_path.
39078   new_path="$input_to_shortpath"
39079 
39080   input_path="$input_to_shortpath"
39081   # Check if we need to convert this using DOS-style short mode. If the path
39082   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39083   # take no chances and rewrite it.
39084   # Note: m4 eats our [], so we need to use [ and ] instead.
39085   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39086   if test "x$has_forbidden_chars" != x; then
39087     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39088     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39089     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39090     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39091       # Going to short mode and back again did indeed matter. Since short mode is
39092       # case insensitive, let's make it lowercase to improve readability.
39093       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39094       # Now convert it back to Unix-style (cygpath)
39095       input_path=`$CYGPATH -u "$shortmode_path"`
39096       new_path="$input_path"
39097     fi
39098   fi
39099 
39100   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39101   if test "x$test_cygdrive_prefix" = x; then
39102     # As a simple fix, exclude /usr/bin since it's not a real path.
39103     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39104       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39105       # a path prefixed by /cygdrive for fixpath to work.
39106       new_path="$CYGWIN_ROOT_PATH$input_path"
39107     fi
39108   fi
39109 
39110   # remove trailing .exe if any
39111   new_path="${new_path/%.exe/}"
39112 
39113     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39114 
39115   # First separate the path from the arguments. This will split at the first
39116   # space.
39117   complete="$GNM"
39118   path="${complete%% *}"
39119   tmp="$complete EOL"
39120   arguments="${tmp#* }"
39121 
39122   # Input might be given as Windows format, start by converting to
39123   # unix format.
39124   new_path="$path"
39125 
39126   windows_path="$new_path"
39127   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39128     unix_path=`$CYGPATH -u "$windows_path"`
39129     new_path="$unix_path"
39130   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39131     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39132     new_path="$unix_path"
39133   fi
39134 
39135 
39136   # Now try to locate executable using which
39137   new_path=`$WHICH "$new_path" 2> /dev/null`
39138 
39139   if test "x$new_path" = x; then
39140     # Oops. Which didn't find the executable.
39141     # The splitting of arguments from the executable at a space might have been incorrect,
39142     # since paths with space are more likely in Windows. Give it another try with the whole
39143     # argument.
39144     path="$complete"
39145     arguments="EOL"
39146     new_path="$path"
39147 
39148   windows_path="$new_path"
39149   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39150     unix_path=`$CYGPATH -u "$windows_path"`
39151     new_path="$unix_path"
39152   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39153     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39154     new_path="$unix_path"
39155   fi
39156 
39157 
39158     new_path=`$WHICH "$new_path" 2> /dev/null`
39159     # bat and cmd files are not always considered executable in MSYS causing which
39160     # to not find them
39161     if test "x$new_path" = x \
39162         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39163         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39164       new_path="$path"
39165 
39166   windows_path="$new_path"
39167   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39168     unix_path=`$CYGPATH -u "$windows_path"`
39169     new_path="$unix_path"
39170   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39171     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39172     new_path="$unix_path"
39173   fi
39174 
39175     fi
39176 
39177     if test "x$new_path" = x; then
39178       # It's still not found. Now this is an unrecoverable error.
39179       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39180 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39181       has_space=`$ECHO "$complete" | $GREP " "`
39182       if test "x$has_space" != x; then
39183         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39184 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39185       fi
39186       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39187     fi
39188   fi
39189 
39190   # Now new_path has a complete unix path to the binary
39191   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39192     # Keep paths in /bin as-is, but remove trailing .exe if any
39193     new_path="${new_path/%.exe/}"
39194     # Do not save /bin paths to all_fixpath_prefixes!
39195   else
39196     # Not in mixed or Windows style, start by that.
39197     new_path=`cmd //c echo $new_path`
39198 
39199   input_path="$new_path"
39200   # Check if we need to convert this using DOS-style short mode. If the path
39201   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39202   # take no chances and rewrite it.
39203   # Note: m4 eats our [], so we need to use [ and ] instead.
39204   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39205   if test "x$has_forbidden_chars" != x; then
39206     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39207     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39208   fi
39209 
39210     # Output is in $new_path
39211 
39212   windows_path="$new_path"
39213   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39214     unix_path=`$CYGPATH -u "$windows_path"`
39215     new_path="$unix_path"
39216   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39217     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39218     new_path="$unix_path"
39219   fi
39220 
39221     # remove trailing .exe if any
39222     new_path="${new_path/%.exe/}"
39223 
39224     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39225     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39226   fi
39227 
39228     else
39229       # We're on a unix platform. Hooray! :)
39230       # First separate the path from the arguments. This will split at the first
39231       # space.
39232       complete="$GNM"
39233       path="${complete%% *}"
39234       tmp="$complete EOL"
39235       arguments="${tmp#* }"
39236 
39237       # Cannot rely on the command "which" here since it doesn't always work.
39238       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39239       if test -z "$is_absolute_path"; then
39240         # Path to executable is not absolute. Find it.
39241         IFS_save="$IFS"
39242         IFS=:
39243         for p in $PATH; do
39244           if test -f "$p/$path" && test -x "$p/$path"; then
39245             new_path="$p/$path"
39246             break
39247           fi
39248         done
39249         IFS="$IFS_save"
39250       else
39251         # This is an absolute path, we can use it without further modifications.
39252         new_path="$path"
39253       fi
39254 
39255       if test "x$new_path" = x; then
39256         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39257 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39258         has_space=`$ECHO "$complete" | $GREP " "`
39259         if test "x$has_space" != x; then
39260           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39261 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39262         fi
39263         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39264       fi
39265     fi
39266 
39267     # Now join together the path and the arguments once again
39268     if test "x$arguments" != xEOL; then
39269       new_complete="$new_path ${arguments% *}"
39270     else
39271       new_complete="$new_path"
39272     fi
39273 
39274     if test "x$complete" != "x$new_complete"; then
39275       GNM="$new_complete"
39276       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
39277 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
39278     fi
39279   fi
39280 
39281   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
39282     # FIXME: we should unify this with the solaris case above.
39283 
39284 
39285   # Publish this variable in the help.
39286 
39287 
39288   if [ -z "${STRIP+x}" ]; then
39289     # The variable is not set by user, try to locate tool using the code snippet
39290     if test -n "$ac_tool_prefix"; then
39291   for ac_prog in strip
39292   do
39293     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39294 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39296 $as_echo_n "checking for $ac_word... " >&6; }
39297 if ${ac_cv_prog_STRIP+:} false; then :
39298   $as_echo_n "(cached) " >&6
39299 else
39300   if test -n "$STRIP"; then
39301   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39302 else
39303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39304 for as_dir in $PATH
39305 do
39306   IFS=$as_save_IFS
39307   test -z "$as_dir" && as_dir=.
39308     for ac_exec_ext in '' $ac_executable_extensions; do
39309   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39310     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39311     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39312     break 2
39313   fi
39314 done
39315   done
39316 IFS=$as_save_IFS
39317 
39318 fi
39319 fi
39320 STRIP=$ac_cv_prog_STRIP
39321 if test -n "$STRIP"; then
39322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39323 $as_echo "$STRIP" >&6; }
39324 else
39325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39326 $as_echo "no" >&6; }
39327 fi
39328 
39329 
39330     test -n "$STRIP" && break
39331   done
39332 fi
39333 if test -z "$STRIP"; then
39334   ac_ct_STRIP=$STRIP
39335   for ac_prog in strip
39336 do
39337   # Extract the first word of "$ac_prog", so it can be a program name with args.
39338 set dummy $ac_prog; ac_word=$2
39339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39340 $as_echo_n "checking for $ac_word... " >&6; }
39341 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39342   $as_echo_n "(cached) " >&6
39343 else
39344   if test -n "$ac_ct_STRIP"; then
39345   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39346 else
39347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39348 for as_dir in $PATH
39349 do
39350   IFS=$as_save_IFS
39351   test -z "$as_dir" && as_dir=.
39352     for ac_exec_ext in '' $ac_executable_extensions; do
39353   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39354     ac_cv_prog_ac_ct_STRIP="$ac_prog"
39355     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39356     break 2
39357   fi
39358 done
39359   done
39360 IFS=$as_save_IFS
39361 
39362 fi
39363 fi
39364 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39365 if test -n "$ac_ct_STRIP"; then
39366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39367 $as_echo "$ac_ct_STRIP" >&6; }
39368 else
39369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39370 $as_echo "no" >&6; }
39371 fi
39372 
39373 
39374   test -n "$ac_ct_STRIP" && break
39375 done
39376 
39377   if test "x$ac_ct_STRIP" = x; then
39378     STRIP=""
39379   else
39380     case $cross_compiling:$ac_tool_warned in
39381 yes:)
39382 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39383 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39384 ac_tool_warned=yes ;;
39385 esac
39386     STRIP=$ac_ct_STRIP
39387   fi
39388 fi
39389 
39390   else
39391     # The variable is set, but is it from the command line or the environment?
39392 
39393     # Try to remove the string !STRIP! from our list.
39394     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39395     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39396       # If it failed, the variable was not from the command line. Ignore it,
39397       # but warn the user (except for BASH, which is always set by the calling BASH).
39398       if test "xSTRIP" != xBASH; then
39399         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39400 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39401       fi
39402       # Try to locate tool using the code snippet
39403       if test -n "$ac_tool_prefix"; then
39404   for ac_prog in strip
39405   do
39406     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39407 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39409 $as_echo_n "checking for $ac_word... " >&6; }
39410 if ${ac_cv_prog_STRIP+:} false; then :
39411   $as_echo_n "(cached) " >&6
39412 else
39413   if test -n "$STRIP"; then
39414   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39415 else
39416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39417 for as_dir in $PATH
39418 do
39419   IFS=$as_save_IFS
39420   test -z "$as_dir" && as_dir=.
39421     for ac_exec_ext in '' $ac_executable_extensions; do
39422   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39423     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39424     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39425     break 2
39426   fi
39427 done
39428   done
39429 IFS=$as_save_IFS
39430 
39431 fi
39432 fi
39433 STRIP=$ac_cv_prog_STRIP
39434 if test -n "$STRIP"; then
39435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39436 $as_echo "$STRIP" >&6; }
39437 else
39438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39439 $as_echo "no" >&6; }
39440 fi
39441 
39442 
39443     test -n "$STRIP" && break
39444   done
39445 fi
39446 if test -z "$STRIP"; then
39447   ac_ct_STRIP=$STRIP
39448   for ac_prog in strip
39449 do
39450   # Extract the first word of "$ac_prog", so it can be a program name with args.
39451 set dummy $ac_prog; ac_word=$2
39452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39453 $as_echo_n "checking for $ac_word... " >&6; }
39454 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39455   $as_echo_n "(cached) " >&6
39456 else
39457   if test -n "$ac_ct_STRIP"; then
39458   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39459 else
39460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39461 for as_dir in $PATH
39462 do
39463   IFS=$as_save_IFS
39464   test -z "$as_dir" && as_dir=.
39465     for ac_exec_ext in '' $ac_executable_extensions; do
39466   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39467     ac_cv_prog_ac_ct_STRIP="$ac_prog"
39468     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39469     break 2
39470   fi
39471 done
39472   done
39473 IFS=$as_save_IFS
39474 
39475 fi
39476 fi
39477 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39478 if test -n "$ac_ct_STRIP"; then
39479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39480 $as_echo "$ac_ct_STRIP" >&6; }
39481 else
39482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39483 $as_echo "no" >&6; }
39484 fi
39485 
39486 
39487   test -n "$ac_ct_STRIP" && break
39488 done
39489 
39490   if test "x$ac_ct_STRIP" = x; then
39491     STRIP=""
39492   else
39493     case $cross_compiling:$ac_tool_warned in
39494 yes:)
39495 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39496 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39497 ac_tool_warned=yes ;;
39498 esac
39499     STRIP=$ac_ct_STRIP
39500   fi
39501 fi
39502 
39503     else
39504       # If it succeeded, then it was overridden by the user. We will use it
39505       # for the tool.
39506 
39507       # First remove it from the list of overridden variables, so we can test
39508       # for unknown variables in the end.
39509       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39510 
39511       # Check if we try to supply an empty value
39512       if test "x$STRIP" = x; then
39513         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39514 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39515         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39516 $as_echo_n "checking for STRIP... " >&6; }
39517         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39518 $as_echo "disabled" >&6; }
39519       else
39520         # Check if the provided tool contains a complete path.
39521         tool_specified="$STRIP"
39522         tool_basename="${tool_specified##*/}"
39523         if test "x$tool_basename" = "x$tool_specified"; then
39524           # A command without a complete path is provided, search $PATH.
39525           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39526 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39527           # Extract the first word of "$tool_basename", so it can be a program name with args.
39528 set dummy $tool_basename; ac_word=$2
39529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39530 $as_echo_n "checking for $ac_word... " >&6; }
39531 if ${ac_cv_path_STRIP+:} false; then :
39532   $as_echo_n "(cached) " >&6
39533 else
39534   case $STRIP in
39535   [\\/]* | ?:[\\/]*)
39536   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39537   ;;
39538   *)
39539   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39540 for as_dir in $PATH
39541 do
39542   IFS=$as_save_IFS
39543   test -z "$as_dir" && as_dir=.
39544     for ac_exec_ext in '' $ac_executable_extensions; do
39545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39546     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39548     break 2
39549   fi
39550 done
39551   done
39552 IFS=$as_save_IFS
39553 
39554   ;;
39555 esac
39556 fi
39557 STRIP=$ac_cv_path_STRIP
39558 if test -n "$STRIP"; then
39559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39560 $as_echo "$STRIP" >&6; }
39561 else
39562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39563 $as_echo "no" >&6; }
39564 fi
39565 
39566 
39567           if test "x$STRIP" = x; then
39568             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39569           fi
39570         else
39571           # Otherwise we believe it is a complete path. Use it as it is.
39572           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39573 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39574           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39575 $as_echo_n "checking for STRIP... " >&6; }
39576           if test ! -x "$tool_specified"; then
39577             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39578 $as_echo "not found" >&6; }
39579             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39580           fi
39581           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39582 $as_echo "$tool_specified" >&6; }
39583         fi
39584       fi
39585     fi
39586 
39587   fi
39588 
39589 
39590 
39591   # Only process if variable expands to non-empty
39592 
39593   if test "x$STRIP" != x; then
39594     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39595 
39596   # First separate the path from the arguments. This will split at the first
39597   # space.
39598   complete="$STRIP"
39599   path="${complete%% *}"
39600   tmp="$complete EOL"
39601   arguments="${tmp#* }"
39602 
39603   # Input might be given as Windows format, start by converting to
39604   # unix format.
39605   new_path=`$CYGPATH -u "$path"`
39606 
39607   # Now try to locate executable using which
39608   new_path=`$WHICH "$new_path" 2> /dev/null`
39609   # bat and cmd files are not always considered executable in cygwin causing which
39610   # to not find them
39611   if test "x$new_path" = x \
39612       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39613       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39614     new_path=`$CYGPATH -u "$path"`
39615   fi
39616   if test "x$new_path" = x; then
39617     # Oops. Which didn't find the executable.
39618     # The splitting of arguments from the executable at a space might have been incorrect,
39619     # since paths with space are more likely in Windows. Give it another try with the whole
39620     # argument.
39621     path="$complete"
39622     arguments="EOL"
39623     new_path=`$CYGPATH -u "$path"`
39624     new_path=`$WHICH "$new_path" 2> /dev/null`
39625     # bat and cmd files are not always considered executable in cygwin causing which
39626     # to not find them
39627     if test "x$new_path" = x \
39628         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39629         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39630       new_path=`$CYGPATH -u "$path"`
39631     fi
39632     if test "x$new_path" = x; then
39633       # It's still not found. Now this is an unrecoverable error.
39634       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39635 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39636       has_space=`$ECHO "$complete" | $GREP " "`
39637       if test "x$has_space" != x; then
39638         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39639 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39640       fi
39641       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39642     fi
39643   fi
39644 
39645   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39646   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39647   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39648   # "foo.exe" is OK but "foo" is an error.
39649   #
39650   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39651   # It is also a way to make sure we got the proper file name for the real test later on.
39652   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39653   if test "x$test_shortpath" = x; then
39654     # Short path failed, file does not exist as specified.
39655     # Try adding .exe or .cmd
39656     if test -f "${new_path}.exe"; then
39657       input_to_shortpath="${new_path}.exe"
39658     elif test -f "${new_path}.cmd"; then
39659       input_to_shortpath="${new_path}.cmd"
39660     else
39661       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39662 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39663       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39664 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39665       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39666     fi
39667   else
39668     input_to_shortpath="$new_path"
39669   fi
39670 
39671   # Call helper function which possibly converts this using DOS-style short mode.
39672   # If so, the updated path is stored in $new_path.
39673   new_path="$input_to_shortpath"
39674 
39675   input_path="$input_to_shortpath"
39676   # Check if we need to convert this using DOS-style short mode. If the path
39677   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39678   # take no chances and rewrite it.
39679   # Note: m4 eats our [], so we need to use [ and ] instead.
39680   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39681   if test "x$has_forbidden_chars" != x; then
39682     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39683     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39684     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39685     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39686       # Going to short mode and back again did indeed matter. Since short mode is
39687       # case insensitive, let's make it lowercase to improve readability.
39688       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39689       # Now convert it back to Unix-style (cygpath)
39690       input_path=`$CYGPATH -u "$shortmode_path"`
39691       new_path="$input_path"
39692     fi
39693   fi
39694 
39695   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39696   if test "x$test_cygdrive_prefix" = x; then
39697     # As a simple fix, exclude /usr/bin since it's not a real path.
39698     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39699       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39700       # a path prefixed by /cygdrive for fixpath to work.
39701       new_path="$CYGWIN_ROOT_PATH$input_path"
39702     fi
39703   fi
39704 
39705   # remove trailing .exe if any
39706   new_path="${new_path/%.exe/}"
39707 
39708     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39709 
39710   # First separate the path from the arguments. This will split at the first
39711   # space.
39712   complete="$STRIP"
39713   path="${complete%% *}"
39714   tmp="$complete EOL"
39715   arguments="${tmp#* }"
39716 
39717   # Input might be given as Windows format, start by converting to
39718   # unix format.
39719   new_path="$path"
39720 
39721   windows_path="$new_path"
39722   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39723     unix_path=`$CYGPATH -u "$windows_path"`
39724     new_path="$unix_path"
39725   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39726     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39727     new_path="$unix_path"
39728   fi
39729 
39730 
39731   # Now try to locate executable using which
39732   new_path=`$WHICH "$new_path" 2> /dev/null`
39733 
39734   if test "x$new_path" = x; then
39735     # Oops. Which didn't find the executable.
39736     # The splitting of arguments from the executable at a space might have been incorrect,
39737     # since paths with space are more likely in Windows. Give it another try with the whole
39738     # argument.
39739     path="$complete"
39740     arguments="EOL"
39741     new_path="$path"
39742 
39743   windows_path="$new_path"
39744   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39745     unix_path=`$CYGPATH -u "$windows_path"`
39746     new_path="$unix_path"
39747   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39748     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39749     new_path="$unix_path"
39750   fi
39751 
39752 
39753     new_path=`$WHICH "$new_path" 2> /dev/null`
39754     # bat and cmd files are not always considered executable in MSYS causing which
39755     # to not find them
39756     if test "x$new_path" = x \
39757         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39758         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39759       new_path="$path"
39760 
39761   windows_path="$new_path"
39762   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39763     unix_path=`$CYGPATH -u "$windows_path"`
39764     new_path="$unix_path"
39765   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39766     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39767     new_path="$unix_path"
39768   fi
39769 
39770     fi
39771 
39772     if test "x$new_path" = x; then
39773       # It's still not found. Now this is an unrecoverable error.
39774       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39775 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39776       has_space=`$ECHO "$complete" | $GREP " "`
39777       if test "x$has_space" != x; then
39778         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39779 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39780       fi
39781       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39782     fi
39783   fi
39784 
39785   # Now new_path has a complete unix path to the binary
39786   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39787     # Keep paths in /bin as-is, but remove trailing .exe if any
39788     new_path="${new_path/%.exe/}"
39789     # Do not save /bin paths to all_fixpath_prefixes!
39790   else
39791     # Not in mixed or Windows style, start by that.
39792     new_path=`cmd //c echo $new_path`
39793 
39794   input_path="$new_path"
39795   # Check if we need to convert this using DOS-style short mode. If the path
39796   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39797   # take no chances and rewrite it.
39798   # Note: m4 eats our [], so we need to use [ and ] instead.
39799   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39800   if test "x$has_forbidden_chars" != x; then
39801     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39802     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39803   fi
39804 
39805     # Output is in $new_path
39806 
39807   windows_path="$new_path"
39808   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39809     unix_path=`$CYGPATH -u "$windows_path"`
39810     new_path="$unix_path"
39811   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39812     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39813     new_path="$unix_path"
39814   fi
39815 
39816     # remove trailing .exe if any
39817     new_path="${new_path/%.exe/}"
39818 
39819     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39820     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39821   fi
39822 
39823     else
39824       # We're on a unix platform. Hooray! :)
39825       # First separate the path from the arguments. This will split at the first
39826       # space.
39827       complete="$STRIP"
39828       path="${complete%% *}"
39829       tmp="$complete EOL"
39830       arguments="${tmp#* }"
39831 
39832       # Cannot rely on the command "which" here since it doesn't always work.
39833       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39834       if test -z "$is_absolute_path"; then
39835         # Path to executable is not absolute. Find it.
39836         IFS_save="$IFS"
39837         IFS=:
39838         for p in $PATH; do
39839           if test -f "$p/$path" && test -x "$p/$path"; then
39840             new_path="$p/$path"
39841             break
39842           fi
39843         done
39844         IFS="$IFS_save"
39845       else
39846         # This is an absolute path, we can use it without further modifications.
39847         new_path="$path"
39848       fi
39849 
39850       if test "x$new_path" = x; then
39851         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39852 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39853         has_space=`$ECHO "$complete" | $GREP " "`
39854         if test "x$has_space" != x; then
39855           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39856 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39857         fi
39858         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39859       fi
39860     fi
39861 
39862     # Now join together the path and the arguments once again
39863     if test "x$arguments" != xEOL; then
39864       new_complete="$new_path ${arguments% *}"
39865     else
39866       new_complete="$new_path"
39867     fi
39868 
39869     if test "x$complete" != "x$new_complete"; then
39870       STRIP="$new_complete"
39871       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39872 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39873     fi
39874   fi
39875 
39876 
39877 
39878   # Publish this variable in the help.
39879 
39880 
39881   if [ -z "${NM+x}" ]; then
39882     # The variable is not set by user, try to locate tool using the code snippet
39883     if test -n "$ac_tool_prefix"; then
39884   for ac_prog in nm
39885   do
39886     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39887 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39889 $as_echo_n "checking for $ac_word... " >&6; }
39890 if ${ac_cv_prog_NM+:} false; then :
39891   $as_echo_n "(cached) " >&6
39892 else
39893   if test -n "$NM"; then
39894   ac_cv_prog_NM="$NM" # Let the user override the test.
39895 else
39896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39897 for as_dir in $PATH
39898 do
39899   IFS=$as_save_IFS
39900   test -z "$as_dir" && as_dir=.
39901     for ac_exec_ext in '' $ac_executable_extensions; do
39902   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39903     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
39904     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39905     break 2
39906   fi
39907 done
39908   done
39909 IFS=$as_save_IFS
39910 
39911 fi
39912 fi
39913 NM=$ac_cv_prog_NM
39914 if test -n "$NM"; then
39915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39916 $as_echo "$NM" >&6; }
39917 else
39918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39919 $as_echo "no" >&6; }
39920 fi
39921 
39922 
39923     test -n "$NM" && break
39924   done
39925 fi
39926 if test -z "$NM"; then
39927   ac_ct_NM=$NM
39928   for ac_prog in nm
39929 do
39930   # Extract the first word of "$ac_prog", so it can be a program name with args.
39931 set dummy $ac_prog; ac_word=$2
39932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39933 $as_echo_n "checking for $ac_word... " >&6; }
39934 if ${ac_cv_prog_ac_ct_NM+:} false; then :
39935   $as_echo_n "(cached) " >&6
39936 else
39937   if test -n "$ac_ct_NM"; then
39938   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
39939 else
39940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39941 for as_dir in $PATH
39942 do
39943   IFS=$as_save_IFS
39944   test -z "$as_dir" && as_dir=.
39945     for ac_exec_ext in '' $ac_executable_extensions; do
39946   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39947     ac_cv_prog_ac_ct_NM="$ac_prog"
39948     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39949     break 2
39950   fi
39951 done
39952   done
39953 IFS=$as_save_IFS
39954 
39955 fi
39956 fi
39957 ac_ct_NM=$ac_cv_prog_ac_ct_NM
39958 if test -n "$ac_ct_NM"; then
39959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
39960 $as_echo "$ac_ct_NM" >&6; }
39961 else
39962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39963 $as_echo "no" >&6; }
39964 fi
39965 
39966 
39967   test -n "$ac_ct_NM" && break
39968 done
39969 
39970   if test "x$ac_ct_NM" = x; then
39971     NM=""
39972   else
39973     case $cross_compiling:$ac_tool_warned in
39974 yes:)
39975 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39976 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39977 ac_tool_warned=yes ;;
39978 esac
39979     NM=$ac_ct_NM
39980   fi
39981 fi
39982 
39983   else
39984     # The variable is set, but is it from the command line or the environment?
39985 
39986     # Try to remove the string !NM! from our list.
39987     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39988     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39989       # If it failed, the variable was not from the command line. Ignore it,
39990       # but warn the user (except for BASH, which is always set by the calling BASH).
39991       if test "xNM" != xBASH; then
39992         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39993 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39994       fi
39995       # Try to locate tool using the code snippet
39996       if test -n "$ac_tool_prefix"; then
39997   for ac_prog in nm
39998   do
39999     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40000 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40002 $as_echo_n "checking for $ac_word... " >&6; }
40003 if ${ac_cv_prog_NM+:} false; then :
40004   $as_echo_n "(cached) " >&6
40005 else
40006   if test -n "$NM"; then
40007   ac_cv_prog_NM="$NM" # Let the user override the test.
40008 else
40009 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40010 for as_dir in $PATH
40011 do
40012   IFS=$as_save_IFS
40013   test -z "$as_dir" && as_dir=.
40014     for ac_exec_ext in '' $ac_executable_extensions; do
40015   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40016     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40017     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40018     break 2
40019   fi
40020 done
40021   done
40022 IFS=$as_save_IFS
40023 
40024 fi
40025 fi
40026 NM=$ac_cv_prog_NM
40027 if test -n "$NM"; then
40028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40029 $as_echo "$NM" >&6; }
40030 else
40031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40032 $as_echo "no" >&6; }
40033 fi
40034 
40035 
40036     test -n "$NM" && break
40037   done
40038 fi
40039 if test -z "$NM"; then
40040   ac_ct_NM=$NM
40041   for ac_prog in nm
40042 do
40043   # Extract the first word of "$ac_prog", so it can be a program name with args.
40044 set dummy $ac_prog; ac_word=$2
40045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40046 $as_echo_n "checking for $ac_word... " >&6; }
40047 if ${ac_cv_prog_ac_ct_NM+:} false; then :
40048   $as_echo_n "(cached) " >&6
40049 else
40050   if test -n "$ac_ct_NM"; then
40051   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40052 else
40053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40054 for as_dir in $PATH
40055 do
40056   IFS=$as_save_IFS
40057   test -z "$as_dir" && as_dir=.
40058     for ac_exec_ext in '' $ac_executable_extensions; do
40059   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40060     ac_cv_prog_ac_ct_NM="$ac_prog"
40061     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40062     break 2
40063   fi
40064 done
40065   done
40066 IFS=$as_save_IFS
40067 
40068 fi
40069 fi
40070 ac_ct_NM=$ac_cv_prog_ac_ct_NM
40071 if test -n "$ac_ct_NM"; then
40072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40073 $as_echo "$ac_ct_NM" >&6; }
40074 else
40075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40076 $as_echo "no" >&6; }
40077 fi
40078 
40079 
40080   test -n "$ac_ct_NM" && break
40081 done
40082 
40083   if test "x$ac_ct_NM" = x; then
40084     NM=""
40085   else
40086     case $cross_compiling:$ac_tool_warned in
40087 yes:)
40088 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40089 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40090 ac_tool_warned=yes ;;
40091 esac
40092     NM=$ac_ct_NM
40093   fi
40094 fi
40095 
40096     else
40097       # If it succeeded, then it was overridden by the user. We will use it
40098       # for the tool.
40099 
40100       # First remove it from the list of overridden variables, so we can test
40101       # for unknown variables in the end.
40102       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40103 
40104       # Check if we try to supply an empty value
40105       if test "x$NM" = x; then
40106         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40107 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40108         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40109 $as_echo_n "checking for NM... " >&6; }
40110         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40111 $as_echo "disabled" >&6; }
40112       else
40113         # Check if the provided tool contains a complete path.
40114         tool_specified="$NM"
40115         tool_basename="${tool_specified##*/}"
40116         if test "x$tool_basename" = "x$tool_specified"; then
40117           # A command without a complete path is provided, search $PATH.
40118           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40119 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40120           # Extract the first word of "$tool_basename", so it can be a program name with args.
40121 set dummy $tool_basename; ac_word=$2
40122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40123 $as_echo_n "checking for $ac_word... " >&6; }
40124 if ${ac_cv_path_NM+:} false; then :
40125   $as_echo_n "(cached) " >&6
40126 else
40127   case $NM in
40128   [\\/]* | ?:[\\/]*)
40129   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40130   ;;
40131   *)
40132   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40133 for as_dir in $PATH
40134 do
40135   IFS=$as_save_IFS
40136   test -z "$as_dir" && as_dir=.
40137     for ac_exec_ext in '' $ac_executable_extensions; do
40138   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40139     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40140     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40141     break 2
40142   fi
40143 done
40144   done
40145 IFS=$as_save_IFS
40146 
40147   ;;
40148 esac
40149 fi
40150 NM=$ac_cv_path_NM
40151 if test -n "$NM"; then
40152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40153 $as_echo "$NM" >&6; }
40154 else
40155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40156 $as_echo "no" >&6; }
40157 fi
40158 
40159 
40160           if test "x$NM" = x; then
40161             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40162           fi
40163         else
40164           # Otherwise we believe it is a complete path. Use it as it is.
40165           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40166 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40167           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40168 $as_echo_n "checking for NM... " >&6; }
40169           if test ! -x "$tool_specified"; then
40170             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40171 $as_echo "not found" >&6; }
40172             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40173           fi
40174           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40175 $as_echo "$tool_specified" >&6; }
40176         fi
40177       fi
40178     fi
40179 
40180   fi
40181 
40182 
40183 
40184   # Only process if variable expands to non-empty
40185 
40186   if test "x$NM" != x; then
40187     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40188 
40189   # First separate the path from the arguments. This will split at the first
40190   # space.
40191   complete="$NM"
40192   path="${complete%% *}"
40193   tmp="$complete EOL"
40194   arguments="${tmp#* }"
40195 
40196   # Input might be given as Windows format, start by converting to
40197   # unix format.
40198   new_path=`$CYGPATH -u "$path"`
40199 
40200   # Now try to locate executable using which
40201   new_path=`$WHICH "$new_path" 2> /dev/null`
40202   # bat and cmd files are not always considered executable in cygwin causing which
40203   # to not find them
40204   if test "x$new_path" = x \
40205       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40206       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40207     new_path=`$CYGPATH -u "$path"`
40208   fi
40209   if test "x$new_path" = x; then
40210     # Oops. Which didn't find the executable.
40211     # The splitting of arguments from the executable at a space might have been incorrect,
40212     # since paths with space are more likely in Windows. Give it another try with the whole
40213     # argument.
40214     path="$complete"
40215     arguments="EOL"
40216     new_path=`$CYGPATH -u "$path"`
40217     new_path=`$WHICH "$new_path" 2> /dev/null`
40218     # bat and cmd files are not always considered executable in cygwin causing which
40219     # to not find them
40220     if test "x$new_path" = x \
40221         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40222         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40223       new_path=`$CYGPATH -u "$path"`
40224     fi
40225     if test "x$new_path" = x; then
40226       # It's still not found. Now this is an unrecoverable error.
40227       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40228 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40229       has_space=`$ECHO "$complete" | $GREP " "`
40230       if test "x$has_space" != x; then
40231         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40232 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40233       fi
40234       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40235     fi
40236   fi
40237 
40238   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40239   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40240   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40241   # "foo.exe" is OK but "foo" is an error.
40242   #
40243   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40244   # It is also a way to make sure we got the proper file name for the real test later on.
40245   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40246   if test "x$test_shortpath" = x; then
40247     # Short path failed, file does not exist as specified.
40248     # Try adding .exe or .cmd
40249     if test -f "${new_path}.exe"; then
40250       input_to_shortpath="${new_path}.exe"
40251     elif test -f "${new_path}.cmd"; then
40252       input_to_shortpath="${new_path}.cmd"
40253     else
40254       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40255 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40256       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40257 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40258       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40259     fi
40260   else
40261     input_to_shortpath="$new_path"
40262   fi
40263 
40264   # Call helper function which possibly converts this using DOS-style short mode.
40265   # If so, the updated path is stored in $new_path.
40266   new_path="$input_to_shortpath"
40267 
40268   input_path="$input_to_shortpath"
40269   # Check if we need to convert this using DOS-style short mode. If the path
40270   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40271   # take no chances and rewrite it.
40272   # Note: m4 eats our [], so we need to use [ and ] instead.
40273   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40274   if test "x$has_forbidden_chars" != x; then
40275     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40276     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40277     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40278     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40279       # Going to short mode and back again did indeed matter. Since short mode is
40280       # case insensitive, let's make it lowercase to improve readability.
40281       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40282       # Now convert it back to Unix-style (cygpath)
40283       input_path=`$CYGPATH -u "$shortmode_path"`
40284       new_path="$input_path"
40285     fi
40286   fi
40287 
40288   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40289   if test "x$test_cygdrive_prefix" = x; then
40290     # As a simple fix, exclude /usr/bin since it's not a real path.
40291     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40292       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40293       # a path prefixed by /cygdrive for fixpath to work.
40294       new_path="$CYGWIN_ROOT_PATH$input_path"
40295     fi
40296   fi
40297 
40298   # remove trailing .exe if any
40299   new_path="${new_path/%.exe/}"
40300 
40301     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40302 
40303   # First separate the path from the arguments. This will split at the first
40304   # space.
40305   complete="$NM"
40306   path="${complete%% *}"
40307   tmp="$complete EOL"
40308   arguments="${tmp#* }"
40309 
40310   # Input might be given as Windows format, start by converting to
40311   # unix format.
40312   new_path="$path"
40313 
40314   windows_path="$new_path"
40315   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40316     unix_path=`$CYGPATH -u "$windows_path"`
40317     new_path="$unix_path"
40318   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40319     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40320     new_path="$unix_path"
40321   fi
40322 
40323 
40324   # Now try to locate executable using which
40325   new_path=`$WHICH "$new_path" 2> /dev/null`
40326 
40327   if test "x$new_path" = x; then
40328     # Oops. Which didn't find the executable.
40329     # The splitting of arguments from the executable at a space might have been incorrect,
40330     # since paths with space are more likely in Windows. Give it another try with the whole
40331     # argument.
40332     path="$complete"
40333     arguments="EOL"
40334     new_path="$path"
40335 
40336   windows_path="$new_path"
40337   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40338     unix_path=`$CYGPATH -u "$windows_path"`
40339     new_path="$unix_path"
40340   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40341     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40342     new_path="$unix_path"
40343   fi
40344 
40345 
40346     new_path=`$WHICH "$new_path" 2> /dev/null`
40347     # bat and cmd files are not always considered executable in MSYS causing which
40348     # to not find them
40349     if test "x$new_path" = x \
40350         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40351         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40352       new_path="$path"
40353 
40354   windows_path="$new_path"
40355   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40356     unix_path=`$CYGPATH -u "$windows_path"`
40357     new_path="$unix_path"
40358   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40359     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40360     new_path="$unix_path"
40361   fi
40362 
40363     fi
40364 
40365     if test "x$new_path" = x; then
40366       # It's still not found. Now this is an unrecoverable error.
40367       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40368 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40369       has_space=`$ECHO "$complete" | $GREP " "`
40370       if test "x$has_space" != x; then
40371         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40372 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40373       fi
40374       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40375     fi
40376   fi
40377 
40378   # Now new_path has a complete unix path to the binary
40379   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40380     # Keep paths in /bin as-is, but remove trailing .exe if any
40381     new_path="${new_path/%.exe/}"
40382     # Do not save /bin paths to all_fixpath_prefixes!
40383   else
40384     # Not in mixed or Windows style, start by that.
40385     new_path=`cmd //c echo $new_path`
40386 
40387   input_path="$new_path"
40388   # Check if we need to convert this using DOS-style short mode. If the path
40389   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40390   # take no chances and rewrite it.
40391   # Note: m4 eats our [], so we need to use [ and ] instead.
40392   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40393   if test "x$has_forbidden_chars" != x; then
40394     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40395     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40396   fi
40397 
40398     # Output is in $new_path
40399 
40400   windows_path="$new_path"
40401   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40402     unix_path=`$CYGPATH -u "$windows_path"`
40403     new_path="$unix_path"
40404   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40405     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40406     new_path="$unix_path"
40407   fi
40408 
40409     # remove trailing .exe if any
40410     new_path="${new_path/%.exe/}"
40411 
40412     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40413     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40414   fi
40415 
40416     else
40417       # We're on a unix platform. Hooray! :)
40418       # First separate the path from the arguments. This will split at the first
40419       # space.
40420       complete="$NM"
40421       path="${complete%% *}"
40422       tmp="$complete EOL"
40423       arguments="${tmp#* }"
40424 
40425       # Cannot rely on the command "which" here since it doesn't always work.
40426       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40427       if test -z "$is_absolute_path"; then
40428         # Path to executable is not absolute. Find it.
40429         IFS_save="$IFS"
40430         IFS=:
40431         for p in $PATH; do
40432           if test -f "$p/$path" && test -x "$p/$path"; then
40433             new_path="$p/$path"
40434             break
40435           fi
40436         done
40437         IFS="$IFS_save"
40438       else
40439         # This is an absolute path, we can use it without further modifications.
40440         new_path="$path"
40441       fi
40442 
40443       if test "x$new_path" = x; then
40444         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40445 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40446         has_space=`$ECHO "$complete" | $GREP " "`
40447         if test "x$has_space" != x; then
40448           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40449 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40450         fi
40451         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40452       fi
40453     fi
40454 
40455     # Now join together the path and the arguments once again
40456     if test "x$arguments" != xEOL; then
40457       new_complete="$new_path ${arguments% *}"
40458     else
40459       new_complete="$new_path"
40460     fi
40461 
40462     if test "x$complete" != "x$new_complete"; then
40463       NM="$new_complete"
40464       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40465 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40466     fi
40467   fi
40468 
40469     GNM="$NM"
40470 
40471   fi
40472 
40473   # objcopy is used for moving debug symbols to separate files when
40474   # full debug symbols are enabled.
40475   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
40476 
40477 
40478   # Publish this variable in the help.
40479 
40480 
40481   if [ -z "${OBJCOPY+x}" ]; then
40482     # The variable is not set by user, try to locate tool using the code snippet
40483     if test -n "$ac_tool_prefix"; then
40484   for ac_prog in gobjcopy objcopy
40485   do
40486     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40487 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40489 $as_echo_n "checking for $ac_word... " >&6; }
40490 if ${ac_cv_prog_OBJCOPY+:} false; then :
40491   $as_echo_n "(cached) " >&6
40492 else
40493   if test -n "$OBJCOPY"; then
40494   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
40495 else
40496 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40497 for as_dir in $PATH
40498 do
40499   IFS=$as_save_IFS
40500   test -z "$as_dir" && as_dir=.
40501     for ac_exec_ext in '' $ac_executable_extensions; do
40502   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40503     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
40504     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40505     break 2
40506   fi
40507 done
40508   done
40509 IFS=$as_save_IFS
40510 
40511 fi
40512 fi
40513 OBJCOPY=$ac_cv_prog_OBJCOPY
40514 if test -n "$OBJCOPY"; then
40515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40516 $as_echo "$OBJCOPY" >&6; }
40517 else
40518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40519 $as_echo "no" >&6; }
40520 fi
40521 
40522 
40523     test -n "$OBJCOPY" && break
40524   done
40525 fi
40526 if test -z "$OBJCOPY"; then
40527   ac_ct_OBJCOPY=$OBJCOPY
40528   for ac_prog in gobjcopy objcopy
40529 do
40530   # Extract the first word of "$ac_prog", so it can be a program name with args.
40531 set dummy $ac_prog; ac_word=$2
40532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40533 $as_echo_n "checking for $ac_word... " >&6; }
40534 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
40535   $as_echo_n "(cached) " >&6
40536 else
40537   if test -n "$ac_ct_OBJCOPY"; then
40538   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
40539 else
40540 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40541 for as_dir in $PATH
40542 do
40543   IFS=$as_save_IFS
40544   test -z "$as_dir" && as_dir=.
40545     for ac_exec_ext in '' $ac_executable_extensions; do
40546   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40547     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
40548     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40549     break 2
40550   fi
40551 done
40552   done
40553 IFS=$as_save_IFS
40554 
40555 fi
40556 fi
40557 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
40558 if test -n "$ac_ct_OBJCOPY"; then
40559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
40560 $as_echo "$ac_ct_OBJCOPY" >&6; }
40561 else
40562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40563 $as_echo "no" >&6; }
40564 fi
40565 
40566 
40567   test -n "$ac_ct_OBJCOPY" && break
40568 done
40569 
40570   if test "x$ac_ct_OBJCOPY" = x; then
40571     OBJCOPY=""
40572   else
40573     case $cross_compiling:$ac_tool_warned in
40574 yes:)
40575 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40576 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40577 ac_tool_warned=yes ;;
40578 esac
40579     OBJCOPY=$ac_ct_OBJCOPY
40580   fi
40581 fi
40582 
40583   else
40584     # The variable is set, but is it from the command line or the environment?
40585 
40586     # Try to remove the string !OBJCOPY! from our list.
40587     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
40588     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40589       # If it failed, the variable was not from the command line. Ignore it,
40590       # but warn the user (except for BASH, which is always set by the calling BASH).
40591       if test "xOBJCOPY" != xBASH; then
40592         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
40593 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
40594       fi
40595       # Try to locate tool using the code snippet
40596       if test -n "$ac_tool_prefix"; then
40597   for ac_prog in gobjcopy objcopy
40598   do
40599     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40600 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40602 $as_echo_n "checking for $ac_word... " >&6; }
40603 if ${ac_cv_prog_OBJCOPY+:} false; then :
40604   $as_echo_n "(cached) " >&6
40605 else
40606   if test -n "$OBJCOPY"; then
40607   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
40608 else
40609 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40610 for as_dir in $PATH
40611 do
40612   IFS=$as_save_IFS
40613   test -z "$as_dir" && as_dir=.
40614     for ac_exec_ext in '' $ac_executable_extensions; do
40615   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40616     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
40617     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40618     break 2
40619   fi
40620 done
40621   done
40622 IFS=$as_save_IFS
40623 
40624 fi
40625 fi
40626 OBJCOPY=$ac_cv_prog_OBJCOPY
40627 if test -n "$OBJCOPY"; then
40628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40629 $as_echo "$OBJCOPY" >&6; }
40630 else
40631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40632 $as_echo "no" >&6; }
40633 fi
40634 
40635 
40636     test -n "$OBJCOPY" && break
40637   done
40638 fi
40639 if test -z "$OBJCOPY"; then
40640   ac_ct_OBJCOPY=$OBJCOPY
40641   for ac_prog in gobjcopy objcopy
40642 do
40643   # Extract the first word of "$ac_prog", so it can be a program name with args.
40644 set dummy $ac_prog; ac_word=$2
40645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40646 $as_echo_n "checking for $ac_word... " >&6; }
40647 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
40648   $as_echo_n "(cached) " >&6
40649 else
40650   if test -n "$ac_ct_OBJCOPY"; then
40651   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
40652 else
40653 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40654 for as_dir in $PATH
40655 do
40656   IFS=$as_save_IFS
40657   test -z "$as_dir" && as_dir=.
40658     for ac_exec_ext in '' $ac_executable_extensions; do
40659   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40660     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
40661     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40662     break 2
40663   fi
40664 done
40665   done
40666 IFS=$as_save_IFS
40667 
40668 fi
40669 fi
40670 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
40671 if test -n "$ac_ct_OBJCOPY"; then
40672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
40673 $as_echo "$ac_ct_OBJCOPY" >&6; }
40674 else
40675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40676 $as_echo "no" >&6; }
40677 fi
40678 
40679 
40680   test -n "$ac_ct_OBJCOPY" && break
40681 done
40682 
40683   if test "x$ac_ct_OBJCOPY" = x; then
40684     OBJCOPY=""
40685   else
40686     case $cross_compiling:$ac_tool_warned in
40687 yes:)
40688 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40689 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40690 ac_tool_warned=yes ;;
40691 esac
40692     OBJCOPY=$ac_ct_OBJCOPY
40693   fi
40694 fi
40695 
40696     else
40697       # If it succeeded, then it was overridden by the user. We will use it
40698       # for the tool.
40699 
40700       # First remove it from the list of overridden variables, so we can test
40701       # for unknown variables in the end.
40702       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40703 
40704       # Check if we try to supply an empty value
40705       if test "x$OBJCOPY" = x; then
40706         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
40707 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
40708         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
40709 $as_echo_n "checking for OBJCOPY... " >&6; }
40710         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40711 $as_echo "disabled" >&6; }
40712       else
40713         # Check if the provided tool contains a complete path.
40714         tool_specified="$OBJCOPY"
40715         tool_basename="${tool_specified##*/}"
40716         if test "x$tool_basename" = "x$tool_specified"; then
40717           # A command without a complete path is provided, search $PATH.
40718           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
40719 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
40720           # Extract the first word of "$tool_basename", so it can be a program name with args.
40721 set dummy $tool_basename; ac_word=$2
40722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40723 $as_echo_n "checking for $ac_word... " >&6; }
40724 if ${ac_cv_path_OBJCOPY+:} false; then :
40725   $as_echo_n "(cached) " >&6
40726 else
40727   case $OBJCOPY in
40728   [\\/]* | ?:[\\/]*)
40729   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
40730   ;;
40731   *)
40732   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40733 for as_dir in $PATH
40734 do
40735   IFS=$as_save_IFS
40736   test -z "$as_dir" && as_dir=.
40737     for ac_exec_ext in '' $ac_executable_extensions; do
40738   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40739     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
40740     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40741     break 2
40742   fi
40743 done
40744   done
40745 IFS=$as_save_IFS
40746 
40747   ;;
40748 esac
40749 fi
40750 OBJCOPY=$ac_cv_path_OBJCOPY
40751 if test -n "$OBJCOPY"; then
40752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40753 $as_echo "$OBJCOPY" >&6; }
40754 else
40755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40756 $as_echo "no" >&6; }
40757 fi
40758 
40759 
40760           if test "x$OBJCOPY" = x; then
40761             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40762           fi
40763         else
40764           # Otherwise we believe it is a complete path. Use it as it is.
40765           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
40766 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
40767           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
40768 $as_echo_n "checking for OBJCOPY... " >&6; }
40769           if test ! -x "$tool_specified"; then
40770             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40771 $as_echo "not found" >&6; }
40772             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
40773           fi
40774           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40775 $as_echo "$tool_specified" >&6; }
40776         fi
40777       fi
40778     fi
40779 
40780   fi
40781 
40782 
40783     # Only call fixup if objcopy was found.
40784     if test -n "$OBJCOPY"; then
40785 
40786   # Only process if variable expands to non-empty
40787 
40788   if test "x$OBJCOPY" != x; then
40789     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40790 
40791   # First separate the path from the arguments. This will split at the first
40792   # space.
40793   complete="$OBJCOPY"
40794   path="${complete%% *}"
40795   tmp="$complete EOL"
40796   arguments="${tmp#* }"
40797 
40798   # Input might be given as Windows format, start by converting to
40799   # unix format.
40800   new_path=`$CYGPATH -u "$path"`
40801 
40802   # Now try to locate executable using which
40803   new_path=`$WHICH "$new_path" 2> /dev/null`
40804   # bat and cmd files are not always considered executable in cygwin causing which
40805   # to not find them
40806   if test "x$new_path" = x \
40807       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40808       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40809     new_path=`$CYGPATH -u "$path"`
40810   fi
40811   if test "x$new_path" = x; then
40812     # Oops. Which didn't find the executable.
40813     # The splitting of arguments from the executable at a space might have been incorrect,
40814     # since paths with space are more likely in Windows. Give it another try with the whole
40815     # argument.
40816     path="$complete"
40817     arguments="EOL"
40818     new_path=`$CYGPATH -u "$path"`
40819     new_path=`$WHICH "$new_path" 2> /dev/null`
40820     # bat and cmd files are not always considered executable in cygwin causing which
40821     # to not find them
40822     if test "x$new_path" = x \
40823         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40824         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40825       new_path=`$CYGPATH -u "$path"`
40826     fi
40827     if test "x$new_path" = x; then
40828       # It's still not found. Now this is an unrecoverable error.
40829       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
40830 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
40831       has_space=`$ECHO "$complete" | $GREP " "`
40832       if test "x$has_space" != x; then
40833         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40834 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40835       fi
40836       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
40837     fi
40838   fi
40839 
40840   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40841   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40842   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40843   # "foo.exe" is OK but "foo" is an error.
40844   #
40845   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40846   # It is also a way to make sure we got the proper file name for the real test later on.
40847   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40848   if test "x$test_shortpath" = x; then
40849     # Short path failed, file does not exist as specified.
40850     # Try adding .exe or .cmd
40851     if test -f "${new_path}.exe"; then
40852       input_to_shortpath="${new_path}.exe"
40853     elif test -f "${new_path}.cmd"; then
40854       input_to_shortpath="${new_path}.cmd"
40855     else
40856       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
40857 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
40858       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40859 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40860       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
40861     fi
40862   else
40863     input_to_shortpath="$new_path"
40864   fi
40865 
40866   # Call helper function which possibly converts this using DOS-style short mode.
40867   # If so, the updated path is stored in $new_path.
40868   new_path="$input_to_shortpath"
40869 
40870   input_path="$input_to_shortpath"
40871   # Check if we need to convert this using DOS-style short mode. If the path
40872   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40873   # take no chances and rewrite it.
40874   # Note: m4 eats our [], so we need to use [ and ] instead.
40875   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40876   if test "x$has_forbidden_chars" != x; then
40877     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40878     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40879     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40880     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40881       # Going to short mode and back again did indeed matter. Since short mode is
40882       # case insensitive, let's make it lowercase to improve readability.
40883       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40884       # Now convert it back to Unix-style (cygpath)
40885       input_path=`$CYGPATH -u "$shortmode_path"`
40886       new_path="$input_path"
40887     fi
40888   fi
40889 
40890   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40891   if test "x$test_cygdrive_prefix" = x; then
40892     # As a simple fix, exclude /usr/bin since it's not a real path.
40893     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40894       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40895       # a path prefixed by /cygdrive for fixpath to work.
40896       new_path="$CYGWIN_ROOT_PATH$input_path"
40897     fi
40898   fi
40899 
40900   # remove trailing .exe if any
40901   new_path="${new_path/%.exe/}"
40902 
40903     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40904 
40905   # First separate the path from the arguments. This will split at the first
40906   # space.
40907   complete="$OBJCOPY"
40908   path="${complete%% *}"
40909   tmp="$complete EOL"
40910   arguments="${tmp#* }"
40911 
40912   # Input might be given as Windows format, start by converting to
40913   # unix format.
40914   new_path="$path"
40915 
40916   windows_path="$new_path"
40917   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40918     unix_path=`$CYGPATH -u "$windows_path"`
40919     new_path="$unix_path"
40920   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40921     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40922     new_path="$unix_path"
40923   fi
40924 
40925 
40926   # Now try to locate executable using which
40927   new_path=`$WHICH "$new_path" 2> /dev/null`
40928 
40929   if test "x$new_path" = x; then
40930     # Oops. Which didn't find the executable.
40931     # The splitting of arguments from the executable at a space might have been incorrect,
40932     # since paths with space are more likely in Windows. Give it another try with the whole
40933     # argument.
40934     path="$complete"
40935     arguments="EOL"
40936     new_path="$path"
40937 
40938   windows_path="$new_path"
40939   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40940     unix_path=`$CYGPATH -u "$windows_path"`
40941     new_path="$unix_path"
40942   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40943     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40944     new_path="$unix_path"
40945   fi
40946 
40947 
40948     new_path=`$WHICH "$new_path" 2> /dev/null`
40949     # bat and cmd files are not always considered executable in MSYS causing which
40950     # to not find them
40951     if test "x$new_path" = x \
40952         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40953         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40954       new_path="$path"
40955 
40956   windows_path="$new_path"
40957   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40958     unix_path=`$CYGPATH -u "$windows_path"`
40959     new_path="$unix_path"
40960   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40961     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40962     new_path="$unix_path"
40963   fi
40964 
40965     fi
40966 
40967     if test "x$new_path" = x; then
40968       # It's still not found. Now this is an unrecoverable error.
40969       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
40970 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
40971       has_space=`$ECHO "$complete" | $GREP " "`
40972       if test "x$has_space" != x; then
40973         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40974 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40975       fi
40976       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
40977     fi
40978   fi
40979 
40980   # Now new_path has a complete unix path to the binary
40981   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40982     # Keep paths in /bin as-is, but remove trailing .exe if any
40983     new_path="${new_path/%.exe/}"
40984     # Do not save /bin paths to all_fixpath_prefixes!
40985   else
40986     # Not in mixed or Windows style, start by that.
40987     new_path=`cmd //c echo $new_path`
40988 
40989   input_path="$new_path"
40990   # Check if we need to convert this using DOS-style short mode. If the path
40991   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40992   # take no chances and rewrite it.
40993   # Note: m4 eats our [], so we need to use [ and ] instead.
40994   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40995   if test "x$has_forbidden_chars" != x; then
40996     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40997     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40998   fi
40999 
41000     # Output is in $new_path
41001 
41002   windows_path="$new_path"
41003   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41004     unix_path=`$CYGPATH -u "$windows_path"`
41005     new_path="$unix_path"
41006   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41007     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41008     new_path="$unix_path"
41009   fi
41010 
41011     # remove trailing .exe if any
41012     new_path="${new_path/%.exe/}"
41013 
41014     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41015     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41016   fi
41017 
41018     else
41019       # We're on a unix platform. Hooray! :)
41020       # First separate the path from the arguments. This will split at the first
41021       # space.
41022       complete="$OBJCOPY"
41023       path="${complete%% *}"
41024       tmp="$complete EOL"
41025       arguments="${tmp#* }"
41026 
41027       # Cannot rely on the command "which" here since it doesn't always work.
41028       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41029       if test -z "$is_absolute_path"; then
41030         # Path to executable is not absolute. Find it.
41031         IFS_save="$IFS"
41032         IFS=:
41033         for p in $PATH; do
41034           if test -f "$p/$path" && test -x "$p/$path"; then
41035             new_path="$p/$path"
41036             break
41037           fi
41038         done
41039         IFS="$IFS_save"
41040       else
41041         # This is an absolute path, we can use it without further modifications.
41042         new_path="$path"
41043       fi
41044 
41045       if test "x$new_path" = x; then
41046         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41047 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41048         has_space=`$ECHO "$complete" | $GREP " "`
41049         if test "x$has_space" != x; then
41050           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41051 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41052         fi
41053         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41054       fi
41055     fi
41056 
41057     # Now join together the path and the arguments once again
41058     if test "x$arguments" != xEOL; then
41059       new_complete="$new_path ${arguments% *}"
41060     else
41061       new_complete="$new_path"
41062     fi
41063 
41064     if test "x$complete" != "x$new_complete"; then
41065       OBJCOPY="$new_complete"
41066       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
41067 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
41068     fi
41069   fi
41070 
41071       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
41072         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
41073         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
41074         # - version number is last blank separate word on first line
41075         # - version number formats that have been seen:
41076         #   - <major>.<minor>
41077         #   - <major>.<minor>.<micro>
41078         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
41079         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
41080          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
41081               -e 's/.* //' \
41082               -e '/^[01]\./b bad' \
41083               -e '/^2\./{' \
41084               -e '  s/^2\.//' \
41085               -e '  /^[0-9]$/b bad' \
41086               -e '  /^[0-9]\./b bad' \
41087               -e '  /^1[0-9]$/b bad' \
41088               -e '  /^1[0-9]\./b bad' \
41089               -e '  /^20\./b bad' \
41090               -e '  /^21\.0$/b bad' \
41091               -e '  /^21\.0\./b bad' \
41092               -e '}' \
41093               -e ':good' \
41094               -e 's/.*/VALID_VERSION/p' \
41095               -e 'q' \
41096               -e ':bad' \
41097               -e 's/.*/BAD_VERSION/p' \
41098               -e 'q'`
41099         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
41100           OBJCOPY=
41101           { $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
41102 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
41103           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
41104 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
41105           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
41106 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
41107           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
41108 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
41109           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
41110 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
41111         fi
41112       fi
41113     fi
41114   fi
41115 
41116 
41117 
41118   # Publish this variable in the help.
41119 
41120 
41121   if [ -z "${OBJDUMP+x}" ]; then
41122     # The variable is not set by user, try to locate tool using the code snippet
41123     if test -n "$ac_tool_prefix"; then
41124   for ac_prog in gobjdump objdump
41125   do
41126     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41127 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41129 $as_echo_n "checking for $ac_word... " >&6; }
41130 if ${ac_cv_prog_OBJDUMP+:} false; then :
41131   $as_echo_n "(cached) " >&6
41132 else
41133   if test -n "$OBJDUMP"; then
41134   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41135 else
41136 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41137 for as_dir in $PATH
41138 do
41139   IFS=$as_save_IFS
41140   test -z "$as_dir" && as_dir=.
41141     for ac_exec_ext in '' $ac_executable_extensions; do
41142   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41143     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41144     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41145     break 2
41146   fi
41147 done
41148   done
41149 IFS=$as_save_IFS
41150 
41151 fi
41152 fi
41153 OBJDUMP=$ac_cv_prog_OBJDUMP
41154 if test -n "$OBJDUMP"; then
41155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41156 $as_echo "$OBJDUMP" >&6; }
41157 else
41158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41159 $as_echo "no" >&6; }
41160 fi
41161 
41162 
41163     test -n "$OBJDUMP" && break
41164   done
41165 fi
41166 if test -z "$OBJDUMP"; then
41167   ac_ct_OBJDUMP=$OBJDUMP
41168   for ac_prog in gobjdump objdump
41169 do
41170   # Extract the first word of "$ac_prog", so it can be a program name with args.
41171 set dummy $ac_prog; ac_word=$2
41172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41173 $as_echo_n "checking for $ac_word... " >&6; }
41174 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41175   $as_echo_n "(cached) " >&6
41176 else
41177   if test -n "$ac_ct_OBJDUMP"; then
41178   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41179 else
41180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41181 for as_dir in $PATH
41182 do
41183   IFS=$as_save_IFS
41184   test -z "$as_dir" && as_dir=.
41185     for ac_exec_ext in '' $ac_executable_extensions; do
41186   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41187     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41188     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41189     break 2
41190   fi
41191 done
41192   done
41193 IFS=$as_save_IFS
41194 
41195 fi
41196 fi
41197 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41198 if test -n "$ac_ct_OBJDUMP"; then
41199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41200 $as_echo "$ac_ct_OBJDUMP" >&6; }
41201 else
41202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41203 $as_echo "no" >&6; }
41204 fi
41205 
41206 
41207   test -n "$ac_ct_OBJDUMP" && break
41208 done
41209 
41210   if test "x$ac_ct_OBJDUMP" = x; then
41211     OBJDUMP=""
41212   else
41213     case $cross_compiling:$ac_tool_warned in
41214 yes:)
41215 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41216 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41217 ac_tool_warned=yes ;;
41218 esac
41219     OBJDUMP=$ac_ct_OBJDUMP
41220   fi
41221 fi
41222 
41223   else
41224     # The variable is set, but is it from the command line or the environment?
41225 
41226     # Try to remove the string !OBJDUMP! from our list.
41227     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
41228     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41229       # If it failed, the variable was not from the command line. Ignore it,
41230       # but warn the user (except for BASH, which is always set by the calling BASH).
41231       if test "xOBJDUMP" != xBASH; then
41232         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
41233 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
41234       fi
41235       # Try to locate tool using the code snippet
41236       if test -n "$ac_tool_prefix"; then
41237   for ac_prog in gobjdump objdump
41238   do
41239     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41240 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41242 $as_echo_n "checking for $ac_word... " >&6; }
41243 if ${ac_cv_prog_OBJDUMP+:} false; then :
41244   $as_echo_n "(cached) " >&6
41245 else
41246   if test -n "$OBJDUMP"; then
41247   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41248 else
41249 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41250 for as_dir in $PATH
41251 do
41252   IFS=$as_save_IFS
41253   test -z "$as_dir" && as_dir=.
41254     for ac_exec_ext in '' $ac_executable_extensions; do
41255   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41256     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41257     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41258     break 2
41259   fi
41260 done
41261   done
41262 IFS=$as_save_IFS
41263 
41264 fi
41265 fi
41266 OBJDUMP=$ac_cv_prog_OBJDUMP
41267 if test -n "$OBJDUMP"; then
41268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41269 $as_echo "$OBJDUMP" >&6; }
41270 else
41271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41272 $as_echo "no" >&6; }
41273 fi
41274 
41275 
41276     test -n "$OBJDUMP" && break
41277   done
41278 fi
41279 if test -z "$OBJDUMP"; then
41280   ac_ct_OBJDUMP=$OBJDUMP
41281   for ac_prog in gobjdump objdump
41282 do
41283   # Extract the first word of "$ac_prog", so it can be a program name with args.
41284 set dummy $ac_prog; ac_word=$2
41285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41286 $as_echo_n "checking for $ac_word... " >&6; }
41287 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41288   $as_echo_n "(cached) " >&6
41289 else
41290   if test -n "$ac_ct_OBJDUMP"; then
41291   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41292 else
41293 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41294 for as_dir in $PATH
41295 do
41296   IFS=$as_save_IFS
41297   test -z "$as_dir" && as_dir=.
41298     for ac_exec_ext in '' $ac_executable_extensions; do
41299   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41300     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41301     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41302     break 2
41303   fi
41304 done
41305   done
41306 IFS=$as_save_IFS
41307 
41308 fi
41309 fi
41310 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41311 if test -n "$ac_ct_OBJDUMP"; then
41312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41313 $as_echo "$ac_ct_OBJDUMP" >&6; }
41314 else
41315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41316 $as_echo "no" >&6; }
41317 fi
41318 
41319 
41320   test -n "$ac_ct_OBJDUMP" && break
41321 done
41322 
41323   if test "x$ac_ct_OBJDUMP" = x; then
41324     OBJDUMP=""
41325   else
41326     case $cross_compiling:$ac_tool_warned in
41327 yes:)
41328 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41329 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41330 ac_tool_warned=yes ;;
41331 esac
41332     OBJDUMP=$ac_ct_OBJDUMP
41333   fi
41334 fi
41335 
41336     else
41337       # If it succeeded, then it was overridden by the user. We will use it
41338       # for the tool.
41339 
41340       # First remove it from the list of overridden variables, so we can test
41341       # for unknown variables in the end.
41342       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41343 
41344       # Check if we try to supply an empty value
41345       if test "x$OBJDUMP" = x; then
41346         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
41347 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
41348         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41349 $as_echo_n "checking for OBJDUMP... " >&6; }
41350         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41351 $as_echo "disabled" >&6; }
41352       else
41353         # Check if the provided tool contains a complete path.
41354         tool_specified="$OBJDUMP"
41355         tool_basename="${tool_specified##*/}"
41356         if test "x$tool_basename" = "x$tool_specified"; then
41357           # A command without a complete path is provided, search $PATH.
41358           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
41359 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
41360           # Extract the first word of "$tool_basename", so it can be a program name with args.
41361 set dummy $tool_basename; ac_word=$2
41362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41363 $as_echo_n "checking for $ac_word... " >&6; }
41364 if ${ac_cv_path_OBJDUMP+:} false; then :
41365   $as_echo_n "(cached) " >&6
41366 else
41367   case $OBJDUMP in
41368   [\\/]* | ?:[\\/]*)
41369   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
41370   ;;
41371   *)
41372   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41373 for as_dir in $PATH
41374 do
41375   IFS=$as_save_IFS
41376   test -z "$as_dir" && as_dir=.
41377     for ac_exec_ext in '' $ac_executable_extensions; do
41378   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41379     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
41380     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41381     break 2
41382   fi
41383 done
41384   done
41385 IFS=$as_save_IFS
41386 
41387   ;;
41388 esac
41389 fi
41390 OBJDUMP=$ac_cv_path_OBJDUMP
41391 if test -n "$OBJDUMP"; then
41392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41393 $as_echo "$OBJDUMP" >&6; }
41394 else
41395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41396 $as_echo "no" >&6; }
41397 fi
41398 
41399 
41400           if test "x$OBJDUMP" = x; then
41401             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41402           fi
41403         else
41404           # Otherwise we believe it is a complete path. Use it as it is.
41405           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
41406 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
41407           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41408 $as_echo_n "checking for OBJDUMP... " >&6; }
41409           if test ! -x "$tool_specified"; then
41410             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41411 $as_echo "not found" >&6; }
41412             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
41413           fi
41414           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41415 $as_echo "$tool_specified" >&6; }
41416         fi
41417       fi
41418     fi
41419 
41420   fi
41421 
41422 
41423   if test "x$OBJDUMP" != x; then
41424     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
41425     # bails if argument is missing.
41426 
41427   # Only process if variable expands to non-empty
41428 
41429   if test "x$OBJDUMP" != x; then
41430     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41431 
41432   # First separate the path from the arguments. This will split at the first
41433   # space.
41434   complete="$OBJDUMP"
41435   path="${complete%% *}"
41436   tmp="$complete EOL"
41437   arguments="${tmp#* }"
41438 
41439   # Input might be given as Windows format, start by converting to
41440   # unix format.
41441   new_path=`$CYGPATH -u "$path"`
41442 
41443   # Now try to locate executable using which
41444   new_path=`$WHICH "$new_path" 2> /dev/null`
41445   # bat and cmd files are not always considered executable in cygwin causing which
41446   # to not find them
41447   if test "x$new_path" = x \
41448       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41449       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41450     new_path=`$CYGPATH -u "$path"`
41451   fi
41452   if test "x$new_path" = x; then
41453     # Oops. Which didn't find the executable.
41454     # The splitting of arguments from the executable at a space might have been incorrect,
41455     # since paths with space are more likely in Windows. Give it another try with the whole
41456     # argument.
41457     path="$complete"
41458     arguments="EOL"
41459     new_path=`$CYGPATH -u "$path"`
41460     new_path=`$WHICH "$new_path" 2> /dev/null`
41461     # bat and cmd files are not always considered executable in cygwin causing which
41462     # to not find them
41463     if test "x$new_path" = x \
41464         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41465         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41466       new_path=`$CYGPATH -u "$path"`
41467     fi
41468     if test "x$new_path" = x; then
41469       # It's still not found. Now this is an unrecoverable error.
41470       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41471 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41472       has_space=`$ECHO "$complete" | $GREP " "`
41473       if test "x$has_space" != x; then
41474         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41475 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41476       fi
41477       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41478     fi
41479   fi
41480 
41481   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41482   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41483   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41484   # "foo.exe" is OK but "foo" is an error.
41485   #
41486   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41487   # It is also a way to make sure we got the proper file name for the real test later on.
41488   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41489   if test "x$test_shortpath" = x; then
41490     # Short path failed, file does not exist as specified.
41491     # Try adding .exe or .cmd
41492     if test -f "${new_path}.exe"; then
41493       input_to_shortpath="${new_path}.exe"
41494     elif test -f "${new_path}.cmd"; then
41495       input_to_shortpath="${new_path}.cmd"
41496     else
41497       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
41498 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
41499       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41500 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41501       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41502     fi
41503   else
41504     input_to_shortpath="$new_path"
41505   fi
41506 
41507   # Call helper function which possibly converts this using DOS-style short mode.
41508   # If so, the updated path is stored in $new_path.
41509   new_path="$input_to_shortpath"
41510 
41511   input_path="$input_to_shortpath"
41512   # Check if we need to convert this using DOS-style short mode. If the path
41513   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41514   # take no chances and rewrite it.
41515   # Note: m4 eats our [], so we need to use [ and ] instead.
41516   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41517   if test "x$has_forbidden_chars" != x; then
41518     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41519     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41520     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41521     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41522       # Going to short mode and back again did indeed matter. Since short mode is
41523       # case insensitive, let's make it lowercase to improve readability.
41524       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41525       # Now convert it back to Unix-style (cygpath)
41526       input_path=`$CYGPATH -u "$shortmode_path"`
41527       new_path="$input_path"
41528     fi
41529   fi
41530 
41531   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41532   if test "x$test_cygdrive_prefix" = x; then
41533     # As a simple fix, exclude /usr/bin since it's not a real path.
41534     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41535       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41536       # a path prefixed by /cygdrive for fixpath to work.
41537       new_path="$CYGWIN_ROOT_PATH$input_path"
41538     fi
41539   fi
41540 
41541   # remove trailing .exe if any
41542   new_path="${new_path/%.exe/}"
41543 
41544     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41545 
41546   # First separate the path from the arguments. This will split at the first
41547   # space.
41548   complete="$OBJDUMP"
41549   path="${complete%% *}"
41550   tmp="$complete EOL"
41551   arguments="${tmp#* }"
41552 
41553   # Input might be given as Windows format, start by converting to
41554   # unix format.
41555   new_path="$path"
41556 
41557   windows_path="$new_path"
41558   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41559     unix_path=`$CYGPATH -u "$windows_path"`
41560     new_path="$unix_path"
41561   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41562     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41563     new_path="$unix_path"
41564   fi
41565 
41566 
41567   # Now try to locate executable using which
41568   new_path=`$WHICH "$new_path" 2> /dev/null`
41569 
41570   if test "x$new_path" = x; then
41571     # Oops. Which didn't find the executable.
41572     # The splitting of arguments from the executable at a space might have been incorrect,
41573     # since paths with space are more likely in Windows. Give it another try with the whole
41574     # argument.
41575     path="$complete"
41576     arguments="EOL"
41577     new_path="$path"
41578 
41579   windows_path="$new_path"
41580   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41581     unix_path=`$CYGPATH -u "$windows_path"`
41582     new_path="$unix_path"
41583   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41584     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41585     new_path="$unix_path"
41586   fi
41587 
41588 
41589     new_path=`$WHICH "$new_path" 2> /dev/null`
41590     # bat and cmd files are not always considered executable in MSYS causing which
41591     # to not find them
41592     if test "x$new_path" = x \
41593         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41594         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41595       new_path="$path"
41596 
41597   windows_path="$new_path"
41598   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41599     unix_path=`$CYGPATH -u "$windows_path"`
41600     new_path="$unix_path"
41601   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41602     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41603     new_path="$unix_path"
41604   fi
41605 
41606     fi
41607 
41608     if test "x$new_path" = x; then
41609       # It's still not found. Now this is an unrecoverable error.
41610       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41611 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41612       has_space=`$ECHO "$complete" | $GREP " "`
41613       if test "x$has_space" != x; then
41614         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41615 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41616       fi
41617       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41618     fi
41619   fi
41620 
41621   # Now new_path has a complete unix path to the binary
41622   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41623     # Keep paths in /bin as-is, but remove trailing .exe if any
41624     new_path="${new_path/%.exe/}"
41625     # Do not save /bin paths to all_fixpath_prefixes!
41626   else
41627     # Not in mixed or Windows style, start by that.
41628     new_path=`cmd //c echo $new_path`
41629 
41630   input_path="$new_path"
41631   # Check if we need to convert this using DOS-style short mode. If the path
41632   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41633   # take no chances and rewrite it.
41634   # Note: m4 eats our [], so we need to use [ and ] instead.
41635   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41636   if test "x$has_forbidden_chars" != x; then
41637     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41638     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41639   fi
41640 
41641     # Output is in $new_path
41642 
41643   windows_path="$new_path"
41644   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41645     unix_path=`$CYGPATH -u "$windows_path"`
41646     new_path="$unix_path"
41647   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41648     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41649     new_path="$unix_path"
41650   fi
41651 
41652     # remove trailing .exe if any
41653     new_path="${new_path/%.exe/}"
41654 
41655     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41656     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41657   fi
41658 
41659     else
41660       # We're on a unix platform. Hooray! :)
41661       # First separate the path from the arguments. This will split at the first
41662       # space.
41663       complete="$OBJDUMP"
41664       path="${complete%% *}"
41665       tmp="$complete EOL"
41666       arguments="${tmp#* }"
41667 
41668       # Cannot rely on the command "which" here since it doesn't always work.
41669       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41670       if test -z "$is_absolute_path"; then
41671         # Path to executable is not absolute. Find it.
41672         IFS_save="$IFS"
41673         IFS=:
41674         for p in $PATH; do
41675           if test -f "$p/$path" && test -x "$p/$path"; then
41676             new_path="$p/$path"
41677             break
41678           fi
41679         done
41680         IFS="$IFS_save"
41681       else
41682         # This is an absolute path, we can use it without further modifications.
41683         new_path="$path"
41684       fi
41685 
41686       if test "x$new_path" = x; then
41687         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41688 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41689         has_space=`$ECHO "$complete" | $GREP " "`
41690         if test "x$has_space" != x; then
41691           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41692 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41693         fi
41694         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41695       fi
41696     fi
41697 
41698     # Now join together the path and the arguments once again
41699     if test "x$arguments" != xEOL; then
41700       new_complete="$new_path ${arguments% *}"
41701     else
41702       new_complete="$new_path"
41703     fi
41704 
41705     if test "x$complete" != "x$new_complete"; then
41706       OBJDUMP="$new_complete"
41707       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
41708 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
41709     fi
41710   fi
41711 
41712   fi
41713 
41714 
41715   # Restore old path.
41716   PATH="$OLD_PATH"
41717 
41718   # Restore the flags to the user specified values.
41719   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
41720   CFLAGS="$ORG_CFLAGS"
41721   CXXFLAGS="$ORG_CXXFLAGS"
41722 
41723 
41724 # Finally do some processing after the detection phase
41725 
41726   if test "x$COMPILE_TYPE" = "xcross"; then
41727     # Now we need to find a C/C++ compiler that can build executables for the
41728     # build platform. We can't use the AC_PROG_CC macro, since it can only be
41729     # used once. Also, we need to do this without adding a tools dir to the
41730     # path, otherwise we might pick up cross-compilers which don't use standard
41731     # naming.
41732 
41733     OLDPATH="$PATH"
41734 
41735 
41736 # Check whether --with-build-devkit was given.
41737 if test "${with_build_devkit+set}" = set; then :
41738   withval=$with_build_devkit;
41739 fi
41740 
41741     if test "x$with_build_devkit" = "xyes"; then
41742       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
41743     elif test -n "$with_build_devkit"; then
41744       if test ! -d "$with_build_devkit"; then
41745         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
41746       else
41747 
41748   # Only process if variable expands to non-empty
41749 
41750   if test "x$with_build_devkit" != x; then
41751     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41752 
41753   # Input might be given as Windows format, start by converting to
41754   # unix format.
41755   path="$with_build_devkit"
41756   new_path=`$CYGPATH -u "$path"`
41757 
41758   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41759   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41760   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41761   # "foo.exe" is OK but "foo" is an error.
41762   #
41763   # This test is therefore slightly more accurate than "test -f" to check for file precense.
41764   # It is also a way to make sure we got the proper file name for the real test later on.
41765   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41766   if test "x$test_shortpath" = x; then
41767     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
41768 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
41769     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
41770   fi
41771 
41772   # Call helper function which possibly converts this using DOS-style short mode.
41773   # If so, the updated path is stored in $new_path.
41774 
41775   input_path="$new_path"
41776   # Check if we need to convert this using DOS-style short mode. If the path
41777   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41778   # take no chances and rewrite it.
41779   # Note: m4 eats our [], so we need to use [ and ] instead.
41780   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41781   if test "x$has_forbidden_chars" != x; then
41782     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41783     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41784     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41785     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41786       # Going to short mode and back again did indeed matter. Since short mode is
41787       # case insensitive, let's make it lowercase to improve readability.
41788       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41789       # Now convert it back to Unix-style (cygpath)
41790       input_path=`$CYGPATH -u "$shortmode_path"`
41791       new_path="$input_path"
41792     fi
41793   fi
41794 
41795   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41796   if test "x$test_cygdrive_prefix" = x; then
41797     # As a simple fix, exclude /usr/bin since it's not a real path.
41798     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41799       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41800       # a path prefixed by /cygdrive for fixpath to work.
41801       new_path="$CYGWIN_ROOT_PATH$input_path"
41802     fi
41803   fi
41804 
41805 
41806   if test "x$path" != "x$new_path"; then
41807     with_build_devkit="$new_path"
41808     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
41809 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
41810   fi
41811 
41812     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41813 
41814   path="$with_build_devkit"
41815   has_colon=`$ECHO $path | $GREP ^.:`
41816   new_path="$path"
41817   if test "x$has_colon" = x; then
41818     # Not in mixed or Windows style, start by that.
41819     new_path=`cmd //c echo $path`
41820   fi
41821 
41822 
41823   input_path="$new_path"
41824   # Check if we need to convert this using DOS-style short mode. If the path
41825   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41826   # take no chances and rewrite it.
41827   # Note: m4 eats our [], so we need to use [ and ] instead.
41828   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41829   if test "x$has_forbidden_chars" != x; then
41830     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41831     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41832   fi
41833 
41834 
41835   windows_path="$new_path"
41836   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41837     unix_path=`$CYGPATH -u "$windows_path"`
41838     new_path="$unix_path"
41839   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41840     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41841     new_path="$unix_path"
41842   fi
41843 
41844   if test "x$path" != "x$new_path"; then
41845     with_build_devkit="$new_path"
41846     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
41847 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
41848   fi
41849 
41850   # Save the first 10 bytes of this path to the storage, so fixpath can work.
41851   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41852 
41853     else
41854       # We're on a unix platform. Hooray! :)
41855       path="$with_build_devkit"
41856       has_space=`$ECHO "$path" | $GREP " "`
41857       if test "x$has_space" != x; then
41858         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
41859 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
41860         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41861       fi
41862 
41863       # Use eval to expand a potential ~
41864       eval path="$path"
41865       if test ! -f "$path" && test ! -d "$path"; then
41866         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
41867       fi
41868 
41869       with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
41870     fi
41871   fi
41872 
41873         BUILD_DEVKIT_ROOT="$with_build_devkit"
41874         # Check for a meta data info file in the root of the devkit
41875         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
41876           # Process devkit.info so that existing devkit variables are not
41877           # modified by this
41878           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
41879               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
41880               -e "s/\$host/\$build/g" \
41881               $BUILD_DEVKIT_ROOT/devkit.info \
41882               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
41883           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
41884           # This potentially sets the following:
41885           # A descriptive name of the devkit
41886 
41887   if test "x$BUILD_DEVKIT_NAME" = x; then
41888     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
41889   fi
41890 
41891           # Corresponds to --with-extra-path
41892 
41893   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
41894     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
41895   fi
41896 
41897           # Corresponds to --with-toolchain-path
41898 
41899   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
41900     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
41901   fi
41902 
41903           # Corresponds to --with-sysroot
41904 
41905   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
41906     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
41907   fi
41908 
41909           # Skip the Window specific parts
41910         fi
41911 
41912         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
41913 $as_echo_n "checking for build platform devkit... " >&6; }
41914         if test "x$BUILD_DEVKIT_NAME" != x; then
41915           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
41916 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
41917         else
41918           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
41919 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
41920         fi
41921 
41922         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
41923 
41924   if test "x$BUILD_SYSROOT" != "x"; then
41925     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41926       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41927         # Solaris Studio does not have a concept of sysroot. Instead we must
41928         # make sure the default include and lib dirs are appended to each
41929         # compile and link command line.
41930         BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
41931         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41932             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41933             -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41934       fi
41935     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41936       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
41937       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
41938     elif test "x$TOOLCHAIN_TYPE" = xclang; then
41939       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
41940       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
41941     fi
41942     # Propagate the sysroot args to hotspot
41943     BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
41944     BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
41945     BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
41946     # The global CFLAGS and LDFLAGS variables need these for configure to function
41947     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
41948     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
41949     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
41950     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
41951   fi
41952 
41953   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41954     # We also need -iframework<path>/System/Library/Frameworks
41955     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
41956     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
41957     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41958     # set this here so it doesn't have to be peppered throughout the forest
41959     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
41960     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
41961   fi
41962 
41963 
41964 
41965 
41966 
41967          # Fallback default of just /bin if DEVKIT_PATH is not defined
41968         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
41969           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
41970         fi
41971         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
41972       fi
41973     fi
41974 
41975     # FIXME: we should list the discovered compilers as an exclude pattern!
41976     # If we do that, we can do this detection before POST_DETECTION, and still
41977     # find the build compilers in the tools dir, if needed.
41978 
41979 
41980 
41981   # Publish this variable in the help.
41982 
41983 
41984   if [ -z "${BUILD_CC+x}" ]; then
41985     # The variable is not set by user, try to locate tool using the code snippet
41986     for ac_prog in cl cc gcc
41987 do
41988   # Extract the first word of "$ac_prog", so it can be a program name with args.
41989 set dummy $ac_prog; ac_word=$2
41990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41991 $as_echo_n "checking for $ac_word... " >&6; }
41992 if ${ac_cv_path_BUILD_CC+:} false; then :
41993   $as_echo_n "(cached) " >&6
41994 else
41995   case $BUILD_CC in
41996   [\\/]* | ?:[\\/]*)
41997   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
41998   ;;
41999   *)
42000   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42001 for as_dir in $PATH
42002 do
42003   IFS=$as_save_IFS
42004   test -z "$as_dir" && as_dir=.
42005     for ac_exec_ext in '' $ac_executable_extensions; do
42006   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42007     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42009     break 2
42010   fi
42011 done
42012   done
42013 IFS=$as_save_IFS
42014 
42015   ;;
42016 esac
42017 fi
42018 BUILD_CC=$ac_cv_path_BUILD_CC
42019 if test -n "$BUILD_CC"; then
42020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42021 $as_echo "$BUILD_CC" >&6; }
42022 else
42023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42024 $as_echo "no" >&6; }
42025 fi
42026 
42027 
42028   test -n "$BUILD_CC" && break
42029 done
42030 
42031   else
42032     # The variable is set, but is it from the command line or the environment?
42033 
42034     # Try to remove the string !BUILD_CC! from our list.
42035     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
42036     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42037       # If it failed, the variable was not from the command line. Ignore it,
42038       # but warn the user (except for BASH, which is always set by the calling BASH).
42039       if test "xBUILD_CC" != xBASH; then
42040         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
42041 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
42042       fi
42043       # Try to locate tool using the code snippet
42044       for ac_prog in cl cc gcc
42045 do
42046   # Extract the first word of "$ac_prog", so it can be a program name with args.
42047 set dummy $ac_prog; ac_word=$2
42048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42049 $as_echo_n "checking for $ac_word... " >&6; }
42050 if ${ac_cv_path_BUILD_CC+:} false; then :
42051   $as_echo_n "(cached) " >&6
42052 else
42053   case $BUILD_CC in
42054   [\\/]* | ?:[\\/]*)
42055   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42056   ;;
42057   *)
42058   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42059 for as_dir in $PATH
42060 do
42061   IFS=$as_save_IFS
42062   test -z "$as_dir" && as_dir=.
42063     for ac_exec_ext in '' $ac_executable_extensions; do
42064   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42065     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42066     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42067     break 2
42068   fi
42069 done
42070   done
42071 IFS=$as_save_IFS
42072 
42073   ;;
42074 esac
42075 fi
42076 BUILD_CC=$ac_cv_path_BUILD_CC
42077 if test -n "$BUILD_CC"; then
42078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42079 $as_echo "$BUILD_CC" >&6; }
42080 else
42081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42082 $as_echo "no" >&6; }
42083 fi
42084 
42085 
42086   test -n "$BUILD_CC" && break
42087 done
42088 
42089     else
42090       # If it succeeded, then it was overridden by the user. We will use it
42091       # for the tool.
42092 
42093       # First remove it from the list of overridden variables, so we can test
42094       # for unknown variables in the end.
42095       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42096 
42097       # Check if we try to supply an empty value
42098       if test "x$BUILD_CC" = x; then
42099         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
42100 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
42101         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42102 $as_echo_n "checking for BUILD_CC... " >&6; }
42103         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42104 $as_echo "disabled" >&6; }
42105       else
42106         # Check if the provided tool contains a complete path.
42107         tool_specified="$BUILD_CC"
42108         tool_basename="${tool_specified##*/}"
42109         if test "x$tool_basename" = "x$tool_specified"; then
42110           # A command without a complete path is provided, search $PATH.
42111           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
42112 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
42113           # Extract the first word of "$tool_basename", so it can be a program name with args.
42114 set dummy $tool_basename; ac_word=$2
42115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42116 $as_echo_n "checking for $ac_word... " >&6; }
42117 if ${ac_cv_path_BUILD_CC+:} false; then :
42118   $as_echo_n "(cached) " >&6
42119 else
42120   case $BUILD_CC in
42121   [\\/]* | ?:[\\/]*)
42122   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42123   ;;
42124   *)
42125   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42126 for as_dir in $PATH
42127 do
42128   IFS=$as_save_IFS
42129   test -z "$as_dir" && as_dir=.
42130     for ac_exec_ext in '' $ac_executable_extensions; do
42131   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42132     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42133     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42134     break 2
42135   fi
42136 done
42137   done
42138 IFS=$as_save_IFS
42139 
42140   ;;
42141 esac
42142 fi
42143 BUILD_CC=$ac_cv_path_BUILD_CC
42144 if test -n "$BUILD_CC"; then
42145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42146 $as_echo "$BUILD_CC" >&6; }
42147 else
42148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42149 $as_echo "no" >&6; }
42150 fi
42151 
42152 
42153           if test "x$BUILD_CC" = x; then
42154             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42155           fi
42156         else
42157           # Otherwise we believe it is a complete path. Use it as it is.
42158           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
42159 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
42160           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42161 $as_echo_n "checking for BUILD_CC... " >&6; }
42162           if test ! -x "$tool_specified"; then
42163             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42164 $as_echo "not found" >&6; }
42165             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
42166           fi
42167           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42168 $as_echo "$tool_specified" >&6; }
42169         fi
42170       fi
42171     fi
42172 
42173   fi
42174 
42175 
42176 
42177   if test "x$BUILD_CC" = x; then
42178     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
42179   fi
42180 
42181 
42182 
42183   # Only process if variable expands to non-empty
42184 
42185   if test "x$BUILD_CC" != x; then
42186     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42187 
42188   # First separate the path from the arguments. This will split at the first
42189   # space.
42190   complete="$BUILD_CC"
42191   path="${complete%% *}"
42192   tmp="$complete EOL"
42193   arguments="${tmp#* }"
42194 
42195   # Input might be given as Windows format, start by converting to
42196   # unix format.
42197   new_path=`$CYGPATH -u "$path"`
42198 
42199   # Now try to locate executable using which
42200   new_path=`$WHICH "$new_path" 2> /dev/null`
42201   # bat and cmd files are not always considered executable in cygwin causing which
42202   # to not find them
42203   if test "x$new_path" = x \
42204       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42205       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42206     new_path=`$CYGPATH -u "$path"`
42207   fi
42208   if test "x$new_path" = x; then
42209     # Oops. Which didn't find the executable.
42210     # The splitting of arguments from the executable at a space might have been incorrect,
42211     # since paths with space are more likely in Windows. Give it another try with the whole
42212     # argument.
42213     path="$complete"
42214     arguments="EOL"
42215     new_path=`$CYGPATH -u "$path"`
42216     new_path=`$WHICH "$new_path" 2> /dev/null`
42217     # bat and cmd files are not always considered executable in cygwin causing which
42218     # to not find them
42219     if test "x$new_path" = x \
42220         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42221         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42222       new_path=`$CYGPATH -u "$path"`
42223     fi
42224     if test "x$new_path" = x; then
42225       # It's still not found. Now this is an unrecoverable error.
42226       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42227 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42228       has_space=`$ECHO "$complete" | $GREP " "`
42229       if test "x$has_space" != x; then
42230         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42231 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42232       fi
42233       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42234     fi
42235   fi
42236 
42237   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42238   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42239   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42240   # "foo.exe" is OK but "foo" is an error.
42241   #
42242   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42243   # It is also a way to make sure we got the proper file name for the real test later on.
42244   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42245   if test "x$test_shortpath" = x; then
42246     # Short path failed, file does not exist as specified.
42247     # Try adding .exe or .cmd
42248     if test -f "${new_path}.exe"; then
42249       input_to_shortpath="${new_path}.exe"
42250     elif test -f "${new_path}.cmd"; then
42251       input_to_shortpath="${new_path}.cmd"
42252     else
42253       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
42254 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
42255       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42256 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42257       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42258     fi
42259   else
42260     input_to_shortpath="$new_path"
42261   fi
42262 
42263   # Call helper function which possibly converts this using DOS-style short mode.
42264   # If so, the updated path is stored in $new_path.
42265   new_path="$input_to_shortpath"
42266 
42267   input_path="$input_to_shortpath"
42268   # Check if we need to convert this using DOS-style short mode. If the path
42269   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42270   # take no chances and rewrite it.
42271   # Note: m4 eats our [], so we need to use [ and ] instead.
42272   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42273   if test "x$has_forbidden_chars" != x; then
42274     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42275     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42276     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42277     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42278       # Going to short mode and back again did indeed matter. Since short mode is
42279       # case insensitive, let's make it lowercase to improve readability.
42280       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42281       # Now convert it back to Unix-style (cygpath)
42282       input_path=`$CYGPATH -u "$shortmode_path"`
42283       new_path="$input_path"
42284     fi
42285   fi
42286 
42287   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42288   if test "x$test_cygdrive_prefix" = x; then
42289     # As a simple fix, exclude /usr/bin since it's not a real path.
42290     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42291       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42292       # a path prefixed by /cygdrive for fixpath to work.
42293       new_path="$CYGWIN_ROOT_PATH$input_path"
42294     fi
42295   fi
42296 
42297   # remove trailing .exe if any
42298   new_path="${new_path/%.exe/}"
42299 
42300     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42301 
42302   # First separate the path from the arguments. This will split at the first
42303   # space.
42304   complete="$BUILD_CC"
42305   path="${complete%% *}"
42306   tmp="$complete EOL"
42307   arguments="${tmp#* }"
42308 
42309   # Input might be given as Windows format, start by converting to
42310   # unix format.
42311   new_path="$path"
42312 
42313   windows_path="$new_path"
42314   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42315     unix_path=`$CYGPATH -u "$windows_path"`
42316     new_path="$unix_path"
42317   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42318     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42319     new_path="$unix_path"
42320   fi
42321 
42322 
42323   # Now try to locate executable using which
42324   new_path=`$WHICH "$new_path" 2> /dev/null`
42325 
42326   if test "x$new_path" = x; then
42327     # Oops. Which didn't find the executable.
42328     # The splitting of arguments from the executable at a space might have been incorrect,
42329     # since paths with space are more likely in Windows. Give it another try with the whole
42330     # argument.
42331     path="$complete"
42332     arguments="EOL"
42333     new_path="$path"
42334 
42335   windows_path="$new_path"
42336   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42337     unix_path=`$CYGPATH -u "$windows_path"`
42338     new_path="$unix_path"
42339   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42340     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42341     new_path="$unix_path"
42342   fi
42343 
42344 
42345     new_path=`$WHICH "$new_path" 2> /dev/null`
42346     # bat and cmd files are not always considered executable in MSYS causing which
42347     # to not find them
42348     if test "x$new_path" = x \
42349         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42350         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42351       new_path="$path"
42352 
42353   windows_path="$new_path"
42354   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42355     unix_path=`$CYGPATH -u "$windows_path"`
42356     new_path="$unix_path"
42357   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42358     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42359     new_path="$unix_path"
42360   fi
42361 
42362     fi
42363 
42364     if test "x$new_path" = x; then
42365       # It's still not found. Now this is an unrecoverable error.
42366       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42367 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42368       has_space=`$ECHO "$complete" | $GREP " "`
42369       if test "x$has_space" != x; then
42370         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42371 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42372       fi
42373       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42374     fi
42375   fi
42376 
42377   # Now new_path has a complete unix path to the binary
42378   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42379     # Keep paths in /bin as-is, but remove trailing .exe if any
42380     new_path="${new_path/%.exe/}"
42381     # Do not save /bin paths to all_fixpath_prefixes!
42382   else
42383     # Not in mixed or Windows style, start by that.
42384     new_path=`cmd //c echo $new_path`
42385 
42386   input_path="$new_path"
42387   # Check if we need to convert this using DOS-style short mode. If the path
42388   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42389   # take no chances and rewrite it.
42390   # Note: m4 eats our [], so we need to use [ and ] instead.
42391   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42392   if test "x$has_forbidden_chars" != x; then
42393     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42394     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42395   fi
42396 
42397     # Output is in $new_path
42398 
42399   windows_path="$new_path"
42400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42401     unix_path=`$CYGPATH -u "$windows_path"`
42402     new_path="$unix_path"
42403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42405     new_path="$unix_path"
42406   fi
42407 
42408     # remove trailing .exe if any
42409     new_path="${new_path/%.exe/}"
42410 
42411     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42412     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42413   fi
42414 
42415     else
42416       # We're on a unix platform. Hooray! :)
42417       # First separate the path from the arguments. This will split at the first
42418       # space.
42419       complete="$BUILD_CC"
42420       path="${complete%% *}"
42421       tmp="$complete EOL"
42422       arguments="${tmp#* }"
42423 
42424       # Cannot rely on the command "which" here since it doesn't always work.
42425       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42426       if test -z "$is_absolute_path"; then
42427         # Path to executable is not absolute. Find it.
42428         IFS_save="$IFS"
42429         IFS=:
42430         for p in $PATH; do
42431           if test -f "$p/$path" && test -x "$p/$path"; then
42432             new_path="$p/$path"
42433             break
42434           fi
42435         done
42436         IFS="$IFS_save"
42437       else
42438         # This is an absolute path, we can use it without further modifications.
42439         new_path="$path"
42440       fi
42441 
42442       if test "x$new_path" = x; then
42443         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42444 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42445         has_space=`$ECHO "$complete" | $GREP " "`
42446         if test "x$has_space" != x; then
42447           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42448 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42449         fi
42450         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42451       fi
42452     fi
42453 
42454     # Now join together the path and the arguments once again
42455     if test "x$arguments" != xEOL; then
42456       new_complete="$new_path ${arguments% *}"
42457     else
42458       new_complete="$new_path"
42459     fi
42460 
42461     if test "x$complete" != "x$new_complete"; then
42462       BUILD_CC="$new_complete"
42463       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
42464 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
42465     fi
42466   fi
42467 
42468 
42469 
42470 
42471   # Publish this variable in the help.
42472 
42473 
42474   if [ -z "${BUILD_CXX+x}" ]; then
42475     # The variable is not set by user, try to locate tool using the code snippet
42476     for ac_prog in cl CC g++
42477 do
42478   # Extract the first word of "$ac_prog", so it can be a program name with args.
42479 set dummy $ac_prog; ac_word=$2
42480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42481 $as_echo_n "checking for $ac_word... " >&6; }
42482 if ${ac_cv_path_BUILD_CXX+:} false; then :
42483   $as_echo_n "(cached) " >&6
42484 else
42485   case $BUILD_CXX in
42486   [\\/]* | ?:[\\/]*)
42487   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42488   ;;
42489   *)
42490   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42491 for as_dir in $PATH
42492 do
42493   IFS=$as_save_IFS
42494   test -z "$as_dir" && as_dir=.
42495     for ac_exec_ext in '' $ac_executable_extensions; do
42496   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42497     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42498     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42499     break 2
42500   fi
42501 done
42502   done
42503 IFS=$as_save_IFS
42504 
42505   ;;
42506 esac
42507 fi
42508 BUILD_CXX=$ac_cv_path_BUILD_CXX
42509 if test -n "$BUILD_CXX"; then
42510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42511 $as_echo "$BUILD_CXX" >&6; }
42512 else
42513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42514 $as_echo "no" >&6; }
42515 fi
42516 
42517 
42518   test -n "$BUILD_CXX" && break
42519 done
42520 
42521   else
42522     # The variable is set, but is it from the command line or the environment?
42523 
42524     # Try to remove the string !BUILD_CXX! from our list.
42525     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
42526     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42527       # If it failed, the variable was not from the command line. Ignore it,
42528       # but warn the user (except for BASH, which is always set by the calling BASH).
42529       if test "xBUILD_CXX" != xBASH; then
42530         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
42531 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
42532       fi
42533       # Try to locate tool using the code snippet
42534       for ac_prog in cl CC g++
42535 do
42536   # Extract the first word of "$ac_prog", so it can be a program name with args.
42537 set dummy $ac_prog; ac_word=$2
42538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42539 $as_echo_n "checking for $ac_word... " >&6; }
42540 if ${ac_cv_path_BUILD_CXX+:} false; then :
42541   $as_echo_n "(cached) " >&6
42542 else
42543   case $BUILD_CXX in
42544   [\\/]* | ?:[\\/]*)
42545   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42546   ;;
42547   *)
42548   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42549 for as_dir in $PATH
42550 do
42551   IFS=$as_save_IFS
42552   test -z "$as_dir" && as_dir=.
42553     for ac_exec_ext in '' $ac_executable_extensions; do
42554   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42555     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42556     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42557     break 2
42558   fi
42559 done
42560   done
42561 IFS=$as_save_IFS
42562 
42563   ;;
42564 esac
42565 fi
42566 BUILD_CXX=$ac_cv_path_BUILD_CXX
42567 if test -n "$BUILD_CXX"; then
42568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42569 $as_echo "$BUILD_CXX" >&6; }
42570 else
42571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42572 $as_echo "no" >&6; }
42573 fi
42574 
42575 
42576   test -n "$BUILD_CXX" && break
42577 done
42578 
42579     else
42580       # If it succeeded, then it was overridden by the user. We will use it
42581       # for the tool.
42582 
42583       # First remove it from the list of overridden variables, so we can test
42584       # for unknown variables in the end.
42585       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42586 
42587       # Check if we try to supply an empty value
42588       if test "x$BUILD_CXX" = x; then
42589         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
42590 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
42591         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
42592 $as_echo_n "checking for BUILD_CXX... " >&6; }
42593         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42594 $as_echo "disabled" >&6; }
42595       else
42596         # Check if the provided tool contains a complete path.
42597         tool_specified="$BUILD_CXX"
42598         tool_basename="${tool_specified##*/}"
42599         if test "x$tool_basename" = "x$tool_specified"; then
42600           # A command without a complete path is provided, search $PATH.
42601           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
42602 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
42603           # Extract the first word of "$tool_basename", so it can be a program name with args.
42604 set dummy $tool_basename; ac_word=$2
42605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42606 $as_echo_n "checking for $ac_word... " >&6; }
42607 if ${ac_cv_path_BUILD_CXX+:} false; then :
42608   $as_echo_n "(cached) " >&6
42609 else
42610   case $BUILD_CXX in
42611   [\\/]* | ?:[\\/]*)
42612   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42613   ;;
42614   *)
42615   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42616 for as_dir in $PATH
42617 do
42618   IFS=$as_save_IFS
42619   test -z "$as_dir" && as_dir=.
42620     for ac_exec_ext in '' $ac_executable_extensions; do
42621   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42622     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42623     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42624     break 2
42625   fi
42626 done
42627   done
42628 IFS=$as_save_IFS
42629 
42630   ;;
42631 esac
42632 fi
42633 BUILD_CXX=$ac_cv_path_BUILD_CXX
42634 if test -n "$BUILD_CXX"; then
42635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42636 $as_echo "$BUILD_CXX" >&6; }
42637 else
42638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42639 $as_echo "no" >&6; }
42640 fi
42641 
42642 
42643           if test "x$BUILD_CXX" = x; then
42644             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42645           fi
42646         else
42647           # Otherwise we believe it is a complete path. Use it as it is.
42648           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
42649 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
42650           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
42651 $as_echo_n "checking for BUILD_CXX... " >&6; }
42652           if test ! -x "$tool_specified"; then
42653             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42654 $as_echo "not found" >&6; }
42655             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
42656           fi
42657           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42658 $as_echo "$tool_specified" >&6; }
42659         fi
42660       fi
42661     fi
42662 
42663   fi
42664 
42665 
42666 
42667   if test "x$BUILD_CXX" = x; then
42668     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
42669   fi
42670 
42671 
42672 
42673   # Only process if variable expands to non-empty
42674 
42675   if test "x$BUILD_CXX" != x; then
42676     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42677 
42678   # First separate the path from the arguments. This will split at the first
42679   # space.
42680   complete="$BUILD_CXX"
42681   path="${complete%% *}"
42682   tmp="$complete EOL"
42683   arguments="${tmp#* }"
42684 
42685   # Input might be given as Windows format, start by converting to
42686   # unix format.
42687   new_path=`$CYGPATH -u "$path"`
42688 
42689   # Now try to locate executable using which
42690   new_path=`$WHICH "$new_path" 2> /dev/null`
42691   # bat and cmd files are not always considered executable in cygwin causing which
42692   # to not find them
42693   if test "x$new_path" = x \
42694       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42695       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42696     new_path=`$CYGPATH -u "$path"`
42697   fi
42698   if test "x$new_path" = x; then
42699     # Oops. Which didn't find the executable.
42700     # The splitting of arguments from the executable at a space might have been incorrect,
42701     # since paths with space are more likely in Windows. Give it another try with the whole
42702     # argument.
42703     path="$complete"
42704     arguments="EOL"
42705     new_path=`$CYGPATH -u "$path"`
42706     new_path=`$WHICH "$new_path" 2> /dev/null`
42707     # bat and cmd files are not always considered executable in cygwin causing which
42708     # to not find them
42709     if test "x$new_path" = x \
42710         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42711         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42712       new_path=`$CYGPATH -u "$path"`
42713     fi
42714     if test "x$new_path" = x; then
42715       # It's still not found. Now this is an unrecoverable error.
42716       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
42717 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
42718       has_space=`$ECHO "$complete" | $GREP " "`
42719       if test "x$has_space" != x; then
42720         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42721 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42722       fi
42723       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
42724     fi
42725   fi
42726 
42727   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42728   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42729   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42730   # "foo.exe" is OK but "foo" is an error.
42731   #
42732   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42733   # It is also a way to make sure we got the proper file name for the real test later on.
42734   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42735   if test "x$test_shortpath" = x; then
42736     # Short path failed, file does not exist as specified.
42737     # Try adding .exe or .cmd
42738     if test -f "${new_path}.exe"; then
42739       input_to_shortpath="${new_path}.exe"
42740     elif test -f "${new_path}.cmd"; then
42741       input_to_shortpath="${new_path}.cmd"
42742     else
42743       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
42744 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
42745       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42746 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42747       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
42748     fi
42749   else
42750     input_to_shortpath="$new_path"
42751   fi
42752 
42753   # Call helper function which possibly converts this using DOS-style short mode.
42754   # If so, the updated path is stored in $new_path.
42755   new_path="$input_to_shortpath"
42756 
42757   input_path="$input_to_shortpath"
42758   # Check if we need to convert this using DOS-style short mode. If the path
42759   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42760   # take no chances and rewrite it.
42761   # Note: m4 eats our [], so we need to use [ and ] instead.
42762   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42763   if test "x$has_forbidden_chars" != x; then
42764     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42765     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42766     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42767     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42768       # Going to short mode and back again did indeed matter. Since short mode is
42769       # case insensitive, let's make it lowercase to improve readability.
42770       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42771       # Now convert it back to Unix-style (cygpath)
42772       input_path=`$CYGPATH -u "$shortmode_path"`
42773       new_path="$input_path"
42774     fi
42775   fi
42776 
42777   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42778   if test "x$test_cygdrive_prefix" = x; then
42779     # As a simple fix, exclude /usr/bin since it's not a real path.
42780     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42781       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42782       # a path prefixed by /cygdrive for fixpath to work.
42783       new_path="$CYGWIN_ROOT_PATH$input_path"
42784     fi
42785   fi
42786 
42787   # remove trailing .exe if any
42788   new_path="${new_path/%.exe/}"
42789 
42790     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42791 
42792   # First separate the path from the arguments. This will split at the first
42793   # space.
42794   complete="$BUILD_CXX"
42795   path="${complete%% *}"
42796   tmp="$complete EOL"
42797   arguments="${tmp#* }"
42798 
42799   # Input might be given as Windows format, start by converting to
42800   # unix format.
42801   new_path="$path"
42802 
42803   windows_path="$new_path"
42804   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42805     unix_path=`$CYGPATH -u "$windows_path"`
42806     new_path="$unix_path"
42807   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42808     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42809     new_path="$unix_path"
42810   fi
42811 
42812 
42813   # Now try to locate executable using which
42814   new_path=`$WHICH "$new_path" 2> /dev/null`
42815 
42816   if test "x$new_path" = x; then
42817     # Oops. Which didn't find the executable.
42818     # The splitting of arguments from the executable at a space might have been incorrect,
42819     # since paths with space are more likely in Windows. Give it another try with the whole
42820     # argument.
42821     path="$complete"
42822     arguments="EOL"
42823     new_path="$path"
42824 
42825   windows_path="$new_path"
42826   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42827     unix_path=`$CYGPATH -u "$windows_path"`
42828     new_path="$unix_path"
42829   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42830     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42831     new_path="$unix_path"
42832   fi
42833 
42834 
42835     new_path=`$WHICH "$new_path" 2> /dev/null`
42836     # bat and cmd files are not always considered executable in MSYS causing which
42837     # to not find them
42838     if test "x$new_path" = x \
42839         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42840         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42841       new_path="$path"
42842 
42843   windows_path="$new_path"
42844   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42845     unix_path=`$CYGPATH -u "$windows_path"`
42846     new_path="$unix_path"
42847   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42848     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42849     new_path="$unix_path"
42850   fi
42851 
42852     fi
42853 
42854     if test "x$new_path" = x; then
42855       # It's still not found. Now this is an unrecoverable error.
42856       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
42857 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
42858       has_space=`$ECHO "$complete" | $GREP " "`
42859       if test "x$has_space" != x; then
42860         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42861 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42862       fi
42863       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
42864     fi
42865   fi
42866 
42867   # Now new_path has a complete unix path to the binary
42868   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42869     # Keep paths in /bin as-is, but remove trailing .exe if any
42870     new_path="${new_path/%.exe/}"
42871     # Do not save /bin paths to all_fixpath_prefixes!
42872   else
42873     # Not in mixed or Windows style, start by that.
42874     new_path=`cmd //c echo $new_path`
42875 
42876   input_path="$new_path"
42877   # Check if we need to convert this using DOS-style short mode. If the path
42878   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42879   # take no chances and rewrite it.
42880   # Note: m4 eats our [], so we need to use [ and ] instead.
42881   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42882   if test "x$has_forbidden_chars" != x; then
42883     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42884     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42885   fi
42886 
42887     # Output is in $new_path
42888 
42889   windows_path="$new_path"
42890   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42891     unix_path=`$CYGPATH -u "$windows_path"`
42892     new_path="$unix_path"
42893   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42894     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42895     new_path="$unix_path"
42896   fi
42897 
42898     # remove trailing .exe if any
42899     new_path="${new_path/%.exe/}"
42900 
42901     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42902     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42903   fi
42904 
42905     else
42906       # We're on a unix platform. Hooray! :)
42907       # First separate the path from the arguments. This will split at the first
42908       # space.
42909       complete="$BUILD_CXX"
42910       path="${complete%% *}"
42911       tmp="$complete EOL"
42912       arguments="${tmp#* }"
42913 
42914       # Cannot rely on the command "which" here since it doesn't always work.
42915       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42916       if test -z "$is_absolute_path"; then
42917         # Path to executable is not absolute. Find it.
42918         IFS_save="$IFS"
42919         IFS=:
42920         for p in $PATH; do
42921           if test -f "$p/$path" && test -x "$p/$path"; then
42922             new_path="$p/$path"
42923             break
42924           fi
42925         done
42926         IFS="$IFS_save"
42927       else
42928         # This is an absolute path, we can use it without further modifications.
42929         new_path="$path"
42930       fi
42931 
42932       if test "x$new_path" = x; then
42933         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
42934 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
42935         has_space=`$ECHO "$complete" | $GREP " "`
42936         if test "x$has_space" != x; then
42937           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42938 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42939         fi
42940         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
42941       fi
42942     fi
42943 
42944     # Now join together the path and the arguments once again
42945     if test "x$arguments" != xEOL; then
42946       new_complete="$new_path ${arguments% *}"
42947     else
42948       new_complete="$new_path"
42949     fi
42950 
42951     if test "x$complete" != "x$new_complete"; then
42952       BUILD_CXX="$new_complete"
42953       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
42954 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
42955     fi
42956   fi
42957 
42958     BUILD_LD="$BUILD_CC"
42959 
42960     PATH="$OLDPATH"
42961   else
42962     # If we are not cross compiling, use the normal target compilers for
42963     # building the build platform executables.
42964     BUILD_CC="$CC"
42965     BUILD_CXX="$CXX"
42966     BUILD_LD="$LD"
42967     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
42968     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
42969   fi
42970 
42971 
42972 
42973 
42974 
42975 
42976 
42977 
42978   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42979     # For hotspot, we need these in Windows mixed path,
42980     # so rewrite them all. Need added .exe suffix.
42981     HOTSPOT_CXX="$CXX.exe"
42982     HOTSPOT_LD="$LD.exe"
42983     HOTSPOT_MT="$MT.exe"
42984     HOTSPOT_RC="$RC.exe"
42985 
42986   unix_path="$HOTSPOT_CXX"
42987   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42988     windows_path=`$CYGPATH -m "$unix_path"`
42989     HOTSPOT_CXX="$windows_path"
42990   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42991     windows_path=`cmd //c echo $unix_path`
42992     HOTSPOT_CXX="$windows_path"
42993   fi
42994 
42995 
42996   unix_path="$HOTSPOT_LD"
42997   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42998     windows_path=`$CYGPATH -m "$unix_path"`
42999     HOTSPOT_LD="$windows_path"
43000   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43001     windows_path=`cmd //c echo $unix_path`
43002     HOTSPOT_LD="$windows_path"
43003   fi
43004 
43005 
43006   unix_path="$HOTSPOT_MT"
43007   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43008     windows_path=`$CYGPATH -m "$unix_path"`
43009     HOTSPOT_MT="$windows_path"
43010   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43011     windows_path=`cmd //c echo $unix_path`
43012     HOTSPOT_MT="$windows_path"
43013   fi
43014 
43015 
43016   unix_path="$HOTSPOT_RC"
43017   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43018     windows_path=`$CYGPATH -m "$unix_path"`
43019     HOTSPOT_RC="$windows_path"
43020   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43021     windows_path=`cmd //c echo $unix_path`
43022     HOTSPOT_RC="$windows_path"
43023   fi
43024 
43025 
43026 
43027   else
43028     HOTSPOT_CXX="$CXX"
43029     HOTSPOT_LD="$LD"
43030   fi
43031 
43032 
43033 
43034   if test  "x$TOOLCHAIN_TYPE" = xclang; then
43035     USE_CLANG=true
43036   fi
43037 
43038 
43039 
43040 
43041 
43042   # The package path is used only on macosx?
43043   # FIXME: clean this up, and/or move it elsewhere.
43044   PACKAGE_PATH=/opt/local
43045 
43046 
43047   # Check for extra potential brokenness.
43048   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43049     # On Windows, double-check that we got the right compiler.
43050     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
43051     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
43052     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
43053       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
43054         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
43055       fi
43056     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
43057       if test "x$COMPILER_CPU_TEST" != "xx64"; then
43058         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
43059       fi
43060     fi
43061   fi
43062 
43063   if test "x$TOOLCHAIN_TYPE" = xgcc; then
43064     # If this is a --hash-style=gnu system, use --hash-style=both, why?
43065     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
43066     # This is later checked when setting flags.
43067 
43068     # "-Og" suppported for GCC 4.8 and later
43069     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
43070 
43071   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
43072 $as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
43073   supports=yes
43074 
43075   saved_cflags="$CFLAGS"
43076   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
43077   ac_ext=c
43078 ac_cpp='$CPP $CPPFLAGS'
43079 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43080 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43081 ac_compiler_gnu=$ac_cv_c_compiler_gnu
43082 
43083   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43084 /* end confdefs.h.  */
43085 int i;
43086 _ACEOF
43087 if ac_fn_c_try_compile "$LINENO"; then :
43088 
43089 else
43090   supports=no
43091 fi
43092 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43093   ac_ext=cpp
43094 ac_cpp='$CXXCPP $CPPFLAGS'
43095 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43096 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43097 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43098 
43099   CFLAGS="$saved_cflags"
43100 
43101   saved_cxxflags="$CXXFLAGS"
43102   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
43103   ac_ext=cpp
43104 ac_cpp='$CXXCPP $CPPFLAGS'
43105 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43106 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43107 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43108 
43109   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43110 /* end confdefs.h.  */
43111 int i;
43112 _ACEOF
43113 if ac_fn_cxx_try_compile "$LINENO"; then :
43114 
43115 else
43116   supports=no
43117 fi
43118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43119   ac_ext=cpp
43120 ac_cpp='$CXXCPP $CPPFLAGS'
43121 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43122 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43123 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43124 
43125   CXXFLAGS="$saved_cxxflags"
43126 
43127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43128 $as_echo "$supports" >&6; }
43129   if test "x$supports" = "xyes" ; then
43130     HAS_CFLAG_OPTIMIZE_DEBUG=true
43131   else
43132     HAS_CFLAG_OPTIMIZE_DEBUG=false
43133   fi
43134 
43135 
43136     # "-z relro" supported in GNU binutils 2.17 and later
43137     LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
43138 
43139   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
43140 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
43141   supports=yes
43142 
43143   saved_ldflags="$LDFLAGS"
43144   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
43145   ac_ext=c
43146 ac_cpp='$CPP $CPPFLAGS'
43147 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43148 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43149 ac_compiler_gnu=$ac_cv_c_compiler_gnu
43150 
43151   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43152 /* end confdefs.h.  */
43153 
43154 int
43155 main ()
43156 {
43157 
43158   ;
43159   return 0;
43160 }
43161 _ACEOF
43162 if ac_fn_c_try_link "$LINENO"; then :
43163 
43164 else
43165   supports=no
43166 fi
43167 rm -f core conftest.err conftest.$ac_objext \
43168     conftest$ac_exeext conftest.$ac_ext
43169   ac_ext=cpp
43170 ac_cpp='$CXXCPP $CPPFLAGS'
43171 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43172 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43173 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43174 
43175   LDFLAGS="$saved_ldflags"
43176 
43177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43178 $as_echo "$supports" >&6; }
43179   if test "x$supports" = "xyes" ; then
43180     HAS_LINKER_RELRO=true
43181   else
43182     HAS_LINKER_RELRO=false
43183   fi
43184 
43185 
43186     # "-z now" supported in GNU binutils 2.11 and later
43187     LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
43188 
43189   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
43190 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
43191   supports=yes
43192 
43193   saved_ldflags="$LDFLAGS"
43194   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
43195   ac_ext=c
43196 ac_cpp='$CPP $CPPFLAGS'
43197 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43198 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43199 ac_compiler_gnu=$ac_cv_c_compiler_gnu
43200 
43201   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43202 /* end confdefs.h.  */
43203 
43204 int
43205 main ()
43206 {
43207 
43208   ;
43209   return 0;
43210 }
43211 _ACEOF
43212 if ac_fn_c_try_link "$LINENO"; then :
43213 
43214 else
43215   supports=no
43216 fi
43217 rm -f core conftest.err conftest.$ac_objext \
43218     conftest$ac_exeext conftest.$ac_ext
43219   ac_ext=cpp
43220 ac_cpp='$CXXCPP $CPPFLAGS'
43221 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43222 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43223 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43224 
43225   LDFLAGS="$saved_ldflags"
43226 
43227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43228 $as_echo "$supports" >&6; }
43229   if test "x$supports" = "xyes" ; then
43230     HAS_LINKER_NOW=true
43231   else
43232     HAS_LINKER_NOW=false
43233   fi
43234 
43235   fi
43236 
43237   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
43238   # in executable.'
43239   USING_BROKEN_SUSE_LD=no
43240   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
43241     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
43242 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
43243     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
43244     $ECHO "int main() { }" > main.c
43245     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
43246       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43247 $as_echo "no" >&6; }
43248       USING_BROKEN_SUSE_LD=no
43249     else
43250       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43251 $as_echo "yes" >&6; }
43252       USING_BROKEN_SUSE_LD=yes
43253     fi
43254     rm -rf version-script.map main.c a.out
43255   fi
43256 
43257 
43258 
43259 # Setup the JTReg Regression Test Harness.
43260 
43261 
43262 # Check whether --with-jtreg was given.
43263 if test "${with_jtreg+set}" = set; then :
43264   withval=$with_jtreg;
43265 else
43266   with_jtreg=no
43267 fi
43268 
43269 
43270   if test "x$with_jtreg" = xno; then
43271     # jtreg disabled
43272     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
43273 $as_echo_n "checking for jtreg... " >&6; }
43274     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43275 $as_echo "no" >&6; }
43276   else
43277     if test "x$with_jtreg" != xyes; then
43278       # with path specified.
43279       JT_HOME="$with_jtreg"
43280     fi
43281 
43282     if test "x$JT_HOME" != x; then
43283       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
43284 $as_echo_n "checking for jtreg... " >&6; }
43285 
43286       # use JT_HOME enviroment var.
43287 
43288   # Only process if variable expands to non-empty
43289 
43290   if test "x$JT_HOME" != x; then
43291     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43292 
43293   # Input might be given as Windows format, start by converting to
43294   # unix format.
43295   path="$JT_HOME"
43296   new_path=`$CYGPATH -u "$path"`
43297 
43298   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43299   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43300   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43301   # "foo.exe" is OK but "foo" is an error.
43302   #
43303   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43304   # It is also a way to make sure we got the proper file name for the real test later on.
43305   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43306   if test "x$test_shortpath" = x; then
43307     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
43308 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
43309     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
43310   fi
43311 
43312   # Call helper function which possibly converts this using DOS-style short mode.
43313   # If so, the updated path is stored in $new_path.
43314 
43315   input_path="$new_path"
43316   # Check if we need to convert this using DOS-style short mode. If the path
43317   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43318   # take no chances and rewrite it.
43319   # Note: m4 eats our [], so we need to use [ and ] instead.
43320   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43321   if test "x$has_forbidden_chars" != x; then
43322     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43323     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43324     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43325     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43326       # Going to short mode and back again did indeed matter. Since short mode is
43327       # case insensitive, let's make it lowercase to improve readability.
43328       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43329       # Now convert it back to Unix-style (cygpath)
43330       input_path=`$CYGPATH -u "$shortmode_path"`
43331       new_path="$input_path"
43332     fi
43333   fi
43334 
43335   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43336   if test "x$test_cygdrive_prefix" = x; then
43337     # As a simple fix, exclude /usr/bin since it's not a real path.
43338     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43339       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43340       # a path prefixed by /cygdrive for fixpath to work.
43341       new_path="$CYGWIN_ROOT_PATH$input_path"
43342     fi
43343   fi
43344 
43345 
43346   if test "x$path" != "x$new_path"; then
43347     JT_HOME="$new_path"
43348     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
43349 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
43350   fi
43351 
43352     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43353 
43354   path="$JT_HOME"
43355   has_colon=`$ECHO $path | $GREP ^.:`
43356   new_path="$path"
43357   if test "x$has_colon" = x; then
43358     # Not in mixed or Windows style, start by that.
43359     new_path=`cmd //c echo $path`
43360   fi
43361 
43362 
43363   input_path="$new_path"
43364   # Check if we need to convert this using DOS-style short mode. If the path
43365   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43366   # take no chances and rewrite it.
43367   # Note: m4 eats our [], so we need to use [ and ] instead.
43368   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43369   if test "x$has_forbidden_chars" != x; then
43370     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43371     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43372   fi
43373 
43374 
43375   windows_path="$new_path"
43376   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43377     unix_path=`$CYGPATH -u "$windows_path"`
43378     new_path="$unix_path"
43379   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43380     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43381     new_path="$unix_path"
43382   fi
43383 
43384   if test "x$path" != "x$new_path"; then
43385     JT_HOME="$new_path"
43386     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
43387 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
43388   fi
43389 
43390   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43391   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43392 
43393     else
43394       # We're on a unix platform. Hooray! :)
43395       path="$JT_HOME"
43396       has_space=`$ECHO "$path" | $GREP " "`
43397       if test "x$has_space" != x; then
43398         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
43399 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
43400         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43401       fi
43402 
43403       # Use eval to expand a potential ~
43404       eval path="$path"
43405       if test ! -f "$path" && test ! -d "$path"; then
43406         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
43407       fi
43408 
43409       JT_HOME="`cd "$path"; $THEPWDCMD -L`"
43410     fi
43411   fi
43412 
43413 
43414       # jtreg win32 script works for everybody
43415       JTREGEXE="$JT_HOME/bin/jtreg"
43416 
43417       if test ! -f "$JTREGEXE"; then
43418         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
43419       fi
43420 
43421       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43422 $as_echo "$JTREGEXE" >&6; }
43423     else
43424       # try to find jtreg on path
43425 
43426 
43427 
43428   # Publish this variable in the help.
43429 
43430 
43431   if [ -z "${JTREGEXE+x}" ]; then
43432     # The variable is not set by user, try to locate tool using the code snippet
43433     for ac_prog in jtreg
43434 do
43435   # Extract the first word of "$ac_prog", so it can be a program name with args.
43436 set dummy $ac_prog; ac_word=$2
43437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43438 $as_echo_n "checking for $ac_word... " >&6; }
43439 if ${ac_cv_path_JTREGEXE+:} false; then :
43440   $as_echo_n "(cached) " >&6
43441 else
43442   case $JTREGEXE in
43443   [\\/]* | ?:[\\/]*)
43444   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43445   ;;
43446   *)
43447   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43448 for as_dir in $PATH
43449 do
43450   IFS=$as_save_IFS
43451   test -z "$as_dir" && as_dir=.
43452     for ac_exec_ext in '' $ac_executable_extensions; do
43453   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43454     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43455     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43456     break 2
43457   fi
43458 done
43459   done
43460 IFS=$as_save_IFS
43461 
43462   ;;
43463 esac
43464 fi
43465 JTREGEXE=$ac_cv_path_JTREGEXE
43466 if test -n "$JTREGEXE"; then
43467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43468 $as_echo "$JTREGEXE" >&6; }
43469 else
43470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43471 $as_echo "no" >&6; }
43472 fi
43473 
43474 
43475   test -n "$JTREGEXE" && break
43476 done
43477 
43478   else
43479     # The variable is set, but is it from the command line or the environment?
43480 
43481     # Try to remove the string !JTREGEXE! from our list.
43482     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
43483     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43484       # If it failed, the variable was not from the command line. Ignore it,
43485       # but warn the user (except for BASH, which is always set by the calling BASH).
43486       if test "xJTREGEXE" != xBASH; then
43487         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
43488 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
43489       fi
43490       # Try to locate tool using the code snippet
43491       for ac_prog in jtreg
43492 do
43493   # Extract the first word of "$ac_prog", so it can be a program name with args.
43494 set dummy $ac_prog; ac_word=$2
43495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43496 $as_echo_n "checking for $ac_word... " >&6; }
43497 if ${ac_cv_path_JTREGEXE+:} false; then :
43498   $as_echo_n "(cached) " >&6
43499 else
43500   case $JTREGEXE in
43501   [\\/]* | ?:[\\/]*)
43502   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43503   ;;
43504   *)
43505   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43506 for as_dir in $PATH
43507 do
43508   IFS=$as_save_IFS
43509   test -z "$as_dir" && as_dir=.
43510     for ac_exec_ext in '' $ac_executable_extensions; do
43511   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43512     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43513     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43514     break 2
43515   fi
43516 done
43517   done
43518 IFS=$as_save_IFS
43519 
43520   ;;
43521 esac
43522 fi
43523 JTREGEXE=$ac_cv_path_JTREGEXE
43524 if test -n "$JTREGEXE"; then
43525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43526 $as_echo "$JTREGEXE" >&6; }
43527 else
43528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43529 $as_echo "no" >&6; }
43530 fi
43531 
43532 
43533   test -n "$JTREGEXE" && break
43534 done
43535 
43536     else
43537       # If it succeeded, then it was overridden by the user. We will use it
43538       # for the tool.
43539 
43540       # First remove it from the list of overridden variables, so we can test
43541       # for unknown variables in the end.
43542       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43543 
43544       # Check if we try to supply an empty value
43545       if test "x$JTREGEXE" = x; then
43546         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
43547 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
43548         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
43549 $as_echo_n "checking for JTREGEXE... " >&6; }
43550         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43551 $as_echo "disabled" >&6; }
43552       else
43553         # Check if the provided tool contains a complete path.
43554         tool_specified="$JTREGEXE"
43555         tool_basename="${tool_specified##*/}"
43556         if test "x$tool_basename" = "x$tool_specified"; then
43557           # A command without a complete path is provided, search $PATH.
43558           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
43559 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
43560           # Extract the first word of "$tool_basename", so it can be a program name with args.
43561 set dummy $tool_basename; ac_word=$2
43562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43563 $as_echo_n "checking for $ac_word... " >&6; }
43564 if ${ac_cv_path_JTREGEXE+:} false; then :
43565   $as_echo_n "(cached) " >&6
43566 else
43567   case $JTREGEXE in
43568   [\\/]* | ?:[\\/]*)
43569   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43570   ;;
43571   *)
43572   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43573 for as_dir in $PATH
43574 do
43575   IFS=$as_save_IFS
43576   test -z "$as_dir" && as_dir=.
43577     for ac_exec_ext in '' $ac_executable_extensions; do
43578   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43579     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43580     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43581     break 2
43582   fi
43583 done
43584   done
43585 IFS=$as_save_IFS
43586 
43587   ;;
43588 esac
43589 fi
43590 JTREGEXE=$ac_cv_path_JTREGEXE
43591 if test -n "$JTREGEXE"; then
43592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43593 $as_echo "$JTREGEXE" >&6; }
43594 else
43595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43596 $as_echo "no" >&6; }
43597 fi
43598 
43599 
43600           if test "x$JTREGEXE" = x; then
43601             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43602           fi
43603         else
43604           # Otherwise we believe it is a complete path. Use it as it is.
43605           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
43606 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
43607           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
43608 $as_echo_n "checking for JTREGEXE... " >&6; }
43609           if test ! -x "$tool_specified"; then
43610             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43611 $as_echo "not found" >&6; }
43612             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
43613           fi
43614           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43615 $as_echo "$tool_specified" >&6; }
43616         fi
43617       fi
43618     fi
43619 
43620   fi
43621 
43622 
43623 
43624   if test "x$JTREGEXE" = x; then
43625     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
43626   fi
43627 
43628 
43629       JT_HOME="`$DIRNAME $JTREGEXE`"
43630     fi
43631   fi
43632 
43633 
43634 
43635 
43636 
43637 
43638   # Option used to tell the compiler whether to create 32- or 64-bit executables
43639   if test "x$TOOLCHAIN_TYPE" = xxlc; then
43640     COMPILER_TARGET_BITS_FLAG="-q"
43641   else
43642     COMPILER_TARGET_BITS_FLAG="-m"
43643   fi
43644 
43645 
43646   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
43647   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43648     ARFLAGS="-r"
43649   elif test "x$OPENJDK_TARGET_OS" = xaix; then
43650     ARFLAGS="-X64"
43651   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
43652     # lib.exe is used as AR to create static libraries.
43653     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
43654   else
43655     ARFLAGS=""
43656   fi
43657 
43658 
43659   ## Setup strip.
43660   # FIXME: should this really be per platform, or should it be per toolchain type?
43661   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
43662   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
43663   if test "x$OPENJDK_TARGET_OS" = xlinux; then
43664     STRIPFLAGS="-g"
43665   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
43666     STRIPFLAGS="-x"
43667   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
43668     STRIPFLAGS="-S"
43669   elif test "x$OPENJDK_TARGET_OS" = xaix; then
43670     STRIPFLAGS="-X32_64"
43671   fi
43672 
43673 
43674 
43675   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43676     CC_OUT_OPTION=-Fo
43677     EXE_OUT_OPTION=-out:
43678     LD_OUT_OPTION=-out:
43679     AR_OUT_OPTION=-out:
43680   else
43681     # The option used to specify the target .o,.a or .so file.
43682     # When compiling, how to specify the to be created object file.
43683     CC_OUT_OPTION='-o$(SPACE)'
43684     # When linking, how to specify the to be created executable.
43685     EXE_OUT_OPTION='-o$(SPACE)'
43686     # When linking, how to specify the to be created dynamically linkable library.
43687     LD_OUT_OPTION='-o$(SPACE)'
43688     # When archiving, how to specify the to be create static archive for object files.
43689     AR_OUT_OPTION='rcs$(SPACE)'
43690   fi
43691 
43692 
43693 
43694 
43695 
43696   # On Windows, we need to set RC flags.
43697   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43698     RC_FLAGS="-nologo -l0x409"
43699     if test "x$VARIANT" = xOPT; then
43700       RC_FLAGS="$RC_FLAGS -DNDEBUG"
43701     fi
43702 
43703     # The version variables used to create RC_FLAGS may be overridden
43704     # in a custom configure script, or possibly the command line.
43705     # Let those variables be expanded at make time in spec.gmk.
43706     # The \$ are escaped to the shell, and the $(...) variables
43707     # are evaluated by make.
43708     RC_FLAGS="$RC_FLAGS \
43709         -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
43710         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
43711         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
43712         -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
43713         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
43714         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
43715         -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
43716   fi
43717 
43718 
43719   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43720     # silence copyright notice and other headers.
43721     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
43722   fi
43723 
43724 
43725 # FIXME: Currently we must test this after toolchain but before flags. Fix!
43726 
43727 # Now we can test some aspects on the target using configure macros.
43728 
43729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
43730 $as_echo_n "checking for ANSI C header files... " >&6; }
43731 if ${ac_cv_header_stdc+:} false; then :
43732   $as_echo_n "(cached) " >&6
43733 else
43734   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43735 /* end confdefs.h.  */
43736 #include <stdlib.h>
43737 #include <stdarg.h>
43738 #include <string.h>
43739 #include <float.h>
43740 
43741 int
43742 main ()
43743 {
43744 
43745   ;
43746   return 0;
43747 }
43748 _ACEOF
43749 if ac_fn_cxx_try_compile "$LINENO"; then :
43750   ac_cv_header_stdc=yes
43751 else
43752   ac_cv_header_stdc=no
43753 fi
43754 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43755 
43756 if test $ac_cv_header_stdc = yes; then
43757   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
43758   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43759 /* end confdefs.h.  */
43760 #include <string.h>
43761 
43762 _ACEOF
43763 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43764   $EGREP "memchr" >/dev/null 2>&1; then :
43765 
43766 else
43767   ac_cv_header_stdc=no
43768 fi
43769 rm -f conftest*
43770 
43771 fi
43772 
43773 if test $ac_cv_header_stdc = yes; then
43774   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
43775   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43776 /* end confdefs.h.  */
43777 #include <stdlib.h>
43778 
43779 _ACEOF
43780 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43781   $EGREP "free" >/dev/null 2>&1; then :
43782 
43783 else
43784   ac_cv_header_stdc=no
43785 fi
43786 rm -f conftest*
43787 
43788 fi
43789 
43790 if test $ac_cv_header_stdc = yes; then
43791   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
43792   if test "$cross_compiling" = yes; then :
43793   :
43794 else
43795   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43796 /* end confdefs.h.  */
43797 #include <ctype.h>
43798 #include <stdlib.h>
43799 #if ((' ' & 0x0FF) == 0x020)
43800 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
43801 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
43802 #else
43803 # define ISLOWER(c) \
43804                    (('a' <= (c) && (c) <= 'i') \
43805                      || ('j' <= (c) && (c) <= 'r') \
43806                      || ('s' <= (c) && (c) <= 'z'))
43807 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
43808 #endif
43809 
43810 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
43811 int
43812 main ()
43813 {
43814   int i;
43815   for (i = 0; i < 256; i++)
43816     if (XOR (islower (i), ISLOWER (i))
43817         || toupper (i) != TOUPPER (i))
43818       return 2;
43819   return 0;
43820 }
43821 _ACEOF
43822 if ac_fn_cxx_try_run "$LINENO"; then :
43823 
43824 else
43825   ac_cv_header_stdc=no
43826 fi
43827 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43828   conftest.$ac_objext conftest.beam conftest.$ac_ext
43829 fi
43830 
43831 fi
43832 fi
43833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
43834 $as_echo "$ac_cv_header_stdc" >&6; }
43835 if test $ac_cv_header_stdc = yes; then
43836 
43837 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
43838 
43839 fi
43840 
43841 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
43842 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
43843                   inttypes.h stdint.h unistd.h
43844 do :
43845   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43846 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
43847 "
43848 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43849   cat >>confdefs.h <<_ACEOF
43850 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43851 _ACEOF
43852 
43853 fi
43854 
43855 done
43856 
43857 
43858 
43859   ###############################################################################
43860   #
43861   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
43862   # (The JVM can use 32 or 64 bit Java pointers but that decision
43863   # is made at runtime.)
43864   #
43865 
43866   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
43867     # Always specify -m flag on Solaris
43868     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
43869 
43870   # When we add flags to the "official" CFLAGS etc, we need to
43871   # keep track of these additions in ADDED_CFLAGS etc. These
43872   # will later be checked to make sure only controlled additions
43873   # have been made to CFLAGS etc.
43874   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43875   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43876   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43877 
43878   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
43879   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
43880   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
43881 
43882   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
43883   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
43884   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
43885 
43886   elif test "x$COMPILE_TYPE" = xreduced; then
43887     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
43888       # Specify -m if running reduced on unix platforms
43889 
43890   # When we add flags to the "official" CFLAGS etc, we need to
43891   # keep track of these additions in ADDED_CFLAGS etc. These
43892   # will later be checked to make sure only controlled additions
43893   # have been made to CFLAGS etc.
43894   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43895   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43896   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43897 
43898   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
43899   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
43900   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
43901 
43902   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
43903   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
43904   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
43905 
43906     fi
43907   fi
43908 
43909   # Make compilation sanity check
43910   for ac_header in stdio.h
43911 do :
43912   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
43913 if test "x$ac_cv_header_stdio_h" = xyes; then :
43914   cat >>confdefs.h <<_ACEOF
43915 #define HAVE_STDIO_H 1
43916 _ACEOF
43917 
43918 else
43919 
43920     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
43921 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
43922     if test "x$COMPILE_TYPE" = xreduced; then
43923 
43924   # Print a helpful message on how to acquire the necessary build dependency.
43925   # reduced is the help tag: freetype, cups, alsa etc
43926   MISSING_DEPENDENCY=reduced
43927 
43928   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43929     cygwin_help $MISSING_DEPENDENCY
43930   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43931     msys_help $MISSING_DEPENDENCY
43932   else
43933     PKGHANDLER_COMMAND=
43934 
43935     case $PKGHANDLER in
43936       apt-get)
43937         apt_help     $MISSING_DEPENDENCY ;;
43938       yum)
43939         yum_help     $MISSING_DEPENDENCY ;;
43940       port)
43941         port_help    $MISSING_DEPENDENCY ;;
43942       pkgutil)
43943         pkgutil_help $MISSING_DEPENDENCY ;;
43944       pkgadd)
43945         pkgadd_help  $MISSING_DEPENDENCY ;;
43946     esac
43947 
43948     if test "x$PKGHANDLER_COMMAND" != x; then
43949       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43950     fi
43951   fi
43952 
43953       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
43954 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
43955     elif test "x$COMPILE_TYPE" = xcross; then
43956       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
43957 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
43958     fi
43959     as_fn_error $? "Cannot continue." "$LINENO" 5
43960 
43961 fi
43962 
43963 done
43964 
43965 
43966   # The cast to long int works around a bug in the HP C Compiler
43967 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
43968 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
43969 # This bug is HP SR number 8606223364.
43970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
43971 $as_echo_n "checking size of int *... " >&6; }
43972 if ${ac_cv_sizeof_int_p+:} false; then :
43973   $as_echo_n "(cached) " >&6
43974 else
43975   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
43976 
43977 else
43978   if test "$ac_cv_type_int_p" = yes; then
43979      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
43980 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
43981 as_fn_error 77 "cannot compute sizeof (int *)
43982 See \`config.log' for more details" "$LINENO" 5; }
43983    else
43984      ac_cv_sizeof_int_p=0
43985    fi
43986 fi
43987 
43988 fi
43989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
43990 $as_echo "$ac_cv_sizeof_int_p" >&6; }
43991 
43992 
43993 
43994 cat >>confdefs.h <<_ACEOF
43995 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
43996 _ACEOF
43997 
43998 
43999 
44000   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
44001   if test "x$ac_cv_sizeof_int_p" = x; then
44002     # The test failed, lets stick to the assumed value.
44003     { $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
44004 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
44005   else
44006     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
44007 
44008     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
44009       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
44010       # Let's try to implicitely set the compilers target architecture and retry the test
44011       { $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
44012 $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;}
44013       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
44014 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
44015 
44016   # When we add flags to the "official" CFLAGS etc, we need to
44017   # keep track of these additions in ADDED_CFLAGS etc. These
44018   # will later be checked to make sure only controlled additions
44019   # have been made to CFLAGS etc.
44020   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44021   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44022   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44023 
44024   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
44025   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
44026   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
44027 
44028   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
44029   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
44030   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
44031 
44032 
44033       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
44034       unset ac_cv_sizeof_int_p
44035       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
44036       cat >>confdefs.h <<_ACEOF
44037 #undef SIZEOF_INT_P
44038 _ACEOF
44039 
44040       # The cast to long int works around a bug in the HP C Compiler
44041 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
44042 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
44043 # This bug is HP SR number 8606223364.
44044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
44045 $as_echo_n "checking size of int *... " >&6; }
44046 if ${ac_cv_sizeof_int_p+:} false; then :
44047   $as_echo_n "(cached) " >&6
44048 else
44049   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
44050 
44051 else
44052   if test "$ac_cv_type_int_p" = yes; then
44053      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
44054 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
44055 as_fn_error 77 "cannot compute sizeof (int *)
44056 See \`config.log' for more details" "$LINENO" 5; }
44057    else
44058      ac_cv_sizeof_int_p=0
44059    fi
44060 fi
44061 
44062 fi
44063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
44064 $as_echo "$ac_cv_sizeof_int_p" >&6; }
44065 
44066 
44067 
44068 cat >>confdefs.h <<_ACEOF
44069 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
44070 _ACEOF
44071 
44072 
44073 
44074       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
44075 
44076       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
44077         { $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
44078 $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;}
44079         if test "x$COMPILE_TYPE" = xreduced; then
44080 
44081   # Print a helpful message on how to acquire the necessary build dependency.
44082   # reduced is the help tag: freetype, cups, alsa etc
44083   MISSING_DEPENDENCY=reduced
44084 
44085   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44086     cygwin_help $MISSING_DEPENDENCY
44087   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44088     msys_help $MISSING_DEPENDENCY
44089   else
44090     PKGHANDLER_COMMAND=
44091 
44092     case $PKGHANDLER in
44093       apt-get)
44094         apt_help     $MISSING_DEPENDENCY ;;
44095       yum)
44096         yum_help     $MISSING_DEPENDENCY ;;
44097       port)
44098         port_help    $MISSING_DEPENDENCY ;;
44099       pkgutil)
44100         pkgutil_help $MISSING_DEPENDENCY ;;
44101       pkgadd)
44102         pkgadd_help  $MISSING_DEPENDENCY ;;
44103     esac
44104 
44105     if test "x$PKGHANDLER_COMMAND" != x; then
44106       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44107     fi
44108   fi
44109 
44110           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
44111 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
44112         elif test "x$COMPILE_TYPE" = xcross; then
44113           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
44114 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
44115         fi
44116         as_fn_error $? "Cannot continue." "$LINENO" 5
44117       fi
44118     fi
44119   fi
44120 
44121   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
44122 $as_echo_n "checking for target address size... " >&6; }
44123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
44124 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
44125 
44126 
44127   ###############################################################################
44128   #
44129   # Is the target little of big endian?
44130   #
44131    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
44132 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
44133 if ${ac_cv_c_bigendian+:} false; then :
44134   $as_echo_n "(cached) " >&6
44135 else
44136   ac_cv_c_bigendian=unknown
44137     # See if we're dealing with a universal compiler.
44138     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44139 /* end confdefs.h.  */
44140 #ifndef __APPLE_CC__
44141                not a universal capable compiler
44142              #endif
44143              typedef int dummy;
44144 
44145 _ACEOF
44146 if ac_fn_cxx_try_compile "$LINENO"; then :
44147 
44148         # Check for potential -arch flags.  It is not universal unless
44149         # there are at least two -arch flags with different values.
44150         ac_arch=
44151         ac_prev=
44152         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
44153          if test -n "$ac_prev"; then
44154            case $ac_word in
44155              i?86 | x86_64 | ppc | ppc64)
44156                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
44157                  ac_arch=$ac_word
44158                else
44159                  ac_cv_c_bigendian=universal
44160                  break
44161                fi
44162                ;;
44163            esac
44164            ac_prev=
44165          elif test "x$ac_word" = "x-arch"; then
44166            ac_prev=arch
44167          fi
44168        done
44169 fi
44170 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44171     if test $ac_cv_c_bigendian = unknown; then
44172       # See if sys/param.h defines the BYTE_ORDER macro.
44173       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44174 /* end confdefs.h.  */
44175 #include <sys/types.h>
44176              #include <sys/param.h>
44177 
44178 int
44179 main ()
44180 {
44181 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
44182                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
44183                      && LITTLE_ENDIAN)
44184               bogus endian macros
44185              #endif
44186 
44187   ;
44188   return 0;
44189 }
44190 _ACEOF
44191 if ac_fn_cxx_try_compile "$LINENO"; then :
44192   # It does; now see whether it defined to BIG_ENDIAN or not.
44193          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44194 /* end confdefs.h.  */
44195 #include <sys/types.h>
44196                 #include <sys/param.h>
44197 
44198 int
44199 main ()
44200 {
44201 #if BYTE_ORDER != BIG_ENDIAN
44202                  not big endian
44203                 #endif
44204 
44205   ;
44206   return 0;
44207 }
44208 _ACEOF
44209 if ac_fn_cxx_try_compile "$LINENO"; then :
44210   ac_cv_c_bigendian=yes
44211 else
44212   ac_cv_c_bigendian=no
44213 fi
44214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44215 fi
44216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44217     fi
44218     if test $ac_cv_c_bigendian = unknown; then
44219       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
44220       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44221 /* end confdefs.h.  */
44222 #include <limits.h>
44223 
44224 int
44225 main ()
44226 {
44227 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
44228               bogus endian macros
44229              #endif
44230 
44231   ;
44232   return 0;
44233 }
44234 _ACEOF
44235 if ac_fn_cxx_try_compile "$LINENO"; then :
44236   # It does; now see whether it defined to _BIG_ENDIAN or not.
44237          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44238 /* end confdefs.h.  */
44239 #include <limits.h>
44240 
44241 int
44242 main ()
44243 {
44244 #ifndef _BIG_ENDIAN
44245                  not big endian
44246                 #endif
44247 
44248   ;
44249   return 0;
44250 }
44251 _ACEOF
44252 if ac_fn_cxx_try_compile "$LINENO"; then :
44253   ac_cv_c_bigendian=yes
44254 else
44255   ac_cv_c_bigendian=no
44256 fi
44257 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44258 fi
44259 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44260     fi
44261     if test $ac_cv_c_bigendian = unknown; then
44262       # Compile a test program.
44263       if test "$cross_compiling" = yes; then :
44264   # Try to guess by grepping values from an object file.
44265          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44266 /* end confdefs.h.  */
44267 short int ascii_mm[] =
44268                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
44269                 short int ascii_ii[] =
44270                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
44271                 int use_ascii (int i) {
44272                   return ascii_mm[i] + ascii_ii[i];
44273                 }
44274                 short int ebcdic_ii[] =
44275                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
44276                 short int ebcdic_mm[] =
44277                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
44278                 int use_ebcdic (int i) {
44279                   return ebcdic_mm[i] + ebcdic_ii[i];
44280                 }
44281                 extern int foo;
44282 
44283 int
44284 main ()
44285 {
44286 return use_ascii (foo) == use_ebcdic (foo);
44287   ;
44288   return 0;
44289 }
44290 _ACEOF
44291 if ac_fn_cxx_try_compile "$LINENO"; then :
44292   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
44293               ac_cv_c_bigendian=yes
44294             fi
44295             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
44296               if test "$ac_cv_c_bigendian" = unknown; then
44297                 ac_cv_c_bigendian=no
44298               else
44299                 # finding both strings is unlikely to happen, but who knows?
44300                 ac_cv_c_bigendian=unknown
44301               fi
44302             fi
44303 fi
44304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44305 else
44306   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44307 /* end confdefs.h.  */
44308 $ac_includes_default
44309 int
44310 main ()
44311 {
44312 
44313              /* Are we little or big endian?  From Harbison&Steele.  */
44314              union
44315              {
44316                long int l;
44317                char c[sizeof (long int)];
44318              } u;
44319              u.l = 1;
44320              return u.c[sizeof (long int) - 1] == 1;
44321 
44322   ;
44323   return 0;
44324 }
44325 _ACEOF
44326 if ac_fn_cxx_try_run "$LINENO"; then :
44327   ac_cv_c_bigendian=no
44328 else
44329   ac_cv_c_bigendian=yes
44330 fi
44331 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44332   conftest.$ac_objext conftest.beam conftest.$ac_ext
44333 fi
44334 
44335     fi
44336 fi
44337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
44338 $as_echo "$ac_cv_c_bigendian" >&6; }
44339  case $ac_cv_c_bigendian in #(
44340    yes)
44341      ENDIAN="big";; #(
44342    no)
44343      ENDIAN="little" ;; #(
44344    universal)
44345      ENDIAN="universal_endianness"
44346      ;; #(
44347    *)
44348      ENDIAN="unknown" ;;
44349  esac
44350 
44351 
44352   if test "x$ENDIAN" = xuniversal_endianness; then
44353     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
44354   fi
44355   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
44356     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
44357   fi
44358 
44359 
44360 # Configure flags for the tools
44361 
44362   ###############################################################################
44363   #
44364   # How to compile shared libraries.
44365   #
44366 
44367   if test "x$TOOLCHAIN_TYPE" = xgcc; then
44368     PICFLAG="-fPIC"
44369     C_FLAG_REORDER=''
44370     CXX_FLAG_REORDER=''
44371 
44372     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44373       # Linking is different on MacOSX
44374       if test "x$STATIC_BUILD" = xtrue; then
44375         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
44376       else
44377         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
44378       fi
44379       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
44380       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44381       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
44382       SET_SHARED_LIBRARY_MAPFILE=''
44383     else
44384       # Default works for linux, might work on other platforms as well.
44385       SHARED_LIBRARY_FLAGS='-shared'
44386       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
44387       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
44388       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
44389       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
44390     fi
44391   elif test "x$TOOLCHAIN_TYPE" = xclang; then
44392     PICFLAG=''
44393     C_FLAG_REORDER=''
44394     CXX_FLAG_REORDER=''
44395 
44396     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44397       # Linking is different on MacOSX
44398       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
44399       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
44400       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44401       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
44402       SET_SHARED_LIBRARY_MAPFILE=''
44403     else
44404       # Default works for linux, might work on other platforms as well.
44405       SHARED_LIBRARY_FLAGS='-shared'
44406       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
44407       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
44408       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
44409       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
44410     fi
44411   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44412     PICFLAG="-KPIC"
44413     C_FLAG_REORDER='-xF'
44414     CXX_FLAG_REORDER='-xF'
44415     SHARED_LIBRARY_FLAGS="-G"
44416     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
44417     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44418     SET_SHARED_LIBRARY_NAME=''
44419     SET_SHARED_LIBRARY_MAPFILE='-M$1'
44420   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44421     PICFLAG="-qpic=large"
44422     C_FLAG_REORDER=''
44423     CXX_FLAG_REORDER=''
44424     SHARED_LIBRARY_FLAGS="-qmkshrobj"
44425     SET_EXECUTABLE_ORIGIN=""
44426     SET_SHARED_LIBRARY_ORIGIN=''
44427     SET_SHARED_LIBRARY_NAME=''
44428     SET_SHARED_LIBRARY_MAPFILE=''
44429   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44430     PICFLAG=""
44431     C_FLAG_REORDER=''
44432     CXX_FLAG_REORDER=''
44433     SHARED_LIBRARY_FLAGS="-LD"
44434     SET_EXECUTABLE_ORIGIN=''
44435     SET_SHARED_LIBRARY_ORIGIN=''
44436     SET_SHARED_LIBRARY_NAME=''
44437     SET_SHARED_LIBRARY_MAPFILE=''
44438   fi
44439 
44440 
44441 
44442 
44443 
44444 
44445 
44446 
44447   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44448     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
44449     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
44450     CFLAGS_JDKLIB_EXTRA='-xstrconst'
44451   fi
44452   # The (cross) compiler is now configured, we can now test capabilities
44453   # of the target platform.
44454 
44455 
44456 
44457   ###############################################################################
44458   #
44459   # Setup the opt flags for different compilers
44460   # and different operating systems.
44461   #
44462 
44463   # FIXME: this was indirectly the old default, but just inherited.
44464   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44465   #   C_FLAG_DEPS="-MMD -MF"
44466   # fi
44467 
44468   # Generate make dependency files
44469   if test "x$TOOLCHAIN_TYPE" = xgcc; then
44470     C_FLAG_DEPS="-MMD -MF"
44471   elif test "x$TOOLCHAIN_TYPE" = xclang; then
44472     C_FLAG_DEPS="-MMD -MF"
44473   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44474     C_FLAG_DEPS="-xMMD -xMF"
44475   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44476     C_FLAG_DEPS="-qmakedep=gcc -MF"
44477   fi
44478   CXX_FLAG_DEPS="$C_FLAG_DEPS"
44479 
44480 
44481 
44482   # Debug symbols
44483   if test "x$TOOLCHAIN_TYPE" = xgcc; then
44484     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
44485       # reduce from default "-g2" option to save space
44486       CFLAGS_DEBUG_SYMBOLS="-g1"
44487       CXXFLAGS_DEBUG_SYMBOLS="-g1"
44488     else
44489       CFLAGS_DEBUG_SYMBOLS="-g"
44490       CXXFLAGS_DEBUG_SYMBOLS="-g"
44491     fi
44492   elif test "x$TOOLCHAIN_TYPE" = xclang; then
44493     CFLAGS_DEBUG_SYMBOLS="-g"
44494     CXXFLAGS_DEBUG_SYMBOLS="-g"
44495   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44496     CFLAGS_DEBUG_SYMBOLS="-g -xs"
44497     # FIXME: likely a bug, this disables debug symbols rather than enables them
44498     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
44499   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44500     CFLAGS_DEBUG_SYMBOLS="-g"
44501     CXXFLAGS_DEBUG_SYMBOLS="-g"
44502   fi
44503 
44504 
44505 
44506   # bounds, memory and behavior checking options
44507   if test "x$TOOLCHAIN_TYPE" = xgcc; then
44508     case $DEBUG_LEVEL in
44509     release )
44510       # no adjustment
44511       ;;
44512     fastdebug )
44513       # no adjustment
44514       ;;
44515     slowdebug )
44516       # Add runtime stack smashing and undefined behavior checks.
44517       # Not all versions of gcc support -fstack-protector
44518       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
44519 
44520   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
44521 $as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
44522   supports=yes
44523 
44524   saved_cflags="$CFLAGS"
44525   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
44526   ac_ext=c
44527 ac_cpp='$CPP $CPPFLAGS'
44528 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44529 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44530 ac_compiler_gnu=$ac_cv_c_compiler_gnu
44531 
44532   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44533 /* end confdefs.h.  */
44534 int i;
44535 _ACEOF
44536 if ac_fn_c_try_compile "$LINENO"; then :
44537 
44538 else
44539   supports=no
44540 fi
44541 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44542   ac_ext=cpp
44543 ac_cpp='$CXXCPP $CPPFLAGS'
44544 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44545 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44546 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44547 
44548   CFLAGS="$saved_cflags"
44549 
44550   saved_cxxflags="$CXXFLAGS"
44551   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
44552   ac_ext=cpp
44553 ac_cpp='$CXXCPP $CPPFLAGS'
44554 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44555 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44556 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44557 
44558   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44559 /* end confdefs.h.  */
44560 int i;
44561 _ACEOF
44562 if ac_fn_cxx_try_compile "$LINENO"; then :
44563 
44564 else
44565   supports=no
44566 fi
44567 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44568   ac_ext=cpp
44569 ac_cpp='$CXXCPP $CPPFLAGS'
44570 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44571 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44572 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44573 
44574   CXXFLAGS="$saved_cxxflags"
44575 
44576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44577 $as_echo "$supports" >&6; }
44578   if test "x$supports" = "xyes" ; then
44579     :
44580   else
44581     STACK_PROTECTOR_CFLAG=""
44582   fi
44583 
44584 
44585       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
44586       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
44587       ;;
44588     esac
44589   fi
44590 
44591   # Optimization levels
44592   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44593     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
44594 
44595     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
44596       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
44597       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
44598       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
44599       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
44600       C_O_FLAG_DEBUG="-xregs=no%frameptr"
44601       C_O_FLAG_NONE="-xregs=no%frameptr"
44602       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
44603       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
44604       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
44605       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
44606       CXX_O_FLAG_NONE="-xregs=no%frameptr"
44607       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
44608         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
44609         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
44610       fi
44611     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
44612       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
44613       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
44614       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
44615       C_O_FLAG_DEBUG=""
44616       C_O_FLAG_NONE=""
44617       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
44618       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
44619       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
44620       C_O_FLAG_DEBUG=""
44621       CXX_O_FLAG_NONE=""
44622     fi
44623   else
44624     # The remaining toolchains share opt flags between CC and CXX;
44625     # setup for C and duplicate afterwards.
44626     if test "x$TOOLCHAIN_TYPE" = xgcc; then
44627       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44628         # On MacOSX we optimize for size, something
44629         # we should do for all platforms?
44630         C_O_FLAG_HIGHEST="-Os"
44631         C_O_FLAG_HI="-Os"
44632         C_O_FLAG_NORM="-Os"
44633       else
44634         C_O_FLAG_HIGHEST="-O3"
44635         C_O_FLAG_HI="-O3"
44636         C_O_FLAG_NORM="-O2"
44637       fi
44638       C_O_FLAG_DEBUG="-O0"
44639       C_O_FLAG_NONE="-O0"
44640     elif test "x$TOOLCHAIN_TYPE" = xclang; then
44641       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44642         # On MacOSX we optimize for size, something
44643         # we should do for all platforms?
44644         C_O_FLAG_HIGHEST="-Os"
44645         C_O_FLAG_HI="-Os"
44646         C_O_FLAG_NORM="-Os"
44647       else
44648         C_O_FLAG_HIGHEST="-O3"
44649         C_O_FLAG_HI="-O3"
44650         C_O_FLAG_NORM="-O2"
44651       fi
44652       C_O_FLAG_DEBUG="-O0"
44653       C_O_FLAG_NONE="-O0"
44654     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44655       C_O_FLAG_HIGHEST="-O3"
44656       C_O_FLAG_HI="-O3 -qstrict"
44657       C_O_FLAG_NORM="-O2"
44658       C_O_FLAG_DEBUG="-qnoopt"
44659       C_O_FLAG_NONE="-qnoop"
44660     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44661       C_O_FLAG_HIGHEST="-O2"
44662       C_O_FLAG_HI="-O1"
44663       C_O_FLAG_NORM="-O1"
44664       C_O_FLAG_DEBUG="-Od"
44665       C_O_FLAG_NONE="-Od"
44666     fi
44667     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
44668     CXX_O_FLAG_HI="$C_O_FLAG_HI"
44669     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
44670     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
44671     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
44672   fi
44673 
44674   # Adjust optimization flags according to debug level.
44675   case $DEBUG_LEVEL in
44676     release )
44677       # no adjustment
44678       ;;
44679     fastdebug )
44680       # Not quite so much optimization
44681       C_O_FLAG_HI="$C_O_FLAG_NORM"
44682       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
44683       ;;
44684     slowdebug )
44685       # Disable optimization
44686       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
44687       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
44688       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
44689       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
44690       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
44691       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
44692       ;;
44693   esac
44694 
44695 
44696 
44697 
44698 
44699 
44700 
44701 
44702 
44703 
44704 
44705 
44706 
44707   # Special extras...
44708   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44709     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
44710       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
44711       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
44712     fi
44713     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
44714     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
44715   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44716     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
44717     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
44718   fi
44719 
44720   CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
44721   CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
44722   LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
44723 
44724   ###############################################################################
44725   #
44726   # Now setup the CFLAGS and LDFLAGS for the JDK build.
44727   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
44728   #
44729 
44730   # Setup compiler/platform specific flags into
44731   #    CFLAGS_JDK    - C Compiler flags
44732   #    CXXFLAGS_JDK  - C++ Compiler flags
44733   #    COMMON_CCXXFLAGS_JDK - common to C and C++
44734   if test "x$TOOLCHAIN_TYPE" = xgcc; then
44735     if test "x$OPENJDK_TARGET_CPU" = xx86; then
44736       # Force compatibility with i586 on 32 bit intel platforms.
44737       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
44738     fi
44739     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
44740         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
44741     case $OPENJDK_TARGET_CPU_ARCH in
44742       arm )
44743         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
44744         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
44745         ;;
44746       ppc )
44747         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
44748         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
44749         ;;
44750       * )
44751         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
44752         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
44753         ;;
44754     esac
44755   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44756     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
44757     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
44758       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
44759     fi
44760 
44761     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
44762     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
44763   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44764     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
44765     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
44766   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44767     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
44768         -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
44769         -DWIN32_LEAN_AND_MEAN \
44770         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
44771         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
44772         -DWIN32 -DIAL"
44773     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44774       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
44775     else
44776       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
44777     fi
44778     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
44779     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
44780     # studio.
44781     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
44782       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
44783           -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
44784     fi
44785   fi
44786 
44787   ###############################################################################
44788 
44789   # Adjust flags according to debug level.
44790   case $DEBUG_LEVEL in
44791     fastdebug | slowdebug )
44792       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
44793       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
44794       JAVAC_FLAGS="$JAVAC_FLAGS -g"
44795       ;;
44796     release )
44797       ;;
44798     * )
44799       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
44800       ;;
44801   esac
44802 
44803   # Setup LP64
44804   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
44805 
44806   # Set some common defines. These works for all compilers, but assume
44807   # -D is universally accepted.
44808 
44809   # Setup endianness
44810   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
44811     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
44812     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
44813     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
44814     #   Note: -Dmacro         is the same as    #define macro 1
44815     #         -Dmacro=        is the same as    #define macro
44816     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44817       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
44818     else
44819       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
44820     fi
44821   else
44822     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
44823     # are defined in the system?
44824     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44825       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
44826     else
44827       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
44828     fi
44829   fi
44830 
44831   # Setup target OS define. Use OS target name but in upper case.
44832   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
44833   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
44834 
44835   # Setup target CPU
44836   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
44837 
44838   # Setup debug/release defines
44839   if test "x$DEBUG_LEVEL" = xrelease; then
44840     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
44841     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44842       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
44843     fi
44844   else
44845     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
44846   fi
44847 
44848   # Setup release name
44849   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
44850 
44851 
44852   # Set some additional per-OS defines.
44853   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44854     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
44855   elif test "x$OPENJDK_TARGET_OS" = xaix; then
44856     # FIXME: PPC64 should not be here.
44857     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
44858   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
44859     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
44860   fi
44861 
44862   # Additional macosx handling
44863   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44864     # Setting these parameters makes it an error to link to macosx APIs that are
44865     # newer than the given OS version and makes the linked binaries compatible
44866     # even if built on a newer version of the OS.
44867     # The expected format is X.Y.Z
44868     MACOSX_VERSION_MIN=10.7.0
44869 
44870 
44871     # The macro takes the version with no dots, ex: 1070
44872     # Let the flags variables get resolved in make for easier override on make
44873     # command line.
44874     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
44875     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
44876   fi
44877 
44878   # Setup some hard coded includes
44879   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
44880       -I${JDK_TOPDIR}/src/java.base/share/native/include \
44881       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
44882       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
44883       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
44884       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
44885 
44886   # The shared libraries are compiled using the picflag.
44887   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
44888   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
44889 
44890   # Executable flags
44891   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
44892   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
44893 
44894 
44895 
44896 
44897 
44898 
44899   # Flags for compiling test libraries
44900   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
44901   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
44902 
44903   # Flags for compiling test executables
44904   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
44905   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
44906 
44907 
44908 
44909 
44910 
44911 
44912   # Setup LDFLAGS et al.
44913   #
44914 
44915   # Now this is odd. The JDK native libraries have to link against libjvm.so
44916   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
44917   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
44918   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
44919   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
44920   # libraries will link to whatever is in memory. Yuck.
44921   #
44922   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
44923   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44924     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
44925     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
44926       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
44927     fi
44928     # TODO: make -debug optional "--disable-full-debug-symbols"
44929     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
44930   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44931     # If this is a --hash-style=gnu system, use --hash-style=both, why?
44932     # We have previously set HAS_GNU_HASH if this is the case
44933     if test -n "$HAS_GNU_HASH"; then
44934       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
44935     fi
44936     if test "x$OPENJDK_TARGET_OS" = xlinux; then
44937       # And since we now know that the linker is gnu, then add -z defs, to forbid
44938       # undefined symbols in object files.
44939       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
44940       case $DEBUG_LEVEL in
44941         release )
44942           # tell linker to optimize libraries.
44943           # Should this be supplied to the OSS linker as well?
44944           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
44945           ;;
44946         slowdebug )
44947           if test "x$HAS_LINKER_NOW" = "xtrue"; then
44948             # do relocations at load
44949             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
44950             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
44951           fi
44952           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
44953             # mark relocations read only
44954             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
44955             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
44956           fi
44957           ;;
44958         fastdebug )
44959           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
44960             # mark relocations read only
44961             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
44962             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
44963           fi
44964           ;;
44965         * )
44966           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
44967           ;;
44968         esac
44969     fi
44970   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44971     LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
44972     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
44973   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44974     LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
44975   fi
44976 
44977   # Customize LDFLAGS for executables
44978 
44979   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
44980 
44981   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44982     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
44983       LDFLAGS_STACK_SIZE=1048576
44984     else
44985       LDFLAGS_STACK_SIZE=327680
44986     fi
44987     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
44988   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
44989     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
44990   fi
44991 
44992   # Customize LDFLAGS for libs
44993   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
44994 
44995   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44996     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
44997     JDKLIB_LIBS=""
44998   else
44999     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
45000         -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
45001 
45002     # On some platforms (mac) the linker warns about non existing -L dirs.
45003     # Add server first if available. Linking aginst client does not always produce the same results.
45004     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
45005     # Default to server for other variants.
45006     if test "x$JVM_VARIANT_SERVER" = xtrue; then
45007       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
45008     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
45009       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
45010     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
45011       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
45012     else
45013       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
45014     fi
45015 
45016     JDKLIB_LIBS="-ljava -ljvm"
45017     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45018       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
45019     fi
45020   fi
45021 
45022 
45023 
45024 
45025 
45026 
45027 
45028   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
45029   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
45030 
45031 
45032 
45033 
45034 
45035   # Some Zero and Shark settings.
45036   # ZERO_ARCHFLAG tells the compiler which mode to build for
45037   case "${OPENJDK_TARGET_CPU}" in
45038     s390)
45039       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
45040       ;;
45041     *)
45042       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45043   esac
45044 
45045   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
45046 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
45047   supports=yes
45048 
45049   saved_cflags="$CFLAGS"
45050   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
45051   ac_ext=c
45052 ac_cpp='$CPP $CPPFLAGS'
45053 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45054 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45055 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45056 
45057   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45058 /* end confdefs.h.  */
45059 int i;
45060 _ACEOF
45061 if ac_fn_c_try_compile "$LINENO"; then :
45062 
45063 else
45064   supports=no
45065 fi
45066 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45067   ac_ext=cpp
45068 ac_cpp='$CXXCPP $CPPFLAGS'
45069 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45070 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45071 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45072 
45073   CFLAGS="$saved_cflags"
45074 
45075   saved_cxxflags="$CXXFLAGS"
45076   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
45077   ac_ext=cpp
45078 ac_cpp='$CXXCPP $CPPFLAGS'
45079 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45080 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45081 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45082 
45083   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45084 /* end confdefs.h.  */
45085 int i;
45086 _ACEOF
45087 if ac_fn_cxx_try_compile "$LINENO"; then :
45088 
45089 else
45090   supports=no
45091 fi
45092 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45093   ac_ext=cpp
45094 ac_cpp='$CXXCPP $CPPFLAGS'
45095 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45096 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45097 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45098 
45099   CXXFLAGS="$saved_cxxflags"
45100 
45101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45102 $as_echo "$supports" >&6; }
45103   if test "x$supports" = "xyes" ; then
45104     :
45105   else
45106     ZERO_ARCHFLAG=""
45107   fi
45108 
45109 
45110 
45111   # Check that the compiler supports -mX (or -qX on AIX) flags
45112   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
45113 
45114   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
45115 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
45116   supports=yes
45117 
45118   saved_cflags="$CFLAGS"
45119   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45120   ac_ext=c
45121 ac_cpp='$CPP $CPPFLAGS'
45122 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45123 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45124 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45125 
45126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45127 /* end confdefs.h.  */
45128 int i;
45129 _ACEOF
45130 if ac_fn_c_try_compile "$LINENO"; then :
45131 
45132 else
45133   supports=no
45134 fi
45135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45136   ac_ext=cpp
45137 ac_cpp='$CXXCPP $CPPFLAGS'
45138 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45139 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45140 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45141 
45142   CFLAGS="$saved_cflags"
45143 
45144   saved_cxxflags="$CXXFLAGS"
45145   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45146   ac_ext=cpp
45147 ac_cpp='$CXXCPP $CPPFLAGS'
45148 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45149 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45150 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45151 
45152   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45153 /* end confdefs.h.  */
45154 int i;
45155 _ACEOF
45156 if ac_fn_cxx_try_compile "$LINENO"; then :
45157 
45158 else
45159   supports=no
45160 fi
45161 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45162   ac_ext=cpp
45163 ac_cpp='$CXXCPP $CPPFLAGS'
45164 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45165 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45166 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45167 
45168   CXXFLAGS="$saved_cxxflags"
45169 
45170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45171 $as_echo "$supports" >&6; }
45172   if test "x$supports" = "xyes" ; then
45173     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
45174   else
45175     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
45176   fi
45177 
45178 
45179 
45180   # Check whether --enable-warnings-as-errors was given.
45181 if test "${enable_warnings_as_errors+set}" = set; then :
45182   enableval=$enable_warnings_as_errors;
45183 fi
45184 
45185 
45186   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
45187 $as_echo_n "checking if native warnings are errors... " >&6; }
45188   if test "x$enable_warnings_as_errors" = "xyes"; then
45189     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
45190 $as_echo "yes (explicitely set)" >&6; }
45191     WARNINGS_AS_ERRORS=true
45192   elif test "x$enable_warnings_as_errors" = "xno"; then
45193     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45194 $as_echo "no" >&6; }
45195     WARNINGS_AS_ERRORS=false
45196   elif test "x$enable_warnings_as_errors" = "x"; then
45197     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
45198 $as_echo "yes (default)" >&6; }
45199     WARNINGS_AS_ERRORS=true
45200   else
45201     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
45202   fi
45203 
45204   if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
45205     # Set legacy hotspot variable
45206     HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
45207   else
45208     HOTSPOT_SET_WARNINGS_AS_ERRORS=""
45209   fi
45210 
45211 
45212 
45213 
45214   case "${TOOLCHAIN_TYPE}" in
45215     microsoft)
45216       DISABLE_WARNING_PREFIX="-wd"
45217       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
45218       ;;
45219     solstudio)
45220       DISABLE_WARNING_PREFIX="-erroff="
45221       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
45222       ;;
45223     gcc)
45224       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
45225 
45226   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
45227 $as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
45228   supports=yes
45229 
45230   saved_cflags="$CFLAGS"
45231   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
45232   ac_ext=c
45233 ac_cpp='$CPP $CPPFLAGS'
45234 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45235 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45236 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45237 
45238   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45239 /* end confdefs.h.  */
45240 int i;
45241 _ACEOF
45242 if ac_fn_c_try_compile "$LINENO"; then :
45243 
45244 else
45245   supports=no
45246 fi
45247 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45248   ac_ext=cpp
45249 ac_cpp='$CXXCPP $CPPFLAGS'
45250 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45251 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45252 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45253 
45254   CFLAGS="$saved_cflags"
45255 
45256   saved_cxxflags="$CXXFLAGS"
45257   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
45258   ac_ext=cpp
45259 ac_cpp='$CXXCPP $CPPFLAGS'
45260 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45261 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45262 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45263 
45264   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45265 /* end confdefs.h.  */
45266 int i;
45267 _ACEOF
45268 if ac_fn_cxx_try_compile "$LINENO"; then :
45269 
45270 else
45271   supports=no
45272 fi
45273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45274   ac_ext=cpp
45275 ac_cpp='$CXXCPP $CPPFLAGS'
45276 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45277 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45278 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45279 
45280   CXXFLAGS="$saved_cxxflags"
45281 
45282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45283 $as_echo "$supports" >&6; }
45284   if test "x$supports" = "xyes" ; then
45285     GCC_CAN_DISABLE_WARNINGS=true
45286   else
45287     GCC_CAN_DISABLE_WARNINGS=false
45288 
45289   fi
45290 
45291       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
45292         DISABLE_WARNING_PREFIX="-Wno-"
45293       else
45294         DISABLE_WARNING_PREFIX=
45295       fi
45296       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
45297       ;;
45298     clang)
45299       DISABLE_WARNING_PREFIX="-Wno-"
45300       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
45301       ;;
45302   esac
45303 
45304 
45305 
45306 
45307 # Setup debug symbols (need objcopy from the toolchain for that)
45308 
45309   #
45310   # ENABLE_DEBUG_SYMBOLS
45311   # This must be done after the toolchain is setup, since we're looking at objcopy.
45312   #
45313   # Check whether --enable-debug-symbols was given.
45314 if test "${enable_debug_symbols+set}" = set; then :
45315   enableval=$enable_debug_symbols;
45316 fi
45317 
45318 
45319   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
45320 $as_echo_n "checking if we should generate debug symbols... " >&6; }
45321 
45322   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
45323     # explicit enabling of enable-debug-symbols and can't find objcopy
45324     #   this is an error
45325     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
45326   fi
45327 
45328   if test "x$enable_debug_symbols" = "xyes"; then
45329     ENABLE_DEBUG_SYMBOLS=true
45330   elif test "x$enable_debug_symbols" = "xno"; then
45331     ENABLE_DEBUG_SYMBOLS=false
45332   else
45333     # Default is on if objcopy is found
45334     if test "x$OBJCOPY" != x; then
45335       ENABLE_DEBUG_SYMBOLS=true
45336     # MacOS X and Windows don't use objcopy but default is on for those OSes
45337     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
45338       ENABLE_DEBUG_SYMBOLS=true
45339     else
45340       ENABLE_DEBUG_SYMBOLS=false
45341     fi
45342   fi
45343 
45344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
45345 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
45346 
45347   #
45348   # ZIP_DEBUGINFO_FILES
45349   #
45350   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
45351 $as_echo_n "checking if we should zip debug-info files... " >&6; }
45352   # Check whether --enable-zip-debug-info was given.
45353 if test "${enable_zip_debug_info+set}" = set; then :
45354   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
45355 else
45356   enable_zip_debug_info="yes"
45357 fi
45358 
45359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
45360 $as_echo "${enable_zip_debug_info}" >&6; }
45361 
45362   if test "x${enable_zip_debug_info}" = "xno"; then
45363     ZIP_DEBUGINFO_FILES=false
45364   else
45365     ZIP_DEBUGINFO_FILES=true
45366   fi
45367 
45368 
45369 
45370 
45371 
45372   # Check whether --enable-native-coverage was given.
45373 if test "${enable_native_coverage+set}" = set; then :
45374   enableval=$enable_native_coverage;
45375 fi
45376 
45377   GCOV_ENABLED="false"
45378   if test "x$enable_native_coverage" = "xyes"; then
45379     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
45380       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
45381 $as_echo_n "checking if native coverage is enabled... " >&6; }
45382       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45383 $as_echo "yes" >&6; }
45384       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
45385       GCOV_LDFLAGS="-fprofile-arcs"
45386       LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
45387       LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
45388       LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
45389       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
45390       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
45391       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
45392       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
45393       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
45394       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
45395       GCOV_ENABLED="true"
45396     else
45397       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
45398     fi
45399   elif test "x$enable_native_coverage" = "xno"; then
45400     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
45401 $as_echo_n "checking if native coverage is enabled... " >&6; }
45402     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45403 $as_echo "no" >&6; }
45404   elif test "x$enable_native_coverage" != "x"; then
45405     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
45406   fi
45407 
45408 
45409 
45410 
45411 ###############################################################################
45412 #
45413 # Check dependencies for external and internal libraries.
45414 #
45415 ###############################################################################
45416 
45417 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
45418 
45419   # When using cygwin or msys, we need a wrapper binary that renames
45420   # /cygdrive/c/ arguments into c:/ arguments and peeks into
45421   # @files and rewrites these too! This wrapper binary is
45422   # called fixpath.
45423   FIXPATH=
45424   if test "x$OPENJDK_BUILD_OS" = xwindows; then
45425     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
45426 $as_echo_n "checking if fixpath can be created... " >&6; }
45427     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
45428     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
45429     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
45430     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
45431       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
45432       FIXPATH="$FIXPATH_BIN -c"
45433     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
45434       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
45435       # @ was chosen as separator to minimize risk of other tools messing around with it
45436       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
45437           | tr ' ' '\n' | grep '^/./' | sort | uniq`
45438       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
45439       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
45440     fi
45441     FIXPATH_SRC_W="$FIXPATH_SRC"
45442     FIXPATH_BIN_W="$FIXPATH_BIN"
45443 
45444   unix_path="$FIXPATH_SRC_W"
45445   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45446     windows_path=`$CYGPATH -m "$unix_path"`
45447     FIXPATH_SRC_W="$windows_path"
45448   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45449     windows_path=`cmd //c echo $unix_path`
45450     FIXPATH_SRC_W="$windows_path"
45451   fi
45452 
45453 
45454   unix_path="$FIXPATH_BIN_W"
45455   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45456     windows_path=`$CYGPATH -m "$unix_path"`
45457     FIXPATH_BIN_W="$windows_path"
45458   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45459     windows_path=`cmd //c echo $unix_path`
45460     FIXPATH_BIN_W="$windows_path"
45461   fi
45462 
45463     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
45464     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
45465     cd $FIXPATH_DIR
45466     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
45467     cd $CURDIR
45468 
45469     if test ! -x $FIXPATH_BIN; then
45470       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45471 $as_echo "no" >&6; }
45472       cat $FIXPATH_DIR/fixpath1.log
45473       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
45474     fi
45475     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45476 $as_echo "yes" >&6; }
45477     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
45478 $as_echo_n "checking if fixpath.exe works... " >&6; }
45479     cd $FIXPATH_DIR
45480     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
45481         > $FIXPATH_DIR/fixpath2.log 2>&1
45482     cd $CURDIR
45483     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
45484       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45485 $as_echo "no" >&6; }
45486       cat $FIXPATH_DIR/fixpath2.log
45487       as_fn_error $? "fixpath did not work!" "$LINENO" 5
45488     fi
45489     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45490 $as_echo "yes" >&6; }
45491   fi
45492 
45493 
45494 
45495 
45496 
45497   # Check if X11 is needed
45498   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
45499     # No X11 support on windows or macosx
45500     NEEDS_LIB_X11=false
45501   else
45502     if test "x$SUPPORT_HEADFUL" = xno; then
45503       # No X11 support if building headless-only
45504       NEEDS_LIB_X11=false
45505     else
45506       # All other instances need X11
45507       NEEDS_LIB_X11=true
45508     fi
45509   fi
45510 
45511   # Check if cups is needed
45512   if test "x$OPENJDK_TARGET_OS" = xwindows; then
45513     # Windows have a separate print system
45514     NEEDS_LIB_CUPS=false
45515   else
45516     NEEDS_LIB_CUPS=true
45517   fi
45518 
45519   # Check if freetype is needed
45520   if test "x$OPENJDK" = "xtrue"; then
45521     NEEDS_LIB_FREETYPE=true
45522   else
45523     NEEDS_LIB_FREETYPE=false
45524   fi
45525 
45526   # Check if alsa is needed
45527   if test "x$OPENJDK_TARGET_OS" = xlinux; then
45528     NEEDS_LIB_ALSA=true
45529   else
45530     NEEDS_LIB_ALSA=false
45531   fi
45532 
45533   # Check if ffi is needed
45534   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
45535     NEEDS_LIB_FFI=true
45536   else
45537     NEEDS_LIB_FFI=false
45538   fi
45539 
45540 
45541   # statically link libstdc++ before C++ ABI is stablized on Linux unless
45542   # dynamic build is configured on command line.
45543 
45544 # Check whether --with-stdc++lib was given.
45545 if test "${with_stdc__lib+set}" = set; then :
45546   withval=$with_stdc__lib;
45547         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
45548                 && test "x$with_stdc__lib" != xdefault; then
45549           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
45550         fi
45551 
45552 else
45553   with_stdc__lib=default
45554 
45555 fi
45556 
45557 
45558   if test "x$OPENJDK_TARGET_OS" = xlinux; then
45559     # Test if -lstdc++ works.
45560     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
45561 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
45562     ac_ext=cpp
45563 ac_cpp='$CXXCPP $CPPFLAGS'
45564 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45565 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45566 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45567 
45568     OLD_CXXFLAGS="$CXXFLAGS"
45569     CXXFLAGS="$CXXFLAGS -lstdc++"
45570     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45571 /* end confdefs.h.  */
45572 
45573 int
45574 main ()
45575 {
45576 return 0;
45577   ;
45578   return 0;
45579 }
45580 _ACEOF
45581 if ac_fn_cxx_try_link "$LINENO"; then :
45582   has_dynamic_libstdcxx=yes
45583 else
45584   has_dynamic_libstdcxx=no
45585 fi
45586 rm -f core conftest.err conftest.$ac_objext \
45587     conftest$ac_exeext conftest.$ac_ext
45588     CXXFLAGS="$OLD_CXXFLAGS"
45589     ac_ext=cpp
45590 ac_cpp='$CXXCPP $CPPFLAGS'
45591 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45592 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45593 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45594 
45595     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
45596 $as_echo "$has_dynamic_libstdcxx" >&6; }
45597 
45598     # Test if stdc++ can be linked statically.
45599     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
45600 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
45601     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
45602     ac_ext=cpp
45603 ac_cpp='$CXXCPP $CPPFLAGS'
45604 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45605 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45606 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45607 
45608     OLD_LIBS="$LIBS"
45609     OLD_CXX="$CXX"
45610     LIBS="$STATIC_STDCXX_FLAGS"
45611     CXX="$CC"
45612     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45613 /* end confdefs.h.  */
45614 
45615 int
45616 main ()
45617 {
45618 return 0;
45619   ;
45620   return 0;
45621 }
45622 _ACEOF
45623 if ac_fn_cxx_try_link "$LINENO"; then :
45624   has_static_libstdcxx=yes
45625 else
45626   has_static_libstdcxx=no
45627 fi
45628 rm -f core conftest.err conftest.$ac_objext \
45629     conftest$ac_exeext conftest.$ac_ext
45630     LIBS="$OLD_LIBS"
45631     CXX="$OLD_CXX"
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     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
45639 $as_echo "$has_static_libstdcxx" >&6; }
45640 
45641     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
45642       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
45643     fi
45644 
45645     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
45646       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
45647     fi
45648 
45649     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
45650       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
45651     fi
45652 
45653     # If dynamic was requested, it's available since it would fail above otherwise.
45654     # If dynamic wasn't requested, go with static unless it isn't available.
45655     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
45656 $as_echo_n "checking how to link with libstdc++... " >&6; }
45657     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
45658       LIBCXX="$LIBCXX -lstdc++"
45659       LDCXX="$CXX"
45660       STATIC_CXX_SETTING="STATIC_CXX=false"
45661       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
45662 $as_echo "dynamic" >&6; }
45663     else
45664       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
45665       LDCXX="$CC"
45666       STATIC_CXX_SETTING="STATIC_CXX=true"
45667       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
45668 $as_echo "static" >&6; }
45669     fi
45670   fi
45671 
45672 
45673   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
45674   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
45675     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
45676   fi
45677 
45678   # TODO better (platform agnostic) test
45679   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
45680     LIBCXX="-lstdc++"
45681   fi
45682 
45683 
45684   # Setup Windows runtime dlls
45685   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
45686 
45687 
45688 # Check whether --with-msvcr-dll was given.
45689 if test "${with_msvcr_dll+set}" = set; then :
45690   withval=$with_msvcr_dll;
45691 fi
45692 
45693 
45694   if test "x$with_msvcr_dll" != x; then
45695     # If given explicitely by user, do not probe. If not present, fail directly.
45696 
45697   DLL_NAME="$MSVCR_NAME"
45698   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
45699   METHOD="--with-msvcr-dll"
45700   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45701     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45702 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45703 
45704     # Need to check if the found msvcr is correct architecture
45705     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45706 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45707     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45708     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45709       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45710       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45711       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45712         CORRECT_MSVCR_ARCH="PE32 executable"
45713       else
45714         CORRECT_MSVCR_ARCH="PE32+ executable"
45715       fi
45716     else
45717       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45718         CORRECT_MSVCR_ARCH=386
45719       else
45720         CORRECT_MSVCR_ARCH=x86-64
45721       fi
45722     fi
45723     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45724       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45725 $as_echo "ok" >&6; }
45726       MSVC_DLL="$POSSIBLE_MSVC_DLL"
45727 
45728   # Only process if variable expands to non-empty
45729 
45730   if test "x$MSVC_DLL" != x; then
45731     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45732 
45733   # Input might be given as Windows format, start by converting to
45734   # unix format.
45735   path="$MSVC_DLL"
45736   new_path=`$CYGPATH -u "$path"`
45737 
45738   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45739   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45740   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45741   # "foo.exe" is OK but "foo" is an error.
45742   #
45743   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45744   # It is also a way to make sure we got the proper file name for the real test later on.
45745   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45746   if test "x$test_shortpath" = x; then
45747     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45748 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45749     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45750   fi
45751 
45752   # Call helper function which possibly converts this using DOS-style short mode.
45753   # If so, the updated path is stored in $new_path.
45754 
45755   input_path="$new_path"
45756   # Check if we need to convert this using DOS-style short mode. If the path
45757   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45758   # take no chances and rewrite it.
45759   # Note: m4 eats our [], so we need to use [ and ] instead.
45760   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45761   if test "x$has_forbidden_chars" != x; then
45762     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45763     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45764     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45765     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45766       # Going to short mode and back again did indeed matter. Since short mode is
45767       # case insensitive, let's make it lowercase to improve readability.
45768       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45769       # Now convert it back to Unix-style (cygpath)
45770       input_path=`$CYGPATH -u "$shortmode_path"`
45771       new_path="$input_path"
45772     fi
45773   fi
45774 
45775   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45776   if test "x$test_cygdrive_prefix" = x; then
45777     # As a simple fix, exclude /usr/bin since it's not a real path.
45778     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45779       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45780       # a path prefixed by /cygdrive for fixpath to work.
45781       new_path="$CYGWIN_ROOT_PATH$input_path"
45782     fi
45783   fi
45784 
45785 
45786   if test "x$path" != "x$new_path"; then
45787     MSVC_DLL="$new_path"
45788     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45789 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45790   fi
45791 
45792     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45793 
45794   path="$MSVC_DLL"
45795   has_colon=`$ECHO $path | $GREP ^.:`
45796   new_path="$path"
45797   if test "x$has_colon" = x; then
45798     # Not in mixed or Windows style, start by that.
45799     new_path=`cmd //c echo $path`
45800   fi
45801 
45802 
45803   input_path="$new_path"
45804   # Check if we need to convert this using DOS-style short mode. If the path
45805   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45806   # take no chances and rewrite it.
45807   # Note: m4 eats our [], so we need to use [ and ] instead.
45808   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45809   if test "x$has_forbidden_chars" != x; then
45810     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45811     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45812   fi
45813 
45814 
45815   windows_path="$new_path"
45816   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45817     unix_path=`$CYGPATH -u "$windows_path"`
45818     new_path="$unix_path"
45819   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45820     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45821     new_path="$unix_path"
45822   fi
45823 
45824   if test "x$path" != "x$new_path"; then
45825     MSVC_DLL="$new_path"
45826     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45827 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45828   fi
45829 
45830   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45831   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45832 
45833     else
45834       # We're on a unix platform. Hooray! :)
45835       path="$MSVC_DLL"
45836       has_space=`$ECHO "$path" | $GREP " "`
45837       if test "x$has_space" != x; then
45838         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45839 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45840         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45841       fi
45842 
45843       # Use eval to expand a potential ~
45844       eval path="$path"
45845       if test ! -f "$path" && test ! -d "$path"; then
45846         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45847       fi
45848 
45849       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45850     fi
45851   fi
45852 
45853       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45854 $as_echo_n "checking for $DLL_NAME... " >&6; }
45855       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45856 $as_echo "$MSVC_DLL" >&6; }
45857     else
45858       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45859 $as_echo "incorrect, ignoring" >&6; }
45860       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45861 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45862     fi
45863   fi
45864 
45865     if test "x$MSVC_DLL" = x; then
45866       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
45867     fi
45868     MSVCR_DLL="$MSVC_DLL"
45869   elif test "x$DEVKIT_MSVCR_DLL" != x; then
45870 
45871   DLL_NAME="$MSVCR_NAME"
45872   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
45873   METHOD="devkit"
45874   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45875     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45876 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45877 
45878     # Need to check if the found msvcr is correct architecture
45879     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45880 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45881     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45882     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45883       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45884       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45885       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45886         CORRECT_MSVCR_ARCH="PE32 executable"
45887       else
45888         CORRECT_MSVCR_ARCH="PE32+ executable"
45889       fi
45890     else
45891       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45892         CORRECT_MSVCR_ARCH=386
45893       else
45894         CORRECT_MSVCR_ARCH=x86-64
45895       fi
45896     fi
45897     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45898       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45899 $as_echo "ok" >&6; }
45900       MSVC_DLL="$POSSIBLE_MSVC_DLL"
45901 
45902   # Only process if variable expands to non-empty
45903 
45904   if test "x$MSVC_DLL" != x; then
45905     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45906 
45907   # Input might be given as Windows format, start by converting to
45908   # unix format.
45909   path="$MSVC_DLL"
45910   new_path=`$CYGPATH -u "$path"`
45911 
45912   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45913   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45914   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45915   # "foo.exe" is OK but "foo" is an error.
45916   #
45917   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45918   # It is also a way to make sure we got the proper file name for the real test later on.
45919   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45920   if test "x$test_shortpath" = x; then
45921     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45922 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45923     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45924   fi
45925 
45926   # Call helper function which possibly converts this using DOS-style short mode.
45927   # If so, the updated path is stored in $new_path.
45928 
45929   input_path="$new_path"
45930   # Check if we need to convert this using DOS-style short mode. If the path
45931   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45932   # take no chances and rewrite it.
45933   # Note: m4 eats our [], so we need to use [ and ] instead.
45934   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45935   if test "x$has_forbidden_chars" != x; then
45936     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45937     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45938     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45939     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45940       # Going to short mode and back again did indeed matter. Since short mode is
45941       # case insensitive, let's make it lowercase to improve readability.
45942       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45943       # Now convert it back to Unix-style (cygpath)
45944       input_path=`$CYGPATH -u "$shortmode_path"`
45945       new_path="$input_path"
45946     fi
45947   fi
45948 
45949   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45950   if test "x$test_cygdrive_prefix" = x; then
45951     # As a simple fix, exclude /usr/bin since it's not a real path.
45952     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45953       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45954       # a path prefixed by /cygdrive for fixpath to work.
45955       new_path="$CYGWIN_ROOT_PATH$input_path"
45956     fi
45957   fi
45958 
45959 
45960   if test "x$path" != "x$new_path"; then
45961     MSVC_DLL="$new_path"
45962     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45963 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45964   fi
45965 
45966     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45967 
45968   path="$MSVC_DLL"
45969   has_colon=`$ECHO $path | $GREP ^.:`
45970   new_path="$path"
45971   if test "x$has_colon" = x; then
45972     # Not in mixed or Windows style, start by that.
45973     new_path=`cmd //c echo $path`
45974   fi
45975 
45976 
45977   input_path="$new_path"
45978   # Check if we need to convert this using DOS-style short mode. If the path
45979   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45980   # take no chances and rewrite it.
45981   # Note: m4 eats our [], so we need to use [ and ] instead.
45982   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45983   if test "x$has_forbidden_chars" != x; then
45984     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45985     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45986   fi
45987 
45988 
45989   windows_path="$new_path"
45990   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45991     unix_path=`$CYGPATH -u "$windows_path"`
45992     new_path="$unix_path"
45993   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45994     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45995     new_path="$unix_path"
45996   fi
45997 
45998   if test "x$path" != "x$new_path"; then
45999     MSVC_DLL="$new_path"
46000     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46001 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46002   fi
46003 
46004   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46005   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46006 
46007     else
46008       # We're on a unix platform. Hooray! :)
46009       path="$MSVC_DLL"
46010       has_space=`$ECHO "$path" | $GREP " "`
46011       if test "x$has_space" != x; then
46012         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46013 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46014         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46015       fi
46016 
46017       # Use eval to expand a potential ~
46018       eval path="$path"
46019       if test ! -f "$path" && test ! -d "$path"; then
46020         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46021       fi
46022 
46023       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46024     fi
46025   fi
46026 
46027       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46028 $as_echo_n "checking for $DLL_NAME... " >&6; }
46029       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46030 $as_echo "$MSVC_DLL" >&6; }
46031     else
46032       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46033 $as_echo "incorrect, ignoring" >&6; }
46034       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46035 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46036     fi
46037   fi
46038 
46039     if test "x$MSVC_DLL" = x; then
46040       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
46041     fi
46042     MSVCR_DLL="$MSVC_DLL"
46043   else
46044 
46045   DLL_NAME="${MSVCR_NAME}"
46046   MSVC_DLL=
46047 
46048   if test "x$MSVC_DLL" = x; then
46049     # Probe: Using well-known location from Visual Studio 10.0
46050     if test "x$VCINSTALLDIR" != x; then
46051       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
46052 
46053   windows_path="$CYGWIN_VC_INSTALL_DIR"
46054   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46055     unix_path=`$CYGPATH -u "$windows_path"`
46056     CYGWIN_VC_INSTALL_DIR="$unix_path"
46057   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46058     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46059     CYGWIN_VC_INSTALL_DIR="$unix_path"
46060   fi
46061 
46062       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46063         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
46064       else
46065         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
46066       fi
46067       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
46068 
46069   DLL_NAME="$DLL_NAME"
46070   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46071   METHOD="well-known location in VCINSTALLDIR"
46072   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46073     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46074 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46075 
46076     # Need to check if the found msvcr is correct architecture
46077     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46078 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46079     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46080     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46081       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46082       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46083       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46084         CORRECT_MSVCR_ARCH="PE32 executable"
46085       else
46086         CORRECT_MSVCR_ARCH="PE32+ executable"
46087       fi
46088     else
46089       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46090         CORRECT_MSVCR_ARCH=386
46091       else
46092         CORRECT_MSVCR_ARCH=x86-64
46093       fi
46094     fi
46095     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46096       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46097 $as_echo "ok" >&6; }
46098       MSVC_DLL="$POSSIBLE_MSVC_DLL"
46099 
46100   # Only process if variable expands to non-empty
46101 
46102   if test "x$MSVC_DLL" != x; then
46103     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46104 
46105   # Input might be given as Windows format, start by converting to
46106   # unix format.
46107   path="$MSVC_DLL"
46108   new_path=`$CYGPATH -u "$path"`
46109 
46110   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46111   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46112   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46113   # "foo.exe" is OK but "foo" is an error.
46114   #
46115   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46116   # It is also a way to make sure we got the proper file name for the real test later on.
46117   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46118   if test "x$test_shortpath" = x; then
46119     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46120 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46121     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46122   fi
46123 
46124   # Call helper function which possibly converts this using DOS-style short mode.
46125   # If so, the updated path is stored in $new_path.
46126 
46127   input_path="$new_path"
46128   # Check if we need to convert this using DOS-style short mode. If the path
46129   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46130   # take no chances and rewrite it.
46131   # Note: m4 eats our [], so we need to use [ and ] instead.
46132   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46133   if test "x$has_forbidden_chars" != x; then
46134     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46135     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46136     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46137     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46138       # Going to short mode and back again did indeed matter. Since short mode is
46139       # case insensitive, let's make it lowercase to improve readability.
46140       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46141       # Now convert it back to Unix-style (cygpath)
46142       input_path=`$CYGPATH -u "$shortmode_path"`
46143       new_path="$input_path"
46144     fi
46145   fi
46146 
46147   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46148   if test "x$test_cygdrive_prefix" = x; then
46149     # As a simple fix, exclude /usr/bin since it's not a real path.
46150     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46151       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46152       # a path prefixed by /cygdrive for fixpath to work.
46153       new_path="$CYGWIN_ROOT_PATH$input_path"
46154     fi
46155   fi
46156 
46157 
46158   if test "x$path" != "x$new_path"; then
46159     MSVC_DLL="$new_path"
46160     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46161 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46162   fi
46163 
46164     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46165 
46166   path="$MSVC_DLL"
46167   has_colon=`$ECHO $path | $GREP ^.:`
46168   new_path="$path"
46169   if test "x$has_colon" = x; then
46170     # Not in mixed or Windows style, start by that.
46171     new_path=`cmd //c echo $path`
46172   fi
46173 
46174 
46175   input_path="$new_path"
46176   # Check if we need to convert this using DOS-style short mode. If the path
46177   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46178   # take no chances and rewrite it.
46179   # Note: m4 eats our [], so we need to use [ and ] instead.
46180   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46181   if test "x$has_forbidden_chars" != x; then
46182     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46183     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46184   fi
46185 
46186 
46187   windows_path="$new_path"
46188   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46189     unix_path=`$CYGPATH -u "$windows_path"`
46190     new_path="$unix_path"
46191   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46192     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46193     new_path="$unix_path"
46194   fi
46195 
46196   if test "x$path" != "x$new_path"; then
46197     MSVC_DLL="$new_path"
46198     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46199 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46200   fi
46201 
46202   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46203   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46204 
46205     else
46206       # We're on a unix platform. Hooray! :)
46207       path="$MSVC_DLL"
46208       has_space=`$ECHO "$path" | $GREP " "`
46209       if test "x$has_space" != x; then
46210         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46211 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46212         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46213       fi
46214 
46215       # Use eval to expand a potential ~
46216       eval path="$path"
46217       if test ! -f "$path" && test ! -d "$path"; then
46218         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46219       fi
46220 
46221       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46222     fi
46223   fi
46224 
46225       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46226 $as_echo_n "checking for $DLL_NAME... " >&6; }
46227       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46228 $as_echo "$MSVC_DLL" >&6; }
46229     else
46230       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46231 $as_echo "incorrect, ignoring" >&6; }
46232       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46233 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46234     fi
46235   fi
46236 
46237     fi
46238   fi
46239 
46240   if test "x$MSVC_DLL" = x; then
46241     # Probe: Check in the Boot JDK directory.
46242     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
46243 
46244   DLL_NAME="$DLL_NAME"
46245   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46246   METHOD="well-known location in Boot JDK"
46247   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46248     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46249 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46250 
46251     # Need to check if the found msvcr is correct architecture
46252     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46253 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46254     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46255     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46256       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46257       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46258       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46259         CORRECT_MSVCR_ARCH="PE32 executable"
46260       else
46261         CORRECT_MSVCR_ARCH="PE32+ executable"
46262       fi
46263     else
46264       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46265         CORRECT_MSVCR_ARCH=386
46266       else
46267         CORRECT_MSVCR_ARCH=x86-64
46268       fi
46269     fi
46270     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46271       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46272 $as_echo "ok" >&6; }
46273       MSVC_DLL="$POSSIBLE_MSVC_DLL"
46274 
46275   # Only process if variable expands to non-empty
46276 
46277   if test "x$MSVC_DLL" != x; then
46278     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46279 
46280   # Input might be given as Windows format, start by converting to
46281   # unix format.
46282   path="$MSVC_DLL"
46283   new_path=`$CYGPATH -u "$path"`
46284 
46285   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46286   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46287   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46288   # "foo.exe" is OK but "foo" is an error.
46289   #
46290   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46291   # It is also a way to make sure we got the proper file name for the real test later on.
46292   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46293   if test "x$test_shortpath" = x; then
46294     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46295 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46296     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46297   fi
46298 
46299   # Call helper function which possibly converts this using DOS-style short mode.
46300   # If so, the updated path is stored in $new_path.
46301 
46302   input_path="$new_path"
46303   # Check if we need to convert this using DOS-style short mode. If the path
46304   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46305   # take no chances and rewrite it.
46306   # Note: m4 eats our [], so we need to use [ and ] instead.
46307   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46308   if test "x$has_forbidden_chars" != x; then
46309     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46310     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46311     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46312     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46313       # Going to short mode and back again did indeed matter. Since short mode is
46314       # case insensitive, let's make it lowercase to improve readability.
46315       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46316       # Now convert it back to Unix-style (cygpath)
46317       input_path=`$CYGPATH -u "$shortmode_path"`
46318       new_path="$input_path"
46319     fi
46320   fi
46321 
46322   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46323   if test "x$test_cygdrive_prefix" = x; then
46324     # As a simple fix, exclude /usr/bin since it's not a real path.
46325     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46326       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46327       # a path prefixed by /cygdrive for fixpath to work.
46328       new_path="$CYGWIN_ROOT_PATH$input_path"
46329     fi
46330   fi
46331 
46332 
46333   if test "x$path" != "x$new_path"; then
46334     MSVC_DLL="$new_path"
46335     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46336 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46337   fi
46338 
46339     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46340 
46341   path="$MSVC_DLL"
46342   has_colon=`$ECHO $path | $GREP ^.:`
46343   new_path="$path"
46344   if test "x$has_colon" = x; then
46345     # Not in mixed or Windows style, start by that.
46346     new_path=`cmd //c echo $path`
46347   fi
46348 
46349 
46350   input_path="$new_path"
46351   # Check if we need to convert this using DOS-style short mode. If the path
46352   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46353   # take no chances and rewrite it.
46354   # Note: m4 eats our [], so we need to use [ and ] instead.
46355   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46356   if test "x$has_forbidden_chars" != x; then
46357     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46358     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46359   fi
46360 
46361 
46362   windows_path="$new_path"
46363   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46364     unix_path=`$CYGPATH -u "$windows_path"`
46365     new_path="$unix_path"
46366   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46367     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46368     new_path="$unix_path"
46369   fi
46370 
46371   if test "x$path" != "x$new_path"; then
46372     MSVC_DLL="$new_path"
46373     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46374 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46375   fi
46376 
46377   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46378   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46379 
46380     else
46381       # We're on a unix platform. Hooray! :)
46382       path="$MSVC_DLL"
46383       has_space=`$ECHO "$path" | $GREP " "`
46384       if test "x$has_space" != x; then
46385         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46386 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46387         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46388       fi
46389 
46390       # Use eval to expand a potential ~
46391       eval path="$path"
46392       if test ! -f "$path" && test ! -d "$path"; then
46393         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46394       fi
46395 
46396       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46397     fi
46398   fi
46399 
46400       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46401 $as_echo_n "checking for $DLL_NAME... " >&6; }
46402       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46403 $as_echo "$MSVC_DLL" >&6; }
46404     else
46405       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46406 $as_echo "incorrect, ignoring" >&6; }
46407       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46408 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46409     fi
46410   fi
46411 
46412   fi
46413 
46414   if test "x$MSVC_DLL" = x; then
46415     # Probe: Look in the Windows system32 directory
46416     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
46417 
46418   windows_path="$CYGWIN_SYSTEMROOT"
46419   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46420     unix_path=`$CYGPATH -u "$windows_path"`
46421     CYGWIN_SYSTEMROOT="$unix_path"
46422   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46423     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46424     CYGWIN_SYSTEMROOT="$unix_path"
46425   fi
46426 
46427     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
46428 
46429   DLL_NAME="$DLL_NAME"
46430   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46431   METHOD="well-known location in SYSTEMROOT"
46432   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46433     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46434 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46435 
46436     # Need to check if the found msvcr is correct architecture
46437     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46438 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46439     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46440     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46441       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46442       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46443       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46444         CORRECT_MSVCR_ARCH="PE32 executable"
46445       else
46446         CORRECT_MSVCR_ARCH="PE32+ executable"
46447       fi
46448     else
46449       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46450         CORRECT_MSVCR_ARCH=386
46451       else
46452         CORRECT_MSVCR_ARCH=x86-64
46453       fi
46454     fi
46455     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46456       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46457 $as_echo "ok" >&6; }
46458       MSVC_DLL="$POSSIBLE_MSVC_DLL"
46459 
46460   # Only process if variable expands to non-empty
46461 
46462   if test "x$MSVC_DLL" != x; then
46463     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46464 
46465   # Input might be given as Windows format, start by converting to
46466   # unix format.
46467   path="$MSVC_DLL"
46468   new_path=`$CYGPATH -u "$path"`
46469 
46470   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46471   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46472   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46473   # "foo.exe" is OK but "foo" is an error.
46474   #
46475   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46476   # It is also a way to make sure we got the proper file name for the real test later on.
46477   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46478   if test "x$test_shortpath" = x; then
46479     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46480 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46481     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46482   fi
46483 
46484   # Call helper function which possibly converts this using DOS-style short mode.
46485   # If so, the updated path is stored in $new_path.
46486 
46487   input_path="$new_path"
46488   # Check if we need to convert this using DOS-style short mode. If the path
46489   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46490   # take no chances and rewrite it.
46491   # Note: m4 eats our [], so we need to use [ and ] instead.
46492   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46493   if test "x$has_forbidden_chars" != x; then
46494     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46495     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46496     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46497     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46498       # Going to short mode and back again did indeed matter. Since short mode is
46499       # case insensitive, let's make it lowercase to improve readability.
46500       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46501       # Now convert it back to Unix-style (cygpath)
46502       input_path=`$CYGPATH -u "$shortmode_path"`
46503       new_path="$input_path"
46504     fi
46505   fi
46506 
46507   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46508   if test "x$test_cygdrive_prefix" = x; then
46509     # As a simple fix, exclude /usr/bin since it's not a real path.
46510     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46511       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46512       # a path prefixed by /cygdrive for fixpath to work.
46513       new_path="$CYGWIN_ROOT_PATH$input_path"
46514     fi
46515   fi
46516 
46517 
46518   if test "x$path" != "x$new_path"; then
46519     MSVC_DLL="$new_path"
46520     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46521 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46522   fi
46523 
46524     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46525 
46526   path="$MSVC_DLL"
46527   has_colon=`$ECHO $path | $GREP ^.:`
46528   new_path="$path"
46529   if test "x$has_colon" = x; then
46530     # Not in mixed or Windows style, start by that.
46531     new_path=`cmd //c echo $path`
46532   fi
46533 
46534 
46535   input_path="$new_path"
46536   # Check if we need to convert this using DOS-style short mode. If the path
46537   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46538   # take no chances and rewrite it.
46539   # Note: m4 eats our [], so we need to use [ and ] instead.
46540   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46541   if test "x$has_forbidden_chars" != x; then
46542     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46543     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46544   fi
46545 
46546 
46547   windows_path="$new_path"
46548   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46549     unix_path=`$CYGPATH -u "$windows_path"`
46550     new_path="$unix_path"
46551   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46552     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46553     new_path="$unix_path"
46554   fi
46555 
46556   if test "x$path" != "x$new_path"; then
46557     MSVC_DLL="$new_path"
46558     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46559 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46560   fi
46561 
46562   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46563   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46564 
46565     else
46566       # We're on a unix platform. Hooray! :)
46567       path="$MSVC_DLL"
46568       has_space=`$ECHO "$path" | $GREP " "`
46569       if test "x$has_space" != x; then
46570         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46571 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46572         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46573       fi
46574 
46575       # Use eval to expand a potential ~
46576       eval path="$path"
46577       if test ! -f "$path" && test ! -d "$path"; then
46578         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46579       fi
46580 
46581       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46582     fi
46583   fi
46584 
46585       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46586 $as_echo_n "checking for $DLL_NAME... " >&6; }
46587       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46588 $as_echo "$MSVC_DLL" >&6; }
46589     else
46590       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46591 $as_echo "incorrect, ignoring" >&6; }
46592       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46593 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46594     fi
46595   fi
46596 
46597   fi
46598 
46599   if test "x$MSVC_DLL" = x; then
46600     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
46601     if test "x$VS100COMNTOOLS" != x; then
46602       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
46603 
46604   windows_path="$CYGWIN_VS_TOOLS_DIR"
46605   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46606     unix_path=`$CYGPATH -u "$windows_path"`
46607     CYGWIN_VS_TOOLS_DIR="$unix_path"
46608   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46609     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46610     CYGWIN_VS_TOOLS_DIR="$unix_path"
46611   fi
46612 
46613       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46614         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
46615             | $GREP -i /x64/ | $HEAD --lines 1`
46616       else
46617         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
46618             | $GREP -i /x86/ | $HEAD --lines 1`
46619       fi
46620 
46621   DLL_NAME="$DLL_NAME"
46622   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46623   METHOD="search of VS100COMNTOOLS"
46624   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46625     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46626 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46627 
46628     # Need to check if the found msvcr is correct architecture
46629     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46630 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46631     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46632     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46633       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46634       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46635       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46636         CORRECT_MSVCR_ARCH="PE32 executable"
46637       else
46638         CORRECT_MSVCR_ARCH="PE32+ executable"
46639       fi
46640     else
46641       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46642         CORRECT_MSVCR_ARCH=386
46643       else
46644         CORRECT_MSVCR_ARCH=x86-64
46645       fi
46646     fi
46647     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46648       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46649 $as_echo "ok" >&6; }
46650       MSVC_DLL="$POSSIBLE_MSVC_DLL"
46651 
46652   # Only process if variable expands to non-empty
46653 
46654   if test "x$MSVC_DLL" != x; then
46655     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46656 
46657   # Input might be given as Windows format, start by converting to
46658   # unix format.
46659   path="$MSVC_DLL"
46660   new_path=`$CYGPATH -u "$path"`
46661 
46662   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46663   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46664   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46665   # "foo.exe" is OK but "foo" is an error.
46666   #
46667   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46668   # It is also a way to make sure we got the proper file name for the real test later on.
46669   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46670   if test "x$test_shortpath" = x; then
46671     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46672 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46673     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46674   fi
46675 
46676   # Call helper function which possibly converts this using DOS-style short mode.
46677   # If so, the updated path is stored in $new_path.
46678 
46679   input_path="$new_path"
46680   # Check if we need to convert this using DOS-style short mode. If the path
46681   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46682   # take no chances and rewrite it.
46683   # Note: m4 eats our [], so we need to use [ and ] instead.
46684   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46685   if test "x$has_forbidden_chars" != x; then
46686     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46687     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46688     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46689     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46690       # Going to short mode and back again did indeed matter. Since short mode is
46691       # case insensitive, let's make it lowercase to improve readability.
46692       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46693       # Now convert it back to Unix-style (cygpath)
46694       input_path=`$CYGPATH -u "$shortmode_path"`
46695       new_path="$input_path"
46696     fi
46697   fi
46698 
46699   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46700   if test "x$test_cygdrive_prefix" = x; then
46701     # As a simple fix, exclude /usr/bin since it's not a real path.
46702     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46703       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46704       # a path prefixed by /cygdrive for fixpath to work.
46705       new_path="$CYGWIN_ROOT_PATH$input_path"
46706     fi
46707   fi
46708 
46709 
46710   if test "x$path" != "x$new_path"; then
46711     MSVC_DLL="$new_path"
46712     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46713 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46714   fi
46715 
46716     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46717 
46718   path="$MSVC_DLL"
46719   has_colon=`$ECHO $path | $GREP ^.:`
46720   new_path="$path"
46721   if test "x$has_colon" = x; then
46722     # Not in mixed or Windows style, start by that.
46723     new_path=`cmd //c echo $path`
46724   fi
46725 
46726 
46727   input_path="$new_path"
46728   # Check if we need to convert this using DOS-style short mode. If the path
46729   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46730   # take no chances and rewrite it.
46731   # Note: m4 eats our [], so we need to use [ and ] instead.
46732   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46733   if test "x$has_forbidden_chars" != x; then
46734     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46735     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46736   fi
46737 
46738 
46739   windows_path="$new_path"
46740   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46741     unix_path=`$CYGPATH -u "$windows_path"`
46742     new_path="$unix_path"
46743   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46744     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46745     new_path="$unix_path"
46746   fi
46747 
46748   if test "x$path" != "x$new_path"; then
46749     MSVC_DLL="$new_path"
46750     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46751 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46752   fi
46753 
46754   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46755   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46756 
46757     else
46758       # We're on a unix platform. Hooray! :)
46759       path="$MSVC_DLL"
46760       has_space=`$ECHO "$path" | $GREP " "`
46761       if test "x$has_space" != x; then
46762         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46763 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46764         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46765       fi
46766 
46767       # Use eval to expand a potential ~
46768       eval path="$path"
46769       if test ! -f "$path" && test ! -d "$path"; then
46770         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46771       fi
46772 
46773       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46774     fi
46775   fi
46776 
46777       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46778 $as_echo_n "checking for $DLL_NAME... " >&6; }
46779       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46780 $as_echo "$MSVC_DLL" >&6; }
46781     else
46782       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46783 $as_echo "incorrect, ignoring" >&6; }
46784       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46785 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46786     fi
46787   fi
46788 
46789     fi
46790   fi
46791 
46792   if test "x$MSVC_DLL" = x; then
46793     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
46794     # (This was the original behaviour; kept since it might turn something up)
46795     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
46796       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46797         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46798             | $GREP x64 | $HEAD --lines 1`
46799       else
46800         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46801             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
46802         if test "x$POSSIBLE_MSVC_DLL" = x; then
46803           # We're grasping at straws now...
46804           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46805               | $HEAD --lines 1`
46806         fi
46807       fi
46808 
46809 
46810   DLL_NAME="$DLL_NAME"
46811   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46812   METHOD="search of VCINSTALLDIR"
46813   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46814     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46815 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46816 
46817     # Need to check if the found msvcr is correct architecture
46818     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46819 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46820     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46821     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46822       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46823       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46824       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46825         CORRECT_MSVCR_ARCH="PE32 executable"
46826       else
46827         CORRECT_MSVCR_ARCH="PE32+ executable"
46828       fi
46829     else
46830       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46831         CORRECT_MSVCR_ARCH=386
46832       else
46833         CORRECT_MSVCR_ARCH=x86-64
46834       fi
46835     fi
46836     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46837       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46838 $as_echo "ok" >&6; }
46839       MSVC_DLL="$POSSIBLE_MSVC_DLL"
46840 
46841   # Only process if variable expands to non-empty
46842 
46843   if test "x$MSVC_DLL" != x; then
46844     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46845 
46846   # Input might be given as Windows format, start by converting to
46847   # unix format.
46848   path="$MSVC_DLL"
46849   new_path=`$CYGPATH -u "$path"`
46850 
46851   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46852   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46853   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46854   # "foo.exe" is OK but "foo" is an error.
46855   #
46856   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46857   # It is also a way to make sure we got the proper file name for the real test later on.
46858   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46859   if test "x$test_shortpath" = x; then
46860     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46861 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46862     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46863   fi
46864 
46865   # Call helper function which possibly converts this using DOS-style short mode.
46866   # If so, the updated path is stored in $new_path.
46867 
46868   input_path="$new_path"
46869   # Check if we need to convert this using DOS-style short mode. If the path
46870   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46871   # take no chances and rewrite it.
46872   # Note: m4 eats our [], so we need to use [ and ] instead.
46873   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46874   if test "x$has_forbidden_chars" != x; then
46875     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46876     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46877     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46878     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46879       # Going to short mode and back again did indeed matter. Since short mode is
46880       # case insensitive, let's make it lowercase to improve readability.
46881       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46882       # Now convert it back to Unix-style (cygpath)
46883       input_path=`$CYGPATH -u "$shortmode_path"`
46884       new_path="$input_path"
46885     fi
46886   fi
46887 
46888   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46889   if test "x$test_cygdrive_prefix" = x; then
46890     # As a simple fix, exclude /usr/bin since it's not a real path.
46891     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46892       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46893       # a path prefixed by /cygdrive for fixpath to work.
46894       new_path="$CYGWIN_ROOT_PATH$input_path"
46895     fi
46896   fi
46897 
46898 
46899   if test "x$path" != "x$new_path"; then
46900     MSVC_DLL="$new_path"
46901     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46902 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46903   fi
46904 
46905     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46906 
46907   path="$MSVC_DLL"
46908   has_colon=`$ECHO $path | $GREP ^.:`
46909   new_path="$path"
46910   if test "x$has_colon" = x; then
46911     # Not in mixed or Windows style, start by that.
46912     new_path=`cmd //c echo $path`
46913   fi
46914 
46915 
46916   input_path="$new_path"
46917   # Check if we need to convert this using DOS-style short mode. If the path
46918   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46919   # take no chances and rewrite it.
46920   # Note: m4 eats our [], so we need to use [ and ] instead.
46921   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46922   if test "x$has_forbidden_chars" != x; then
46923     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46924     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46925   fi
46926 
46927 
46928   windows_path="$new_path"
46929   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46930     unix_path=`$CYGPATH -u "$windows_path"`
46931     new_path="$unix_path"
46932   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46933     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46934     new_path="$unix_path"
46935   fi
46936 
46937   if test "x$path" != "x$new_path"; then
46938     MSVC_DLL="$new_path"
46939     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46940 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46941   fi
46942 
46943   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46944   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46945 
46946     else
46947       # We're on a unix platform. Hooray! :)
46948       path="$MSVC_DLL"
46949       has_space=`$ECHO "$path" | $GREP " "`
46950       if test "x$has_space" != x; then
46951         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46952 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46953         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46954       fi
46955 
46956       # Use eval to expand a potential ~
46957       eval path="$path"
46958       if test ! -f "$path" && test ! -d "$path"; then
46959         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46960       fi
46961 
46962       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46963     fi
46964   fi
46965 
46966       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46967 $as_echo_n "checking for $DLL_NAME... " >&6; }
46968       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46969 $as_echo "$MSVC_DLL" >&6; }
46970     else
46971       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46972 $as_echo "incorrect, ignoring" >&6; }
46973       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46974 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46975     fi
46976   fi
46977 
46978     fi
46979   fi
46980 
46981   if test "x$MSVC_DLL" = x; then
46982     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46983 $as_echo_n "checking for $DLL_NAME... " >&6; }
46984     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46985 $as_echo "no" >&6; }
46986     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
46987   fi
46988 
46989     MSVCR_DLL="$MSVC_DLL"
46990   fi
46991 
46992 
46993 
46994 # Check whether --with-msvcp-dll was given.
46995 if test "${with_msvcp_dll+set}" = set; then :
46996   withval=$with_msvcp_dll;
46997 fi
46998 
46999 
47000   if test "x$MSVCP_NAME" != "x"; then
47001     if test "x$with_msvcp_dll" != x; then
47002       # If given explicitely by user, do not probe. If not present, fail directly.
47003 
47004   DLL_NAME="$MSVCP_NAME"
47005   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
47006   METHOD="--with-msvcp-dll"
47007   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47008     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47009 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47010 
47011     # Need to check if the found msvcr is correct architecture
47012     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47013 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47014     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47015     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47016       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47017       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47018       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47019         CORRECT_MSVCR_ARCH="PE32 executable"
47020       else
47021         CORRECT_MSVCR_ARCH="PE32+ executable"
47022       fi
47023     else
47024       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47025         CORRECT_MSVCR_ARCH=386
47026       else
47027         CORRECT_MSVCR_ARCH=x86-64
47028       fi
47029     fi
47030     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47031       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47032 $as_echo "ok" >&6; }
47033       MSVC_DLL="$POSSIBLE_MSVC_DLL"
47034 
47035   # Only process if variable expands to non-empty
47036 
47037   if test "x$MSVC_DLL" != x; then
47038     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47039 
47040   # Input might be given as Windows format, start by converting to
47041   # unix format.
47042   path="$MSVC_DLL"
47043   new_path=`$CYGPATH -u "$path"`
47044 
47045   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47046   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47047   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47048   # "foo.exe" is OK but "foo" is an error.
47049   #
47050   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47051   # It is also a way to make sure we got the proper file name for the real test later on.
47052   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47053   if test "x$test_shortpath" = x; then
47054     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47055 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47056     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47057   fi
47058 
47059   # Call helper function which possibly converts this using DOS-style short mode.
47060   # If so, the updated path is stored in $new_path.
47061 
47062   input_path="$new_path"
47063   # Check if we need to convert this using DOS-style short mode. If the path
47064   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47065   # take no chances and rewrite it.
47066   # Note: m4 eats our [], so we need to use [ and ] instead.
47067   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47068   if test "x$has_forbidden_chars" != x; then
47069     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47070     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47071     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47072     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47073       # Going to short mode and back again did indeed matter. Since short mode is
47074       # case insensitive, let's make it lowercase to improve readability.
47075       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47076       # Now convert it back to Unix-style (cygpath)
47077       input_path=`$CYGPATH -u "$shortmode_path"`
47078       new_path="$input_path"
47079     fi
47080   fi
47081 
47082   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47083   if test "x$test_cygdrive_prefix" = x; then
47084     # As a simple fix, exclude /usr/bin since it's not a real path.
47085     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47086       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47087       # a path prefixed by /cygdrive for fixpath to work.
47088       new_path="$CYGWIN_ROOT_PATH$input_path"
47089     fi
47090   fi
47091 
47092 
47093   if test "x$path" != "x$new_path"; then
47094     MSVC_DLL="$new_path"
47095     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47096 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47097   fi
47098 
47099     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47100 
47101   path="$MSVC_DLL"
47102   has_colon=`$ECHO $path | $GREP ^.:`
47103   new_path="$path"
47104   if test "x$has_colon" = x; then
47105     # Not in mixed or Windows style, start by that.
47106     new_path=`cmd //c echo $path`
47107   fi
47108 
47109 
47110   input_path="$new_path"
47111   # Check if we need to convert this using DOS-style short mode. If the path
47112   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47113   # take no chances and rewrite it.
47114   # Note: m4 eats our [], so we need to use [ and ] instead.
47115   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47116   if test "x$has_forbidden_chars" != x; then
47117     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47118     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47119   fi
47120 
47121 
47122   windows_path="$new_path"
47123   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47124     unix_path=`$CYGPATH -u "$windows_path"`
47125     new_path="$unix_path"
47126   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47127     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47128     new_path="$unix_path"
47129   fi
47130 
47131   if test "x$path" != "x$new_path"; then
47132     MSVC_DLL="$new_path"
47133     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47134 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47135   fi
47136 
47137   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47138   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47139 
47140     else
47141       # We're on a unix platform. Hooray! :)
47142       path="$MSVC_DLL"
47143       has_space=`$ECHO "$path" | $GREP " "`
47144       if test "x$has_space" != x; then
47145         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47146 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47147         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47148       fi
47149 
47150       # Use eval to expand a potential ~
47151       eval path="$path"
47152       if test ! -f "$path" && test ! -d "$path"; then
47153         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47154       fi
47155 
47156       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47157     fi
47158   fi
47159 
47160       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47161 $as_echo_n "checking for $DLL_NAME... " >&6; }
47162       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47163 $as_echo "$MSVC_DLL" >&6; }
47164     else
47165       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47166 $as_echo "incorrect, ignoring" >&6; }
47167       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47168 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47169     fi
47170   fi
47171 
47172       if test "x$MSVC_DLL" = x; then
47173         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
47174       fi
47175       MSVCP_DLL="$MSVC_DLL"
47176     elif test "x$DEVKIT_MSVCP_DLL" != x; then
47177 
47178   DLL_NAME="$MSVCP_NAME"
47179   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
47180   METHOD="devkit"
47181   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47182     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47183 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47184 
47185     # Need to check if the found msvcr is correct architecture
47186     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47187 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47188     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47189     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47190       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47191       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47192       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47193         CORRECT_MSVCR_ARCH="PE32 executable"
47194       else
47195         CORRECT_MSVCR_ARCH="PE32+ executable"
47196       fi
47197     else
47198       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47199         CORRECT_MSVCR_ARCH=386
47200       else
47201         CORRECT_MSVCR_ARCH=x86-64
47202       fi
47203     fi
47204     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47205       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47206 $as_echo "ok" >&6; }
47207       MSVC_DLL="$POSSIBLE_MSVC_DLL"
47208 
47209   # Only process if variable expands to non-empty
47210 
47211   if test "x$MSVC_DLL" != x; then
47212     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47213 
47214   # Input might be given as Windows format, start by converting to
47215   # unix format.
47216   path="$MSVC_DLL"
47217   new_path=`$CYGPATH -u "$path"`
47218 
47219   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47220   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47221   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47222   # "foo.exe" is OK but "foo" is an error.
47223   #
47224   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47225   # It is also a way to make sure we got the proper file name for the real test later on.
47226   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47227   if test "x$test_shortpath" = x; then
47228     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47229 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47230     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47231   fi
47232 
47233   # Call helper function which possibly converts this using DOS-style short mode.
47234   # If so, the updated path is stored in $new_path.
47235 
47236   input_path="$new_path"
47237   # Check if we need to convert this using DOS-style short mode. If the path
47238   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47239   # take no chances and rewrite it.
47240   # Note: m4 eats our [], so we need to use [ and ] instead.
47241   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47242   if test "x$has_forbidden_chars" != x; then
47243     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47244     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47245     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47246     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47247       # Going to short mode and back again did indeed matter. Since short mode is
47248       # case insensitive, let's make it lowercase to improve readability.
47249       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47250       # Now convert it back to Unix-style (cygpath)
47251       input_path=`$CYGPATH -u "$shortmode_path"`
47252       new_path="$input_path"
47253     fi
47254   fi
47255 
47256   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47257   if test "x$test_cygdrive_prefix" = x; then
47258     # As a simple fix, exclude /usr/bin since it's not a real path.
47259     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47260       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47261       # a path prefixed by /cygdrive for fixpath to work.
47262       new_path="$CYGWIN_ROOT_PATH$input_path"
47263     fi
47264   fi
47265 
47266 
47267   if test "x$path" != "x$new_path"; then
47268     MSVC_DLL="$new_path"
47269     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47270 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47271   fi
47272 
47273     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47274 
47275   path="$MSVC_DLL"
47276   has_colon=`$ECHO $path | $GREP ^.:`
47277   new_path="$path"
47278   if test "x$has_colon" = x; then
47279     # Not in mixed or Windows style, start by that.
47280     new_path=`cmd //c echo $path`
47281   fi
47282 
47283 
47284   input_path="$new_path"
47285   # Check if we need to convert this using DOS-style short mode. If the path
47286   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47287   # take no chances and rewrite it.
47288   # Note: m4 eats our [], so we need to use [ and ] instead.
47289   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47290   if test "x$has_forbidden_chars" != x; then
47291     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47292     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47293   fi
47294 
47295 
47296   windows_path="$new_path"
47297   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47298     unix_path=`$CYGPATH -u "$windows_path"`
47299     new_path="$unix_path"
47300   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47301     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47302     new_path="$unix_path"
47303   fi
47304 
47305   if test "x$path" != "x$new_path"; then
47306     MSVC_DLL="$new_path"
47307     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47308 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47309   fi
47310 
47311   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47312   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47313 
47314     else
47315       # We're on a unix platform. Hooray! :)
47316       path="$MSVC_DLL"
47317       has_space=`$ECHO "$path" | $GREP " "`
47318       if test "x$has_space" != x; then
47319         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47320 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47321         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47322       fi
47323 
47324       # Use eval to expand a potential ~
47325       eval path="$path"
47326       if test ! -f "$path" && test ! -d "$path"; then
47327         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47328       fi
47329 
47330       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47331     fi
47332   fi
47333 
47334       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47335 $as_echo_n "checking for $DLL_NAME... " >&6; }
47336       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47337 $as_echo "$MSVC_DLL" >&6; }
47338     else
47339       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47340 $as_echo "incorrect, ignoring" >&6; }
47341       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47342 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47343     fi
47344   fi
47345 
47346       if test "x$MSVC_DLL" = x; then
47347         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
47348       fi
47349       MSVCP_DLL="$MSVC_DLL"
47350     else
47351 
47352   DLL_NAME="${MSVCP_NAME}"
47353   MSVC_DLL=
47354 
47355   if test "x$MSVC_DLL" = x; then
47356     # Probe: Using well-known location from Visual Studio 10.0
47357     if test "x$VCINSTALLDIR" != x; then
47358       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47359 
47360   windows_path="$CYGWIN_VC_INSTALL_DIR"
47361   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47362     unix_path=`$CYGPATH -u "$windows_path"`
47363     CYGWIN_VC_INSTALL_DIR="$unix_path"
47364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47365     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47366     CYGWIN_VC_INSTALL_DIR="$unix_path"
47367   fi
47368 
47369       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47370         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47371       else
47372         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47373       fi
47374       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
47375 
47376   DLL_NAME="$DLL_NAME"
47377   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47378   METHOD="well-known location in VCINSTALLDIR"
47379   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47380     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47381 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47382 
47383     # Need to check if the found msvcr is correct architecture
47384     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47385 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47386     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47387     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47388       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47389       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47390       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47391         CORRECT_MSVCR_ARCH="PE32 executable"
47392       else
47393         CORRECT_MSVCR_ARCH="PE32+ executable"
47394       fi
47395     else
47396       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47397         CORRECT_MSVCR_ARCH=386
47398       else
47399         CORRECT_MSVCR_ARCH=x86-64
47400       fi
47401     fi
47402     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47403       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47404 $as_echo "ok" >&6; }
47405       MSVC_DLL="$POSSIBLE_MSVC_DLL"
47406 
47407   # Only process if variable expands to non-empty
47408 
47409   if test "x$MSVC_DLL" != x; then
47410     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47411 
47412   # Input might be given as Windows format, start by converting to
47413   # unix format.
47414   path="$MSVC_DLL"
47415   new_path=`$CYGPATH -u "$path"`
47416 
47417   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47418   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47419   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47420   # "foo.exe" is OK but "foo" is an error.
47421   #
47422   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47423   # It is also a way to make sure we got the proper file name for the real test later on.
47424   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47425   if test "x$test_shortpath" = x; then
47426     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47427 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47428     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47429   fi
47430 
47431   # Call helper function which possibly converts this using DOS-style short mode.
47432   # If so, the updated path is stored in $new_path.
47433 
47434   input_path="$new_path"
47435   # Check if we need to convert this using DOS-style short mode. If the path
47436   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47437   # take no chances and rewrite it.
47438   # Note: m4 eats our [], so we need to use [ and ] instead.
47439   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47440   if test "x$has_forbidden_chars" != x; then
47441     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47442     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47443     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47444     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47445       # Going to short mode and back again did indeed matter. Since short mode is
47446       # case insensitive, let's make it lowercase to improve readability.
47447       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47448       # Now convert it back to Unix-style (cygpath)
47449       input_path=`$CYGPATH -u "$shortmode_path"`
47450       new_path="$input_path"
47451     fi
47452   fi
47453 
47454   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47455   if test "x$test_cygdrive_prefix" = x; then
47456     # As a simple fix, exclude /usr/bin since it's not a real path.
47457     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47458       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47459       # a path prefixed by /cygdrive for fixpath to work.
47460       new_path="$CYGWIN_ROOT_PATH$input_path"
47461     fi
47462   fi
47463 
47464 
47465   if test "x$path" != "x$new_path"; then
47466     MSVC_DLL="$new_path"
47467     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47468 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47469   fi
47470 
47471     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47472 
47473   path="$MSVC_DLL"
47474   has_colon=`$ECHO $path | $GREP ^.:`
47475   new_path="$path"
47476   if test "x$has_colon" = x; then
47477     # Not in mixed or Windows style, start by that.
47478     new_path=`cmd //c echo $path`
47479   fi
47480 
47481 
47482   input_path="$new_path"
47483   # Check if we need to convert this using DOS-style short mode. If the path
47484   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47485   # take no chances and rewrite it.
47486   # Note: m4 eats our [], so we need to use [ and ] instead.
47487   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47488   if test "x$has_forbidden_chars" != x; then
47489     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47490     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47491   fi
47492 
47493 
47494   windows_path="$new_path"
47495   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47496     unix_path=`$CYGPATH -u "$windows_path"`
47497     new_path="$unix_path"
47498   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47499     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47500     new_path="$unix_path"
47501   fi
47502 
47503   if test "x$path" != "x$new_path"; then
47504     MSVC_DLL="$new_path"
47505     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47506 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47507   fi
47508 
47509   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47510   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47511 
47512     else
47513       # We're on a unix platform. Hooray! :)
47514       path="$MSVC_DLL"
47515       has_space=`$ECHO "$path" | $GREP " "`
47516       if test "x$has_space" != x; then
47517         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47518 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47519         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47520       fi
47521 
47522       # Use eval to expand a potential ~
47523       eval path="$path"
47524       if test ! -f "$path" && test ! -d "$path"; then
47525         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47526       fi
47527 
47528       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47529     fi
47530   fi
47531 
47532       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47533 $as_echo_n "checking for $DLL_NAME... " >&6; }
47534       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47535 $as_echo "$MSVC_DLL" >&6; }
47536     else
47537       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47538 $as_echo "incorrect, ignoring" >&6; }
47539       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47540 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47541     fi
47542   fi
47543 
47544     fi
47545   fi
47546 
47547   if test "x$MSVC_DLL" = x; then
47548     # Probe: Check in the Boot JDK directory.
47549     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
47550 
47551   DLL_NAME="$DLL_NAME"
47552   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47553   METHOD="well-known location in Boot JDK"
47554   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47555     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47556 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47557 
47558     # Need to check if the found msvcr is correct architecture
47559     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47560 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47561     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47562     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47563       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47564       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47565       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47566         CORRECT_MSVCR_ARCH="PE32 executable"
47567       else
47568         CORRECT_MSVCR_ARCH="PE32+ executable"
47569       fi
47570     else
47571       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47572         CORRECT_MSVCR_ARCH=386
47573       else
47574         CORRECT_MSVCR_ARCH=x86-64
47575       fi
47576     fi
47577     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47578       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47579 $as_echo "ok" >&6; }
47580       MSVC_DLL="$POSSIBLE_MSVC_DLL"
47581 
47582   # Only process if variable expands to non-empty
47583 
47584   if test "x$MSVC_DLL" != x; then
47585     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47586 
47587   # Input might be given as Windows format, start by converting to
47588   # unix format.
47589   path="$MSVC_DLL"
47590   new_path=`$CYGPATH -u "$path"`
47591 
47592   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47593   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47594   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47595   # "foo.exe" is OK but "foo" is an error.
47596   #
47597   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47598   # It is also a way to make sure we got the proper file name for the real test later on.
47599   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47600   if test "x$test_shortpath" = x; then
47601     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47602 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47603     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47604   fi
47605 
47606   # Call helper function which possibly converts this using DOS-style short mode.
47607   # If so, the updated path is stored in $new_path.
47608 
47609   input_path="$new_path"
47610   # Check if we need to convert this using DOS-style short mode. If the path
47611   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47612   # take no chances and rewrite it.
47613   # Note: m4 eats our [], so we need to use [ and ] instead.
47614   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47615   if test "x$has_forbidden_chars" != x; then
47616     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47617     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47618     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47619     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47620       # Going to short mode and back again did indeed matter. Since short mode is
47621       # case insensitive, let's make it lowercase to improve readability.
47622       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47623       # Now convert it back to Unix-style (cygpath)
47624       input_path=`$CYGPATH -u "$shortmode_path"`
47625       new_path="$input_path"
47626     fi
47627   fi
47628 
47629   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47630   if test "x$test_cygdrive_prefix" = x; then
47631     # As a simple fix, exclude /usr/bin since it's not a real path.
47632     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47633       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47634       # a path prefixed by /cygdrive for fixpath to work.
47635       new_path="$CYGWIN_ROOT_PATH$input_path"
47636     fi
47637   fi
47638 
47639 
47640   if test "x$path" != "x$new_path"; then
47641     MSVC_DLL="$new_path"
47642     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47643 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47644   fi
47645 
47646     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47647 
47648   path="$MSVC_DLL"
47649   has_colon=`$ECHO $path | $GREP ^.:`
47650   new_path="$path"
47651   if test "x$has_colon" = x; then
47652     # Not in mixed or Windows style, start by that.
47653     new_path=`cmd //c echo $path`
47654   fi
47655 
47656 
47657   input_path="$new_path"
47658   # Check if we need to convert this using DOS-style short mode. If the path
47659   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47660   # take no chances and rewrite it.
47661   # Note: m4 eats our [], so we need to use [ and ] instead.
47662   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47663   if test "x$has_forbidden_chars" != x; then
47664     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47665     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47666   fi
47667 
47668 
47669   windows_path="$new_path"
47670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47671     unix_path=`$CYGPATH -u "$windows_path"`
47672     new_path="$unix_path"
47673   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47674     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47675     new_path="$unix_path"
47676   fi
47677 
47678   if test "x$path" != "x$new_path"; then
47679     MSVC_DLL="$new_path"
47680     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47681 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47682   fi
47683 
47684   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47685   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47686 
47687     else
47688       # We're on a unix platform. Hooray! :)
47689       path="$MSVC_DLL"
47690       has_space=`$ECHO "$path" | $GREP " "`
47691       if test "x$has_space" != x; then
47692         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47693 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47694         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47695       fi
47696 
47697       # Use eval to expand a potential ~
47698       eval path="$path"
47699       if test ! -f "$path" && test ! -d "$path"; then
47700         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47701       fi
47702 
47703       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47704     fi
47705   fi
47706 
47707       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47708 $as_echo_n "checking for $DLL_NAME... " >&6; }
47709       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47710 $as_echo "$MSVC_DLL" >&6; }
47711     else
47712       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47713 $as_echo "incorrect, ignoring" >&6; }
47714       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47715 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47716     fi
47717   fi
47718 
47719   fi
47720 
47721   if test "x$MSVC_DLL" = x; then
47722     # Probe: Look in the Windows system32 directory
47723     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
47724 
47725   windows_path="$CYGWIN_SYSTEMROOT"
47726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47727     unix_path=`$CYGPATH -u "$windows_path"`
47728     CYGWIN_SYSTEMROOT="$unix_path"
47729   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47730     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47731     CYGWIN_SYSTEMROOT="$unix_path"
47732   fi
47733 
47734     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
47735 
47736   DLL_NAME="$DLL_NAME"
47737   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47738   METHOD="well-known location in SYSTEMROOT"
47739   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47740     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47741 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47742 
47743     # Need to check if the found msvcr is correct architecture
47744     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47745 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47746     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47747     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47748       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47749       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47750       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47751         CORRECT_MSVCR_ARCH="PE32 executable"
47752       else
47753         CORRECT_MSVCR_ARCH="PE32+ executable"
47754       fi
47755     else
47756       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47757         CORRECT_MSVCR_ARCH=386
47758       else
47759         CORRECT_MSVCR_ARCH=x86-64
47760       fi
47761     fi
47762     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47763       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47764 $as_echo "ok" >&6; }
47765       MSVC_DLL="$POSSIBLE_MSVC_DLL"
47766 
47767   # Only process if variable expands to non-empty
47768 
47769   if test "x$MSVC_DLL" != x; then
47770     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47771 
47772   # Input might be given as Windows format, start by converting to
47773   # unix format.
47774   path="$MSVC_DLL"
47775   new_path=`$CYGPATH -u "$path"`
47776 
47777   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47778   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47779   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47780   # "foo.exe" is OK but "foo" is an error.
47781   #
47782   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47783   # It is also a way to make sure we got the proper file name for the real test later on.
47784   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47785   if test "x$test_shortpath" = x; then
47786     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47787 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47788     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47789   fi
47790 
47791   # Call helper function which possibly converts this using DOS-style short mode.
47792   # If so, the updated path is stored in $new_path.
47793 
47794   input_path="$new_path"
47795   # Check if we need to convert this using DOS-style short mode. If the path
47796   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47797   # take no chances and rewrite it.
47798   # Note: m4 eats our [], so we need to use [ and ] instead.
47799   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47800   if test "x$has_forbidden_chars" != x; then
47801     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47802     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47803     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47804     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47805       # Going to short mode and back again did indeed matter. Since short mode is
47806       # case insensitive, let's make it lowercase to improve readability.
47807       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47808       # Now convert it back to Unix-style (cygpath)
47809       input_path=`$CYGPATH -u "$shortmode_path"`
47810       new_path="$input_path"
47811     fi
47812   fi
47813 
47814   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47815   if test "x$test_cygdrive_prefix" = x; then
47816     # As a simple fix, exclude /usr/bin since it's not a real path.
47817     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47818       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47819       # a path prefixed by /cygdrive for fixpath to work.
47820       new_path="$CYGWIN_ROOT_PATH$input_path"
47821     fi
47822   fi
47823 
47824 
47825   if test "x$path" != "x$new_path"; then
47826     MSVC_DLL="$new_path"
47827     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47828 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47829   fi
47830 
47831     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47832 
47833   path="$MSVC_DLL"
47834   has_colon=`$ECHO $path | $GREP ^.:`
47835   new_path="$path"
47836   if test "x$has_colon" = x; then
47837     # Not in mixed or Windows style, start by that.
47838     new_path=`cmd //c echo $path`
47839   fi
47840 
47841 
47842   input_path="$new_path"
47843   # Check if we need to convert this using DOS-style short mode. If the path
47844   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47845   # take no chances and rewrite it.
47846   # Note: m4 eats our [], so we need to use [ and ] instead.
47847   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47848   if test "x$has_forbidden_chars" != x; then
47849     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47850     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47851   fi
47852 
47853 
47854   windows_path="$new_path"
47855   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47856     unix_path=`$CYGPATH -u "$windows_path"`
47857     new_path="$unix_path"
47858   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47859     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47860     new_path="$unix_path"
47861   fi
47862 
47863   if test "x$path" != "x$new_path"; then
47864     MSVC_DLL="$new_path"
47865     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47866 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47867   fi
47868 
47869   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47870   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47871 
47872     else
47873       # We're on a unix platform. Hooray! :)
47874       path="$MSVC_DLL"
47875       has_space=`$ECHO "$path" | $GREP " "`
47876       if test "x$has_space" != x; then
47877         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47878 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47879         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47880       fi
47881 
47882       # Use eval to expand a potential ~
47883       eval path="$path"
47884       if test ! -f "$path" && test ! -d "$path"; then
47885         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47886       fi
47887 
47888       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47889     fi
47890   fi
47891 
47892       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47893 $as_echo_n "checking for $DLL_NAME... " >&6; }
47894       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47895 $as_echo "$MSVC_DLL" >&6; }
47896     else
47897       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47898 $as_echo "incorrect, ignoring" >&6; }
47899       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47900 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47901     fi
47902   fi
47903 
47904   fi
47905 
47906   if test "x$MSVC_DLL" = x; then
47907     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
47908     if test "x$VS100COMNTOOLS" != x; then
47909       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
47910 
47911   windows_path="$CYGWIN_VS_TOOLS_DIR"
47912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47913     unix_path=`$CYGPATH -u "$windows_path"`
47914     CYGWIN_VS_TOOLS_DIR="$unix_path"
47915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47916     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47917     CYGWIN_VS_TOOLS_DIR="$unix_path"
47918   fi
47919 
47920       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47921         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
47922             | $GREP -i /x64/ | $HEAD --lines 1`
47923       else
47924         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
47925             | $GREP -i /x86/ | $HEAD --lines 1`
47926       fi
47927 
47928   DLL_NAME="$DLL_NAME"
47929   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47930   METHOD="search of VS100COMNTOOLS"
47931   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47932     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47933 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47934 
47935     # Need to check if the found msvcr is correct architecture
47936     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47937 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47938     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47939     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47940       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47941       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47942       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47943         CORRECT_MSVCR_ARCH="PE32 executable"
47944       else
47945         CORRECT_MSVCR_ARCH="PE32+ executable"
47946       fi
47947     else
47948       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47949         CORRECT_MSVCR_ARCH=386
47950       else
47951         CORRECT_MSVCR_ARCH=x86-64
47952       fi
47953     fi
47954     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47955       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47956 $as_echo "ok" >&6; }
47957       MSVC_DLL="$POSSIBLE_MSVC_DLL"
47958 
47959   # Only process if variable expands to non-empty
47960 
47961   if test "x$MSVC_DLL" != x; then
47962     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47963 
47964   # Input might be given as Windows format, start by converting to
47965   # unix format.
47966   path="$MSVC_DLL"
47967   new_path=`$CYGPATH -u "$path"`
47968 
47969   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47970   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47971   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47972   # "foo.exe" is OK but "foo" is an error.
47973   #
47974   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47975   # It is also a way to make sure we got the proper file name for the real test later on.
47976   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47977   if test "x$test_shortpath" = x; then
47978     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47979 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47980     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47981   fi
47982 
47983   # Call helper function which possibly converts this using DOS-style short mode.
47984   # If so, the updated path is stored in $new_path.
47985 
47986   input_path="$new_path"
47987   # Check if we need to convert this using DOS-style short mode. If the path
47988   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47989   # take no chances and rewrite it.
47990   # Note: m4 eats our [], so we need to use [ and ] instead.
47991   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47992   if test "x$has_forbidden_chars" != x; then
47993     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47994     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47995     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47996     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47997       # Going to short mode and back again did indeed matter. Since short mode is
47998       # case insensitive, let's make it lowercase to improve readability.
47999       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48000       # Now convert it back to Unix-style (cygpath)
48001       input_path=`$CYGPATH -u "$shortmode_path"`
48002       new_path="$input_path"
48003     fi
48004   fi
48005 
48006   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48007   if test "x$test_cygdrive_prefix" = x; then
48008     # As a simple fix, exclude /usr/bin since it's not a real path.
48009     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48010       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48011       # a path prefixed by /cygdrive for fixpath to work.
48012       new_path="$CYGWIN_ROOT_PATH$input_path"
48013     fi
48014   fi
48015 
48016 
48017   if test "x$path" != "x$new_path"; then
48018     MSVC_DLL="$new_path"
48019     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48020 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48021   fi
48022 
48023     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48024 
48025   path="$MSVC_DLL"
48026   has_colon=`$ECHO $path | $GREP ^.:`
48027   new_path="$path"
48028   if test "x$has_colon" = x; then
48029     # Not in mixed or Windows style, start by that.
48030     new_path=`cmd //c echo $path`
48031   fi
48032 
48033 
48034   input_path="$new_path"
48035   # Check if we need to convert this using DOS-style short mode. If the path
48036   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48037   # take no chances and rewrite it.
48038   # Note: m4 eats our [], so we need to use [ and ] instead.
48039   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48040   if test "x$has_forbidden_chars" != x; then
48041     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48042     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48043   fi
48044 
48045 
48046   windows_path="$new_path"
48047   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48048     unix_path=`$CYGPATH -u "$windows_path"`
48049     new_path="$unix_path"
48050   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48051     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48052     new_path="$unix_path"
48053   fi
48054 
48055   if test "x$path" != "x$new_path"; then
48056     MSVC_DLL="$new_path"
48057     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48058 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48059   fi
48060 
48061   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48062   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48063 
48064     else
48065       # We're on a unix platform. Hooray! :)
48066       path="$MSVC_DLL"
48067       has_space=`$ECHO "$path" | $GREP " "`
48068       if test "x$has_space" != x; then
48069         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48070 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48071         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48072       fi
48073 
48074       # Use eval to expand a potential ~
48075       eval path="$path"
48076       if test ! -f "$path" && test ! -d "$path"; then
48077         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48078       fi
48079 
48080       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48081     fi
48082   fi
48083 
48084       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48085 $as_echo_n "checking for $DLL_NAME... " >&6; }
48086       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48087 $as_echo "$MSVC_DLL" >&6; }
48088     else
48089       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48090 $as_echo "incorrect, ignoring" >&6; }
48091       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48092 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48093     fi
48094   fi
48095 
48096     fi
48097   fi
48098 
48099   if test "x$MSVC_DLL" = x; then
48100     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48101     # (This was the original behaviour; kept since it might turn something up)
48102     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48103       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48104         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48105             | $GREP x64 | $HEAD --lines 1`
48106       else
48107         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48108             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48109         if test "x$POSSIBLE_MSVC_DLL" = x; then
48110           # We're grasping at straws now...
48111           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48112               | $HEAD --lines 1`
48113         fi
48114       fi
48115 
48116 
48117   DLL_NAME="$DLL_NAME"
48118   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48119   METHOD="search of VCINSTALLDIR"
48120   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48121     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48122 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48123 
48124     # Need to check if the found msvcr is correct architecture
48125     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48126 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48127     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48128     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48129       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48130       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48131       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48132         CORRECT_MSVCR_ARCH="PE32 executable"
48133       else
48134         CORRECT_MSVCR_ARCH="PE32+ executable"
48135       fi
48136     else
48137       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48138         CORRECT_MSVCR_ARCH=386
48139       else
48140         CORRECT_MSVCR_ARCH=x86-64
48141       fi
48142     fi
48143     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48144       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48145 $as_echo "ok" >&6; }
48146       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48147 
48148   # Only process if variable expands to non-empty
48149 
48150   if test "x$MSVC_DLL" != x; then
48151     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48152 
48153   # Input might be given as Windows format, start by converting to
48154   # unix format.
48155   path="$MSVC_DLL"
48156   new_path=`$CYGPATH -u "$path"`
48157 
48158   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48159   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48160   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48161   # "foo.exe" is OK but "foo" is an error.
48162   #
48163   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48164   # It is also a way to make sure we got the proper file name for the real test later on.
48165   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48166   if test "x$test_shortpath" = x; then
48167     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48168 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48169     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48170   fi
48171 
48172   # Call helper function which possibly converts this using DOS-style short mode.
48173   # If so, the updated path is stored in $new_path.
48174 
48175   input_path="$new_path"
48176   # Check if we need to convert this using DOS-style short mode. If the path
48177   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48178   # take no chances and rewrite it.
48179   # Note: m4 eats our [], so we need to use [ and ] instead.
48180   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48181   if test "x$has_forbidden_chars" != x; then
48182     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48183     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48184     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48185     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48186       # Going to short mode and back again did indeed matter. Since short mode is
48187       # case insensitive, let's make it lowercase to improve readability.
48188       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48189       # Now convert it back to Unix-style (cygpath)
48190       input_path=`$CYGPATH -u "$shortmode_path"`
48191       new_path="$input_path"
48192     fi
48193   fi
48194 
48195   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48196   if test "x$test_cygdrive_prefix" = x; then
48197     # As a simple fix, exclude /usr/bin since it's not a real path.
48198     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48199       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48200       # a path prefixed by /cygdrive for fixpath to work.
48201       new_path="$CYGWIN_ROOT_PATH$input_path"
48202     fi
48203   fi
48204 
48205 
48206   if test "x$path" != "x$new_path"; then
48207     MSVC_DLL="$new_path"
48208     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48209 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48210   fi
48211 
48212     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48213 
48214   path="$MSVC_DLL"
48215   has_colon=`$ECHO $path | $GREP ^.:`
48216   new_path="$path"
48217   if test "x$has_colon" = x; then
48218     # Not in mixed or Windows style, start by that.
48219     new_path=`cmd //c echo $path`
48220   fi
48221 
48222 
48223   input_path="$new_path"
48224   # Check if we need to convert this using DOS-style short mode. If the path
48225   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48226   # take no chances and rewrite it.
48227   # Note: m4 eats our [], so we need to use [ and ] instead.
48228   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48229   if test "x$has_forbidden_chars" != x; then
48230     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48231     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48232   fi
48233 
48234 
48235   windows_path="$new_path"
48236   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48237     unix_path=`$CYGPATH -u "$windows_path"`
48238     new_path="$unix_path"
48239   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48240     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48241     new_path="$unix_path"
48242   fi
48243 
48244   if test "x$path" != "x$new_path"; then
48245     MSVC_DLL="$new_path"
48246     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48247 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48248   fi
48249 
48250   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48251   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48252 
48253     else
48254       # We're on a unix platform. Hooray! :)
48255       path="$MSVC_DLL"
48256       has_space=`$ECHO "$path" | $GREP " "`
48257       if test "x$has_space" != x; then
48258         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48259 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48260         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48261       fi
48262 
48263       # Use eval to expand a potential ~
48264       eval path="$path"
48265       if test ! -f "$path" && test ! -d "$path"; then
48266         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48267       fi
48268 
48269       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48270     fi
48271   fi
48272 
48273       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48274 $as_echo_n "checking for $DLL_NAME... " >&6; }
48275       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48276 $as_echo "$MSVC_DLL" >&6; }
48277     else
48278       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48279 $as_echo "incorrect, ignoring" >&6; }
48280       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48281 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48282     fi
48283   fi
48284 
48285     fi
48286   fi
48287 
48288   if test "x$MSVC_DLL" = x; then
48289     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48290 $as_echo_n "checking for $DLL_NAME... " >&6; }
48291     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48292 $as_echo "no" >&6; }
48293     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
48294   fi
48295 
48296       MSVCP_DLL="$MSVC_DLL"
48297     fi
48298 
48299   fi
48300 
48301   fi
48302 
48303 
48304   if test "x$NEEDS_LIB_X11" = xfalse; then
48305     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
48306       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
48307 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
48308     fi
48309     X_CFLAGS=
48310     X_LIBS=
48311   else
48312 
48313     if test "x${with_x}" = xno; then
48314       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
48315     fi
48316 
48317     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
48318       # The user has specified a X11 base directory. Use it for includes and
48319       # libraries, unless explicitely overridden.
48320       if test "x$x_includes" = xNONE; then
48321         x_includes="${with_x}/include"
48322       fi
48323       if test "x$x_libraries" = xNONE; then
48324         x_libraries="${with_x}/lib"
48325       fi
48326     else
48327       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
48328       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
48329       # --x-libraries for the sysroot, if that seems to be correct.
48330       if test "x$SYSROOT" != "x"; then
48331         if test "x$x_includes" = xNONE; then
48332           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
48333             x_includes="$SYSROOT/usr/X11R6/include"
48334           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
48335             x_includes="$SYSROOT/usr/include"
48336           fi
48337         fi
48338         if test "x$x_libraries" = xNONE; then
48339           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
48340             x_libraries="$SYSROOT/usr/X11R6/lib"
48341           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48342             x_libraries="$SYSROOT/usr/lib64"
48343           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
48344             x_libraries="$SYSROOT/usr/lib"
48345           fi
48346         fi
48347       fi
48348     fi
48349 
48350     # Now let autoconf do it's magic
48351     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
48352 $as_echo_n "checking for X... " >&6; }
48353 
48354 
48355 # Check whether --with-x was given.
48356 if test "${with_x+set}" = set; then :
48357   withval=$with_x;
48358 fi
48359 
48360 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
48361 if test "x$with_x" = xno; then
48362   # The user explicitly disabled X.
48363   have_x=disabled
48364 else
48365   case $x_includes,$x_libraries in #(
48366     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
48367     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
48368   $as_echo_n "(cached) " >&6
48369 else
48370   # One or both of the vars are not set, and there is no cached value.
48371 ac_x_includes=no ac_x_libraries=no
48372 rm -f -r conftest.dir
48373 if mkdir conftest.dir; then
48374   cd conftest.dir
48375   cat >Imakefile <<'_ACEOF'
48376 incroot:
48377         @echo incroot='${INCROOT}'
48378 usrlibdir:
48379         @echo usrlibdir='${USRLIBDIR}'
48380 libdir:
48381         @echo libdir='${LIBDIR}'
48382 _ACEOF
48383   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
48384     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
48385     for ac_var in incroot usrlibdir libdir; do
48386       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
48387     done
48388     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
48389     for ac_extension in a so sl dylib la dll; do
48390       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
48391          test -f "$ac_im_libdir/libX11.$ac_extension"; then
48392         ac_im_usrlibdir=$ac_im_libdir; break
48393       fi
48394     done
48395     # Screen out bogus values from the imake configuration.  They are
48396     # bogus both because they are the default anyway, and because
48397     # using them would break gcc on systems where it needs fixed includes.
48398     case $ac_im_incroot in
48399         /usr/include) ac_x_includes= ;;
48400         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
48401     esac
48402     case $ac_im_usrlibdir in
48403         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
48404         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
48405     esac
48406   fi
48407   cd ..
48408   rm -f -r conftest.dir
48409 fi
48410 
48411 # Standard set of common directories for X headers.
48412 # Check X11 before X11Rn because it is often a symlink to the current release.
48413 ac_x_header_dirs='
48414 /usr/X11/include
48415 /usr/X11R7/include
48416 /usr/X11R6/include
48417 /usr/X11R5/include
48418 /usr/X11R4/include
48419 
48420 /usr/include/X11
48421 /usr/include/X11R7
48422 /usr/include/X11R6
48423 /usr/include/X11R5
48424 /usr/include/X11R4
48425 
48426 /usr/local/X11/include
48427 /usr/local/X11R7/include
48428 /usr/local/X11R6/include
48429 /usr/local/X11R5/include
48430 /usr/local/X11R4/include
48431 
48432 /usr/local/include/X11
48433 /usr/local/include/X11R7
48434 /usr/local/include/X11R6
48435 /usr/local/include/X11R5
48436 /usr/local/include/X11R4
48437 
48438 /usr/X386/include
48439 /usr/x386/include
48440 /usr/XFree86/include/X11
48441 
48442 /usr/include
48443 /usr/local/include
48444 /usr/unsupported/include
48445 /usr/athena/include
48446 /usr/local/x11r5/include
48447 /usr/lpp/Xamples/include
48448 
48449 /usr/openwin/include
48450 /usr/openwin/share/include'
48451 
48452 if test "$ac_x_includes" = no; then
48453   # Guess where to find include files, by looking for Xlib.h.
48454   # First, try using that file with no special directory specified.
48455   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48456 /* end confdefs.h.  */
48457 #include <X11/Xlib.h>
48458 _ACEOF
48459 if ac_fn_cxx_try_cpp "$LINENO"; then :
48460   # We can compile using X headers with no special include directory.
48461 ac_x_includes=
48462 else
48463   for ac_dir in $ac_x_header_dirs; do
48464   if test -r "$ac_dir/X11/Xlib.h"; then
48465     ac_x_includes=$ac_dir
48466     break
48467   fi
48468 done
48469 fi
48470 rm -f conftest.err conftest.i conftest.$ac_ext
48471 fi # $ac_x_includes = no
48472 
48473 if test "$ac_x_libraries" = no; then
48474   # Check for the libraries.
48475   # See if we find them without any special options.
48476   # Don't add to $LIBS permanently.
48477   ac_save_LIBS=$LIBS
48478   LIBS="-lX11 $LIBS"
48479   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48480 /* end confdefs.h.  */
48481 #include <X11/Xlib.h>
48482 int
48483 main ()
48484 {
48485 XrmInitialize ()
48486   ;
48487   return 0;
48488 }
48489 _ACEOF
48490 if ac_fn_cxx_try_link "$LINENO"; then :
48491   LIBS=$ac_save_LIBS
48492 # We can link X programs with no special library path.
48493 ac_x_libraries=
48494 else
48495   LIBS=$ac_save_LIBS
48496 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
48497 do
48498   # Don't even attempt the hair of trying to link an X program!
48499   for ac_extension in a so sl dylib la dll; do
48500     if test -r "$ac_dir/libX11.$ac_extension"; then
48501       ac_x_libraries=$ac_dir
48502       break 2
48503     fi
48504   done
48505 done
48506 fi
48507 rm -f core conftest.err conftest.$ac_objext \
48508     conftest$ac_exeext conftest.$ac_ext
48509 fi # $ac_x_libraries = no
48510 
48511 case $ac_x_includes,$ac_x_libraries in #(
48512   no,* | *,no | *\'*)
48513     # Didn't find X, or a directory has "'" in its name.
48514     ac_cv_have_x="have_x=no";; #(
48515   *)
48516     # Record where we found X for the cache.
48517     ac_cv_have_x="have_x=yes\
48518         ac_x_includes='$ac_x_includes'\
48519         ac_x_libraries='$ac_x_libraries'"
48520 esac
48521 fi
48522 ;; #(
48523     *) have_x=yes;;
48524   esac
48525   eval "$ac_cv_have_x"
48526 fi # $with_x != no
48527 
48528 if test "$have_x" != yes; then
48529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
48530 $as_echo "$have_x" >&6; }
48531   no_x=yes
48532 else
48533   # If each of the values was on the command line, it overrides each guess.
48534   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
48535   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
48536   # Update the cache value to reflect the command line values.
48537   ac_cv_have_x="have_x=yes\
48538         ac_x_includes='$x_includes'\
48539         ac_x_libraries='$x_libraries'"
48540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
48541 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
48542 fi
48543 
48544     if test "$no_x" = yes; then
48545   # Not all programs may use this symbol, but it does not hurt to define it.
48546 
48547 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
48548 
48549   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
48550 else
48551   if test -n "$x_includes"; then
48552     X_CFLAGS="$X_CFLAGS -I$x_includes"
48553   fi
48554 
48555   # It would also be nice to do this for all -L options, not just this one.
48556   if test -n "$x_libraries"; then
48557     X_LIBS="$X_LIBS -L$x_libraries"
48558     # For Solaris; some versions of Sun CC require a space after -R and
48559     # others require no space.  Words are not sufficient . . . .
48560     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
48561 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
48562     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
48563     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
48564     ac_cxx_werror_flag=yes
48565     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48566 /* end confdefs.h.  */
48567 
48568 int
48569 main ()
48570 {
48571 
48572   ;
48573   return 0;
48574 }
48575 _ACEOF
48576 if ac_fn_cxx_try_link "$LINENO"; then :
48577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48578 $as_echo "no" >&6; }
48579        X_LIBS="$X_LIBS -R$x_libraries"
48580 else
48581   LIBS="$ac_xsave_LIBS -R $x_libraries"
48582        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48583 /* end confdefs.h.  */
48584 
48585 int
48586 main ()
48587 {
48588 
48589   ;
48590   return 0;
48591 }
48592 _ACEOF
48593 if ac_fn_cxx_try_link "$LINENO"; then :
48594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48595 $as_echo "yes" >&6; }
48596           X_LIBS="$X_LIBS -R $x_libraries"
48597 else
48598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
48599 $as_echo "neither works" >&6; }
48600 fi
48601 rm -f core conftest.err conftest.$ac_objext \
48602     conftest$ac_exeext conftest.$ac_ext
48603 fi
48604 rm -f core conftest.err conftest.$ac_objext \
48605     conftest$ac_exeext conftest.$ac_ext
48606     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
48607     LIBS=$ac_xsave_LIBS
48608   fi
48609 
48610   # Check for system-dependent libraries X programs must link with.
48611   # Do this before checking for the system-independent R6 libraries
48612   # (-lICE), since we may need -lsocket or whatever for X linking.
48613 
48614   if test "$ISC" = yes; then
48615     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
48616   else
48617     # Martyn Johnson says this is needed for Ultrix, if the X
48618     # libraries were built with DECnet support.  And Karl Berry says
48619     # the Alpha needs dnet_stub (dnet does not exist).
48620     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
48621     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48622 /* end confdefs.h.  */
48623 
48624 /* Override any GCC internal prototype to avoid an error.
48625    Use char because int might match the return type of a GCC
48626    builtin and then its argument prototype would still apply.  */
48627 #ifdef __cplusplus
48628 extern "C"
48629 #endif
48630 char XOpenDisplay ();
48631 int
48632 main ()
48633 {
48634 return XOpenDisplay ();
48635   ;
48636   return 0;
48637 }
48638 _ACEOF
48639 if ac_fn_cxx_try_link "$LINENO"; then :
48640 
48641 else
48642   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
48643 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
48644 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
48645   $as_echo_n "(cached) " >&6
48646 else
48647   ac_check_lib_save_LIBS=$LIBS
48648 LIBS="-ldnet  $LIBS"
48649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48650 /* end confdefs.h.  */
48651 
48652 /* Override any GCC internal prototype to avoid an error.
48653    Use char because int might match the return type of a GCC
48654    builtin and then its argument prototype would still apply.  */
48655 #ifdef __cplusplus
48656 extern "C"
48657 #endif
48658 char dnet_ntoa ();
48659 int
48660 main ()
48661 {
48662 return dnet_ntoa ();
48663   ;
48664   return 0;
48665 }
48666 _ACEOF
48667 if ac_fn_cxx_try_link "$LINENO"; then :
48668   ac_cv_lib_dnet_dnet_ntoa=yes
48669 else
48670   ac_cv_lib_dnet_dnet_ntoa=no
48671 fi
48672 rm -f core conftest.err conftest.$ac_objext \
48673     conftest$ac_exeext conftest.$ac_ext
48674 LIBS=$ac_check_lib_save_LIBS
48675 fi
48676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
48677 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
48678 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
48679   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
48680 fi
48681 
48682     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
48683       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
48684 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
48685 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
48686   $as_echo_n "(cached) " >&6
48687 else
48688   ac_check_lib_save_LIBS=$LIBS
48689 LIBS="-ldnet_stub  $LIBS"
48690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48691 /* end confdefs.h.  */
48692 
48693 /* Override any GCC internal prototype to avoid an error.
48694    Use char because int might match the return type of a GCC
48695    builtin and then its argument prototype would still apply.  */
48696 #ifdef __cplusplus
48697 extern "C"
48698 #endif
48699 char dnet_ntoa ();
48700 int
48701 main ()
48702 {
48703 return dnet_ntoa ();
48704   ;
48705   return 0;
48706 }
48707 _ACEOF
48708 if ac_fn_cxx_try_link "$LINENO"; then :
48709   ac_cv_lib_dnet_stub_dnet_ntoa=yes
48710 else
48711   ac_cv_lib_dnet_stub_dnet_ntoa=no
48712 fi
48713 rm -f core conftest.err conftest.$ac_objext \
48714     conftest$ac_exeext conftest.$ac_ext
48715 LIBS=$ac_check_lib_save_LIBS
48716 fi
48717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
48718 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
48719 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
48720   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
48721 fi
48722 
48723     fi
48724 fi
48725 rm -f core conftest.err conftest.$ac_objext \
48726     conftest$ac_exeext conftest.$ac_ext
48727     LIBS="$ac_xsave_LIBS"
48728 
48729     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
48730     # to get the SysV transport functions.
48731     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
48732     # needs -lnsl.
48733     # The nsl library prevents programs from opening the X display
48734     # on Irix 5.2, according to T.E. Dickey.
48735     # The functions gethostbyname, getservbyname, and inet_addr are
48736     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
48737     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
48738 if test "x$ac_cv_func_gethostbyname" = xyes; then :
48739 
48740 fi
48741 
48742     if test $ac_cv_func_gethostbyname = no; then
48743       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
48744 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
48745 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
48746   $as_echo_n "(cached) " >&6
48747 else
48748   ac_check_lib_save_LIBS=$LIBS
48749 LIBS="-lnsl  $LIBS"
48750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48751 /* end confdefs.h.  */
48752 
48753 /* Override any GCC internal prototype to avoid an error.
48754    Use char because int might match the return type of a GCC
48755    builtin and then its argument prototype would still apply.  */
48756 #ifdef __cplusplus
48757 extern "C"
48758 #endif
48759 char gethostbyname ();
48760 int
48761 main ()
48762 {
48763 return gethostbyname ();
48764   ;
48765   return 0;
48766 }
48767 _ACEOF
48768 if ac_fn_cxx_try_link "$LINENO"; then :
48769   ac_cv_lib_nsl_gethostbyname=yes
48770 else
48771   ac_cv_lib_nsl_gethostbyname=no
48772 fi
48773 rm -f core conftest.err conftest.$ac_objext \
48774     conftest$ac_exeext conftest.$ac_ext
48775 LIBS=$ac_check_lib_save_LIBS
48776 fi
48777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
48778 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
48779 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
48780   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
48781 fi
48782 
48783       if test $ac_cv_lib_nsl_gethostbyname = no; then
48784         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
48785 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
48786 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
48787   $as_echo_n "(cached) " >&6
48788 else
48789   ac_check_lib_save_LIBS=$LIBS
48790 LIBS="-lbsd  $LIBS"
48791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48792 /* end confdefs.h.  */
48793 
48794 /* Override any GCC internal prototype to avoid an error.
48795    Use char because int might match the return type of a GCC
48796    builtin and then its argument prototype would still apply.  */
48797 #ifdef __cplusplus
48798 extern "C"
48799 #endif
48800 char gethostbyname ();
48801 int
48802 main ()
48803 {
48804 return gethostbyname ();
48805   ;
48806   return 0;
48807 }
48808 _ACEOF
48809 if ac_fn_cxx_try_link "$LINENO"; then :
48810   ac_cv_lib_bsd_gethostbyname=yes
48811 else
48812   ac_cv_lib_bsd_gethostbyname=no
48813 fi
48814 rm -f core conftest.err conftest.$ac_objext \
48815     conftest$ac_exeext conftest.$ac_ext
48816 LIBS=$ac_check_lib_save_LIBS
48817 fi
48818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
48819 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
48820 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
48821   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
48822 fi
48823 
48824       fi
48825     fi
48826 
48827     # lieder@skyler.mavd.honeywell.com says without -lsocket,
48828     # socket/setsockopt and other routines are undefined under SCO ODT
48829     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
48830     # on later versions), says Simon Leinen: it contains gethostby*
48831     # variants that don't use the name server (or something).  -lsocket
48832     # must be given before -lnsl if both are needed.  We assume that
48833     # if connect needs -lnsl, so does gethostbyname.
48834     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
48835 if test "x$ac_cv_func_connect" = xyes; then :
48836 
48837 fi
48838 
48839     if test $ac_cv_func_connect = no; then
48840       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
48841 $as_echo_n "checking for connect in -lsocket... " >&6; }
48842 if ${ac_cv_lib_socket_connect+:} false; then :
48843   $as_echo_n "(cached) " >&6
48844 else
48845   ac_check_lib_save_LIBS=$LIBS
48846 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
48847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48848 /* end confdefs.h.  */
48849 
48850 /* Override any GCC internal prototype to avoid an error.
48851    Use char because int might match the return type of a GCC
48852    builtin and then its argument prototype would still apply.  */
48853 #ifdef __cplusplus
48854 extern "C"
48855 #endif
48856 char connect ();
48857 int
48858 main ()
48859 {
48860 return connect ();
48861   ;
48862   return 0;
48863 }
48864 _ACEOF
48865 if ac_fn_cxx_try_link "$LINENO"; then :
48866   ac_cv_lib_socket_connect=yes
48867 else
48868   ac_cv_lib_socket_connect=no
48869 fi
48870 rm -f core conftest.err conftest.$ac_objext \
48871     conftest$ac_exeext conftest.$ac_ext
48872 LIBS=$ac_check_lib_save_LIBS
48873 fi
48874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
48875 $as_echo "$ac_cv_lib_socket_connect" >&6; }
48876 if test "x$ac_cv_lib_socket_connect" = xyes; then :
48877   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
48878 fi
48879 
48880     fi
48881 
48882     # Guillermo Gomez says -lposix is necessary on A/UX.
48883     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
48884 if test "x$ac_cv_func_remove" = xyes; then :
48885 
48886 fi
48887 
48888     if test $ac_cv_func_remove = no; then
48889       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
48890 $as_echo_n "checking for remove in -lposix... " >&6; }
48891 if ${ac_cv_lib_posix_remove+:} false; then :
48892   $as_echo_n "(cached) " >&6
48893 else
48894   ac_check_lib_save_LIBS=$LIBS
48895 LIBS="-lposix  $LIBS"
48896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48897 /* end confdefs.h.  */
48898 
48899 /* Override any GCC internal prototype to avoid an error.
48900    Use char because int might match the return type of a GCC
48901    builtin and then its argument prototype would still apply.  */
48902 #ifdef __cplusplus
48903 extern "C"
48904 #endif
48905 char remove ();
48906 int
48907 main ()
48908 {
48909 return remove ();
48910   ;
48911   return 0;
48912 }
48913 _ACEOF
48914 if ac_fn_cxx_try_link "$LINENO"; then :
48915   ac_cv_lib_posix_remove=yes
48916 else
48917   ac_cv_lib_posix_remove=no
48918 fi
48919 rm -f core conftest.err conftest.$ac_objext \
48920     conftest$ac_exeext conftest.$ac_ext
48921 LIBS=$ac_check_lib_save_LIBS
48922 fi
48923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
48924 $as_echo "$ac_cv_lib_posix_remove" >&6; }
48925 if test "x$ac_cv_lib_posix_remove" = xyes; then :
48926   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
48927 fi
48928 
48929     fi
48930 
48931     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
48932     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
48933 if test "x$ac_cv_func_shmat" = xyes; then :
48934 
48935 fi
48936 
48937     if test $ac_cv_func_shmat = no; then
48938       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
48939 $as_echo_n "checking for shmat in -lipc... " >&6; }
48940 if ${ac_cv_lib_ipc_shmat+:} false; then :
48941   $as_echo_n "(cached) " >&6
48942 else
48943   ac_check_lib_save_LIBS=$LIBS
48944 LIBS="-lipc  $LIBS"
48945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48946 /* end confdefs.h.  */
48947 
48948 /* Override any GCC internal prototype to avoid an error.
48949    Use char because int might match the return type of a GCC
48950    builtin and then its argument prototype would still apply.  */
48951 #ifdef __cplusplus
48952 extern "C"
48953 #endif
48954 char shmat ();
48955 int
48956 main ()
48957 {
48958 return shmat ();
48959   ;
48960   return 0;
48961 }
48962 _ACEOF
48963 if ac_fn_cxx_try_link "$LINENO"; then :
48964   ac_cv_lib_ipc_shmat=yes
48965 else
48966   ac_cv_lib_ipc_shmat=no
48967 fi
48968 rm -f core conftest.err conftest.$ac_objext \
48969     conftest$ac_exeext conftest.$ac_ext
48970 LIBS=$ac_check_lib_save_LIBS
48971 fi
48972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
48973 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
48974 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
48975   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
48976 fi
48977 
48978     fi
48979   fi
48980 
48981   # Check for libraries that X11R6 Xt/Xaw programs need.
48982   ac_save_LDFLAGS=$LDFLAGS
48983   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
48984   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
48985   # check for ICE first), but we must link in the order -lSM -lICE or
48986   # we get undefined symbols.  So assume we have SM if we have ICE.
48987   # These have to be linked with before -lX11, unlike the other
48988   # libraries we check for below, so use a different variable.
48989   # John Interrante, Karl Berry
48990   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
48991 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
48992 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
48993   $as_echo_n "(cached) " >&6
48994 else
48995   ac_check_lib_save_LIBS=$LIBS
48996 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
48997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48998 /* end confdefs.h.  */
48999 
49000 /* Override any GCC internal prototype to avoid an error.
49001    Use char because int might match the return type of a GCC
49002    builtin and then its argument prototype would still apply.  */
49003 #ifdef __cplusplus
49004 extern "C"
49005 #endif
49006 char IceConnectionNumber ();
49007 int
49008 main ()
49009 {
49010 return IceConnectionNumber ();
49011   ;
49012   return 0;
49013 }
49014 _ACEOF
49015 if ac_fn_cxx_try_link "$LINENO"; then :
49016   ac_cv_lib_ICE_IceConnectionNumber=yes
49017 else
49018   ac_cv_lib_ICE_IceConnectionNumber=no
49019 fi
49020 rm -f core conftest.err conftest.$ac_objext \
49021     conftest$ac_exeext conftest.$ac_ext
49022 LIBS=$ac_check_lib_save_LIBS
49023 fi
49024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
49025 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
49026 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
49027   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
49028 fi
49029 
49030   LDFLAGS=$ac_save_LDFLAGS
49031 
49032 fi
49033 
49034 
49035     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
49036     # this doesn't make sense so we remove it.
49037     if test "x$COMPILE_TYPE" = xcross; then
49038       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
49039     fi
49040 
49041     if test "x$no_x" = xyes; then
49042 
49043   # Print a helpful message on how to acquire the necessary build dependency.
49044   # x11 is the help tag: freetype, cups, alsa etc
49045   MISSING_DEPENDENCY=x11
49046 
49047   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49048     cygwin_help $MISSING_DEPENDENCY
49049   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49050     msys_help $MISSING_DEPENDENCY
49051   else
49052     PKGHANDLER_COMMAND=
49053 
49054     case $PKGHANDLER in
49055       apt-get)
49056         apt_help     $MISSING_DEPENDENCY ;;
49057       yum)
49058         yum_help     $MISSING_DEPENDENCY ;;
49059       port)
49060         port_help    $MISSING_DEPENDENCY ;;
49061       pkgutil)
49062         pkgutil_help $MISSING_DEPENDENCY ;;
49063       pkgadd)
49064         pkgadd_help  $MISSING_DEPENDENCY ;;
49065     esac
49066 
49067     if test "x$PKGHANDLER_COMMAND" != x; then
49068       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49069     fi
49070   fi
49071 
49072       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
49073     fi
49074 
49075     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49076       OPENWIN_HOME="/usr/openwin"
49077       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
49078       X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
49079           -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
49080           -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
49081           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
49082     fi
49083 
49084     ac_ext=c
49085 ac_cpp='$CPP $CPPFLAGS'
49086 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49087 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49088 ac_compiler_gnu=$ac_cv_c_compiler_gnu
49089 
49090     OLD_CFLAGS="$CFLAGS"
49091     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
49092 
49093     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
49094     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
49095 do :
49096   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49097 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
49098           # include <X11/Xlib.h>
49099           # include <X11/Xutil.h>
49100 
49101 
49102 "
49103 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49104   cat >>confdefs.h <<_ACEOF
49105 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49106 _ACEOF
49107  X11_HEADERS_OK=yes
49108 else
49109   X11_HEADERS_OK=no; break
49110 fi
49111 
49112 done
49113 
49114 
49115     if test "x$X11_HEADERS_OK" = xno; then
49116 
49117   # Print a helpful message on how to acquire the necessary build dependency.
49118   # x11 is the help tag: freetype, cups, alsa etc
49119   MISSING_DEPENDENCY=x11
49120 
49121   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49122     cygwin_help $MISSING_DEPENDENCY
49123   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49124     msys_help $MISSING_DEPENDENCY
49125   else
49126     PKGHANDLER_COMMAND=
49127 
49128     case $PKGHANDLER in
49129       apt-get)
49130         apt_help     $MISSING_DEPENDENCY ;;
49131       yum)
49132         yum_help     $MISSING_DEPENDENCY ;;
49133       port)
49134         port_help    $MISSING_DEPENDENCY ;;
49135       pkgutil)
49136         pkgutil_help $MISSING_DEPENDENCY ;;
49137       pkgadd)
49138         pkgadd_help  $MISSING_DEPENDENCY ;;
49139     esac
49140 
49141     if test "x$PKGHANDLER_COMMAND" != x; then
49142       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49143     fi
49144   fi
49145 
49146       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
49147     fi
49148 
49149     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
49150     # defined in libawt_xawt.
49151     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
49152 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
49153     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49154 /* end confdefs.h.  */
49155 #include <X11/extensions/Xrender.h>
49156 int
49157 main ()
49158 {
49159 XLinearGradient x;
49160   ;
49161   return 0;
49162 }
49163 _ACEOF
49164 if ac_fn_c_try_compile "$LINENO"; then :
49165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49166 $as_echo "yes" >&6; }
49167 else
49168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49169 $as_echo "no" >&6; }
49170          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
49171 fi
49172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49173 
49174     CFLAGS="$OLD_CFLAGS"
49175     ac_ext=cpp
49176 ac_cpp='$CXXCPP $CPPFLAGS'
49177 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49178 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49179 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49180 
49181   fi # NEEDS_LIB_X11
49182 
49183 
49184 
49185 
49186 
49187 
49188 # Check whether --with-cups was given.
49189 if test "${with_cups+set}" = set; then :
49190   withval=$with_cups;
49191 fi
49192 
49193 
49194 # Check whether --with-cups-include was given.
49195 if test "${with_cups_include+set}" = set; then :
49196   withval=$with_cups_include;
49197 fi
49198 
49199 
49200   if test "x$NEEDS_LIB_CUPS" = xfalse; then
49201     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
49202         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
49203       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
49204 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
49205     fi
49206     CUPS_CFLAGS=
49207   else
49208     CUPS_FOUND=no
49209 
49210     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
49211       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
49212     fi
49213 
49214     if test "x${with_cups}" != x; then
49215       CUPS_CFLAGS="-I${with_cups}/include"
49216       CUPS_FOUND=yes
49217     fi
49218     if test "x${with_cups_include}" != x; then
49219       CUPS_CFLAGS="-I${with_cups_include}"
49220       CUPS_FOUND=yes
49221     fi
49222     if test "x$CUPS_FOUND" = xno; then
49223       # Are the cups headers installed in the default /usr/include location?
49224       for ac_header in cups/cups.h cups/ppd.h
49225 do :
49226   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49227 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
49228 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49229   cat >>confdefs.h <<_ACEOF
49230 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49231 _ACEOF
49232 
49233           CUPS_FOUND=yes
49234           CUPS_CFLAGS=
49235           DEFAULT_CUPS=yes
49236 
49237 fi
49238 
49239 done
49240 
49241     fi
49242     if test "x$CUPS_FOUND" = xno; then
49243       # Getting nervous now? Lets poke around for standard Solaris third-party
49244       # package installation locations.
49245       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
49246 $as_echo_n "checking for cups headers... " >&6; }
49247       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
49248         # An SFW package seems to be installed!
49249         CUPS_FOUND=yes
49250         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
49251       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
49252         # A CSW package seems to be installed!
49253         CUPS_FOUND=yes
49254         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
49255       fi
49256       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
49257 $as_echo "$CUPS_FOUND" >&6; }
49258     fi
49259     if test "x$CUPS_FOUND" = xno; then
49260 
49261   # Print a helpful message on how to acquire the necessary build dependency.
49262   # cups is the help tag: freetype, cups, alsa etc
49263   MISSING_DEPENDENCY=cups
49264 
49265   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49266     cygwin_help $MISSING_DEPENDENCY
49267   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49268     msys_help $MISSING_DEPENDENCY
49269   else
49270     PKGHANDLER_COMMAND=
49271 
49272     case $PKGHANDLER in
49273       apt-get)
49274         apt_help     $MISSING_DEPENDENCY ;;
49275       yum)
49276         yum_help     $MISSING_DEPENDENCY ;;
49277       port)
49278         port_help    $MISSING_DEPENDENCY ;;
49279       pkgutil)
49280         pkgutil_help $MISSING_DEPENDENCY ;;
49281       pkgadd)
49282         pkgadd_help  $MISSING_DEPENDENCY ;;
49283     esac
49284 
49285     if test "x$PKGHANDLER_COMMAND" != x; then
49286       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49287     fi
49288   fi
49289 
49290       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
49291     fi
49292   fi
49293 
49294 
49295 
49296 
49297 
49298 # Check whether --with-freetype was given.
49299 if test "${with_freetype+set}" = set; then :
49300   withval=$with_freetype;
49301 fi
49302 
49303 
49304 # Check whether --with-freetype-include was given.
49305 if test "${with_freetype_include+set}" = set; then :
49306   withval=$with_freetype_include;
49307 fi
49308 
49309 
49310 # Check whether --with-freetype-lib was given.
49311 if test "${with_freetype_lib+set}" = set; then :
49312   withval=$with_freetype_lib;
49313 fi
49314 
49315 
49316 # Check whether --with-freetype-src was given.
49317 if test "${with_freetype_src+set}" = set; then :
49318   withval=$with_freetype_src;
49319 fi
49320 
49321   # Check whether --enable-freetype-bundling was given.
49322 if test "${enable_freetype_bundling+set}" = set; then :
49323   enableval=$enable_freetype_bundling;
49324 fi
49325 
49326 
49327   # Need to specify explicitly since it needs to be overridden on some versions of macosx
49328   FREETYPE_BASE_NAME=freetype
49329   FREETYPE_CFLAGS=
49330   FREETYPE_LIBS=
49331   FREETYPE_BUNDLE_LIB_PATH=
49332 
49333   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
49334     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
49335         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
49336         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
49337         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
49338       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
49339 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
49340     fi
49341     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
49342       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
49343 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
49344     fi
49345   else
49346     # freetype is needed to build; go get it!
49347 
49348     BUNDLE_FREETYPE="$enable_freetype_bundling"
49349 
49350     if  test "x$with_freetype_src" != x; then
49351       if test "x$OPENJDK_TARGET_OS" = xwindows; then
49352         # Try to build freetype if --with-freetype-src was given on Windows
49353 
49354   FREETYPE_SRC_PATH="$with_freetype_src"
49355   BUILD_FREETYPE=yes
49356 
49357   # Check if the freetype sources are acessible..
49358   if ! test -d $FREETYPE_SRC_PATH; then
49359     { $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
49360 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
49361     BUILD_FREETYPE=no
49362   fi
49363   # ..and contain a vc2010 project file
49364   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
49365   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
49366     { $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
49367 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
49368     BUILD_FREETYPE=no
49369   fi
49370   # Now check if configure found a version of 'msbuild.exe'
49371   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
49372     { $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
49373 $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;}
49374     BUILD_FREETYPE=no
49375   fi
49376 
49377   # Ready to go..
49378   if test "x$BUILD_FREETYPE" = xyes; then
49379     # msbuild requires trailing slashes for output directories
49380     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
49381     freetype_lib_path_unix="$freetype_lib_path"
49382     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
49383 
49384   unix_path="$vcxproj_path"
49385   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49386     windows_path=`$CYGPATH -m "$unix_path"`
49387     vcxproj_path="$windows_path"
49388   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49389     windows_path=`cmd //c echo $unix_path`
49390     vcxproj_path="$windows_path"
49391   fi
49392 
49393 
49394   unix_path="$freetype_lib_path"
49395   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49396     windows_path=`$CYGPATH -m "$unix_path"`
49397     freetype_lib_path="$windows_path"
49398   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49399     windows_path=`cmd //c echo $unix_path`
49400     freetype_lib_path="$windows_path"
49401   fi
49402 
49403 
49404   unix_path="$freetype_obj_path"
49405   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49406     windows_path=`$CYGPATH -m "$unix_path"`
49407     freetype_obj_path="$windows_path"
49408   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49409     windows_path=`cmd //c echo $unix_path`
49410     freetype_obj_path="$windows_path"
49411   fi
49412 
49413     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49414       freetype_platform=x64
49415     else
49416       freetype_platform=win32
49417     fi
49418 
49419     # The original freetype project file is for VS 2010 (i.e. 'v100'),
49420     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
49421     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
49422     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
49423     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
49424 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
49425 
49426     # First we try to build the freetype.dll
49427     $ECHO -e "@echo off\n"\
49428         "$MSBUILD $vcxproj_path "\
49429         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
49430         "/p:Configuration=\"Release Multithreaded\" "\
49431         "/p:Platform=$freetype_platform "\
49432         "/p:ConfigurationType=DynamicLibrary "\
49433         "/p:TargetName=freetype "\
49434         "/p:OutDir=\"$freetype_lib_path\" "\
49435         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
49436     cmd /c freetype.bat
49437 
49438     if test -s "$freetype_lib_path_unix/freetype.dll"; then
49439       # If that succeeds we also build freetype.lib
49440       $ECHO -e "@echo off\n"\
49441           "$MSBUILD $vcxproj_path "\
49442           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
49443           "/p:Configuration=\"Release Multithreaded\" "\
49444           "/p:Platform=$freetype_platform "\
49445           "/p:ConfigurationType=StaticLibrary "\
49446           "/p:TargetName=freetype "\
49447           "/p:OutDir=\"$freetype_lib_path\" "\
49448           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
49449       cmd /c freetype.bat
49450 
49451       if test -s "$freetype_lib_path_unix/freetype.lib"; then
49452         # Once we build both, lib and dll, set freetype lib and include path appropriately
49453         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
49454         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
49455         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
49456 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
49457       else
49458         BUILD_FREETYPE=no
49459       fi
49460     else
49461       BUILD_FREETYPE=no
49462     fi
49463   fi
49464 
49465         if test "x$BUILD_FREETYPE" = xyes; then
49466           # Okay, we built it. Check that it works.
49467 
49468   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49469   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49470   METHOD="--with-freetype-src"
49471 
49472   # Let's start with an optimistic view of the world :-)
49473   FOUND_FREETYPE=yes
49474 
49475   # First look for the canonical freetype main include file ft2build.h.
49476   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49477     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49478     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49479     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49480       # Fail.
49481       FOUND_FREETYPE=no
49482     fi
49483   fi
49484 
49485   if test "x$FOUND_FREETYPE" = xyes; then
49486     # Include file found, let's continue the sanity check.
49487     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49488 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49489 
49490     # Reset to default value
49491     FREETYPE_BASE_NAME=freetype
49492     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49493     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49494       if test "x$OPENJDK_TARGET_OS" = xmacosx \
49495           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49496         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49497         # for the .6 version explicitly.
49498         FREETYPE_BASE_NAME=freetype.6
49499         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49500         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49501 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49502       else
49503         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49504 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49505         FOUND_FREETYPE=no
49506       fi
49507     else
49508       if test "x$OPENJDK_TARGET_OS" = xwindows; then
49509         # On Windows, we will need both .lib and .dll file.
49510         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49511           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49512 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49513           FOUND_FREETYPE=no
49514         fi
49515       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49516           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49517         # Found lib in isa dir, use that instead.
49518         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49519         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49520 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49521       fi
49522     fi
49523   fi
49524 
49525   if test "x$FOUND_FREETYPE" = xyes; then
49526 
49527   # Only process if variable expands to non-empty
49528 
49529   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49530     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49531 
49532   # Input might be given as Windows format, start by converting to
49533   # unix format.
49534   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49535   new_path=`$CYGPATH -u "$path"`
49536 
49537   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49538   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49539   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49540   # "foo.exe" is OK but "foo" is an error.
49541   #
49542   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49543   # It is also a way to make sure we got the proper file name for the real test later on.
49544   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49545   if test "x$test_shortpath" = x; then
49546     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49547 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49548     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49549   fi
49550 
49551   # Call helper function which possibly converts this using DOS-style short mode.
49552   # If so, the updated path is stored in $new_path.
49553 
49554   input_path="$new_path"
49555   # Check if we need to convert this using DOS-style short mode. If the path
49556   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49557   # take no chances and rewrite it.
49558   # Note: m4 eats our [], so we need to use [ and ] instead.
49559   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49560   if test "x$has_forbidden_chars" != x; then
49561     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49562     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49563     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49564     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49565       # Going to short mode and back again did indeed matter. Since short mode is
49566       # case insensitive, let's make it lowercase to improve readability.
49567       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49568       # Now convert it back to Unix-style (cygpath)
49569       input_path=`$CYGPATH -u "$shortmode_path"`
49570       new_path="$input_path"
49571     fi
49572   fi
49573 
49574   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49575   if test "x$test_cygdrive_prefix" = x; then
49576     # As a simple fix, exclude /usr/bin since it's not a real path.
49577     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49578       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49579       # a path prefixed by /cygdrive for fixpath to work.
49580       new_path="$CYGWIN_ROOT_PATH$input_path"
49581     fi
49582   fi
49583 
49584 
49585   if test "x$path" != "x$new_path"; then
49586     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49587     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49588 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49589   fi
49590 
49591     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49592 
49593   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49594   has_colon=`$ECHO $path | $GREP ^.:`
49595   new_path="$path"
49596   if test "x$has_colon" = x; then
49597     # Not in mixed or Windows style, start by that.
49598     new_path=`cmd //c echo $path`
49599   fi
49600 
49601 
49602   input_path="$new_path"
49603   # Check if we need to convert this using DOS-style short mode. If the path
49604   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49605   # take no chances and rewrite it.
49606   # Note: m4 eats our [], so we need to use [ and ] instead.
49607   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49608   if test "x$has_forbidden_chars" != x; then
49609     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49610     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49611   fi
49612 
49613 
49614   windows_path="$new_path"
49615   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49616     unix_path=`$CYGPATH -u "$windows_path"`
49617     new_path="$unix_path"
49618   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49619     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49620     new_path="$unix_path"
49621   fi
49622 
49623   if test "x$path" != "x$new_path"; then
49624     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49625     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49626 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49627   fi
49628 
49629   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49630   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49631 
49632     else
49633       # We're on a unix platform. Hooray! :)
49634       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49635       has_space=`$ECHO "$path" | $GREP " "`
49636       if test "x$has_space" != x; then
49637         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49638 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49639         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49640       fi
49641 
49642       # Use eval to expand a potential ~
49643       eval path="$path"
49644       if test ! -f "$path" && test ! -d "$path"; then
49645         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49646       fi
49647 
49648       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
49649     fi
49650   fi
49651 
49652 
49653   # Only process if variable expands to non-empty
49654 
49655   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49656     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49657 
49658   # Input might be given as Windows format, start by converting to
49659   # unix format.
49660   path="$POTENTIAL_FREETYPE_LIB_PATH"
49661   new_path=`$CYGPATH -u "$path"`
49662 
49663   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49664   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49665   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49666   # "foo.exe" is OK but "foo" is an error.
49667   #
49668   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49669   # It is also a way to make sure we got the proper file name for the real test later on.
49670   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49671   if test "x$test_shortpath" = x; then
49672     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49673 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49674     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
49675   fi
49676 
49677   # Call helper function which possibly converts this using DOS-style short mode.
49678   # If so, the updated path is stored in $new_path.
49679 
49680   input_path="$new_path"
49681   # Check if we need to convert this using DOS-style short mode. If the path
49682   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49683   # take no chances and rewrite it.
49684   # Note: m4 eats our [], so we need to use [ and ] instead.
49685   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49686   if test "x$has_forbidden_chars" != x; then
49687     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49688     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49689     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49690     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49691       # Going to short mode and back again did indeed matter. Since short mode is
49692       # case insensitive, let's make it lowercase to improve readability.
49693       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49694       # Now convert it back to Unix-style (cygpath)
49695       input_path=`$CYGPATH -u "$shortmode_path"`
49696       new_path="$input_path"
49697     fi
49698   fi
49699 
49700   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49701   if test "x$test_cygdrive_prefix" = x; then
49702     # As a simple fix, exclude /usr/bin since it's not a real path.
49703     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49704       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49705       # a path prefixed by /cygdrive for fixpath to work.
49706       new_path="$CYGWIN_ROOT_PATH$input_path"
49707     fi
49708   fi
49709 
49710 
49711   if test "x$path" != "x$new_path"; then
49712     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49713     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49714 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49715   fi
49716 
49717     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49718 
49719   path="$POTENTIAL_FREETYPE_LIB_PATH"
49720   has_colon=`$ECHO $path | $GREP ^.:`
49721   new_path="$path"
49722   if test "x$has_colon" = x; then
49723     # Not in mixed or Windows style, start by that.
49724     new_path=`cmd //c echo $path`
49725   fi
49726 
49727 
49728   input_path="$new_path"
49729   # Check if we need to convert this using DOS-style short mode. If the path
49730   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49731   # take no chances and rewrite it.
49732   # Note: m4 eats our [], so we need to use [ and ] instead.
49733   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49734   if test "x$has_forbidden_chars" != x; then
49735     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49736     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49737   fi
49738 
49739 
49740   windows_path="$new_path"
49741   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49742     unix_path=`$CYGPATH -u "$windows_path"`
49743     new_path="$unix_path"
49744   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49745     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49746     new_path="$unix_path"
49747   fi
49748 
49749   if test "x$path" != "x$new_path"; then
49750     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49751     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49752 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49753   fi
49754 
49755   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49756   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49757 
49758     else
49759       # We're on a unix platform. Hooray! :)
49760       path="$POTENTIAL_FREETYPE_LIB_PATH"
49761       has_space=`$ECHO "$path" | $GREP " "`
49762       if test "x$has_space" != x; then
49763         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49764 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49765         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49766       fi
49767 
49768       # Use eval to expand a potential ~
49769       eval path="$path"
49770       if test ! -f "$path" && test ! -d "$path"; then
49771         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49772       fi
49773 
49774       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
49775     fi
49776   fi
49777 
49778 
49779     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49780     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
49781 $as_echo_n "checking for freetype includes... " >&6; }
49782     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
49783 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
49784     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49785     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
49786 $as_echo_n "checking for freetype libraries... " >&6; }
49787     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
49788 $as_echo "$FREETYPE_LIB_PATH" >&6; }
49789   fi
49790 
49791           if test "x$FOUND_FREETYPE" != xyes; then
49792             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
49793           fi
49794         else
49795           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
49796 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
49797           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
49798         fi
49799       else
49800         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
49801 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
49802       fi
49803     fi
49804 
49805     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
49806       # User has specified settings
49807 
49808       if test "x$BUNDLE_FREETYPE" = x; then
49809         # If not specified, default is to bundle freetype
49810         BUNDLE_FREETYPE=yes
49811       fi
49812 
49813       if test "x$with_freetype" != x; then
49814         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
49815         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
49816       fi
49817 
49818       # Allow --with-freetype-lib and --with-freetype-include to override
49819       if test "x$with_freetype_include" != x; then
49820         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
49821       fi
49822       if test "x$with_freetype_lib" != x; then
49823         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
49824       fi
49825 
49826       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49827         # Okay, we got it. Check that it works.
49828 
49829   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49830   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49831   METHOD="--with-freetype"
49832 
49833   # Let's start with an optimistic view of the world :-)
49834   FOUND_FREETYPE=yes
49835 
49836   # First look for the canonical freetype main include file ft2build.h.
49837   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49838     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49839     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49840     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49841       # Fail.
49842       FOUND_FREETYPE=no
49843     fi
49844   fi
49845 
49846   if test "x$FOUND_FREETYPE" = xyes; then
49847     # Include file found, let's continue the sanity check.
49848     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49849 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49850 
49851     # Reset to default value
49852     FREETYPE_BASE_NAME=freetype
49853     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49854     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49855       if test "x$OPENJDK_TARGET_OS" = xmacosx \
49856           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49857         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49858         # for the .6 version explicitly.
49859         FREETYPE_BASE_NAME=freetype.6
49860         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49861         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49862 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49863       else
49864         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49865 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49866         FOUND_FREETYPE=no
49867       fi
49868     else
49869       if test "x$OPENJDK_TARGET_OS" = xwindows; then
49870         # On Windows, we will need both .lib and .dll file.
49871         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49872           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49873 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49874           FOUND_FREETYPE=no
49875         fi
49876       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49877           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49878         # Found lib in isa dir, use that instead.
49879         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49880         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49881 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49882       fi
49883     fi
49884   fi
49885 
49886   if test "x$FOUND_FREETYPE" = xyes; then
49887 
49888   # Only process if variable expands to non-empty
49889 
49890   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49891     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49892 
49893   # Input might be given as Windows format, start by converting to
49894   # unix format.
49895   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49896   new_path=`$CYGPATH -u "$path"`
49897 
49898   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49899   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49900   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49901   # "foo.exe" is OK but "foo" is an error.
49902   #
49903   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49904   # It is also a way to make sure we got the proper file name for the real test later on.
49905   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49906   if test "x$test_shortpath" = x; then
49907     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49908 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49909     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49910   fi
49911 
49912   # Call helper function which possibly converts this using DOS-style short mode.
49913   # If so, the updated path is stored in $new_path.
49914 
49915   input_path="$new_path"
49916   # Check if we need to convert this using DOS-style short mode. If the path
49917   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49918   # take no chances and rewrite it.
49919   # Note: m4 eats our [], so we need to use [ and ] instead.
49920   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49921   if test "x$has_forbidden_chars" != x; then
49922     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49923     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49924     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49925     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49926       # Going to short mode and back again did indeed matter. Since short mode is
49927       # case insensitive, let's make it lowercase to improve readability.
49928       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49929       # Now convert it back to Unix-style (cygpath)
49930       input_path=`$CYGPATH -u "$shortmode_path"`
49931       new_path="$input_path"
49932     fi
49933   fi
49934 
49935   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49936   if test "x$test_cygdrive_prefix" = x; then
49937     # As a simple fix, exclude /usr/bin since it's not a real path.
49938     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49939       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49940       # a path prefixed by /cygdrive for fixpath to work.
49941       new_path="$CYGWIN_ROOT_PATH$input_path"
49942     fi
49943   fi
49944 
49945 
49946   if test "x$path" != "x$new_path"; then
49947     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49948     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49949 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49950   fi
49951 
49952     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49953 
49954   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49955   has_colon=`$ECHO $path | $GREP ^.:`
49956   new_path="$path"
49957   if test "x$has_colon" = x; then
49958     # Not in mixed or Windows style, start by that.
49959     new_path=`cmd //c echo $path`
49960   fi
49961 
49962 
49963   input_path="$new_path"
49964   # Check if we need to convert this using DOS-style short mode. If the path
49965   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49966   # take no chances and rewrite it.
49967   # Note: m4 eats our [], so we need to use [ and ] instead.
49968   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49969   if test "x$has_forbidden_chars" != x; then
49970     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49971     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49972   fi
49973 
49974 
49975   windows_path="$new_path"
49976   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49977     unix_path=`$CYGPATH -u "$windows_path"`
49978     new_path="$unix_path"
49979   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49980     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49981     new_path="$unix_path"
49982   fi
49983 
49984   if test "x$path" != "x$new_path"; then
49985     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49986     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49987 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49988   fi
49989 
49990   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49991   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49992 
49993     else
49994       # We're on a unix platform. Hooray! :)
49995       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49996       has_space=`$ECHO "$path" | $GREP " "`
49997       if test "x$has_space" != x; then
49998         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49999 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50000         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50001       fi
50002 
50003       # Use eval to expand a potential ~
50004       eval path="$path"
50005       if test ! -f "$path" && test ! -d "$path"; then
50006         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50007       fi
50008 
50009       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50010     fi
50011   fi
50012 
50013 
50014   # Only process if variable expands to non-empty
50015 
50016   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50017     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50018 
50019   # Input might be given as Windows format, start by converting to
50020   # unix format.
50021   path="$POTENTIAL_FREETYPE_LIB_PATH"
50022   new_path=`$CYGPATH -u "$path"`
50023 
50024   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50025   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50026   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50027   # "foo.exe" is OK but "foo" is an error.
50028   #
50029   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50030   # It is also a way to make sure we got the proper file name for the real test later on.
50031   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50032   if test "x$test_shortpath" = x; then
50033     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50034 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50035     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50036   fi
50037 
50038   # Call helper function which possibly converts this using DOS-style short mode.
50039   # If so, the updated path is stored in $new_path.
50040 
50041   input_path="$new_path"
50042   # Check if we need to convert this using DOS-style short mode. If the path
50043   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50044   # take no chances and rewrite it.
50045   # Note: m4 eats our [], so we need to use [ and ] instead.
50046   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50047   if test "x$has_forbidden_chars" != x; then
50048     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50049     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50050     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50051     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50052       # Going to short mode and back again did indeed matter. Since short mode is
50053       # case insensitive, let's make it lowercase to improve readability.
50054       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50055       # Now convert it back to Unix-style (cygpath)
50056       input_path=`$CYGPATH -u "$shortmode_path"`
50057       new_path="$input_path"
50058     fi
50059   fi
50060 
50061   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50062   if test "x$test_cygdrive_prefix" = x; then
50063     # As a simple fix, exclude /usr/bin since it's not a real path.
50064     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50065       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50066       # a path prefixed by /cygdrive for fixpath to work.
50067       new_path="$CYGWIN_ROOT_PATH$input_path"
50068     fi
50069   fi
50070 
50071 
50072   if test "x$path" != "x$new_path"; then
50073     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50074     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50075 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50076   fi
50077 
50078     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50079 
50080   path="$POTENTIAL_FREETYPE_LIB_PATH"
50081   has_colon=`$ECHO $path | $GREP ^.:`
50082   new_path="$path"
50083   if test "x$has_colon" = x; then
50084     # Not in mixed or Windows style, start by that.
50085     new_path=`cmd //c echo $path`
50086   fi
50087 
50088 
50089   input_path="$new_path"
50090   # Check if we need to convert this using DOS-style short mode. If the path
50091   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50092   # take no chances and rewrite it.
50093   # Note: m4 eats our [], so we need to use [ and ] instead.
50094   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50095   if test "x$has_forbidden_chars" != x; then
50096     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50097     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50098   fi
50099 
50100 
50101   windows_path="$new_path"
50102   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50103     unix_path=`$CYGPATH -u "$windows_path"`
50104     new_path="$unix_path"
50105   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50106     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50107     new_path="$unix_path"
50108   fi
50109 
50110   if test "x$path" != "x$new_path"; then
50111     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50112     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50113 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50114   fi
50115 
50116   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50117   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50118 
50119     else
50120       # We're on a unix platform. Hooray! :)
50121       path="$POTENTIAL_FREETYPE_LIB_PATH"
50122       has_space=`$ECHO "$path" | $GREP " "`
50123       if test "x$has_space" != x; then
50124         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50125 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50126         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50127       fi
50128 
50129       # Use eval to expand a potential ~
50130       eval path="$path"
50131       if test ! -f "$path" && test ! -d "$path"; then
50132         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50133       fi
50134 
50135       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50136     fi
50137   fi
50138 
50139 
50140     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50141     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50142 $as_echo_n "checking for freetype includes... " >&6; }
50143     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50144 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50145     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50146     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50147 $as_echo_n "checking for freetype libraries... " >&6; }
50148     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50149 $as_echo "$FREETYPE_LIB_PATH" >&6; }
50150   fi
50151 
50152         if test "x$FOUND_FREETYPE" != xyes; then
50153           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
50154         fi
50155       else
50156         # User specified only one of lib or include. This is an error.
50157         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
50158           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
50159 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
50160           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
50161         else
50162           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
50163 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
50164           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
50165         fi
50166       fi
50167     else
50168       # User did not specify settings, but we need freetype. Try to locate it.
50169 
50170       if test "x$BUNDLE_FREETYPE" = x; then
50171         # If not specified, default is to bundle freetype only on windows
50172         if test "x$OPENJDK_TARGET_OS" = xwindows; then
50173           BUNDLE_FREETYPE=yes
50174         else
50175           BUNDLE_FREETYPE=no
50176         fi
50177       fi
50178 
50179       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
50180       if test "x$SYSROOT" = x; then
50181         if test "x$FOUND_FREETYPE" != xyes; then
50182           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
50183           if test "x$PKG_CONFIG" != x; then
50184 
50185 pkg_failed=no
50186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
50187 $as_echo_n "checking for FREETYPE... " >&6; }
50188 
50189 if test -n "$FREETYPE_CFLAGS"; then
50190     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
50191  elif test -n "$PKG_CONFIG"; then
50192     if test -n "$PKG_CONFIG" && \
50193     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
50194   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
50195   ac_status=$?
50196   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50197   test $ac_status = 0; }; then
50198   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
50199 else
50200   pkg_failed=yes
50201 fi
50202  else
50203     pkg_failed=untried
50204 fi
50205 if test -n "$FREETYPE_LIBS"; then
50206     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
50207  elif test -n "$PKG_CONFIG"; then
50208     if test -n "$PKG_CONFIG" && \
50209     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
50210   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
50211   ac_status=$?
50212   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50213   test $ac_status = 0; }; then
50214   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
50215 else
50216   pkg_failed=yes
50217 fi
50218  else
50219     pkg_failed=untried
50220 fi
50221 
50222 
50223 
50224 if test $pkg_failed = yes; then
50225 
50226 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
50227         _pkg_short_errors_supported=yes
50228 else
50229         _pkg_short_errors_supported=no
50230 fi
50231         if test $_pkg_short_errors_supported = yes; then
50232                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
50233         else
50234                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
50235         fi
50236         # Put the nasty error message in config.log where it belongs
50237         echo "$FREETYPE_PKG_ERRORS" >&5
50238 
50239         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50240 $as_echo "no" >&6; }
50241                 FOUND_FREETYPE=no
50242 elif test $pkg_failed = untried; then
50243         FOUND_FREETYPE=no
50244 else
50245         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
50246         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
50247         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50248 $as_echo "yes" >&6; }
50249         FOUND_FREETYPE=yes
50250 fi
50251             if test "x$FOUND_FREETYPE" = xyes; then
50252               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
50253               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
50254               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
50255               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50256                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
50257               fi
50258               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
50259               if test "x$BUNDLE_FREETYPE" = xyes; then
50260                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
50261 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
50262                 FOUND_FREETYPE=no
50263               else
50264                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
50265 $as_echo_n "checking for freetype... " >&6; }
50266                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
50267 $as_echo "yes (using pkg-config)" >&6; }
50268               fi
50269             fi
50270           fi
50271         fi
50272       fi
50273 
50274       if test "x$FOUND_FREETYPE" != xyes; then
50275         # Check in well-known locations
50276         if test "x$OPENJDK_TARGET_OS" = xwindows; then
50277           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
50278 
50279   windows_path="$FREETYPE_BASE_DIR"
50280   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50281     unix_path=`$CYGPATH -u "$windows_path"`
50282     FREETYPE_BASE_DIR="$unix_path"
50283   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50284     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50285     FREETYPE_BASE_DIR="$unix_path"
50286   fi
50287 
50288 
50289   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50290   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
50291   METHOD="well-known location"
50292 
50293   # Let's start with an optimistic view of the world :-)
50294   FOUND_FREETYPE=yes
50295 
50296   # First look for the canonical freetype main include file ft2build.h.
50297   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50298     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50299     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50300     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50301       # Fail.
50302       FOUND_FREETYPE=no
50303     fi
50304   fi
50305 
50306   if test "x$FOUND_FREETYPE" = xyes; then
50307     # Include file found, let's continue the sanity check.
50308     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50309 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50310 
50311     # Reset to default value
50312     FREETYPE_BASE_NAME=freetype
50313     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50314     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50315       if test "x$OPENJDK_TARGET_OS" = xmacosx \
50316           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50317         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50318         # for the .6 version explicitly.
50319         FREETYPE_BASE_NAME=freetype.6
50320         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50321         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50322 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50323       else
50324         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50325 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50326         FOUND_FREETYPE=no
50327       fi
50328     else
50329       if test "x$OPENJDK_TARGET_OS" = xwindows; then
50330         # On Windows, we will need both .lib and .dll file.
50331         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50332           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50333 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50334           FOUND_FREETYPE=no
50335         fi
50336       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50337           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50338         # Found lib in isa dir, use that instead.
50339         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50340         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50341 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50342       fi
50343     fi
50344   fi
50345 
50346   if test "x$FOUND_FREETYPE" = xyes; then
50347 
50348   # Only process if variable expands to non-empty
50349 
50350   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50351     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50352 
50353   # Input might be given as Windows format, start by converting to
50354   # unix format.
50355   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50356   new_path=`$CYGPATH -u "$path"`
50357 
50358   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50359   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50360   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50361   # "foo.exe" is OK but "foo" is an error.
50362   #
50363   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50364   # It is also a way to make sure we got the proper file name for the real test later on.
50365   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50366   if test "x$test_shortpath" = x; then
50367     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50368 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50369     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50370   fi
50371 
50372   # Call helper function which possibly converts this using DOS-style short mode.
50373   # If so, the updated path is stored in $new_path.
50374 
50375   input_path="$new_path"
50376   # Check if we need to convert this using DOS-style short mode. If the path
50377   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50378   # take no chances and rewrite it.
50379   # Note: m4 eats our [], so we need to use [ and ] instead.
50380   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50381   if test "x$has_forbidden_chars" != x; then
50382     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50383     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50384     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50385     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50386       # Going to short mode and back again did indeed matter. Since short mode is
50387       # case insensitive, let's make it lowercase to improve readability.
50388       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50389       # Now convert it back to Unix-style (cygpath)
50390       input_path=`$CYGPATH -u "$shortmode_path"`
50391       new_path="$input_path"
50392     fi
50393   fi
50394 
50395   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50396   if test "x$test_cygdrive_prefix" = x; then
50397     # As a simple fix, exclude /usr/bin since it's not a real path.
50398     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50399       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50400       # a path prefixed by /cygdrive for fixpath to work.
50401       new_path="$CYGWIN_ROOT_PATH$input_path"
50402     fi
50403   fi
50404 
50405 
50406   if test "x$path" != "x$new_path"; then
50407     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50408     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50409 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50410   fi
50411 
50412     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50413 
50414   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50415   has_colon=`$ECHO $path | $GREP ^.:`
50416   new_path="$path"
50417   if test "x$has_colon" = x; then
50418     # Not in mixed or Windows style, start by that.
50419     new_path=`cmd //c echo $path`
50420   fi
50421 
50422 
50423   input_path="$new_path"
50424   # Check if we need to convert this using DOS-style short mode. If the path
50425   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50426   # take no chances and rewrite it.
50427   # Note: m4 eats our [], so we need to use [ and ] instead.
50428   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50429   if test "x$has_forbidden_chars" != x; then
50430     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50431     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50432   fi
50433 
50434 
50435   windows_path="$new_path"
50436   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50437     unix_path=`$CYGPATH -u "$windows_path"`
50438     new_path="$unix_path"
50439   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50440     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50441     new_path="$unix_path"
50442   fi
50443 
50444   if test "x$path" != "x$new_path"; then
50445     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50446     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50447 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50448   fi
50449 
50450   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50451   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50452 
50453     else
50454       # We're on a unix platform. Hooray! :)
50455       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50456       has_space=`$ECHO "$path" | $GREP " "`
50457       if test "x$has_space" != x; then
50458         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50459 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50460         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50461       fi
50462 
50463       # Use eval to expand a potential ~
50464       eval path="$path"
50465       if test ! -f "$path" && test ! -d "$path"; then
50466         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50467       fi
50468 
50469       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50470     fi
50471   fi
50472 
50473 
50474   # Only process if variable expands to non-empty
50475 
50476   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50477     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50478 
50479   # Input might be given as Windows format, start by converting to
50480   # unix format.
50481   path="$POTENTIAL_FREETYPE_LIB_PATH"
50482   new_path=`$CYGPATH -u "$path"`
50483 
50484   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50485   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50486   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50487   # "foo.exe" is OK but "foo" is an error.
50488   #
50489   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50490   # It is also a way to make sure we got the proper file name for the real test later on.
50491   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50492   if test "x$test_shortpath" = x; then
50493     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50494 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50495     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50496   fi
50497 
50498   # Call helper function which possibly converts this using DOS-style short mode.
50499   # If so, the updated path is stored in $new_path.
50500 
50501   input_path="$new_path"
50502   # Check if we need to convert this using DOS-style short mode. If the path
50503   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50504   # take no chances and rewrite it.
50505   # Note: m4 eats our [], so we need to use [ and ] instead.
50506   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50507   if test "x$has_forbidden_chars" != x; then
50508     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50509     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50510     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50511     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50512       # Going to short mode and back again did indeed matter. Since short mode is
50513       # case insensitive, let's make it lowercase to improve readability.
50514       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50515       # Now convert it back to Unix-style (cygpath)
50516       input_path=`$CYGPATH -u "$shortmode_path"`
50517       new_path="$input_path"
50518     fi
50519   fi
50520 
50521   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50522   if test "x$test_cygdrive_prefix" = x; then
50523     # As a simple fix, exclude /usr/bin since it's not a real path.
50524     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50525       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50526       # a path prefixed by /cygdrive for fixpath to work.
50527       new_path="$CYGWIN_ROOT_PATH$input_path"
50528     fi
50529   fi
50530 
50531 
50532   if test "x$path" != "x$new_path"; then
50533     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50534     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50535 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50536   fi
50537 
50538     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50539 
50540   path="$POTENTIAL_FREETYPE_LIB_PATH"
50541   has_colon=`$ECHO $path | $GREP ^.:`
50542   new_path="$path"
50543   if test "x$has_colon" = x; then
50544     # Not in mixed or Windows style, start by that.
50545     new_path=`cmd //c echo $path`
50546   fi
50547 
50548 
50549   input_path="$new_path"
50550   # Check if we need to convert this using DOS-style short mode. If the path
50551   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50552   # take no chances and rewrite it.
50553   # Note: m4 eats our [], so we need to use [ and ] instead.
50554   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50555   if test "x$has_forbidden_chars" != x; then
50556     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50557     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50558   fi
50559 
50560 
50561   windows_path="$new_path"
50562   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50563     unix_path=`$CYGPATH -u "$windows_path"`
50564     new_path="$unix_path"
50565   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50566     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50567     new_path="$unix_path"
50568   fi
50569 
50570   if test "x$path" != "x$new_path"; then
50571     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50572     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50573 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50574   fi
50575 
50576   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50577   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50578 
50579     else
50580       # We're on a unix platform. Hooray! :)
50581       path="$POTENTIAL_FREETYPE_LIB_PATH"
50582       has_space=`$ECHO "$path" | $GREP " "`
50583       if test "x$has_space" != x; then
50584         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50585 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50586         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50587       fi
50588 
50589       # Use eval to expand a potential ~
50590       eval path="$path"
50591       if test ! -f "$path" && test ! -d "$path"; then
50592         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50593       fi
50594 
50595       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50596     fi
50597   fi
50598 
50599 
50600     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50601     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50602 $as_echo_n "checking for freetype includes... " >&6; }
50603     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50604 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50605     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50606     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50607 $as_echo_n "checking for freetype libraries... " >&6; }
50608     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50609 $as_echo "$FREETYPE_LIB_PATH" >&6; }
50610   fi
50611 
50612           if test "x$FOUND_FREETYPE" != xyes; then
50613             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
50614 
50615   windows_path="$FREETYPE_BASE_DIR"
50616   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50617     unix_path=`$CYGPATH -u "$windows_path"`
50618     FREETYPE_BASE_DIR="$unix_path"
50619   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50620     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50621     FREETYPE_BASE_DIR="$unix_path"
50622   fi
50623 
50624 
50625   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50626   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
50627   METHOD="well-known location"
50628 
50629   # Let's start with an optimistic view of the world :-)
50630   FOUND_FREETYPE=yes
50631 
50632   # First look for the canonical freetype main include file ft2build.h.
50633   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50634     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50635     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50636     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50637       # Fail.
50638       FOUND_FREETYPE=no
50639     fi
50640   fi
50641 
50642   if test "x$FOUND_FREETYPE" = xyes; then
50643     # Include file found, let's continue the sanity check.
50644     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50645 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50646 
50647     # Reset to default value
50648     FREETYPE_BASE_NAME=freetype
50649     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50650     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50651       if test "x$OPENJDK_TARGET_OS" = xmacosx \
50652           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50653         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50654         # for the .6 version explicitly.
50655         FREETYPE_BASE_NAME=freetype.6
50656         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50657         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50658 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50659       else
50660         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50661 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50662         FOUND_FREETYPE=no
50663       fi
50664     else
50665       if test "x$OPENJDK_TARGET_OS" = xwindows; then
50666         # On Windows, we will need both .lib and .dll file.
50667         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50668           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50669 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50670           FOUND_FREETYPE=no
50671         fi
50672       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50673           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50674         # Found lib in isa dir, use that instead.
50675         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50676         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50677 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50678       fi
50679     fi
50680   fi
50681 
50682   if test "x$FOUND_FREETYPE" = xyes; then
50683 
50684   # Only process if variable expands to non-empty
50685 
50686   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50687     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50688 
50689   # Input might be given as Windows format, start by converting to
50690   # unix format.
50691   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50692   new_path=`$CYGPATH -u "$path"`
50693 
50694   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50695   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50696   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50697   # "foo.exe" is OK but "foo" is an error.
50698   #
50699   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50700   # It is also a way to make sure we got the proper file name for the real test later on.
50701   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50702   if test "x$test_shortpath" = x; then
50703     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50704 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50705     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50706   fi
50707 
50708   # Call helper function which possibly converts this using DOS-style short mode.
50709   # If so, the updated path is stored in $new_path.
50710 
50711   input_path="$new_path"
50712   # Check if we need to convert this using DOS-style short mode. If the path
50713   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50714   # take no chances and rewrite it.
50715   # Note: m4 eats our [], so we need to use [ and ] instead.
50716   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50717   if test "x$has_forbidden_chars" != x; then
50718     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50719     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50720     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50721     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50722       # Going to short mode and back again did indeed matter. Since short mode is
50723       # case insensitive, let's make it lowercase to improve readability.
50724       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50725       # Now convert it back to Unix-style (cygpath)
50726       input_path=`$CYGPATH -u "$shortmode_path"`
50727       new_path="$input_path"
50728     fi
50729   fi
50730 
50731   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50732   if test "x$test_cygdrive_prefix" = x; then
50733     # As a simple fix, exclude /usr/bin since it's not a real path.
50734     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50735       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50736       # a path prefixed by /cygdrive for fixpath to work.
50737       new_path="$CYGWIN_ROOT_PATH$input_path"
50738     fi
50739   fi
50740 
50741 
50742   if test "x$path" != "x$new_path"; then
50743     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50744     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50745 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50746   fi
50747 
50748     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50749 
50750   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50751   has_colon=`$ECHO $path | $GREP ^.:`
50752   new_path="$path"
50753   if test "x$has_colon" = x; then
50754     # Not in mixed or Windows style, start by that.
50755     new_path=`cmd //c echo $path`
50756   fi
50757 
50758 
50759   input_path="$new_path"
50760   # Check if we need to convert this using DOS-style short mode. If the path
50761   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50762   # take no chances and rewrite it.
50763   # Note: m4 eats our [], so we need to use [ and ] instead.
50764   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50765   if test "x$has_forbidden_chars" != x; then
50766     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50767     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50768   fi
50769 
50770 
50771   windows_path="$new_path"
50772   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50773     unix_path=`$CYGPATH -u "$windows_path"`
50774     new_path="$unix_path"
50775   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50776     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50777     new_path="$unix_path"
50778   fi
50779 
50780   if test "x$path" != "x$new_path"; then
50781     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50782     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50783 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50784   fi
50785 
50786   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50787   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50788 
50789     else
50790       # We're on a unix platform. Hooray! :)
50791       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50792       has_space=`$ECHO "$path" | $GREP " "`
50793       if test "x$has_space" != x; then
50794         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50795 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50796         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50797       fi
50798 
50799       # Use eval to expand a potential ~
50800       eval path="$path"
50801       if test ! -f "$path" && test ! -d "$path"; then
50802         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50803       fi
50804 
50805       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50806     fi
50807   fi
50808 
50809 
50810   # Only process if variable expands to non-empty
50811 
50812   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50813     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50814 
50815   # Input might be given as Windows format, start by converting to
50816   # unix format.
50817   path="$POTENTIAL_FREETYPE_LIB_PATH"
50818   new_path=`$CYGPATH -u "$path"`
50819 
50820   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50821   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50822   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50823   # "foo.exe" is OK but "foo" is an error.
50824   #
50825   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50826   # It is also a way to make sure we got the proper file name for the real test later on.
50827   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50828   if test "x$test_shortpath" = x; then
50829     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50830 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50831     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50832   fi
50833 
50834   # Call helper function which possibly converts this using DOS-style short mode.
50835   # If so, the updated path is stored in $new_path.
50836 
50837   input_path="$new_path"
50838   # Check if we need to convert this using DOS-style short mode. If the path
50839   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50840   # take no chances and rewrite it.
50841   # Note: m4 eats our [], so we need to use [ and ] instead.
50842   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50843   if test "x$has_forbidden_chars" != x; then
50844     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50845     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50846     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50847     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50848       # Going to short mode and back again did indeed matter. Since short mode is
50849       # case insensitive, let's make it lowercase to improve readability.
50850       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50851       # Now convert it back to Unix-style (cygpath)
50852       input_path=`$CYGPATH -u "$shortmode_path"`
50853       new_path="$input_path"
50854     fi
50855   fi
50856 
50857   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50858   if test "x$test_cygdrive_prefix" = x; then
50859     # As a simple fix, exclude /usr/bin since it's not a real path.
50860     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50861       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50862       # a path prefixed by /cygdrive for fixpath to work.
50863       new_path="$CYGWIN_ROOT_PATH$input_path"
50864     fi
50865   fi
50866 
50867 
50868   if test "x$path" != "x$new_path"; then
50869     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50870     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50871 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50872   fi
50873 
50874     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50875 
50876   path="$POTENTIAL_FREETYPE_LIB_PATH"
50877   has_colon=`$ECHO $path | $GREP ^.:`
50878   new_path="$path"
50879   if test "x$has_colon" = x; then
50880     # Not in mixed or Windows style, start by that.
50881     new_path=`cmd //c echo $path`
50882   fi
50883 
50884 
50885   input_path="$new_path"
50886   # Check if we need to convert this using DOS-style short mode. If the path
50887   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50888   # take no chances and rewrite it.
50889   # Note: m4 eats our [], so we need to use [ and ] instead.
50890   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50891   if test "x$has_forbidden_chars" != x; then
50892     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50893     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50894   fi
50895 
50896 
50897   windows_path="$new_path"
50898   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50899     unix_path=`$CYGPATH -u "$windows_path"`
50900     new_path="$unix_path"
50901   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50902     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50903     new_path="$unix_path"
50904   fi
50905 
50906   if test "x$path" != "x$new_path"; then
50907     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50908     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50909 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50910   fi
50911 
50912   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50913   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50914 
50915     else
50916       # We're on a unix platform. Hooray! :)
50917       path="$POTENTIAL_FREETYPE_LIB_PATH"
50918       has_space=`$ECHO "$path" | $GREP " "`
50919       if test "x$has_space" != x; then
50920         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50921 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50922         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50923       fi
50924 
50925       # Use eval to expand a potential ~
50926       eval path="$path"
50927       if test ! -f "$path" && test ! -d "$path"; then
50928         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50929       fi
50930 
50931       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50932     fi
50933   fi
50934 
50935 
50936     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50937     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50938 $as_echo_n "checking for freetype includes... " >&6; }
50939     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50940 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50941     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50942     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50943 $as_echo_n "checking for freetype libraries... " >&6; }
50944     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50945 $as_echo "$FREETYPE_LIB_PATH" >&6; }
50946   fi
50947 
50948           fi
50949         else
50950           FREETYPE_BASE_DIR="$SYSROOT/usr"
50951 
50952   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50953   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
50954   METHOD="well-known location"
50955 
50956   # Let's start with an optimistic view of the world :-)
50957   FOUND_FREETYPE=yes
50958 
50959   # First look for the canonical freetype main include file ft2build.h.
50960   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50961     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50962     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50963     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50964       # Fail.
50965       FOUND_FREETYPE=no
50966     fi
50967   fi
50968 
50969   if test "x$FOUND_FREETYPE" = xyes; then
50970     # Include file found, let's continue the sanity check.
50971     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50972 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50973 
50974     # Reset to default value
50975     FREETYPE_BASE_NAME=freetype
50976     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50977     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50978       if test "x$OPENJDK_TARGET_OS" = xmacosx \
50979           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50980         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50981         # for the .6 version explicitly.
50982         FREETYPE_BASE_NAME=freetype.6
50983         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50984         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50985 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50986       else
50987         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50988 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50989         FOUND_FREETYPE=no
50990       fi
50991     else
50992       if test "x$OPENJDK_TARGET_OS" = xwindows; then
50993         # On Windows, we will need both .lib and .dll file.
50994         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50995           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50996 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50997           FOUND_FREETYPE=no
50998         fi
50999       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51000           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51001         # Found lib in isa dir, use that instead.
51002         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51003         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51004 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51005       fi
51006     fi
51007   fi
51008 
51009   if test "x$FOUND_FREETYPE" = xyes; then
51010 
51011   # Only process if variable expands to non-empty
51012 
51013   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51014     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51015 
51016   # Input might be given as Windows format, start by converting to
51017   # unix format.
51018   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51019   new_path=`$CYGPATH -u "$path"`
51020 
51021   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51022   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51023   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51024   # "foo.exe" is OK but "foo" is an error.
51025   #
51026   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51027   # It is also a way to make sure we got the proper file name for the real test later on.
51028   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51029   if test "x$test_shortpath" = x; then
51030     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51031 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51032     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51033   fi
51034 
51035   # Call helper function which possibly converts this using DOS-style short mode.
51036   # If so, the updated path is stored in $new_path.
51037 
51038   input_path="$new_path"
51039   # Check if we need to convert this using DOS-style short mode. If the path
51040   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51041   # take no chances and rewrite it.
51042   # Note: m4 eats our [], so we need to use [ and ] instead.
51043   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51044   if test "x$has_forbidden_chars" != x; then
51045     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51046     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51047     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51048     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51049       # Going to short mode and back again did indeed matter. Since short mode is
51050       # case insensitive, let's make it lowercase to improve readability.
51051       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51052       # Now convert it back to Unix-style (cygpath)
51053       input_path=`$CYGPATH -u "$shortmode_path"`
51054       new_path="$input_path"
51055     fi
51056   fi
51057 
51058   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51059   if test "x$test_cygdrive_prefix" = x; then
51060     # As a simple fix, exclude /usr/bin since it's not a real path.
51061     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51062       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51063       # a path prefixed by /cygdrive for fixpath to work.
51064       new_path="$CYGWIN_ROOT_PATH$input_path"
51065     fi
51066   fi
51067 
51068 
51069   if test "x$path" != "x$new_path"; then
51070     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51071     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51072 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51073   fi
51074 
51075     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51076 
51077   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51078   has_colon=`$ECHO $path | $GREP ^.:`
51079   new_path="$path"
51080   if test "x$has_colon" = x; then
51081     # Not in mixed or Windows style, start by that.
51082     new_path=`cmd //c echo $path`
51083   fi
51084 
51085 
51086   input_path="$new_path"
51087   # Check if we need to convert this using DOS-style short mode. If the path
51088   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51089   # take no chances and rewrite it.
51090   # Note: m4 eats our [], so we need to use [ and ] instead.
51091   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51092   if test "x$has_forbidden_chars" != x; then
51093     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51094     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51095   fi
51096 
51097 
51098   windows_path="$new_path"
51099   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51100     unix_path=`$CYGPATH -u "$windows_path"`
51101     new_path="$unix_path"
51102   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51103     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51104     new_path="$unix_path"
51105   fi
51106 
51107   if test "x$path" != "x$new_path"; then
51108     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51109     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51110 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51111   fi
51112 
51113   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51114   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51115 
51116     else
51117       # We're on a unix platform. Hooray! :)
51118       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51119       has_space=`$ECHO "$path" | $GREP " "`
51120       if test "x$has_space" != x; then
51121         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51122 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51123         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51124       fi
51125 
51126       # Use eval to expand a potential ~
51127       eval path="$path"
51128       if test ! -f "$path" && test ! -d "$path"; then
51129         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51130       fi
51131 
51132       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51133     fi
51134   fi
51135 
51136 
51137   # Only process if variable expands to non-empty
51138 
51139   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51140     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51141 
51142   # Input might be given as Windows format, start by converting to
51143   # unix format.
51144   path="$POTENTIAL_FREETYPE_LIB_PATH"
51145   new_path=`$CYGPATH -u "$path"`
51146 
51147   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51148   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51149   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51150   # "foo.exe" is OK but "foo" is an error.
51151   #
51152   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51153   # It is also a way to make sure we got the proper file name for the real test later on.
51154   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51155   if test "x$test_shortpath" = x; then
51156     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51157 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51158     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51159   fi
51160 
51161   # Call helper function which possibly converts this using DOS-style short mode.
51162   # If so, the updated path is stored in $new_path.
51163 
51164   input_path="$new_path"
51165   # Check if we need to convert this using DOS-style short mode. If the path
51166   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51167   # take no chances and rewrite it.
51168   # Note: m4 eats our [], so we need to use [ and ] instead.
51169   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51170   if test "x$has_forbidden_chars" != x; then
51171     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51172     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51173     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51174     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51175       # Going to short mode and back again did indeed matter. Since short mode is
51176       # case insensitive, let's make it lowercase to improve readability.
51177       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51178       # Now convert it back to Unix-style (cygpath)
51179       input_path=`$CYGPATH -u "$shortmode_path"`
51180       new_path="$input_path"
51181     fi
51182   fi
51183 
51184   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51185   if test "x$test_cygdrive_prefix" = x; then
51186     # As a simple fix, exclude /usr/bin since it's not a real path.
51187     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51188       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51189       # a path prefixed by /cygdrive for fixpath to work.
51190       new_path="$CYGWIN_ROOT_PATH$input_path"
51191     fi
51192   fi
51193 
51194 
51195   if test "x$path" != "x$new_path"; then
51196     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51197     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51198 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51199   fi
51200 
51201     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51202 
51203   path="$POTENTIAL_FREETYPE_LIB_PATH"
51204   has_colon=`$ECHO $path | $GREP ^.:`
51205   new_path="$path"
51206   if test "x$has_colon" = x; then
51207     # Not in mixed or Windows style, start by that.
51208     new_path=`cmd //c echo $path`
51209   fi
51210 
51211 
51212   input_path="$new_path"
51213   # Check if we need to convert this using DOS-style short mode. If the path
51214   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51215   # take no chances and rewrite it.
51216   # Note: m4 eats our [], so we need to use [ and ] instead.
51217   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51218   if test "x$has_forbidden_chars" != x; then
51219     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51220     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51221   fi
51222 
51223 
51224   windows_path="$new_path"
51225   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51226     unix_path=`$CYGPATH -u "$windows_path"`
51227     new_path="$unix_path"
51228   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51229     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51230     new_path="$unix_path"
51231   fi
51232 
51233   if test "x$path" != "x$new_path"; then
51234     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51235     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51236 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51237   fi
51238 
51239   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51240   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51241 
51242     else
51243       # We're on a unix platform. Hooray! :)
51244       path="$POTENTIAL_FREETYPE_LIB_PATH"
51245       has_space=`$ECHO "$path" | $GREP " "`
51246       if test "x$has_space" != x; then
51247         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51248 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51249         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51250       fi
51251 
51252       # Use eval to expand a potential ~
51253       eval path="$path"
51254       if test ! -f "$path" && test ! -d "$path"; then
51255         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51256       fi
51257 
51258       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51259     fi
51260   fi
51261 
51262 
51263     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51264     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51265 $as_echo_n "checking for freetype includes... " >&6; }
51266     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51267 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51268     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51269     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51270 $as_echo_n "checking for freetype libraries... " >&6; }
51271     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51272 $as_echo "$FREETYPE_LIB_PATH" >&6; }
51273   fi
51274 
51275 
51276           if test "x$FOUND_FREETYPE" != xyes; then
51277             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
51278 
51279   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51280   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51281   METHOD="well-known location"
51282 
51283   # Let's start with an optimistic view of the world :-)
51284   FOUND_FREETYPE=yes
51285 
51286   # First look for the canonical freetype main include file ft2build.h.
51287   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51288     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51289     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51290     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51291       # Fail.
51292       FOUND_FREETYPE=no
51293     fi
51294   fi
51295 
51296   if test "x$FOUND_FREETYPE" = xyes; then
51297     # Include file found, let's continue the sanity check.
51298     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51299 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51300 
51301     # Reset to default value
51302     FREETYPE_BASE_NAME=freetype
51303     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51304     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51305       if test "x$OPENJDK_TARGET_OS" = xmacosx \
51306           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51307         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51308         # for the .6 version explicitly.
51309         FREETYPE_BASE_NAME=freetype.6
51310         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51311         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51312 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51313       else
51314         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51315 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51316         FOUND_FREETYPE=no
51317       fi
51318     else
51319       if test "x$OPENJDK_TARGET_OS" = xwindows; then
51320         # On Windows, we will need both .lib and .dll file.
51321         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51322           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51323 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51324           FOUND_FREETYPE=no
51325         fi
51326       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51327           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51328         # Found lib in isa dir, use that instead.
51329         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51330         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51331 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51332       fi
51333     fi
51334   fi
51335 
51336   if test "x$FOUND_FREETYPE" = xyes; then
51337 
51338   # Only process if variable expands to non-empty
51339 
51340   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51341     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51342 
51343   # Input might be given as Windows format, start by converting to
51344   # unix format.
51345   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51346   new_path=`$CYGPATH -u "$path"`
51347 
51348   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51349   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51350   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51351   # "foo.exe" is OK but "foo" is an error.
51352   #
51353   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51354   # It is also a way to make sure we got the proper file name for the real test later on.
51355   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51356   if test "x$test_shortpath" = x; then
51357     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51358 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51359     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51360   fi
51361 
51362   # Call helper function which possibly converts this using DOS-style short mode.
51363   # If so, the updated path is stored in $new_path.
51364 
51365   input_path="$new_path"
51366   # Check if we need to convert this using DOS-style short mode. If the path
51367   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51368   # take no chances and rewrite it.
51369   # Note: m4 eats our [], so we need to use [ and ] instead.
51370   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51371   if test "x$has_forbidden_chars" != x; then
51372     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51373     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51374     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51375     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51376       # Going to short mode and back again did indeed matter. Since short mode is
51377       # case insensitive, let's make it lowercase to improve readability.
51378       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51379       # Now convert it back to Unix-style (cygpath)
51380       input_path=`$CYGPATH -u "$shortmode_path"`
51381       new_path="$input_path"
51382     fi
51383   fi
51384 
51385   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51386   if test "x$test_cygdrive_prefix" = x; then
51387     # As a simple fix, exclude /usr/bin since it's not a real path.
51388     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51389       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51390       # a path prefixed by /cygdrive for fixpath to work.
51391       new_path="$CYGWIN_ROOT_PATH$input_path"
51392     fi
51393   fi
51394 
51395 
51396   if test "x$path" != "x$new_path"; then
51397     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51398     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51399 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51400   fi
51401 
51402     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51403 
51404   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51405   has_colon=`$ECHO $path | $GREP ^.:`
51406   new_path="$path"
51407   if test "x$has_colon" = x; then
51408     # Not in mixed or Windows style, start by that.
51409     new_path=`cmd //c echo $path`
51410   fi
51411 
51412 
51413   input_path="$new_path"
51414   # Check if we need to convert this using DOS-style short mode. If the path
51415   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51416   # take no chances and rewrite it.
51417   # Note: m4 eats our [], so we need to use [ and ] instead.
51418   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51419   if test "x$has_forbidden_chars" != x; then
51420     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51421     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51422   fi
51423 
51424 
51425   windows_path="$new_path"
51426   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51427     unix_path=`$CYGPATH -u "$windows_path"`
51428     new_path="$unix_path"
51429   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51430     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51431     new_path="$unix_path"
51432   fi
51433 
51434   if test "x$path" != "x$new_path"; then
51435     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51436     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51437 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51438   fi
51439 
51440   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51441   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51442 
51443     else
51444       # We're on a unix platform. Hooray! :)
51445       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51446       has_space=`$ECHO "$path" | $GREP " "`
51447       if test "x$has_space" != x; then
51448         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51449 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51450         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51451       fi
51452 
51453       # Use eval to expand a potential ~
51454       eval path="$path"
51455       if test ! -f "$path" && test ! -d "$path"; then
51456         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51457       fi
51458 
51459       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51460     fi
51461   fi
51462 
51463 
51464   # Only process if variable expands to non-empty
51465 
51466   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51467     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51468 
51469   # Input might be given as Windows format, start by converting to
51470   # unix format.
51471   path="$POTENTIAL_FREETYPE_LIB_PATH"
51472   new_path=`$CYGPATH -u "$path"`
51473 
51474   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51475   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51476   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51477   # "foo.exe" is OK but "foo" is an error.
51478   #
51479   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51480   # It is also a way to make sure we got the proper file name for the real test later on.
51481   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51482   if test "x$test_shortpath" = x; then
51483     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51484 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51485     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51486   fi
51487 
51488   # Call helper function which possibly converts this using DOS-style short mode.
51489   # If so, the updated path is stored in $new_path.
51490 
51491   input_path="$new_path"
51492   # Check if we need to convert this using DOS-style short mode. If the path
51493   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51494   # take no chances and rewrite it.
51495   # Note: m4 eats our [], so we need to use [ and ] instead.
51496   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51497   if test "x$has_forbidden_chars" != x; then
51498     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51499     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51500     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51501     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51502       # Going to short mode and back again did indeed matter. Since short mode is
51503       # case insensitive, let's make it lowercase to improve readability.
51504       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51505       # Now convert it back to Unix-style (cygpath)
51506       input_path=`$CYGPATH -u "$shortmode_path"`
51507       new_path="$input_path"
51508     fi
51509   fi
51510 
51511   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51512   if test "x$test_cygdrive_prefix" = x; then
51513     # As a simple fix, exclude /usr/bin since it's not a real path.
51514     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51515       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51516       # a path prefixed by /cygdrive for fixpath to work.
51517       new_path="$CYGWIN_ROOT_PATH$input_path"
51518     fi
51519   fi
51520 
51521 
51522   if test "x$path" != "x$new_path"; then
51523     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51524     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51525 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51526   fi
51527 
51528     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51529 
51530   path="$POTENTIAL_FREETYPE_LIB_PATH"
51531   has_colon=`$ECHO $path | $GREP ^.:`
51532   new_path="$path"
51533   if test "x$has_colon" = x; then
51534     # Not in mixed or Windows style, start by that.
51535     new_path=`cmd //c echo $path`
51536   fi
51537 
51538 
51539   input_path="$new_path"
51540   # Check if we need to convert this using DOS-style short mode. If the path
51541   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51542   # take no chances and rewrite it.
51543   # Note: m4 eats our [], so we need to use [ and ] instead.
51544   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51545   if test "x$has_forbidden_chars" != x; then
51546     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51547     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51548   fi
51549 
51550 
51551   windows_path="$new_path"
51552   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51553     unix_path=`$CYGPATH -u "$windows_path"`
51554     new_path="$unix_path"
51555   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51556     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51557     new_path="$unix_path"
51558   fi
51559 
51560   if test "x$path" != "x$new_path"; then
51561     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51562     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51563 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51564   fi
51565 
51566   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51567   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51568 
51569     else
51570       # We're on a unix platform. Hooray! :)
51571       path="$POTENTIAL_FREETYPE_LIB_PATH"
51572       has_space=`$ECHO "$path" | $GREP " "`
51573       if test "x$has_space" != x; then
51574         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51575 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51576         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51577       fi
51578 
51579       # Use eval to expand a potential ~
51580       eval path="$path"
51581       if test ! -f "$path" && test ! -d "$path"; then
51582         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51583       fi
51584 
51585       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51586     fi
51587   fi
51588 
51589 
51590     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51591     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51592 $as_echo_n "checking for freetype includes... " >&6; }
51593     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51594 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51595     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51596     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51597 $as_echo_n "checking for freetype libraries... " >&6; }
51598     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51599 $as_echo "$FREETYPE_LIB_PATH" >&6; }
51600   fi
51601 
51602           fi
51603 
51604           if test "x$FOUND_FREETYPE" != xyes; then
51605             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
51606 
51607   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51608   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51609   METHOD="well-known location"
51610 
51611   # Let's start with an optimistic view of the world :-)
51612   FOUND_FREETYPE=yes
51613 
51614   # First look for the canonical freetype main include file ft2build.h.
51615   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51616     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51617     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51618     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51619       # Fail.
51620       FOUND_FREETYPE=no
51621     fi
51622   fi
51623 
51624   if test "x$FOUND_FREETYPE" = xyes; then
51625     # Include file found, let's continue the sanity check.
51626     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51627 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51628 
51629     # Reset to default value
51630     FREETYPE_BASE_NAME=freetype
51631     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51632     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51633       if test "x$OPENJDK_TARGET_OS" = xmacosx \
51634           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51635         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51636         # for the .6 version explicitly.
51637         FREETYPE_BASE_NAME=freetype.6
51638         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51639         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51640 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51641       else
51642         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51643 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51644         FOUND_FREETYPE=no
51645       fi
51646     else
51647       if test "x$OPENJDK_TARGET_OS" = xwindows; then
51648         # On Windows, we will need both .lib and .dll file.
51649         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51650           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51651 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51652           FOUND_FREETYPE=no
51653         fi
51654       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51655           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51656         # Found lib in isa dir, use that instead.
51657         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51658         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51659 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51660       fi
51661     fi
51662   fi
51663 
51664   if test "x$FOUND_FREETYPE" = xyes; then
51665 
51666   # Only process if variable expands to non-empty
51667 
51668   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51669     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51670 
51671   # Input might be given as Windows format, start by converting to
51672   # unix format.
51673   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51674   new_path=`$CYGPATH -u "$path"`
51675 
51676   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51677   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51678   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51679   # "foo.exe" is OK but "foo" is an error.
51680   #
51681   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51682   # It is also a way to make sure we got the proper file name for the real test later on.
51683   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51684   if test "x$test_shortpath" = x; then
51685     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51686 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51687     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51688   fi
51689 
51690   # Call helper function which possibly converts this using DOS-style short mode.
51691   # If so, the updated path is stored in $new_path.
51692 
51693   input_path="$new_path"
51694   # Check if we need to convert this using DOS-style short mode. If the path
51695   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51696   # take no chances and rewrite it.
51697   # Note: m4 eats our [], so we need to use [ and ] instead.
51698   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51699   if test "x$has_forbidden_chars" != x; then
51700     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51701     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51702     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51703     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51704       # Going to short mode and back again did indeed matter. Since short mode is
51705       # case insensitive, let's make it lowercase to improve readability.
51706       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51707       # Now convert it back to Unix-style (cygpath)
51708       input_path=`$CYGPATH -u "$shortmode_path"`
51709       new_path="$input_path"
51710     fi
51711   fi
51712 
51713   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51714   if test "x$test_cygdrive_prefix" = x; then
51715     # As a simple fix, exclude /usr/bin since it's not a real path.
51716     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51717       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51718       # a path prefixed by /cygdrive for fixpath to work.
51719       new_path="$CYGWIN_ROOT_PATH$input_path"
51720     fi
51721   fi
51722 
51723 
51724   if test "x$path" != "x$new_path"; then
51725     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51726     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51727 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51728   fi
51729 
51730     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51731 
51732   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51733   has_colon=`$ECHO $path | $GREP ^.:`
51734   new_path="$path"
51735   if test "x$has_colon" = x; then
51736     # Not in mixed or Windows style, start by that.
51737     new_path=`cmd //c echo $path`
51738   fi
51739 
51740 
51741   input_path="$new_path"
51742   # Check if we need to convert this using DOS-style short mode. If the path
51743   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51744   # take no chances and rewrite it.
51745   # Note: m4 eats our [], so we need to use [ and ] instead.
51746   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51747   if test "x$has_forbidden_chars" != x; then
51748     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51749     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51750   fi
51751 
51752 
51753   windows_path="$new_path"
51754   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51755     unix_path=`$CYGPATH -u "$windows_path"`
51756     new_path="$unix_path"
51757   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51758     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51759     new_path="$unix_path"
51760   fi
51761 
51762   if test "x$path" != "x$new_path"; then
51763     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51764     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51765 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51766   fi
51767 
51768   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51769   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51770 
51771     else
51772       # We're on a unix platform. Hooray! :)
51773       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51774       has_space=`$ECHO "$path" | $GREP " "`
51775       if test "x$has_space" != x; then
51776         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51777 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51778         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51779       fi
51780 
51781       # Use eval to expand a potential ~
51782       eval path="$path"
51783       if test ! -f "$path" && test ! -d "$path"; then
51784         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51785       fi
51786 
51787       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51788     fi
51789   fi
51790 
51791 
51792   # Only process if variable expands to non-empty
51793 
51794   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51795     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51796 
51797   # Input might be given as Windows format, start by converting to
51798   # unix format.
51799   path="$POTENTIAL_FREETYPE_LIB_PATH"
51800   new_path=`$CYGPATH -u "$path"`
51801 
51802   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51803   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51804   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51805   # "foo.exe" is OK but "foo" is an error.
51806   #
51807   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51808   # It is also a way to make sure we got the proper file name for the real test later on.
51809   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51810   if test "x$test_shortpath" = x; then
51811     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51812 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51813     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51814   fi
51815 
51816   # Call helper function which possibly converts this using DOS-style short mode.
51817   # If so, the updated path is stored in $new_path.
51818 
51819   input_path="$new_path"
51820   # Check if we need to convert this using DOS-style short mode. If the path
51821   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51822   # take no chances and rewrite it.
51823   # Note: m4 eats our [], so we need to use [ and ] instead.
51824   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51825   if test "x$has_forbidden_chars" != x; then
51826     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51827     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51828     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51829     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51830       # Going to short mode and back again did indeed matter. Since short mode is
51831       # case insensitive, let's make it lowercase to improve readability.
51832       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51833       # Now convert it back to Unix-style (cygpath)
51834       input_path=`$CYGPATH -u "$shortmode_path"`
51835       new_path="$input_path"
51836     fi
51837   fi
51838 
51839   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51840   if test "x$test_cygdrive_prefix" = x; then
51841     # As a simple fix, exclude /usr/bin since it's not a real path.
51842     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51843       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51844       # a path prefixed by /cygdrive for fixpath to work.
51845       new_path="$CYGWIN_ROOT_PATH$input_path"
51846     fi
51847   fi
51848 
51849 
51850   if test "x$path" != "x$new_path"; then
51851     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51852     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51853 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51854   fi
51855 
51856     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51857 
51858   path="$POTENTIAL_FREETYPE_LIB_PATH"
51859   has_colon=`$ECHO $path | $GREP ^.:`
51860   new_path="$path"
51861   if test "x$has_colon" = x; then
51862     # Not in mixed or Windows style, start by that.
51863     new_path=`cmd //c echo $path`
51864   fi
51865 
51866 
51867   input_path="$new_path"
51868   # Check if we need to convert this using DOS-style short mode. If the path
51869   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51870   # take no chances and rewrite it.
51871   # Note: m4 eats our [], so we need to use [ and ] instead.
51872   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51873   if test "x$has_forbidden_chars" != x; then
51874     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51875     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51876   fi
51877 
51878 
51879   windows_path="$new_path"
51880   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51881     unix_path=`$CYGPATH -u "$windows_path"`
51882     new_path="$unix_path"
51883   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51884     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51885     new_path="$unix_path"
51886   fi
51887 
51888   if test "x$path" != "x$new_path"; then
51889     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51890     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51891 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51892   fi
51893 
51894   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51895   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51896 
51897     else
51898       # We're on a unix platform. Hooray! :)
51899       path="$POTENTIAL_FREETYPE_LIB_PATH"
51900       has_space=`$ECHO "$path" | $GREP " "`
51901       if test "x$has_space" != x; then
51902         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51903 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51904         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51905       fi
51906 
51907       # Use eval to expand a potential ~
51908       eval path="$path"
51909       if test ! -f "$path" && test ! -d "$path"; then
51910         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51911       fi
51912 
51913       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51914     fi
51915   fi
51916 
51917 
51918     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51919     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51920 $as_echo_n "checking for freetype includes... " >&6; }
51921     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51922 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51923     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51924     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51925 $as_echo_n "checking for freetype libraries... " >&6; }
51926     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51927 $as_echo "$FREETYPE_LIB_PATH" >&6; }
51928   fi
51929 
51930           fi
51931 
51932           if test "x$FOUND_FREETYPE" != xyes; then
51933             FREETYPE_BASE_DIR="$SYSROOT/usr"
51934             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51935 
51936   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51937   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
51938   METHOD="well-known location"
51939 
51940   # Let's start with an optimistic view of the world :-)
51941   FOUND_FREETYPE=yes
51942 
51943   # First look for the canonical freetype main include file ft2build.h.
51944   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51945     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51946     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51947     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51948       # Fail.
51949       FOUND_FREETYPE=no
51950     fi
51951   fi
51952 
51953   if test "x$FOUND_FREETYPE" = xyes; then
51954     # Include file found, let's continue the sanity check.
51955     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51956 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51957 
51958     # Reset to default value
51959     FREETYPE_BASE_NAME=freetype
51960     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51961     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51962       if test "x$OPENJDK_TARGET_OS" = xmacosx \
51963           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51964         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51965         # for the .6 version explicitly.
51966         FREETYPE_BASE_NAME=freetype.6
51967         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51968         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51969 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51970       else
51971         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51972 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51973         FOUND_FREETYPE=no
51974       fi
51975     else
51976       if test "x$OPENJDK_TARGET_OS" = xwindows; then
51977         # On Windows, we will need both .lib and .dll file.
51978         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51979           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51980 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51981           FOUND_FREETYPE=no
51982         fi
51983       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51984           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51985         # Found lib in isa dir, use that instead.
51986         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51987         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51988 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51989       fi
51990     fi
51991   fi
51992 
51993   if test "x$FOUND_FREETYPE" = xyes; then
51994 
51995   # Only process if variable expands to non-empty
51996 
51997   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51998     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51999 
52000   # Input might be given as Windows format, start by converting to
52001   # unix format.
52002   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52003   new_path=`$CYGPATH -u "$path"`
52004 
52005   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52006   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52007   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52008   # "foo.exe" is OK but "foo" is an error.
52009   #
52010   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52011   # It is also a way to make sure we got the proper file name for the real test later on.
52012   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52013   if test "x$test_shortpath" = x; then
52014     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52015 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52016     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52017   fi
52018 
52019   # Call helper function which possibly converts this using DOS-style short mode.
52020   # If so, the updated path is stored in $new_path.
52021 
52022   input_path="$new_path"
52023   # Check if we need to convert this using DOS-style short mode. If the path
52024   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52025   # take no chances and rewrite it.
52026   # Note: m4 eats our [], so we need to use [ and ] instead.
52027   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52028   if test "x$has_forbidden_chars" != x; then
52029     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52030     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52031     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52032     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52033       # Going to short mode and back again did indeed matter. Since short mode is
52034       # case insensitive, let's make it lowercase to improve readability.
52035       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52036       # Now convert it back to Unix-style (cygpath)
52037       input_path=`$CYGPATH -u "$shortmode_path"`
52038       new_path="$input_path"
52039     fi
52040   fi
52041 
52042   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52043   if test "x$test_cygdrive_prefix" = x; then
52044     # As a simple fix, exclude /usr/bin since it's not a real path.
52045     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52046       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52047       # a path prefixed by /cygdrive for fixpath to work.
52048       new_path="$CYGWIN_ROOT_PATH$input_path"
52049     fi
52050   fi
52051 
52052 
52053   if test "x$path" != "x$new_path"; then
52054     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52055     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52056 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52057   fi
52058 
52059     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52060 
52061   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52062   has_colon=`$ECHO $path | $GREP ^.:`
52063   new_path="$path"
52064   if test "x$has_colon" = x; then
52065     # Not in mixed or Windows style, start by that.
52066     new_path=`cmd //c echo $path`
52067   fi
52068 
52069 
52070   input_path="$new_path"
52071   # Check if we need to convert this using DOS-style short mode. If the path
52072   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52073   # take no chances and rewrite it.
52074   # Note: m4 eats our [], so we need to use [ and ] instead.
52075   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52076   if test "x$has_forbidden_chars" != x; then
52077     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52078     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52079   fi
52080 
52081 
52082   windows_path="$new_path"
52083   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52084     unix_path=`$CYGPATH -u "$windows_path"`
52085     new_path="$unix_path"
52086   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52087     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52088     new_path="$unix_path"
52089   fi
52090 
52091   if test "x$path" != "x$new_path"; then
52092     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52093     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52094 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52095   fi
52096 
52097   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52098   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52099 
52100     else
52101       # We're on a unix platform. Hooray! :)
52102       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52103       has_space=`$ECHO "$path" | $GREP " "`
52104       if test "x$has_space" != x; then
52105         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52106 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52107         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52108       fi
52109 
52110       # Use eval to expand a potential ~
52111       eval path="$path"
52112       if test ! -f "$path" && test ! -d "$path"; then
52113         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52114       fi
52115 
52116       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52117     fi
52118   fi
52119 
52120 
52121   # Only process if variable expands to non-empty
52122 
52123   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52124     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52125 
52126   # Input might be given as Windows format, start by converting to
52127   # unix format.
52128   path="$POTENTIAL_FREETYPE_LIB_PATH"
52129   new_path=`$CYGPATH -u "$path"`
52130 
52131   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52132   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52133   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52134   # "foo.exe" is OK but "foo" is an error.
52135   #
52136   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52137   # It is also a way to make sure we got the proper file name for the real test later on.
52138   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52139   if test "x$test_shortpath" = x; then
52140     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52141 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52142     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52143   fi
52144 
52145   # Call helper function which possibly converts this using DOS-style short mode.
52146   # If so, the updated path is stored in $new_path.
52147 
52148   input_path="$new_path"
52149   # Check if we need to convert this using DOS-style short mode. If the path
52150   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52151   # take no chances and rewrite it.
52152   # Note: m4 eats our [], so we need to use [ and ] instead.
52153   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52154   if test "x$has_forbidden_chars" != x; then
52155     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52156     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52157     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52158     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52159       # Going to short mode and back again did indeed matter. Since short mode is
52160       # case insensitive, let's make it lowercase to improve readability.
52161       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52162       # Now convert it back to Unix-style (cygpath)
52163       input_path=`$CYGPATH -u "$shortmode_path"`
52164       new_path="$input_path"
52165     fi
52166   fi
52167 
52168   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52169   if test "x$test_cygdrive_prefix" = x; then
52170     # As a simple fix, exclude /usr/bin since it's not a real path.
52171     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52172       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52173       # a path prefixed by /cygdrive for fixpath to work.
52174       new_path="$CYGWIN_ROOT_PATH$input_path"
52175     fi
52176   fi
52177 
52178 
52179   if test "x$path" != "x$new_path"; then
52180     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52181     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52182 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52183   fi
52184 
52185     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52186 
52187   path="$POTENTIAL_FREETYPE_LIB_PATH"
52188   has_colon=`$ECHO $path | $GREP ^.:`
52189   new_path="$path"
52190   if test "x$has_colon" = x; then
52191     # Not in mixed or Windows style, start by that.
52192     new_path=`cmd //c echo $path`
52193   fi
52194 
52195 
52196   input_path="$new_path"
52197   # Check if we need to convert this using DOS-style short mode. If the path
52198   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52199   # take no chances and rewrite it.
52200   # Note: m4 eats our [], so we need to use [ and ] instead.
52201   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52202   if test "x$has_forbidden_chars" != x; then
52203     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52204     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52205   fi
52206 
52207 
52208   windows_path="$new_path"
52209   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52210     unix_path=`$CYGPATH -u "$windows_path"`
52211     new_path="$unix_path"
52212   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52213     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52214     new_path="$unix_path"
52215   fi
52216 
52217   if test "x$path" != "x$new_path"; then
52218     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52219     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52220 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52221   fi
52222 
52223   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52224   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52225 
52226     else
52227       # We're on a unix platform. Hooray! :)
52228       path="$POTENTIAL_FREETYPE_LIB_PATH"
52229       has_space=`$ECHO "$path" | $GREP " "`
52230       if test "x$has_space" != x; then
52231         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52232 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52233         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52234       fi
52235 
52236       # Use eval to expand a potential ~
52237       eval path="$path"
52238       if test ! -f "$path" && test ! -d "$path"; then
52239         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52240       fi
52241 
52242       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52243     fi
52244   fi
52245 
52246 
52247     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52248     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52249 $as_echo_n "checking for freetype includes... " >&6; }
52250     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52251 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52252     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52253     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52254 $as_echo_n "checking for freetype libraries... " >&6; }
52255     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52256 $as_echo "$FREETYPE_LIB_PATH" >&6; }
52257   fi
52258 
52259             else
52260 
52261   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52262   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
52263   METHOD="well-known location"
52264 
52265   # Let's start with an optimistic view of the world :-)
52266   FOUND_FREETYPE=yes
52267 
52268   # First look for the canonical freetype main include file ft2build.h.
52269   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52270     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52271     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52272     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52273       # Fail.
52274       FOUND_FREETYPE=no
52275     fi
52276   fi
52277 
52278   if test "x$FOUND_FREETYPE" = xyes; then
52279     # Include file found, let's continue the sanity check.
52280     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52281 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52282 
52283     # Reset to default value
52284     FREETYPE_BASE_NAME=freetype
52285     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52286     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52287       if test "x$OPENJDK_TARGET_OS" = xmacosx \
52288           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52289         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52290         # for the .6 version explicitly.
52291         FREETYPE_BASE_NAME=freetype.6
52292         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52293         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52294 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52295       else
52296         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52297 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52298         FOUND_FREETYPE=no
52299       fi
52300     else
52301       if test "x$OPENJDK_TARGET_OS" = xwindows; then
52302         # On Windows, we will need both .lib and .dll file.
52303         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52304           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52305 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52306           FOUND_FREETYPE=no
52307         fi
52308       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52309           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52310         # Found lib in isa dir, use that instead.
52311         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52312         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52313 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52314       fi
52315     fi
52316   fi
52317 
52318   if test "x$FOUND_FREETYPE" = xyes; then
52319 
52320   # Only process if variable expands to non-empty
52321 
52322   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52323     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52324 
52325   # Input might be given as Windows format, start by converting to
52326   # unix format.
52327   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52328   new_path=`$CYGPATH -u "$path"`
52329 
52330   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52331   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52332   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52333   # "foo.exe" is OK but "foo" is an error.
52334   #
52335   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52336   # It is also a way to make sure we got the proper file name for the real test later on.
52337   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52338   if test "x$test_shortpath" = x; then
52339     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52340 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52341     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52342   fi
52343 
52344   # Call helper function which possibly converts this using DOS-style short mode.
52345   # If so, the updated path is stored in $new_path.
52346 
52347   input_path="$new_path"
52348   # Check if we need to convert this using DOS-style short mode. If the path
52349   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52350   # take no chances and rewrite it.
52351   # Note: m4 eats our [], so we need to use [ and ] instead.
52352   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52353   if test "x$has_forbidden_chars" != x; then
52354     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52355     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52356     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52357     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52358       # Going to short mode and back again did indeed matter. Since short mode is
52359       # case insensitive, let's make it lowercase to improve readability.
52360       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52361       # Now convert it back to Unix-style (cygpath)
52362       input_path=`$CYGPATH -u "$shortmode_path"`
52363       new_path="$input_path"
52364     fi
52365   fi
52366 
52367   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52368   if test "x$test_cygdrive_prefix" = x; then
52369     # As a simple fix, exclude /usr/bin since it's not a real path.
52370     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52371       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52372       # a path prefixed by /cygdrive for fixpath to work.
52373       new_path="$CYGWIN_ROOT_PATH$input_path"
52374     fi
52375   fi
52376 
52377 
52378   if test "x$path" != "x$new_path"; then
52379     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52380     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52381 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52382   fi
52383 
52384     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52385 
52386   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52387   has_colon=`$ECHO $path | $GREP ^.:`
52388   new_path="$path"
52389   if test "x$has_colon" = x; then
52390     # Not in mixed or Windows style, start by that.
52391     new_path=`cmd //c echo $path`
52392   fi
52393 
52394 
52395   input_path="$new_path"
52396   # Check if we need to convert this using DOS-style short mode. If the path
52397   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52398   # take no chances and rewrite it.
52399   # Note: m4 eats our [], so we need to use [ and ] instead.
52400   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52401   if test "x$has_forbidden_chars" != x; then
52402     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52403     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52404   fi
52405 
52406 
52407   windows_path="$new_path"
52408   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52409     unix_path=`$CYGPATH -u "$windows_path"`
52410     new_path="$unix_path"
52411   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52412     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52413     new_path="$unix_path"
52414   fi
52415 
52416   if test "x$path" != "x$new_path"; then
52417     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52418     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52419 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52420   fi
52421 
52422   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52423   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52424 
52425     else
52426       # We're on a unix platform. Hooray! :)
52427       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52428       has_space=`$ECHO "$path" | $GREP " "`
52429       if test "x$has_space" != x; then
52430         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52431 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52432         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52433       fi
52434 
52435       # Use eval to expand a potential ~
52436       eval path="$path"
52437       if test ! -f "$path" && test ! -d "$path"; then
52438         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52439       fi
52440 
52441       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52442     fi
52443   fi
52444 
52445 
52446   # Only process if variable expands to non-empty
52447 
52448   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52449     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52450 
52451   # Input might be given as Windows format, start by converting to
52452   # unix format.
52453   path="$POTENTIAL_FREETYPE_LIB_PATH"
52454   new_path=`$CYGPATH -u "$path"`
52455 
52456   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52457   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52458   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52459   # "foo.exe" is OK but "foo" is an error.
52460   #
52461   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52462   # It is also a way to make sure we got the proper file name for the real test later on.
52463   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52464   if test "x$test_shortpath" = x; then
52465     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52466 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52467     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52468   fi
52469 
52470   # Call helper function which possibly converts this using DOS-style short mode.
52471   # If so, the updated path is stored in $new_path.
52472 
52473   input_path="$new_path"
52474   # Check if we need to convert this using DOS-style short mode. If the path
52475   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52476   # take no chances and rewrite it.
52477   # Note: m4 eats our [], so we need to use [ and ] instead.
52478   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52479   if test "x$has_forbidden_chars" != x; then
52480     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52481     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52482     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52483     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52484       # Going to short mode and back again did indeed matter. Since short mode is
52485       # case insensitive, let's make it lowercase to improve readability.
52486       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52487       # Now convert it back to Unix-style (cygpath)
52488       input_path=`$CYGPATH -u "$shortmode_path"`
52489       new_path="$input_path"
52490     fi
52491   fi
52492 
52493   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52494   if test "x$test_cygdrive_prefix" = x; then
52495     # As a simple fix, exclude /usr/bin since it's not a real path.
52496     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52497       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52498       # a path prefixed by /cygdrive for fixpath to work.
52499       new_path="$CYGWIN_ROOT_PATH$input_path"
52500     fi
52501   fi
52502 
52503 
52504   if test "x$path" != "x$new_path"; then
52505     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52506     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52507 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52508   fi
52509 
52510     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52511 
52512   path="$POTENTIAL_FREETYPE_LIB_PATH"
52513   has_colon=`$ECHO $path | $GREP ^.:`
52514   new_path="$path"
52515   if test "x$has_colon" = x; then
52516     # Not in mixed or Windows style, start by that.
52517     new_path=`cmd //c echo $path`
52518   fi
52519 
52520 
52521   input_path="$new_path"
52522   # Check if we need to convert this using DOS-style short mode. If the path
52523   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52524   # take no chances and rewrite it.
52525   # Note: m4 eats our [], so we need to use [ and ] instead.
52526   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52527   if test "x$has_forbidden_chars" != x; then
52528     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52529     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52530   fi
52531 
52532 
52533   windows_path="$new_path"
52534   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52535     unix_path=`$CYGPATH -u "$windows_path"`
52536     new_path="$unix_path"
52537   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52538     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52539     new_path="$unix_path"
52540   fi
52541 
52542   if test "x$path" != "x$new_path"; then
52543     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52544     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52545 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52546   fi
52547 
52548   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52549   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52550 
52551     else
52552       # We're on a unix platform. Hooray! :)
52553       path="$POTENTIAL_FREETYPE_LIB_PATH"
52554       has_space=`$ECHO "$path" | $GREP " "`
52555       if test "x$has_space" != x; then
52556         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52557 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52558         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52559       fi
52560 
52561       # Use eval to expand a potential ~
52562       eval path="$path"
52563       if test ! -f "$path" && test ! -d "$path"; then
52564         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52565       fi
52566 
52567       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52568     fi
52569   fi
52570 
52571 
52572     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52573     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52574 $as_echo_n "checking for freetype includes... " >&6; }
52575     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52576 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52577     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52578     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52579 $as_echo_n "checking for freetype libraries... " >&6; }
52580     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52581 $as_echo "$FREETYPE_LIB_PATH" >&6; }
52582   fi
52583 
52584               if test "x$FOUND_FREETYPE" != xyes; then
52585 
52586   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52587   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
52588   METHOD="well-known location"
52589 
52590   # Let's start with an optimistic view of the world :-)
52591   FOUND_FREETYPE=yes
52592 
52593   # First look for the canonical freetype main include file ft2build.h.
52594   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52595     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52596     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52597     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52598       # Fail.
52599       FOUND_FREETYPE=no
52600     fi
52601   fi
52602 
52603   if test "x$FOUND_FREETYPE" = xyes; then
52604     # Include file found, let's continue the sanity check.
52605     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52606 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52607 
52608     # Reset to default value
52609     FREETYPE_BASE_NAME=freetype
52610     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52611     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52612       if test "x$OPENJDK_TARGET_OS" = xmacosx \
52613           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52614         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52615         # for the .6 version explicitly.
52616         FREETYPE_BASE_NAME=freetype.6
52617         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52618         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52619 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52620       else
52621         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52622 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52623         FOUND_FREETYPE=no
52624       fi
52625     else
52626       if test "x$OPENJDK_TARGET_OS" = xwindows; then
52627         # On Windows, we will need both .lib and .dll file.
52628         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52629           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52630 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52631           FOUND_FREETYPE=no
52632         fi
52633       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52634           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52635         # Found lib in isa dir, use that instead.
52636         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52637         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52638 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52639       fi
52640     fi
52641   fi
52642 
52643   if test "x$FOUND_FREETYPE" = xyes; then
52644 
52645   # Only process if variable expands to non-empty
52646 
52647   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52648     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52649 
52650   # Input might be given as Windows format, start by converting to
52651   # unix format.
52652   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52653   new_path=`$CYGPATH -u "$path"`
52654 
52655   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52656   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52657   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52658   # "foo.exe" is OK but "foo" is an error.
52659   #
52660   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52661   # It is also a way to make sure we got the proper file name for the real test later on.
52662   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52663   if test "x$test_shortpath" = x; then
52664     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52665 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52666     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52667   fi
52668 
52669   # Call helper function which possibly converts this using DOS-style short mode.
52670   # If so, the updated path is stored in $new_path.
52671 
52672   input_path="$new_path"
52673   # Check if we need to convert this using DOS-style short mode. If the path
52674   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52675   # take no chances and rewrite it.
52676   # Note: m4 eats our [], so we need to use [ and ] instead.
52677   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52678   if test "x$has_forbidden_chars" != x; then
52679     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52680     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52681     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52682     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52683       # Going to short mode and back again did indeed matter. Since short mode is
52684       # case insensitive, let's make it lowercase to improve readability.
52685       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52686       # Now convert it back to Unix-style (cygpath)
52687       input_path=`$CYGPATH -u "$shortmode_path"`
52688       new_path="$input_path"
52689     fi
52690   fi
52691 
52692   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52693   if test "x$test_cygdrive_prefix" = x; then
52694     # As a simple fix, exclude /usr/bin since it's not a real path.
52695     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52696       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52697       # a path prefixed by /cygdrive for fixpath to work.
52698       new_path="$CYGWIN_ROOT_PATH$input_path"
52699     fi
52700   fi
52701 
52702 
52703   if test "x$path" != "x$new_path"; then
52704     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52705     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52706 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52707   fi
52708 
52709     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52710 
52711   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52712   has_colon=`$ECHO $path | $GREP ^.:`
52713   new_path="$path"
52714   if test "x$has_colon" = x; then
52715     # Not in mixed or Windows style, start by that.
52716     new_path=`cmd //c echo $path`
52717   fi
52718 
52719 
52720   input_path="$new_path"
52721   # Check if we need to convert this using DOS-style short mode. If the path
52722   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52723   # take no chances and rewrite it.
52724   # Note: m4 eats our [], so we need to use [ and ] instead.
52725   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52726   if test "x$has_forbidden_chars" != x; then
52727     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52728     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52729   fi
52730 
52731 
52732   windows_path="$new_path"
52733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52734     unix_path=`$CYGPATH -u "$windows_path"`
52735     new_path="$unix_path"
52736   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52737     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52738     new_path="$unix_path"
52739   fi
52740 
52741   if test "x$path" != "x$new_path"; then
52742     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52743     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52744 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52745   fi
52746 
52747   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52748   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52749 
52750     else
52751       # We're on a unix platform. Hooray! :)
52752       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52753       has_space=`$ECHO "$path" | $GREP " "`
52754       if test "x$has_space" != x; then
52755         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52756 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52757         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52758       fi
52759 
52760       # Use eval to expand a potential ~
52761       eval path="$path"
52762       if test ! -f "$path" && test ! -d "$path"; then
52763         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52764       fi
52765 
52766       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52767     fi
52768   fi
52769 
52770 
52771   # Only process if variable expands to non-empty
52772 
52773   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52774     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52775 
52776   # Input might be given as Windows format, start by converting to
52777   # unix format.
52778   path="$POTENTIAL_FREETYPE_LIB_PATH"
52779   new_path=`$CYGPATH -u "$path"`
52780 
52781   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52782   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52783   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52784   # "foo.exe" is OK but "foo" is an error.
52785   #
52786   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52787   # It is also a way to make sure we got the proper file name for the real test later on.
52788   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52789   if test "x$test_shortpath" = x; then
52790     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52791 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52792     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52793   fi
52794 
52795   # Call helper function which possibly converts this using DOS-style short mode.
52796   # If so, the updated path is stored in $new_path.
52797 
52798   input_path="$new_path"
52799   # Check if we need to convert this using DOS-style short mode. If the path
52800   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52801   # take no chances and rewrite it.
52802   # Note: m4 eats our [], so we need to use [ and ] instead.
52803   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52804   if test "x$has_forbidden_chars" != x; then
52805     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52806     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52807     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52808     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52809       # Going to short mode and back again did indeed matter. Since short mode is
52810       # case insensitive, let's make it lowercase to improve readability.
52811       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52812       # Now convert it back to Unix-style (cygpath)
52813       input_path=`$CYGPATH -u "$shortmode_path"`
52814       new_path="$input_path"
52815     fi
52816   fi
52817 
52818   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52819   if test "x$test_cygdrive_prefix" = x; then
52820     # As a simple fix, exclude /usr/bin since it's not a real path.
52821     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52822       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52823       # a path prefixed by /cygdrive for fixpath to work.
52824       new_path="$CYGWIN_ROOT_PATH$input_path"
52825     fi
52826   fi
52827 
52828 
52829   if test "x$path" != "x$new_path"; then
52830     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52831     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52832 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52833   fi
52834 
52835     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52836 
52837   path="$POTENTIAL_FREETYPE_LIB_PATH"
52838   has_colon=`$ECHO $path | $GREP ^.:`
52839   new_path="$path"
52840   if test "x$has_colon" = x; then
52841     # Not in mixed or Windows style, start by that.
52842     new_path=`cmd //c echo $path`
52843   fi
52844 
52845 
52846   input_path="$new_path"
52847   # Check if we need to convert this using DOS-style short mode. If the path
52848   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52849   # take no chances and rewrite it.
52850   # Note: m4 eats our [], so we need to use [ and ] instead.
52851   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52852   if test "x$has_forbidden_chars" != x; then
52853     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52854     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52855   fi
52856 
52857 
52858   windows_path="$new_path"
52859   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52860     unix_path=`$CYGPATH -u "$windows_path"`
52861     new_path="$unix_path"
52862   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52863     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52864     new_path="$unix_path"
52865   fi
52866 
52867   if test "x$path" != "x$new_path"; then
52868     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52869     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52870 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52871   fi
52872 
52873   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52874   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52875 
52876     else
52877       # We're on a unix platform. Hooray! :)
52878       path="$POTENTIAL_FREETYPE_LIB_PATH"
52879       has_space=`$ECHO "$path" | $GREP " "`
52880       if test "x$has_space" != x; then
52881         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52882 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52883         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52884       fi
52885 
52886       # Use eval to expand a potential ~
52887       eval path="$path"
52888       if test ! -f "$path" && test ! -d "$path"; then
52889         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52890       fi
52891 
52892       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52893     fi
52894   fi
52895 
52896 
52897     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52898     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52899 $as_echo_n "checking for freetype includes... " >&6; }
52900     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52901 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52902     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52903     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52904 $as_echo_n "checking for freetype libraries... " >&6; }
52905     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52906 $as_echo "$FREETYPE_LIB_PATH" >&6; }
52907   fi
52908 
52909               fi
52910             fi
52911           fi
52912         fi
52913       fi # end check in well-known locations
52914 
52915       if test "x$FOUND_FREETYPE" != xyes; then
52916 
52917   # Print a helpful message on how to acquire the necessary build dependency.
52918   # freetype is the help tag: freetype, cups, alsa etc
52919   MISSING_DEPENDENCY=freetype
52920 
52921   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52922     cygwin_help $MISSING_DEPENDENCY
52923   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52924     msys_help $MISSING_DEPENDENCY
52925   else
52926     PKGHANDLER_COMMAND=
52927 
52928     case $PKGHANDLER in
52929       apt-get)
52930         apt_help     $MISSING_DEPENDENCY ;;
52931       yum)
52932         yum_help     $MISSING_DEPENDENCY ;;
52933       port)
52934         port_help    $MISSING_DEPENDENCY ;;
52935       pkgutil)
52936         pkgutil_help $MISSING_DEPENDENCY ;;
52937       pkgadd)
52938         pkgadd_help  $MISSING_DEPENDENCY ;;
52939     esac
52940 
52941     if test "x$PKGHANDLER_COMMAND" != x; then
52942       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52943     fi
52944   fi
52945 
52946         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
52947       fi
52948     fi # end user specified settings
52949 
52950     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
52951     if test "x$FREETYPE_CFLAGS" = x; then
52952 
52953   # Only process if variable expands to non-empty
52954 
52955   if test "x$FREETYPE_INCLUDE_PATH" != x; then
52956     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52957 
52958   # Input might be given as Windows format, start by converting to
52959   # unix format.
52960   path="$FREETYPE_INCLUDE_PATH"
52961   new_path=`$CYGPATH -u "$path"`
52962 
52963   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52964   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52965   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52966   # "foo.exe" is OK but "foo" is an error.
52967   #
52968   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52969   # It is also a way to make sure we got the proper file name for the real test later on.
52970   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52971   if test "x$test_shortpath" = x; then
52972     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52973 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52974     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
52975   fi
52976 
52977   # Call helper function which possibly converts this using DOS-style short mode.
52978   # If so, the updated path is stored in $new_path.
52979 
52980   input_path="$new_path"
52981   # Check if we need to convert this using DOS-style short mode. If the path
52982   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52983   # take no chances and rewrite it.
52984   # Note: m4 eats our [], so we need to use [ and ] instead.
52985   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52986   if test "x$has_forbidden_chars" != x; then
52987     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52988     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52989     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52990     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52991       # Going to short mode and back again did indeed matter. Since short mode is
52992       # case insensitive, let's make it lowercase to improve readability.
52993       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52994       # Now convert it back to Unix-style (cygpath)
52995       input_path=`$CYGPATH -u "$shortmode_path"`
52996       new_path="$input_path"
52997     fi
52998   fi
52999 
53000   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53001   if test "x$test_cygdrive_prefix" = x; then
53002     # As a simple fix, exclude /usr/bin since it's not a real path.
53003     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53004       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53005       # a path prefixed by /cygdrive for fixpath to work.
53006       new_path="$CYGWIN_ROOT_PATH$input_path"
53007     fi
53008   fi
53009 
53010 
53011   if test "x$path" != "x$new_path"; then
53012     FREETYPE_INCLUDE_PATH="$new_path"
53013     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53014 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53015   fi
53016 
53017     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53018 
53019   path="$FREETYPE_INCLUDE_PATH"
53020   has_colon=`$ECHO $path | $GREP ^.:`
53021   new_path="$path"
53022   if test "x$has_colon" = x; then
53023     # Not in mixed or Windows style, start by that.
53024     new_path=`cmd //c echo $path`
53025   fi
53026 
53027 
53028   input_path="$new_path"
53029   # Check if we need to convert this using DOS-style short mode. If the path
53030   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53031   # take no chances and rewrite it.
53032   # Note: m4 eats our [], so we need to use [ and ] instead.
53033   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53034   if test "x$has_forbidden_chars" != x; then
53035     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53036     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53037   fi
53038 
53039 
53040   windows_path="$new_path"
53041   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53042     unix_path=`$CYGPATH -u "$windows_path"`
53043     new_path="$unix_path"
53044   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53045     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53046     new_path="$unix_path"
53047   fi
53048 
53049   if test "x$path" != "x$new_path"; then
53050     FREETYPE_INCLUDE_PATH="$new_path"
53051     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53052 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53053   fi
53054 
53055   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53056   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53057 
53058     else
53059       # We're on a unix platform. Hooray! :)
53060       path="$FREETYPE_INCLUDE_PATH"
53061       has_space=`$ECHO "$path" | $GREP " "`
53062       if test "x$has_space" != x; then
53063         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53064 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53065         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53066       fi
53067 
53068       # Use eval to expand a potential ~
53069       eval path="$path"
53070       if test ! -f "$path" && test ! -d "$path"; then
53071         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53072       fi
53073 
53074       FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53075     fi
53076   fi
53077 
53078       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
53079         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
53080       else
53081         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
53082       fi
53083     fi
53084 
53085     if test "x$FREETYPE_LIBS" = x; then
53086 
53087   # Only process if variable expands to non-empty
53088 
53089   if test "x$FREETYPE_LIB_PATH" != x; then
53090     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53091 
53092   # Input might be given as Windows format, start by converting to
53093   # unix format.
53094   path="$FREETYPE_LIB_PATH"
53095   new_path=`$CYGPATH -u "$path"`
53096 
53097   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53098   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53099   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53100   # "foo.exe" is OK but "foo" is an error.
53101   #
53102   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53103   # It is also a way to make sure we got the proper file name for the real test later on.
53104   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53105   if test "x$test_shortpath" = x; then
53106     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53107 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53108     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
53109   fi
53110 
53111   # Call helper function which possibly converts this using DOS-style short mode.
53112   # If so, the updated path is stored in $new_path.
53113 
53114   input_path="$new_path"
53115   # Check if we need to convert this using DOS-style short mode. If the path
53116   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53117   # take no chances and rewrite it.
53118   # Note: m4 eats our [], so we need to use [ and ] instead.
53119   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53120   if test "x$has_forbidden_chars" != x; then
53121     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53122     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53123     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53124     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53125       # Going to short mode and back again did indeed matter. Since short mode is
53126       # case insensitive, let's make it lowercase to improve readability.
53127       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53128       # Now convert it back to Unix-style (cygpath)
53129       input_path=`$CYGPATH -u "$shortmode_path"`
53130       new_path="$input_path"
53131     fi
53132   fi
53133 
53134   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53135   if test "x$test_cygdrive_prefix" = x; then
53136     # As a simple fix, exclude /usr/bin since it's not a real path.
53137     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53138       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53139       # a path prefixed by /cygdrive for fixpath to work.
53140       new_path="$CYGWIN_ROOT_PATH$input_path"
53141     fi
53142   fi
53143 
53144 
53145   if test "x$path" != "x$new_path"; then
53146     FREETYPE_LIB_PATH="$new_path"
53147     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
53148 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53149   fi
53150 
53151     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53152 
53153   path="$FREETYPE_LIB_PATH"
53154   has_colon=`$ECHO $path | $GREP ^.:`
53155   new_path="$path"
53156   if test "x$has_colon" = x; then
53157     # Not in mixed or Windows style, start by that.
53158     new_path=`cmd //c echo $path`
53159   fi
53160 
53161 
53162   input_path="$new_path"
53163   # Check if we need to convert this using DOS-style short mode. If the path
53164   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53165   # take no chances and rewrite it.
53166   # Note: m4 eats our [], so we need to use [ and ] instead.
53167   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53168   if test "x$has_forbidden_chars" != x; then
53169     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53170     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53171   fi
53172 
53173 
53174   windows_path="$new_path"
53175   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53176     unix_path=`$CYGPATH -u "$windows_path"`
53177     new_path="$unix_path"
53178   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53179     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53180     new_path="$unix_path"
53181   fi
53182 
53183   if test "x$path" != "x$new_path"; then
53184     FREETYPE_LIB_PATH="$new_path"
53185     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
53186 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53187   fi
53188 
53189   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53190   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53191 
53192     else
53193       # We're on a unix platform. Hooray! :)
53194       path="$FREETYPE_LIB_PATH"
53195       has_space=`$ECHO "$path" | $GREP " "`
53196       if test "x$has_space" != x; then
53197         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53198 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53199         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53200       fi
53201 
53202       # Use eval to expand a potential ~
53203       eval path="$path"
53204       if test ! -f "$path" && test ! -d "$path"; then
53205         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53206       fi
53207 
53208       FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53209     fi
53210   fi
53211 
53212       if test "x$OPENJDK_TARGET_OS" = xwindows; then
53213         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
53214       else
53215         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
53216       fi
53217     fi
53218 
53219     # Try to compile it
53220     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
53221 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
53222     ac_ext=cpp
53223 ac_cpp='$CXXCPP $CPPFLAGS'
53224 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53225 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53226 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53227 
53228     PREV_CXXCFLAGS="$CXXFLAGS"
53229     PREV_LIBS="$LIBS"
53230     PREV_CXX="$CXX"
53231     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
53232     LIBS="$LIBS $FREETYPE_LIBS"
53233     CXX="$FIXPATH $CXX"
53234     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53235 /* end confdefs.h.  */
53236 
53237           #include<ft2build.h>
53238           #include FT_FREETYPE_H
53239           int main () {
53240             FT_Init_FreeType(NULL);
53241             return 0;
53242           }
53243 
53244 _ACEOF
53245 if ac_fn_cxx_try_link "$LINENO"; then :
53246 
53247           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53248 $as_echo "yes" >&6; }
53249 
53250 else
53251 
53252           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53253 $as_echo "no" >&6; }
53254           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
53255 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
53256           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
53257 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
53258 
53259 
53260   # Print a helpful message on how to acquire the necessary build dependency.
53261   # freetype is the help tag: freetype, cups, alsa etc
53262   MISSING_DEPENDENCY=freetype
53263 
53264   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53265     cygwin_help $MISSING_DEPENDENCY
53266   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53267     msys_help $MISSING_DEPENDENCY
53268   else
53269     PKGHANDLER_COMMAND=
53270 
53271     case $PKGHANDLER in
53272       apt-get)
53273         apt_help     $MISSING_DEPENDENCY ;;
53274       yum)
53275         yum_help     $MISSING_DEPENDENCY ;;
53276       port)
53277         port_help    $MISSING_DEPENDENCY ;;
53278       pkgutil)
53279         pkgutil_help $MISSING_DEPENDENCY ;;
53280       pkgadd)
53281         pkgadd_help  $MISSING_DEPENDENCY ;;
53282     esac
53283 
53284     if test "x$PKGHANDLER_COMMAND" != x; then
53285       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53286     fi
53287   fi
53288 
53289 
53290           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
53291 
53292 
53293 fi
53294 rm -f core conftest.err conftest.$ac_objext \
53295     conftest$ac_exeext conftest.$ac_ext
53296     CXXCFLAGS="$PREV_CXXFLAGS"
53297     LIBS="$PREV_LIBS"
53298     CXX="$PREV_CXX"
53299     ac_ext=cpp
53300 ac_cpp='$CXXCPP $CPPFLAGS'
53301 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53302 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53303 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53304 
53305 
53306     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
53307 $as_echo_n "checking if we should bundle freetype... " >&6; }
53308     if test "x$BUNDLE_FREETYPE" = xyes; then
53309       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
53310     fi
53311     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
53312 $as_echo "$BUNDLE_FREETYPE" >&6; }
53313 
53314   fi # end freetype needed
53315 
53316 
53317 
53318 
53319 
53320 
53321 
53322 # Check whether --with-alsa was given.
53323 if test "${with_alsa+set}" = set; then :
53324   withval=$with_alsa;
53325 fi
53326 
53327 
53328 # Check whether --with-alsa-include was given.
53329 if test "${with_alsa_include+set}" = set; then :
53330   withval=$with_alsa_include;
53331 fi
53332 
53333 
53334 # Check whether --with-alsa-lib was given.
53335 if test "${with_alsa_lib+set}" = set; then :
53336   withval=$with_alsa_lib;
53337 fi
53338 
53339 
53340   if test "x$NEEDS_LIB_ALSA" = xfalse; then
53341     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
53342         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
53343         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
53344       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
53345 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
53346     fi
53347     ALSA_CFLAGS=
53348     ALSA_LIBS=
53349   else
53350     ALSA_FOUND=no
53351 
53352     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
53353       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
53354     fi
53355 
53356     if test "x${with_alsa}" != x; then
53357       ALSA_LIBS="-L${with_alsa}/lib -lasound"
53358       ALSA_CFLAGS="-I${with_alsa}/include"
53359       ALSA_FOUND=yes
53360     fi
53361     if test "x${with_alsa_include}" != x; then
53362       ALSA_CFLAGS="-I${with_alsa_include}"
53363       ALSA_FOUND=yes
53364     fi
53365     if test "x${with_alsa_lib}" != x; then
53366       ALSA_LIBS="-L${with_alsa_lib} -lasound"
53367       ALSA_FOUND=yes
53368     fi
53369     # Do not try pkg-config if we have a sysroot set.
53370     if test "x$SYSROOT" = x; then
53371       if test "x$ALSA_FOUND" = xno; then
53372 
53373 pkg_failed=no
53374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
53375 $as_echo_n "checking for ALSA... " >&6; }
53376 
53377 if test -n "$ALSA_CFLAGS"; then
53378     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
53379  elif test -n "$PKG_CONFIG"; then
53380     if test -n "$PKG_CONFIG" && \
53381     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
53382   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
53383   ac_status=$?
53384   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53385   test $ac_status = 0; }; then
53386   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
53387 else
53388   pkg_failed=yes
53389 fi
53390  else
53391     pkg_failed=untried
53392 fi
53393 if test -n "$ALSA_LIBS"; then
53394     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
53395  elif test -n "$PKG_CONFIG"; then
53396     if test -n "$PKG_CONFIG" && \
53397     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
53398   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
53399   ac_status=$?
53400   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53401   test $ac_status = 0; }; then
53402   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
53403 else
53404   pkg_failed=yes
53405 fi
53406  else
53407     pkg_failed=untried
53408 fi
53409 
53410 
53411 
53412 if test $pkg_failed = yes; then
53413 
53414 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
53415         _pkg_short_errors_supported=yes
53416 else
53417         _pkg_short_errors_supported=no
53418 fi
53419         if test $_pkg_short_errors_supported = yes; then
53420                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
53421         else
53422                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
53423         fi
53424         # Put the nasty error message in config.log where it belongs
53425         echo "$ALSA_PKG_ERRORS" >&5
53426 
53427         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53428 $as_echo "no" >&6; }
53429                 ALSA_FOUND=no
53430 elif test $pkg_failed = untried; then
53431         ALSA_FOUND=no
53432 else
53433         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
53434         ALSA_LIBS=$pkg_cv_ALSA_LIBS
53435         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53436 $as_echo "yes" >&6; }
53437         ALSA_FOUND=yes
53438 fi
53439       fi
53440     fi
53441     if test "x$ALSA_FOUND" = xno; then
53442       for ac_header in alsa/asoundlib.h
53443 do :
53444   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
53445 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
53446   cat >>confdefs.h <<_ACEOF
53447 #define HAVE_ALSA_ASOUNDLIB_H 1
53448 _ACEOF
53449 
53450             ALSA_FOUND=yes
53451             ALSA_CFLAGS=-Iignoreme
53452             ALSA_LIBS=-lasound
53453             DEFAULT_ALSA=yes
53454 
53455 else
53456   ALSA_FOUND=no
53457 
53458 fi
53459 
53460 done
53461 
53462     fi
53463     if test "x$ALSA_FOUND" = xno; then
53464 
53465   # Print a helpful message on how to acquire the necessary build dependency.
53466   # alsa is the help tag: freetype, cups, alsa etc
53467   MISSING_DEPENDENCY=alsa
53468 
53469   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53470     cygwin_help $MISSING_DEPENDENCY
53471   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53472     msys_help $MISSING_DEPENDENCY
53473   else
53474     PKGHANDLER_COMMAND=
53475 
53476     case $PKGHANDLER in
53477       apt-get)
53478         apt_help     $MISSING_DEPENDENCY ;;
53479       yum)
53480         yum_help     $MISSING_DEPENDENCY ;;
53481       port)
53482         port_help    $MISSING_DEPENDENCY ;;
53483       pkgutil)
53484         pkgutil_help $MISSING_DEPENDENCY ;;
53485       pkgadd)
53486         pkgadd_help  $MISSING_DEPENDENCY ;;
53487     esac
53488 
53489     if test "x$PKGHANDLER_COMMAND" != x; then
53490       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53491     fi
53492   fi
53493 
53494       as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
53495     fi
53496   fi
53497 
53498 
53499 
53500 
53501 
53502 
53503 # Check whether --with-libffi was given.
53504 if test "${with_libffi+set}" = set; then :
53505   withval=$with_libffi;
53506 fi
53507 
53508 
53509 # Check whether --with-libffi-include was given.
53510 if test "${with_libffi_include+set}" = set; then :
53511   withval=$with_libffi_include;
53512 fi
53513 
53514 
53515 # Check whether --with-libffi-lib was given.
53516 if test "${with_libffi_lib+set}" = set; then :
53517   withval=$with_libffi_lib;
53518 fi
53519 
53520 
53521   if test "x$NEEDS_LIB_FFI" = xfalse; then
53522     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
53523         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
53524         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
53525       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
53526 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
53527     fi
53528     LIBFFI_CFLAGS=
53529     LIBFFI_LIBS=
53530   else
53531     LIBFFI_FOUND=no
53532 
53533     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
53534       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
53535     fi
53536 
53537     if test "x${with_libffi}" != x; then
53538       LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
53539       LIBFFI_CFLAGS="-I${with_libffi}/include"
53540       LIBFFI_FOUND=yes
53541     fi
53542     if test "x${with_libffi_include}" != x; then
53543       LIBFFI_CFLAGS="-I${with_libffi_include}"
53544       LIBFFI_FOUND=yes
53545     fi
53546     if test "x${with_libffi_lib}" != x; then
53547       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
53548       LIBFFI_FOUND=yes
53549     fi
53550     # Do not try pkg-config if we have a sysroot set.
53551     if test "x$SYSROOT" = x; then
53552       if test "x$LIBFFI_FOUND" = xno; then
53553         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
53554 
53555 pkg_failed=no
53556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
53557 $as_echo_n "checking for LIBFFI... " >&6; }
53558 
53559 if test -n "$LIBFFI_CFLAGS"; then
53560     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
53561  elif test -n "$PKG_CONFIG"; then
53562     if test -n "$PKG_CONFIG" && \
53563     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
53564   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
53565   ac_status=$?
53566   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53567   test $ac_status = 0; }; then
53568   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
53569 else
53570   pkg_failed=yes
53571 fi
53572  else
53573     pkg_failed=untried
53574 fi
53575 if test -n "$LIBFFI_LIBS"; then
53576     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
53577  elif test -n "$PKG_CONFIG"; then
53578     if test -n "$PKG_CONFIG" && \
53579     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
53580   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
53581   ac_status=$?
53582   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53583   test $ac_status = 0; }; then
53584   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
53585 else
53586   pkg_failed=yes
53587 fi
53588  else
53589     pkg_failed=untried
53590 fi
53591 
53592 
53593 
53594 if test $pkg_failed = yes; then
53595 
53596 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
53597         _pkg_short_errors_supported=yes
53598 else
53599         _pkg_short_errors_supported=no
53600 fi
53601         if test $_pkg_short_errors_supported = yes; then
53602                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
53603         else
53604                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
53605         fi
53606         # Put the nasty error message in config.log where it belongs
53607         echo "$LIBFFI_PKG_ERRORS" >&5
53608 
53609         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53610 $as_echo "no" >&6; }
53611                 LIBFFI_FOUND=no
53612 elif test $pkg_failed = untried; then
53613         LIBFFI_FOUND=no
53614 else
53615         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
53616         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
53617         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53618 $as_echo "yes" >&6; }
53619         LIBFFI_FOUND=yes
53620 fi
53621       fi
53622     fi
53623     if test "x$LIBFFI_FOUND" = xno; then
53624       for ac_header in ffi.h
53625 do :
53626   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
53627 if test "x$ac_cv_header_ffi_h" = xyes; then :
53628   cat >>confdefs.h <<_ACEOF
53629 #define HAVE_FFI_H 1
53630 _ACEOF
53631 
53632             LIBFFI_FOUND=yes
53633             LIBFFI_CFLAGS=
53634             LIBFFI_LIBS=-lffi
53635 
53636 else
53637   LIBFFI_FOUND=no
53638 
53639 fi
53640 
53641 done
53642 
53643     fi
53644     if test "x$LIBFFI_FOUND" = xno; then
53645 
53646   # Print a helpful message on how to acquire the necessary build dependency.
53647   # ffi is the help tag: freetype, cups, alsa etc
53648   MISSING_DEPENDENCY=ffi
53649 
53650   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53651     cygwin_help $MISSING_DEPENDENCY
53652   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53653     msys_help $MISSING_DEPENDENCY
53654   else
53655     PKGHANDLER_COMMAND=
53656 
53657     case $PKGHANDLER in
53658       apt-get)
53659         apt_help     $MISSING_DEPENDENCY ;;
53660       yum)
53661         yum_help     $MISSING_DEPENDENCY ;;
53662       port)
53663         port_help    $MISSING_DEPENDENCY ;;
53664       pkgutil)
53665         pkgutil_help $MISSING_DEPENDENCY ;;
53666       pkgadd)
53667         pkgadd_help  $MISSING_DEPENDENCY ;;
53668     esac
53669 
53670     if test "x$PKGHANDLER_COMMAND" != x; then
53671       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53672     fi
53673   fi
53674 
53675       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
53676     fi
53677 
53678     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
53679 $as_echo_n "checking if libffi works... " >&6; }
53680     ac_ext=c
53681 ac_cpp='$CPP $CPPFLAGS'
53682 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53683 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53684 ac_compiler_gnu=$ac_cv_c_compiler_gnu
53685 
53686     OLD_CFLAGS="$CFLAGS"
53687     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
53688     OLD_LIBS="$LIBS"
53689     LIBS="$LIBS $LIBFFI_LIBS"
53690     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53691 /* end confdefs.h.  */
53692 #include <ffi.h>
53693 int
53694 main ()
53695 {
53696 
53697           ffi_call(NULL, NULL, NULL, NULL);
53698           return 0;
53699 
53700   ;
53701   return 0;
53702 }
53703 _ACEOF
53704 if ac_fn_c_try_link "$LINENO"; then :
53705   LIBFFI_WORKS=yes
53706 else
53707   LIBFFI_WORKS=no
53708 
53709 fi
53710 rm -f core conftest.err conftest.$ac_objext \
53711     conftest$ac_exeext conftest.$ac_ext
53712     CFLAGS="$OLD_CFLAGS"
53713     LIBS="$OLD_LIBS"
53714     ac_ext=cpp
53715 ac_cpp='$CXXCPP $CPPFLAGS'
53716 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53717 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53718 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53719 
53720     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
53721 $as_echo "$LIBFFI_WORKS" >&6; }
53722 
53723     if test "x$LIBFFI_WORKS" = xno; then
53724 
53725   # Print a helpful message on how to acquire the necessary build dependency.
53726   # ffi is the help tag: freetype, cups, alsa etc
53727   MISSING_DEPENDENCY=ffi
53728 
53729   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53730     cygwin_help $MISSING_DEPENDENCY
53731   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53732     msys_help $MISSING_DEPENDENCY
53733   else
53734     PKGHANDLER_COMMAND=
53735 
53736     case $PKGHANDLER in
53737       apt-get)
53738         apt_help     $MISSING_DEPENDENCY ;;
53739       yum)
53740         yum_help     $MISSING_DEPENDENCY ;;
53741       port)
53742         port_help    $MISSING_DEPENDENCY ;;
53743       pkgutil)
53744         pkgutil_help $MISSING_DEPENDENCY ;;
53745       pkgadd)
53746         pkgadd_help  $MISSING_DEPENDENCY ;;
53747     esac
53748 
53749     if test "x$PKGHANDLER_COMMAND" != x; then
53750       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53751     fi
53752   fi
53753 
53754       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
53755     fi
53756   fi
53757 
53758 
53759 
53760 
53761 
53762   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
53763     # Extract the first word of "llvm-config", so it can be a program name with args.
53764 set dummy llvm-config; ac_word=$2
53765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53766 $as_echo_n "checking for $ac_word... " >&6; }
53767 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
53768   $as_echo_n "(cached) " >&6
53769 else
53770   if test -n "$LLVM_CONFIG"; then
53771   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
53772 else
53773 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53774 for as_dir in $PATH
53775 do
53776   IFS=$as_save_IFS
53777   test -z "$as_dir" && as_dir=.
53778     for ac_exec_ext in '' $ac_executable_extensions; do
53779   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53780     ac_cv_prog_LLVM_CONFIG="llvm-config"
53781     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53782     break 2
53783   fi
53784 done
53785   done
53786 IFS=$as_save_IFS
53787 
53788 fi
53789 fi
53790 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
53791 if test -n "$LLVM_CONFIG"; then
53792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
53793 $as_echo "$LLVM_CONFIG" >&6; }
53794 else
53795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53796 $as_echo "no" >&6; }
53797 fi
53798 
53799 
53800 
53801     if test "x$LLVM_CONFIG" != xllvm-config; then
53802       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
53803     fi
53804 
53805     llvm_components="jit mcjit engine nativecodegen native"
53806     unset LLVM_CFLAGS
53807     for flag in $("$LLVM_CONFIG" --cxxflags); do
53808       if echo "${flag}" | grep -q '^-[ID]'; then
53809         if test "${flag}" != "-D_DEBUG" ; then
53810           if test "${LLVM_CFLAGS}" != "" ; then
53811             LLVM_CFLAGS="${LLVM_CFLAGS} "
53812           fi
53813           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
53814         fi
53815       fi
53816     done
53817     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
53818     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
53819 
53820     unset LLVM_LDFLAGS
53821     for flag in $("${LLVM_CONFIG}" --ldflags); do
53822       if echo "${flag}" | grep -q '^-L'; then
53823         if test "${LLVM_LDFLAGS}" != ""; then
53824           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
53825         fi
53826         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
53827       fi
53828     done
53829 
53830     unset LLVM_LIBS
53831     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
53832       if echo "${flag}" | grep -q '^-l'; then
53833         if test "${LLVM_LIBS}" != ""; then
53834           LLVM_LIBS="${LLVM_LIBS} "
53835         fi
53836         LLVM_LIBS="${LLVM_LIBS}${flag}"
53837       fi
53838     done
53839 
53840 
53841 
53842 
53843   fi
53844 
53845 
53846 
53847 # Check whether --with-libjpeg was given.
53848 if test "${with_libjpeg+set}" = set; then :
53849   withval=$with_libjpeg;
53850 fi
53851 
53852 
53853   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
53854 $as_echo_n "checking for which libjpeg to use... " >&6; }
53855   # default is bundled
53856   DEFAULT_LIBJPEG=bundled
53857   # if user didn't specify, use DEFAULT_LIBJPEG
53858   if test "x${with_libjpeg}" = "x"; then
53859     with_libjpeg=${DEFAULT_LIBJPEG}
53860   fi
53861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
53862 $as_echo "${with_libjpeg}" >&6; }
53863 
53864   if test "x${with_libjpeg}" = "xbundled"; then
53865     USE_EXTERNAL_LIBJPEG=false
53866   elif test "x${with_libjpeg}" = "xsystem"; then
53867     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
53868 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
53869 
53870 else
53871    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
53872 fi
53873 
53874 
53875     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
53876 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
53877 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
53878   $as_echo_n "(cached) " >&6
53879 else
53880   ac_check_lib_save_LIBS=$LIBS
53881 LIBS="-ljpeg  $LIBS"
53882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53883 /* end confdefs.h.  */
53884 
53885 /* Override any GCC internal prototype to avoid an error.
53886    Use char because int might match the return type of a GCC
53887    builtin and then its argument prototype would still apply.  */
53888 #ifdef __cplusplus
53889 extern "C"
53890 #endif
53891 char jpeg_CreateDecompress ();
53892 int
53893 main ()
53894 {
53895 return jpeg_CreateDecompress ();
53896   ;
53897   return 0;
53898 }
53899 _ACEOF
53900 if ac_fn_cxx_try_link "$LINENO"; then :
53901   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
53902 else
53903   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
53904 fi
53905 rm -f core conftest.err conftest.$ac_objext \
53906     conftest$ac_exeext conftest.$ac_ext
53907 LIBS=$ac_check_lib_save_LIBS
53908 fi
53909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
53910 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
53911 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
53912   cat >>confdefs.h <<_ACEOF
53913 #define HAVE_LIBJPEG 1
53914 _ACEOF
53915 
53916   LIBS="-ljpeg $LIBS"
53917 
53918 else
53919    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
53920 fi
53921 
53922 
53923     USE_EXTERNAL_LIBJPEG=true
53924   else
53925     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
53926   fi
53927 
53928 
53929 
53930 
53931 
53932 # Check whether --with-giflib was given.
53933 if test "${with_giflib+set}" = set; then :
53934   withval=$with_giflib;
53935 fi
53936 
53937 
53938   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
53939 $as_echo_n "checking for which giflib to use... " >&6; }
53940   # default is bundled
53941   DEFAULT_GIFLIB=bundled
53942   # if user didn't specify, use DEFAULT_GIFLIB
53943   if test "x${with_giflib}" = "x"; then
53944     with_giflib=${DEFAULT_GIFLIB}
53945   fi
53946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
53947 $as_echo "${with_giflib}" >&6; }
53948 
53949   if test "x${with_giflib}" = "xbundled"; then
53950     USE_EXTERNAL_LIBGIF=false
53951   elif test "x${with_giflib}" = "xsystem"; then
53952     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
53953 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
53954 
53955 else
53956    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
53957 fi
53958 
53959 
53960     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
53961 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
53962 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
53963   $as_echo_n "(cached) " >&6
53964 else
53965   ac_check_lib_save_LIBS=$LIBS
53966 LIBS="-lgif  $LIBS"
53967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53968 /* end confdefs.h.  */
53969 
53970 /* Override any GCC internal prototype to avoid an error.
53971    Use char because int might match the return type of a GCC
53972    builtin and then its argument prototype would still apply.  */
53973 #ifdef __cplusplus
53974 extern "C"
53975 #endif
53976 char DGifGetCode ();
53977 int
53978 main ()
53979 {
53980 return DGifGetCode ();
53981   ;
53982   return 0;
53983 }
53984 _ACEOF
53985 if ac_fn_cxx_try_link "$LINENO"; then :
53986   ac_cv_lib_gif_DGifGetCode=yes
53987 else
53988   ac_cv_lib_gif_DGifGetCode=no
53989 fi
53990 rm -f core conftest.err conftest.$ac_objext \
53991     conftest$ac_exeext conftest.$ac_ext
53992 LIBS=$ac_check_lib_save_LIBS
53993 fi
53994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
53995 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
53996 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
53997   cat >>confdefs.h <<_ACEOF
53998 #define HAVE_LIBGIF 1
53999 _ACEOF
54000 
54001   LIBS="-lgif $LIBS"
54002 
54003 else
54004    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
54005 fi
54006 
54007 
54008     USE_EXTERNAL_LIBGIF=true
54009   else
54010     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
54011   fi
54012 
54013 
54014 
54015 
54016 
54017 # Check whether --with-libpng was given.
54018 if test "${with_libpng+set}" = set; then :
54019   withval=$with_libpng;
54020 fi
54021 
54022 
54023   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
54024 $as_echo_n "checking for which libpng to use... " >&6; }
54025 
54026   # default is bundled
54027   DEFAULT_LIBPNG=bundled
54028   # if user didn't specify, use DEFAULT_LIBPNG
54029   if test "x${with_libpng}" = "x"; then
54030       with_libpng=${DEFAULT_LIBPNG}
54031   fi
54032 
54033   if test "x${with_libpng}" = "xbundled"; then
54034       USE_EXTERNAL_LIBPNG=false
54035       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54036 $as_echo "bundled" >&6; }
54037   elif test "x${with_libpng}" = "xsystem"; then
54038 
54039 pkg_failed=no
54040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
54041 $as_echo_n "checking for PNG... " >&6; }
54042 
54043 if test -n "$PNG_CFLAGS"; then
54044     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
54045  elif test -n "$PKG_CONFIG"; then
54046     if test -n "$PKG_CONFIG" && \
54047     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
54048   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
54049   ac_status=$?
54050   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54051   test $ac_status = 0; }; then
54052   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
54053 else
54054   pkg_failed=yes
54055 fi
54056  else
54057     pkg_failed=untried
54058 fi
54059 if test -n "$PNG_LIBS"; then
54060     pkg_cv_PNG_LIBS="$PNG_LIBS"
54061  elif test -n "$PKG_CONFIG"; then
54062     if test -n "$PKG_CONFIG" && \
54063     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
54064   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
54065   ac_status=$?
54066   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54067   test $ac_status = 0; }; then
54068   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
54069 else
54070   pkg_failed=yes
54071 fi
54072  else
54073     pkg_failed=untried
54074 fi
54075 
54076 
54077 
54078 if test $pkg_failed = yes; then
54079 
54080 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
54081         _pkg_short_errors_supported=yes
54082 else
54083         _pkg_short_errors_supported=no
54084 fi
54085         if test $_pkg_short_errors_supported = yes; then
54086                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
54087         else
54088                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
54089         fi
54090         # Put the nasty error message in config.log where it belongs
54091         echo "$PNG_PKG_ERRORS" >&5
54092 
54093         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54094 $as_echo "no" >&6; }
54095                  LIBPNG_FOUND=no
54096 elif test $pkg_failed = untried; then
54097          LIBPNG_FOUND=no
54098 else
54099         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
54100         PNG_LIBS=$pkg_cv_PNG_LIBS
54101         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54102 $as_echo "yes" >&6; }
54103          LIBPNG_FOUND=yes
54104 fi
54105       if test "x${LIBPNG_FOUND}" = "xyes"; then
54106           USE_EXTERNAL_LIBPNG=true
54107           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54108 $as_echo "system" >&6; }
54109       else
54110           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
54111 $as_echo "system not found" >&6; }
54112           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
54113       fi
54114   else
54115       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
54116   fi
54117 
54118 
54119 
54120 
54121 
54122 # Check whether --with-zlib was given.
54123 if test "${with_zlib+set}" = set; then :
54124   withval=$with_zlib;
54125 fi
54126 
54127 
54128   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
54129 $as_echo_n "checking for compress in -lz... " >&6; }
54130 if ${ac_cv_lib_z_compress+:} false; then :
54131   $as_echo_n "(cached) " >&6
54132 else
54133   ac_check_lib_save_LIBS=$LIBS
54134 LIBS="-lz  $LIBS"
54135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54136 /* end confdefs.h.  */
54137 
54138 /* Override any GCC internal prototype to avoid an error.
54139    Use char because int might match the return type of a GCC
54140    builtin and then its argument prototype would still apply.  */
54141 #ifdef __cplusplus
54142 extern "C"
54143 #endif
54144 char compress ();
54145 int
54146 main ()
54147 {
54148 return compress ();
54149   ;
54150   return 0;
54151 }
54152 _ACEOF
54153 if ac_fn_cxx_try_link "$LINENO"; then :
54154   ac_cv_lib_z_compress=yes
54155 else
54156   ac_cv_lib_z_compress=no
54157 fi
54158 rm -f core conftest.err conftest.$ac_objext \
54159     conftest$ac_exeext conftest.$ac_ext
54160 LIBS=$ac_check_lib_save_LIBS
54161 fi
54162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
54163 $as_echo "$ac_cv_lib_z_compress" >&6; }
54164 if test "x$ac_cv_lib_z_compress" = xyes; then :
54165    ZLIB_FOUND=yes
54166 else
54167    ZLIB_FOUND=no
54168 fi
54169 
54170 
54171   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
54172 $as_echo_n "checking for which zlib to use... " >&6; }
54173 
54174   DEFAULT_ZLIB=bundled
54175   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
54176     # On macosx default is system...on others default is bundled
54177     DEFAULT_ZLIB=system
54178   fi
54179 
54180   if test "x${ZLIB_FOUND}" != "xyes"; then
54181     # If we don't find any system...set default to bundled
54182     DEFAULT_ZLIB=bundled
54183   fi
54184 
54185   # If user didn't specify, use DEFAULT_ZLIB
54186   if test "x${with_zlib}" = "x"; then
54187     with_zlib=${DEFAULT_ZLIB}
54188   fi
54189 
54190   if test "x${with_zlib}" = "xbundled"; then
54191     USE_EXTERNAL_LIBZ=false
54192     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54193 $as_echo "bundled" >&6; }
54194   elif test "x${with_zlib}" = "xsystem"; then
54195     if test "x${ZLIB_FOUND}" = "xyes"; then
54196       USE_EXTERNAL_LIBZ=true
54197       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54198 $as_echo "system" >&6; }
54199     else
54200       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
54201 $as_echo "system not found" >&6; }
54202       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
54203     fi
54204   else
54205     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
54206   fi
54207 
54208 
54209 
54210 
54211 
54212 # Check whether --with-lcms was given.
54213 if test "${with_lcms+set}" = set; then :
54214   withval=$with_lcms;
54215 fi
54216 
54217 
54218   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
54219 $as_echo_n "checking for which lcms to use... " >&6; }
54220 
54221   DEFAULT_LCMS=bundled
54222   # If user didn't specify, use DEFAULT_LCMS
54223   if test "x${with_lcms}" = "x"; then
54224       with_lcms=${DEFAULT_LCMS}
54225   fi
54226 
54227   if test "x${with_lcms}" = "xbundled"; then
54228     USE_EXTERNAL_LCMS=false
54229     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54230 $as_echo "bundled" >&6; }
54231   elif test "x${with_lcms}" = "xsystem"; then
54232     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54233 $as_echo "system" >&6; }
54234 
54235 pkg_failed=no
54236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
54237 $as_echo_n "checking for LCMS... " >&6; }
54238 
54239 if test -n "$LCMS_CFLAGS"; then
54240     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
54241  elif test -n "$PKG_CONFIG"; then
54242     if test -n "$PKG_CONFIG" && \
54243     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
54244   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
54245   ac_status=$?
54246   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54247   test $ac_status = 0; }; then
54248   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
54249 else
54250   pkg_failed=yes
54251 fi
54252  else
54253     pkg_failed=untried
54254 fi
54255 if test -n "$LCMS_LIBS"; then
54256     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
54257  elif test -n "$PKG_CONFIG"; then
54258     if test -n "$PKG_CONFIG" && \
54259     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
54260   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
54261   ac_status=$?
54262   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54263   test $ac_status = 0; }; then
54264   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
54265 else
54266   pkg_failed=yes
54267 fi
54268  else
54269     pkg_failed=untried
54270 fi
54271 
54272 
54273 
54274 if test $pkg_failed = yes; then
54275 
54276 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
54277         _pkg_short_errors_supported=yes
54278 else
54279         _pkg_short_errors_supported=no
54280 fi
54281         if test $_pkg_short_errors_supported = yes; then
54282                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
54283         else
54284                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
54285         fi
54286         # Put the nasty error message in config.log where it belongs
54287         echo "$LCMS_PKG_ERRORS" >&5
54288 
54289         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54290 $as_echo "no" >&6; }
54291                 LCMS_FOUND=no
54292 elif test $pkg_failed = untried; then
54293         LCMS_FOUND=no
54294 else
54295         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
54296         LCMS_LIBS=$pkg_cv_LCMS_LIBS
54297         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54298 $as_echo "yes" >&6; }
54299         LCMS_FOUND=yes
54300 fi
54301     if test "x${LCMS_FOUND}" = "xyes"; then
54302       USE_EXTERNAL_LCMS=true
54303     else
54304       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
54305     fi
54306   else
54307     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
54308   fi
54309 
54310 
54311 
54312 
54313 
54314 
54315 
54316 
54317 
54318 
54319 
54320   # Setup libm (the maths library)
54321   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
54322 $as_echo_n "checking for cos in -lm... " >&6; }
54323 if ${ac_cv_lib_m_cos+:} false; then :
54324   $as_echo_n "(cached) " >&6
54325 else
54326   ac_check_lib_save_LIBS=$LIBS
54327 LIBS="-lm  $LIBS"
54328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54329 /* end confdefs.h.  */
54330 
54331 /* Override any GCC internal prototype to avoid an error.
54332    Use char because int might match the return type of a GCC
54333    builtin and then its argument prototype would still apply.  */
54334 #ifdef __cplusplus
54335 extern "C"
54336 #endif
54337 char cos ();
54338 int
54339 main ()
54340 {
54341 return cos ();
54342   ;
54343   return 0;
54344 }
54345 _ACEOF
54346 if ac_fn_cxx_try_link "$LINENO"; then :
54347   ac_cv_lib_m_cos=yes
54348 else
54349   ac_cv_lib_m_cos=no
54350 fi
54351 rm -f core conftest.err conftest.$ac_objext \
54352     conftest$ac_exeext conftest.$ac_ext
54353 LIBS=$ac_check_lib_save_LIBS
54354 fi
54355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
54356 $as_echo "$ac_cv_lib_m_cos" >&6; }
54357 if test "x$ac_cv_lib_m_cos" = xyes; then :
54358   cat >>confdefs.h <<_ACEOF
54359 #define HAVE_LIBM 1
54360 _ACEOF
54361 
54362   LIBS="-lm $LIBS"
54363 
54364 else
54365 
54366       { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
54367 $as_echo "$as_me: Maths library was not found" >&6;}
54368 
54369 fi
54370 
54371   LIBM=-lm
54372 
54373 
54374   # Setup libdl (for dynamic library loading)
54375   save_LIBS="$LIBS"
54376   LIBS=""
54377   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
54378 $as_echo_n "checking for dlopen in -ldl... " >&6; }
54379 if ${ac_cv_lib_dl_dlopen+:} false; then :
54380   $as_echo_n "(cached) " >&6
54381 else
54382   ac_check_lib_save_LIBS=$LIBS
54383 LIBS="-ldl  $LIBS"
54384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54385 /* end confdefs.h.  */
54386 
54387 /* Override any GCC internal prototype to avoid an error.
54388    Use char because int might match the return type of a GCC
54389    builtin and then its argument prototype would still apply.  */
54390 #ifdef __cplusplus
54391 extern "C"
54392 #endif
54393 char dlopen ();
54394 int
54395 main ()
54396 {
54397 return dlopen ();
54398   ;
54399   return 0;
54400 }
54401 _ACEOF
54402 if ac_fn_cxx_try_link "$LINENO"; then :
54403   ac_cv_lib_dl_dlopen=yes
54404 else
54405   ac_cv_lib_dl_dlopen=no
54406 fi
54407 rm -f core conftest.err conftest.$ac_objext \
54408     conftest$ac_exeext conftest.$ac_ext
54409 LIBS=$ac_check_lib_save_LIBS
54410 fi
54411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
54412 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
54413 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
54414   cat >>confdefs.h <<_ACEOF
54415 #define HAVE_LIBDL 1
54416 _ACEOF
54417 
54418   LIBS="-ldl $LIBS"
54419 
54420 fi
54421 
54422   LIBDL="$LIBS"
54423 
54424   LIBS="$save_LIBS"
54425 
54426   # Deprecated libraries, keep the flags for backwards compatibility
54427   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54428 
54429 
54430 # Check whether --with-dxsdk was given.
54431 if test "${with_dxsdk+set}" = set; then :
54432   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
54433 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
54434 fi
54435 
54436 
54437 
54438 
54439 # Check whether --with-dxsdk-lib was given.
54440 if test "${with_dxsdk_lib+set}" = set; then :
54441   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
54442 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
54443 fi
54444 
54445 
54446 
54447 
54448 # Check whether --with-dxsdk-include was given.
54449 if test "${with_dxsdk_include+set}" = set; then :
54450   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
54451 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
54452 fi
54453 
54454 
54455   fi
54456 
54457   # Control if libzip can use mmap. Available for purposes of overriding.
54458   LIBZIP_CAN_USE_MMAP=true
54459 
54460 
54461 
54462 
54463 
54464 
54465 
54466 
54467 
54468 
54469 
54470 
54471 
54472 
54473 ###############################################################################
54474 #
54475 # We need to do some final tweaking, when everything else is done.
54476 #
54477 ###############################################################################
54478 
54479 
54480   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
54481 
54482 
54483   # The name of the Service Agent jar.
54484   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
54485   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54486     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
54487   fi
54488 
54489 
54490 
54491     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
54492 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
54493 
54494     if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
54495       ENABLE_INTREE_EC=yes
54496       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54497 $as_echo "yes" >&6; }
54498     else
54499       ENABLE_INTREE_EC=no
54500       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54501 $as_echo "no" >&6; }
54502     fi
54503 
54504 
54505 
54506 
54507 ###############################################################################
54508 #
54509 # Configure parts of the build that only affect the build performance,
54510 # not the result.
54511 #
54512 ###############################################################################
54513 
54514 
54515   # How many cores do we have on this build system?
54516 
54517 # Check whether --with-num-cores was given.
54518 if test "${with_num_cores+set}" = set; then :
54519   withval=$with_num_cores;
54520 fi
54521 
54522   if test "x$with_num_cores" = x; then
54523     # The number of cores were not specified, try to probe them.
54524 
54525   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
54526 $as_echo_n "checking for number of cores... " >&6; }
54527   NUM_CORES=1
54528   FOUND_CORES=no
54529 
54530   if test -f /proc/cpuinfo; then
54531     # Looks like a Linux (or cygwin) system
54532     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
54533     FOUND_CORES=yes
54534   elif test -x /usr/sbin/psrinfo; then
54535     # Looks like a Solaris system
54536     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
54537     FOUND_CORES=yes
54538   elif test -x /usr/sbin/system_profiler; then
54539     # Looks like a MacOSX system
54540     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
54541     FOUND_CORES=yes
54542   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
54543     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
54544     FOUND_CORES=yes
54545   elif test -n "$NUMBER_OF_PROCESSORS"; then
54546     # On windows, look in the env
54547     NUM_CORES=$NUMBER_OF_PROCESSORS
54548     FOUND_CORES=yes
54549   fi
54550 
54551   if test "x$FOUND_CORES" = xyes; then
54552     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
54553 $as_echo "$NUM_CORES" >&6; }
54554   else
54555     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
54556 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
54557     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
54558 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
54559   fi
54560 
54561   else
54562     NUM_CORES=$with_num_cores
54563   fi
54564 
54565 
54566 
54567   # How much memory do we have on this build system?
54568 
54569 # Check whether --with-memory-size was given.
54570 if test "${with_memory_size+set}" = set; then :
54571   withval=$with_memory_size;
54572 fi
54573 
54574   if test "x$with_memory_size" = x; then
54575     # The memory size was not specified, try to probe it.
54576 
54577   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
54578 $as_echo_n "checking for memory size... " >&6; }
54579   # Default to 1024 MB
54580   MEMORY_SIZE=1024
54581   FOUND_MEM=no
54582 
54583   if test -f /proc/meminfo; then
54584     # Looks like a Linux (or cygwin) system
54585     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
54586     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
54587     FOUND_MEM=yes
54588   elif test -x /usr/sbin/prtconf; then
54589     # Looks like a Solaris or AIX system
54590     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
54591     FOUND_MEM=yes
54592   elif test -x /usr/sbin/system_profiler; then
54593     # Looks like a MacOSX system
54594     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
54595     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
54596     FOUND_MEM=yes
54597   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
54598     # Windows, but without cygwin
54599     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
54600     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
54601     FOUND_MEM=yes
54602   fi
54603 
54604   if test "x$FOUND_MEM" = xyes; then
54605     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
54606 $as_echo "$MEMORY_SIZE MB" >&6; }
54607   else
54608     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
54609 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
54610     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
54611 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
54612   fi
54613 
54614   else
54615     MEMORY_SIZE=$with_memory_size
54616   fi
54617 
54618 
54619 
54620   # Provide a decent default number of parallel jobs for make depending on
54621   # number of cores, amount of memory and machine architecture.
54622 
54623 # Check whether --with-jobs was given.
54624 if test "${with_jobs+set}" = set; then :
54625   withval=$with_jobs;
54626 fi
54627 
54628   if test "x$with_jobs" = x; then
54629     # Number of jobs was not specified, calculate.
54630     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
54631 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
54632     # Approximate memory in GB.
54633     memory_gb=`expr $MEMORY_SIZE / 1024`
54634     # Pick the lowest of memory in gb and number of cores.
54635     if test "$memory_gb" -lt "$NUM_CORES"; then
54636       JOBS="$memory_gb"
54637     else
54638       JOBS="$NUM_CORES"
54639       # On bigger machines, leave some room for other processes to run
54640       if test "$JOBS" -gt "4"; then
54641         JOBS=`expr $JOBS '*' 90 / 100`
54642       fi
54643     fi
54644     # Cap number of jobs to 16
54645     if test "$JOBS" -gt "16"; then
54646       JOBS=16
54647     fi
54648     if test "$JOBS" -eq "0"; then
54649       JOBS=1
54650     fi
54651     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
54652 $as_echo "$JOBS" >&6; }
54653   else
54654     JOBS=$with_jobs
54655   fi
54656 
54657 
54658 
54659 # Setup arguments for the boot jdk (after cores and memory have been setup)
54660 
54661   ##############################################################################
54662   #
54663   # Specify jvm options for anything that is run with the Boot JDK.
54664   # Not all JVM:s accept the same arguments on the command line.
54665   #
54666 
54667 # Check whether --with-boot-jdk-jvmargs was given.
54668 if test "${with_boot_jdk_jvmargs+set}" = set; then :
54669   withval=$with_boot_jdk_jvmargs;
54670 fi
54671 
54672 
54673   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
54674 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
54675 
54676   # Disable special log output when a debug build is used as Boot JDK...
54677 
54678   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
54679   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
54680   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
54681   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54682   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54683   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54684     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
54685     JVM_ARG_OK=true
54686   else
54687     $ECHO "Arg failed:" >&5
54688     $ECHO "$OUTPUT" >&5
54689     JVM_ARG_OK=false
54690   fi
54691 
54692 
54693   # Apply user provided options.
54694 
54695   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
54696   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
54697   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
54698   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54699   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54700   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54701     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
54702     JVM_ARG_OK=true
54703   else
54704     $ECHO "Arg failed:" >&5
54705     $ECHO "$OUTPUT" >&5
54706     JVM_ARG_OK=false
54707   fi
54708 
54709 
54710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
54711 $as_echo "$boot_jdk_jvmargs" >&6; }
54712 
54713   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
54714   JAVA_FLAGS=$boot_jdk_jvmargs
54715 
54716 
54717 
54718   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
54719 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
54720 
54721   # Starting amount of heap memory.
54722 
54723   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
54724   $ECHO "Command: $JAVA -Xms64M -version" >&5
54725   OUTPUT=`$JAVA -Xms64M -version 2>&1`
54726   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54727   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54728   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54729     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
54730     JVM_ARG_OK=true
54731   else
54732     $ECHO "Arg failed:" >&5
54733     $ECHO "$OUTPUT" >&5
54734     JVM_ARG_OK=false
54735   fi
54736 
54737 
54738   # Maximum amount of heap memory.
54739   # Maximum stack size.
54740   JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
54741   if test "x$BOOT_JDK_BITS" = "x32"; then
54742     if test "$JVM_MAX_HEAP" -gt "1100"; then
54743       JVM_MAX_HEAP=1100
54744     elif test "$JVM_MAX_HEAP" -lt "512"; then
54745       JVM_MAX_HEAP=512
54746     fi
54747     STACK_SIZE=768
54748   else
54749     # Running a 64 bit JVM allows for and requires a bigger heap
54750     if test "$JVM_MAX_HEAP" -gt "1600"; then
54751       JVM_MAX_HEAP=1600
54752     elif test "$JVM_MAX_HEAP" -lt "512"; then
54753       JVM_MAX_HEAP=512
54754     fi
54755     STACK_SIZE=1536
54756   fi
54757 
54758   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
54759   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
54760   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
54761   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54762   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54763   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54764     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
54765     JVM_ARG_OK=true
54766   else
54767     $ECHO "Arg failed:" >&5
54768     $ECHO "$OUTPUT" >&5
54769     JVM_ARG_OK=false
54770   fi
54771 
54772 
54773   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
54774   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
54775   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
54776   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54777   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54778   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54779     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
54780     JVM_ARG_OK=true
54781   else
54782     $ECHO "Arg failed:" >&5
54783     $ECHO "$OUTPUT" >&5
54784     JVM_ARG_OK=false
54785   fi
54786 
54787 
54788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
54789 $as_echo "$boot_jdk_jvmargs_big" >&6; }
54790 
54791   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
54792 
54793 
54794 
54795   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
54796 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
54797 
54798   # Use serial gc for small short lived tools if possible
54799 
54800   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
54801   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
54802   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
54803   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54804   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54805   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54806     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
54807     JVM_ARG_OK=true
54808   else
54809     $ECHO "Arg failed:" >&5
54810     $ECHO "$OUTPUT" >&5
54811     JVM_ARG_OK=false
54812   fi
54813 
54814 
54815   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
54816   $ECHO "Command: $JAVA -Xms32M -version" >&5
54817   OUTPUT=`$JAVA -Xms32M -version 2>&1`
54818   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54819   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54820   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54821     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
54822     JVM_ARG_OK=true
54823   else
54824     $ECHO "Arg failed:" >&5
54825     $ECHO "$OUTPUT" >&5
54826     JVM_ARG_OK=false
54827   fi
54828 
54829 
54830   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
54831   $ECHO "Command: $JAVA -Xmx512M -version" >&5
54832   OUTPUT=`$JAVA -Xmx512M -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 -Xmx512M"
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   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
54846 $as_echo "$boot_jdk_jvmargs_small" >&6; }
54847 
54848   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
54849 
54850 
54851   JAVA_TOOL_FLAGS_SMALL=""
54852   for f in $JAVA_FLAGS_SMALL; do
54853     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
54854   done
54855 
54856 
54857 
54858 # Setup smart javac (after cores and memory have been setup)
54859 
54860 
54861 # Check whether --with-sjavac-server-java was given.
54862 if test "${with_sjavac_server_java+set}" = set; then :
54863   withval=$with_sjavac_server_java;
54864 fi
54865 
54866 
54867   if test "x$with_sjavac_server_java" != x; then
54868     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
54869     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
54870     if test "x$FOUND_VERSION" = x; then
54871       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
54872     fi
54873   else
54874     SJAVAC_SERVER_JAVA="$JAVA"
54875   fi
54876 
54877 
54878   if test "$MEMORY_SIZE" -gt "3000"; then
54879 
54880   $ECHO "Check if jvm arg is ok: -d64" >&5
54881   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
54882   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
54883   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54884   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54885   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54886     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
54887     JVM_ARG_OK=true
54888   else
54889     $ECHO "Arg failed:" >&5
54890     $ECHO "$OUTPUT" >&5
54891     JVM_ARG_OK=false
54892   fi
54893 
54894     if test "$JVM_ARG_OK" = true; then
54895       JVM_64BIT=true
54896       JVM_ARG_OK=false
54897     fi
54898   fi
54899 
54900   MX_VALUE=`expr $MEMORY_SIZE / 2`
54901   if test "$JVM_64BIT" = true; then
54902     # Set ms lower than mx since more than one instance of the server might
54903     # get launched at the same time before they figure out which instance won.
54904     MS_VALUE=512
54905     if test "$MX_VALUE" -gt "2048"; then
54906       MX_VALUE=2048
54907     fi
54908   else
54909     MS_VALUE=256
54910     if test "$MX_VALUE" -gt "1500"; then
54911       MX_VALUE=1500
54912     fi
54913   fi
54914   if test "$MX_VALUE" -lt "512"; then
54915     MX_VALUE=512
54916   fi
54917 
54918   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
54919   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
54920   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
54921   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54922   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54923   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54924     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
54925     JVM_ARG_OK=true
54926   else
54927     $ECHO "Arg failed:" >&5
54928     $ECHO "$OUTPUT" >&5
54929     JVM_ARG_OK=false
54930   fi
54931 
54932 
54933 
54934   # Check whether --enable-sjavac was given.
54935 if test "${enable_sjavac+set}" = set; then :
54936   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
54937 else
54938   ENABLE_SJAVAC="no"
54939 fi
54940 
54941   if test "x$JVM_ARG_OK" = "xfalse"; then
54942     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
54943 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
54944     ENABLE_SJAVAC="no"
54945   fi
54946   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
54947 $as_echo_n "checking whether to use sjavac... " >&6; }
54948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
54949 $as_echo "$ENABLE_SJAVAC" >&6; }
54950 
54951 
54952   # Check whether --enable-javac-server was given.
54953 if test "${enable_javac_server+set}" = set; then :
54954   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
54955 else
54956   ENABLE_JAVAC_SERVER="no"
54957 fi
54958 
54959   if test "x$JVM_ARG_OK" = "xfalse"; then
54960     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
54961 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
54962     ENABLE_JAVAC_SERVER="no"
54963   fi
54964   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
54965 $as_echo_n "checking whether to use javac server... " >&6; }
54966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
54967 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
54968 
54969 
54970 
54971 # Can the C/C++ compiler use precompiled headers?
54972 
54973 
54974   ###############################################################################
54975   #
54976   # Can the C/C++ compiler use precompiled headers?
54977   #
54978   # Check whether --enable-precompiled-headers was given.
54979 if test "${enable_precompiled_headers+set}" = set; then :
54980   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
54981 else
54982   ENABLE_PRECOMPH=yes
54983 fi
54984 
54985 
54986   USE_PRECOMPILED_HEADER=1
54987   if test "x$ENABLE_PRECOMPH" = xno; then
54988     USE_PRECOMPILED_HEADER=0
54989   fi
54990 
54991   if test "x$ENABLE_PRECOMPH" = xyes; then
54992     # Check that the compiler actually supports precomp headers.
54993     if test "x$TOOLCHAIN_TYPE" = xgcc; then
54994       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
54995 $as_echo_n "checking that precompiled headers work... " >&6; }
54996       echo "int alfa();" > conftest.h
54997       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
54998       if test ! -f conftest.hpp.gch; then
54999         USE_PRECOMPILED_HEADER=0
55000         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55001 $as_echo "no" >&6; }
55002       else
55003         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55004 $as_echo "yes" >&6; }
55005       fi
55006       rm -f conftest.h conftest.hpp.gch
55007     fi
55008   fi
55009 
55010 
55011 
55012 
55013 # Setup use of ccache, if available
55014 
55015   # Check whether --enable-ccache was given.
55016 if test "${enable_ccache+set}" = set; then :
55017   enableval=$enable_ccache;
55018 fi
55019 
55020 
55021   CCACHE=
55022   CCACHE_STATUS=
55023   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
55024 $as_echo_n "checking is ccache enabled... " >&6; }
55025   if test "x$enable_ccache" = xyes; then
55026     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
55027       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55028 $as_echo "yes" >&6; }
55029       OLD_PATH="$PATH"
55030       if test "x$TOOLCHAIN_PATH" != x; then
55031         PATH=$TOOLCHAIN_PATH:$PATH
55032       fi
55033 
55034 
55035 
55036   # Publish this variable in the help.
55037 
55038 
55039   if [ -z "${CCACHE+x}" ]; then
55040     # The variable is not set by user, try to locate tool using the code snippet
55041     for ac_prog in ccache
55042 do
55043   # Extract the first word of "$ac_prog", so it can be a program name with args.
55044 set dummy $ac_prog; ac_word=$2
55045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55046 $as_echo_n "checking for $ac_word... " >&6; }
55047 if ${ac_cv_path_CCACHE+:} false; then :
55048   $as_echo_n "(cached) " >&6
55049 else
55050   case $CCACHE in
55051   [\\/]* | ?:[\\/]*)
55052   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55053   ;;
55054   *)
55055   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55056 for as_dir in $PATH
55057 do
55058   IFS=$as_save_IFS
55059   test -z "$as_dir" && as_dir=.
55060     for ac_exec_ext in '' $ac_executable_extensions; do
55061   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55062     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55063     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55064     break 2
55065   fi
55066 done
55067   done
55068 IFS=$as_save_IFS
55069 
55070   ;;
55071 esac
55072 fi
55073 CCACHE=$ac_cv_path_CCACHE
55074 if test -n "$CCACHE"; then
55075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55076 $as_echo "$CCACHE" >&6; }
55077 else
55078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55079 $as_echo "no" >&6; }
55080 fi
55081 
55082 
55083   test -n "$CCACHE" && break
55084 done
55085 
55086   else
55087     # The variable is set, but is it from the command line or the environment?
55088 
55089     # Try to remove the string !CCACHE! from our list.
55090     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
55091     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
55092       # If it failed, the variable was not from the command line. Ignore it,
55093       # but warn the user (except for BASH, which is always set by the calling BASH).
55094       if test "xCCACHE" != xBASH; then
55095         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
55096 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
55097       fi
55098       # Try to locate tool using the code snippet
55099       for ac_prog in ccache
55100 do
55101   # Extract the first word of "$ac_prog", so it can be a program name with args.
55102 set dummy $ac_prog; ac_word=$2
55103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55104 $as_echo_n "checking for $ac_word... " >&6; }
55105 if ${ac_cv_path_CCACHE+:} false; then :
55106   $as_echo_n "(cached) " >&6
55107 else
55108   case $CCACHE in
55109   [\\/]* | ?:[\\/]*)
55110   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55111   ;;
55112   *)
55113   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55114 for as_dir in $PATH
55115 do
55116   IFS=$as_save_IFS
55117   test -z "$as_dir" && as_dir=.
55118     for ac_exec_ext in '' $ac_executable_extensions; do
55119   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55120     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55122     break 2
55123   fi
55124 done
55125   done
55126 IFS=$as_save_IFS
55127 
55128   ;;
55129 esac
55130 fi
55131 CCACHE=$ac_cv_path_CCACHE
55132 if test -n "$CCACHE"; then
55133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55134 $as_echo "$CCACHE" >&6; }
55135 else
55136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55137 $as_echo "no" >&6; }
55138 fi
55139 
55140 
55141   test -n "$CCACHE" && break
55142 done
55143 
55144     else
55145       # If it succeeded, then it was overridden by the user. We will use it
55146       # for the tool.
55147 
55148       # First remove it from the list of overridden variables, so we can test
55149       # for unknown variables in the end.
55150       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
55151 
55152       # Check if we try to supply an empty value
55153       if test "x$CCACHE" = x; then
55154         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
55155 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
55156         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
55157 $as_echo_n "checking for CCACHE... " >&6; }
55158         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
55159 $as_echo "disabled" >&6; }
55160       else
55161         # Check if the provided tool contains a complete path.
55162         tool_specified="$CCACHE"
55163         tool_basename="${tool_specified##*/}"
55164         if test "x$tool_basename" = "x$tool_specified"; then
55165           # A command without a complete path is provided, search $PATH.
55166           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
55167 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
55168           # Extract the first word of "$tool_basename", so it can be a program name with args.
55169 set dummy $tool_basename; ac_word=$2
55170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55171 $as_echo_n "checking for $ac_word... " >&6; }
55172 if ${ac_cv_path_CCACHE+:} false; then :
55173   $as_echo_n "(cached) " >&6
55174 else
55175   case $CCACHE in
55176   [\\/]* | ?:[\\/]*)
55177   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55178   ;;
55179   *)
55180   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55181 for as_dir in $PATH
55182 do
55183   IFS=$as_save_IFS
55184   test -z "$as_dir" && as_dir=.
55185     for ac_exec_ext in '' $ac_executable_extensions; do
55186   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55187     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55188     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55189     break 2
55190   fi
55191 done
55192   done
55193 IFS=$as_save_IFS
55194 
55195   ;;
55196 esac
55197 fi
55198 CCACHE=$ac_cv_path_CCACHE
55199 if test -n "$CCACHE"; then
55200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55201 $as_echo "$CCACHE" >&6; }
55202 else
55203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55204 $as_echo "no" >&6; }
55205 fi
55206 
55207 
55208           if test "x$CCACHE" = x; then
55209             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
55210           fi
55211         else
55212           # Otherwise we believe it is a complete path. Use it as it is.
55213           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
55214 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
55215           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
55216 $as_echo_n "checking for CCACHE... " >&6; }
55217           if test ! -x "$tool_specified"; then
55218             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
55219 $as_echo "not found" >&6; }
55220             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
55221           fi
55222           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
55223 $as_echo "$tool_specified" >&6; }
55224         fi
55225       fi
55226     fi
55227 
55228   fi
55229 
55230 
55231 
55232   if test "x$CCACHE" = x; then
55233     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
55234   fi
55235 
55236 
55237       PATH="$OLD_PATH"
55238       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
55239       CCACHE_STATUS="Active ($CCACHE_VERSION)"
55240     else
55241       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55242 $as_echo "no" >&6; }
55243       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
55244 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
55245     fi
55246   elif test "x$enable_ccache" = xno; then
55247     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
55248 $as_echo "no, explicitly disabled" >&6; }
55249     CCACHE_STATUS="Disabled"
55250   elif test "x$enable_ccache" = x; then
55251     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55252 $as_echo "no" >&6; }
55253   else
55254     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
55255 $as_echo "unknown" >&6; }
55256     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
55257   fi
55258 
55259 
55260 
55261 # Check whether --with-ccache-dir was given.
55262 if test "${with_ccache_dir+set}" = set; then :
55263   withval=$with_ccache_dir;
55264 fi
55265 
55266 
55267   if test "x$with_ccache_dir" != x; then
55268     # When using a non home ccache directory, assume the use is to share ccache files
55269     # with other users. Thus change the umask.
55270     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
55271     if test "x$CCACHE" = x; then
55272       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
55273 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
55274     fi
55275   fi
55276 
55277   if test "x$CCACHE" != x; then
55278 
55279   if test "x$CCACHE" != x; then
55280     if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
55281       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
55282           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
55283       if test "x$HAS_BAD_CCACHE" != "x"; then
55284         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
55285       fi
55286       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
55287 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
55288       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
55289       PUSHED_FLAGS="$CXXFLAGS"
55290       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
55291       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55292 /* end confdefs.h.  */
55293 
55294 int
55295 main ()
55296 {
55297 
55298   ;
55299   return 0;
55300 }
55301 _ACEOF
55302 if ac_fn_cxx_try_compile "$LINENO"; then :
55303   CC_KNOWS_CCACHE_TRICK=yes
55304 else
55305   CC_KNOWS_CCACHE_TRICK=no
55306 fi
55307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
55308       CXXFLAGS="$PUSHED_FLAGS"
55309       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
55310         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55311 $as_echo "yes" >&6; }
55312         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
55313 
55314         CCACHE_SLOPPINESS=pch_defines,time_macros
55315       else
55316         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55317 $as_echo "no" >&6; }
55318         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
55319       fi
55320     fi
55321 
55322     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
55323         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
55324 
55325     if test "x$SET_CCACHE_DIR" != x; then
55326       mkdir -p $CCACHE_DIR > /dev/null 2>&1
55327       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
55328     fi
55329   fi
55330 
55331   fi
55332 
55333 
55334 ###############################################################################
55335 #
55336 # And now the finish...
55337 #
55338 ###############################################################################
55339 
55340 # Check for some common pitfalls
55341 
55342   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55343     file_to_test="$SRC_ROOT/LICENSE"
55344     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
55345       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
55346     fi
55347   fi
55348 
55349 
55350   # Did user specify any unknown variables?
55351 
55352   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
55353     # Replace the separating ! with spaces before presenting for end user.
55354     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
55355     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
55356 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
55357   fi
55358 
55359 
55360   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
55361 $as_echo_n "checking if build directory is on local disk... " >&6; }
55362 
55363   # df -l lists only local disks; if the given directory is not found then
55364   # a non-zero exit code is given
55365   if test "x$DF" = x; then
55366     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55367       # msys does not have df; use Windows "net use" instead.
55368       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
55369       if test "x$IS_NETWORK_DISK" = x; then
55370         OUTPUT_DIR_IS_LOCAL="yes"
55371       else
55372         OUTPUT_DIR_IS_LOCAL="no"
55373       fi
55374     else
55375       # No df here, say it's local
55376       OUTPUT_DIR_IS_LOCAL="yes"
55377     fi
55378   else
55379     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
55380       OUTPUT_DIR_IS_LOCAL="yes"
55381     else
55382       OUTPUT_DIR_IS_LOCAL="no"
55383     fi
55384   fi
55385 
55386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
55387 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
55388 
55389 
55390 
55391   # Check if the user has any old-style ALT_ variables set.
55392   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
55393 
55394   # Before generating output files, test if they exist. If they do, this is a reconfigure.
55395   # Since we can't properly handle the dependencies for this, warn the user about the situation
55396   if test -e $OUTPUT_ROOT/spec.gmk; then
55397     IS_RECONFIGURE=yes
55398   else
55399     IS_RECONFIGURE=no
55400   fi
55401 
55402 
55403 # At the end, call the custom hook. (Dummy macro if no custom sources available)
55404 
55405 
55406 # We're messing a bit with internal autoconf variables to put the config.status
55407 # in the output directory instead of the current directory.
55408 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
55409 
55410 # Create the actual output files. Now the main work of configure is done.
55411 cat >confcache <<\_ACEOF
55412 # This file is a shell script that caches the results of configure
55413 # tests run on this system so they can be shared between configure
55414 # scripts and configure runs, see configure's option --config-cache.
55415 # It is not useful on other systems.  If it contains results you don't
55416 # want to keep, you may remove or edit it.
55417 #
55418 # config.status only pays attention to the cache file if you give it
55419 # the --recheck option to rerun configure.
55420 #
55421 # `ac_cv_env_foo' variables (set or unset) will be overridden when
55422 # loading this file, other *unset* `ac_cv_foo' will be assigned the
55423 # following values.
55424 
55425 _ACEOF
55426 
55427 # The following way of writing the cache mishandles newlines in values,
55428 # but we know of no workaround that is simple, portable, and efficient.
55429 # So, we kill variables containing newlines.
55430 # Ultrix sh set writes to stderr and can't be redirected directly,
55431 # and sets the high bit in the cache file unless we assign to the vars.
55432 (
55433   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
55434     eval ac_val=\$$ac_var
55435     case $ac_val in #(
55436     *${as_nl}*)
55437       case $ac_var in #(
55438       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
55439 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
55440       esac
55441       case $ac_var in #(
55442       _ | IFS | as_nl) ;; #(
55443       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
55444       *) { eval $ac_var=; unset $ac_var;} ;;
55445       esac ;;
55446     esac
55447   done
55448 
55449   (set) 2>&1 |
55450     case $as_nl`(ac_space=' '; set) 2>&1` in #(
55451     *${as_nl}ac_space=\ *)
55452       # `set' does not quote correctly, so add quotes: double-quote
55453       # substitution turns \\\\ into \\, and sed turns \\ into \.
55454       sed -n \
55455         "s/'/'\\\\''/g;
55456           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
55457       ;; #(
55458     *)
55459       # `set' quotes correctly as required by POSIX, so do not add quotes.
55460       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
55461       ;;
55462     esac |
55463     sort
55464 ) |
55465   sed '
55466      /^ac_cv_env_/b end
55467      t clear
55468      :clear
55469      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
55470      t end
55471      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
55472      :end' >>confcache
55473 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
55474   if test -w "$cache_file"; then
55475     if test "x$cache_file" != "x/dev/null"; then
55476       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
55477 $as_echo "$as_me: updating cache $cache_file" >&6;}
55478       if test ! -f "$cache_file" || test -h "$cache_file"; then
55479         cat confcache >"$cache_file"
55480       else
55481         case $cache_file in #(
55482         */* | ?:*)
55483           mv -f confcache "$cache_file"$$ &&
55484           mv -f "$cache_file"$$ "$cache_file" ;; #(
55485         *)
55486           mv -f confcache "$cache_file" ;;
55487         esac
55488       fi
55489     fi
55490   else
55491     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
55492 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
55493   fi
55494 fi
55495 rm -f confcache
55496 
55497 test "x$prefix" = xNONE && prefix=$ac_default_prefix
55498 # Let make expand exec_prefix.
55499 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
55500 
55501 # Transform confdefs.h into DEFS.
55502 # Protect against shell expansion while executing Makefile rules.
55503 # Protect against Makefile macro expansion.
55504 #
55505 # If the first sed substitution is executed (which looks for macros that
55506 # take arguments), then branch to the quote section.  Otherwise,
55507 # look for a macro that doesn't take arguments.
55508 ac_script='
55509 :mline
55510 /\\$/{
55511  N
55512  s,\\\n,,
55513  b mline
55514 }
55515 t clear
55516 :clear
55517 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
55518 t quote
55519 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
55520 t quote
55521 b any
55522 :quote
55523 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
55524 s/\[/\\&/g
55525 s/\]/\\&/g
55526 s/\$/$$/g
55527 H
55528 :any
55529 ${
55530         g
55531         s/^\n//
55532         s/\n/ /g
55533         p
55534 }
55535 '
55536 DEFS=`sed -n "$ac_script" confdefs.h`
55537 
55538 
55539 ac_libobjs=
55540 ac_ltlibobjs=
55541 U=
55542 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
55543   # 1. Remove the extension, and $U if already installed.
55544   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
55545   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
55546   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
55547   #    will be set to the directory where LIBOBJS objects are built.
55548   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
55549   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
55550 done
55551 LIBOBJS=$ac_libobjs
55552 
55553 LTLIBOBJS=$ac_ltlibobjs
55554 
55555 
55556 
55557 : "${CONFIG_STATUS=./config.status}"
55558 ac_write_fail=0
55559 ac_clean_files_save=$ac_clean_files
55560 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
55561 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
55562 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
55563 as_write_fail=0
55564 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
55565 #! $SHELL
55566 # Generated by $as_me.
55567 # Run this file to recreate the current configuration.
55568 # Compiler output produced by configure, useful for debugging
55569 # configure, is in config.log if it exists.
55570 
55571 debug=false
55572 ac_cs_recheck=false
55573 ac_cs_silent=false
55574 
55575 SHELL=\${CONFIG_SHELL-$SHELL}
55576 export SHELL
55577 _ASEOF
55578 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
55579 ## -------------------- ##
55580 ## M4sh Initialization. ##
55581 ## -------------------- ##
55582 
55583 # Be more Bourne compatible
55584 DUALCASE=1; export DUALCASE # for MKS sh
55585 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
55586   emulate sh
55587   NULLCMD=:
55588   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
55589   # is contrary to our usage.  Disable this feature.
55590   alias -g '${1+"$@"}'='"$@"'
55591   setopt NO_GLOB_SUBST
55592 else
55593   case `(set -o) 2>/dev/null` in #(
55594   *posix*) :
55595     set -o posix ;; #(
55596   *) :
55597      ;;
55598 esac
55599 fi
55600 
55601 
55602 as_nl='
55603 '
55604 export as_nl
55605 # Printing a long string crashes Solaris 7 /usr/bin/printf.
55606 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
55607 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
55608 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
55609 # Prefer a ksh shell builtin over an external printf program on Solaris,
55610 # but without wasting forks for bash or zsh.
55611 if test -z "$BASH_VERSION$ZSH_VERSION" \
55612     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
55613   as_echo='print -r --'
55614   as_echo_n='print -rn --'
55615 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
55616   as_echo='printf %s\n'
55617   as_echo_n='printf %s'
55618 else
55619   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55620     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55621     as_echo_n='/usr/ucb/echo -n'
55622   else
55623     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
55624     as_echo_n_body='eval
55625       arg=$1;
55626       case $arg in #(
55627       *"$as_nl"*)
55628         expr "X$arg" : "X\\(.*\\)$as_nl";
55629         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
55630       esac;
55631       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
55632     '
55633     export as_echo_n_body
55634     as_echo_n='sh -c $as_echo_n_body as_echo'
55635   fi
55636   export as_echo_body
55637   as_echo='sh -c $as_echo_body as_echo'
55638 fi
55639 
55640 # The user is always right.
55641 if test "${PATH_SEPARATOR+set}" != set; then
55642   PATH_SEPARATOR=:
55643   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
55644     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
55645       PATH_SEPARATOR=';'
55646   }
55647 fi
55648 
55649 
55650 # IFS
55651 # We need space, tab and new line, in precisely that order.  Quoting is
55652 # there to prevent editors from complaining about space-tab.
55653 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
55654 # splitting by setting IFS to empty value.)
55655 IFS=" ""        $as_nl"
55656 
55657 # Find who we are.  Look in the path if we contain no directory separator.
55658 as_myself=
55659 case $0 in #((
55660   *[\\/]* ) as_myself=$0 ;;
55661   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55662 for as_dir in $PATH
55663 do
55664   IFS=$as_save_IFS
55665   test -z "$as_dir" && as_dir=.
55666     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
55667   done
55668 IFS=$as_save_IFS
55669 
55670      ;;
55671 esac
55672 # We did not find ourselves, most probably we were run as `sh COMMAND'
55673 # in which case we are not to be found in the path.
55674 if test "x$as_myself" = x; then
55675   as_myself=$0
55676 fi
55677 if test ! -f "$as_myself"; then
55678   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
55679   exit 1
55680 fi
55681 
55682 # Unset variables that we do not need and which cause bugs (e.g. in
55683 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
55684 # suppresses any "Segmentation fault" message there.  '((' could
55685 # trigger a bug in pdksh 5.2.14.
55686 for as_var in BASH_ENV ENV MAIL MAILPATH
55687 do eval test x\${$as_var+set} = xset \
55688   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
55689 done
55690 PS1='$ '
55691 PS2='> '
55692 PS4='+ '
55693 
55694 # NLS nuisances.
55695 LC_ALL=C
55696 export LC_ALL
55697 LANGUAGE=C
55698 export LANGUAGE
55699 
55700 # CDPATH.
55701 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
55702 
55703 
55704 # as_fn_error STATUS ERROR [LINENO LOG_FD]
55705 # ----------------------------------------
55706 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
55707 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
55708 # script with STATUS, using 1 if that was 0.
55709 as_fn_error ()
55710 {
55711   as_status=$1; test $as_status -eq 0 && as_status=1
55712   if test "$4"; then
55713     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
55714     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
55715   fi
55716   $as_echo "$as_me: error: $2" >&2
55717   as_fn_exit $as_status
55718 } # as_fn_error
55719 
55720 
55721 # as_fn_set_status STATUS
55722 # -----------------------
55723 # Set $? to STATUS, without forking.
55724 as_fn_set_status ()
55725 {
55726   return $1
55727 } # as_fn_set_status
55728 
55729 # as_fn_exit STATUS
55730 # -----------------
55731 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
55732 as_fn_exit ()
55733 {
55734   set +e
55735   as_fn_set_status $1
55736   exit $1
55737 } # as_fn_exit
55738 
55739 # as_fn_unset VAR
55740 # ---------------
55741 # Portably unset VAR.
55742 as_fn_unset ()
55743 {
55744   { eval $1=; unset $1;}
55745 }
55746 as_unset=as_fn_unset
55747 # as_fn_append VAR VALUE
55748 # ----------------------
55749 # Append the text in VALUE to the end of the definition contained in VAR. Take
55750 # advantage of any shell optimizations that allow amortized linear growth over
55751 # repeated appends, instead of the typical quadratic growth present in naive
55752 # implementations.
55753 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
55754   eval 'as_fn_append ()
55755   {
55756     eval $1+=\$2
55757   }'
55758 else
55759   as_fn_append ()
55760   {
55761     eval $1=\$$1\$2
55762   }
55763 fi # as_fn_append
55764 
55765 # as_fn_arith ARG...
55766 # ------------------
55767 # Perform arithmetic evaluation on the ARGs, and store the result in the
55768 # global $as_val. Take advantage of shells that can avoid forks. The arguments
55769 # must be portable across $(()) and expr.
55770 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
55771   eval 'as_fn_arith ()
55772   {
55773     as_val=$(( $* ))
55774   }'
55775 else
55776   as_fn_arith ()
55777   {
55778     as_val=`expr "$@" || test $? -eq 1`
55779   }
55780 fi # as_fn_arith
55781 
55782 
55783 if expr a : '\(a\)' >/dev/null 2>&1 &&
55784    test "X`expr 00001 : '.*\(...\)'`" = X001; then
55785   as_expr=expr
55786 else
55787   as_expr=false
55788 fi
55789 
55790 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
55791   as_basename=basename
55792 else
55793   as_basename=false
55794 fi
55795 
55796 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
55797   as_dirname=dirname
55798 else
55799   as_dirname=false
55800 fi
55801 
55802 as_me=`$as_basename -- "$0" ||
55803 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
55804          X"$0" : 'X\(//\)$' \| \
55805          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
55806 $as_echo X/"$0" |
55807     sed '/^.*\/\([^/][^/]*\)\/*$/{
55808             s//\1/
55809             q
55810           }
55811           /^X\/\(\/\/\)$/{
55812             s//\1/
55813             q
55814           }
55815           /^X\/\(\/\).*/{
55816             s//\1/
55817             q
55818           }
55819           s/.*/./; q'`
55820 
55821 # Avoid depending upon Character Ranges.
55822 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
55823 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
55824 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
55825 as_cr_digits='0123456789'
55826 as_cr_alnum=$as_cr_Letters$as_cr_digits
55827 
55828 ECHO_C= ECHO_N= ECHO_T=
55829 case `echo -n x` in #(((((
55830 -n*)
55831   case `echo 'xy\c'` in
55832   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
55833   xy)  ECHO_C='\c';;
55834   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
55835        ECHO_T=' ';;
55836   esac;;
55837 *)
55838   ECHO_N='-n';;
55839 esac
55840 
55841 rm -f conf$$ conf$$.exe conf$$.file
55842 if test -d conf$$.dir; then
55843   rm -f conf$$.dir/conf$$.file
55844 else
55845   rm -f conf$$.dir
55846   mkdir conf$$.dir 2>/dev/null
55847 fi
55848 if (echo >conf$$.file) 2>/dev/null; then
55849   if ln -s conf$$.file conf$$ 2>/dev/null; then
55850     as_ln_s='ln -s'
55851     # ... but there are two gotchas:
55852     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
55853     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
55854     # In both cases, we have to default to `cp -pR'.
55855     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
55856       as_ln_s='cp -pR'
55857   elif ln conf$$.file conf$$ 2>/dev/null; then
55858     as_ln_s=ln
55859   else
55860     as_ln_s='cp -pR'
55861   fi
55862 else
55863   as_ln_s='cp -pR'
55864 fi
55865 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
55866 rmdir conf$$.dir 2>/dev/null
55867 
55868 
55869 # as_fn_mkdir_p
55870 # -------------
55871 # Create "$as_dir" as a directory, including parents if necessary.
55872 as_fn_mkdir_p ()
55873 {
55874 
55875   case $as_dir in #(
55876   -*) as_dir=./$as_dir;;
55877   esac
55878   test -d "$as_dir" || eval $as_mkdir_p || {
55879     as_dirs=
55880     while :; do
55881       case $as_dir in #(
55882       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
55883       *) as_qdir=$as_dir;;
55884       esac
55885       as_dirs="'$as_qdir' $as_dirs"
55886       as_dir=`$as_dirname -- "$as_dir" ||
55887 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
55888          X"$as_dir" : 'X\(//\)[^/]' \| \
55889          X"$as_dir" : 'X\(//\)$' \| \
55890          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
55891 $as_echo X"$as_dir" |
55892     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
55893             s//\1/
55894             q
55895           }
55896           /^X\(\/\/\)[^/].*/{
55897             s//\1/
55898             q
55899           }
55900           /^X\(\/\/\)$/{
55901             s//\1/
55902             q
55903           }
55904           /^X\(\/\).*/{
55905             s//\1/
55906             q
55907           }
55908           s/.*/./; q'`
55909       test -d "$as_dir" && break
55910     done
55911     test -z "$as_dirs" || eval "mkdir $as_dirs"
55912   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
55913 
55914 
55915 } # as_fn_mkdir_p
55916 if mkdir -p . 2>/dev/null; then
55917   as_mkdir_p='mkdir -p "$as_dir"'
55918 else
55919   test -d ./-p && rmdir ./-p
55920   as_mkdir_p=false
55921 fi
55922 
55923 
55924 # as_fn_executable_p FILE
55925 # -----------------------
55926 # Test if FILE is an executable regular file.
55927 as_fn_executable_p ()
55928 {
55929   test -f "$1" && test -x "$1"
55930 } # as_fn_executable_p
55931 as_test_x='test -x'
55932 as_executable_p=as_fn_executable_p
55933 
55934 # Sed expression to map a string onto a valid CPP name.
55935 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
55936 
55937 # Sed expression to map a string onto a valid variable name.
55938 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
55939 
55940 
55941 exec 6>&1
55942 ## ----------------------------------- ##
55943 ## Main body of $CONFIG_STATUS script. ##
55944 ## ----------------------------------- ##
55945 _ASEOF
55946 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
55947 
55948 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
55949 # Save the log message, to keep $0 and so on meaningful, and to
55950 # report actual input values of CONFIG_FILES etc. instead of their
55951 # values after options handling.
55952 ac_log="
55953 This file was extended by OpenJDK $as_me jdk9, which was
55954 generated by GNU Autoconf 2.69.  Invocation command line was
55955 
55956   CONFIG_FILES    = $CONFIG_FILES
55957   CONFIG_HEADERS  = $CONFIG_HEADERS
55958   CONFIG_LINKS    = $CONFIG_LINKS
55959   CONFIG_COMMANDS = $CONFIG_COMMANDS
55960   $ $0 $@
55961 
55962 on `(hostname || uname -n) 2>/dev/null | sed 1q`
55963 "
55964 
55965 _ACEOF
55966 
55967 case $ac_config_files in *"
55968 "*) set x $ac_config_files; shift; ac_config_files=$*;;
55969 esac
55970 
55971 
55972 
55973 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
55974 # Files that config.status was made for.
55975 config_files="$ac_config_files"
55976 
55977 _ACEOF
55978 
55979 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
55980 ac_cs_usage="\
55981 \`$as_me' instantiates files and other configuration actions
55982 from templates according to the current configuration.  Unless the files
55983 and actions are specified as TAGs, all are instantiated by default.
55984 
55985 Usage: $0 [OPTION]... [TAG]...
55986 
55987   -h, --help       print this help, then exit
55988   -V, --version    print version number and configuration settings, then exit
55989       --config     print configuration, then exit
55990   -q, --quiet, --silent
55991                    do not print progress messages
55992   -d, --debug      don't remove temporary files
55993       --recheck    update $as_me by reconfiguring in the same conditions
55994       --file=FILE[:TEMPLATE]
55995                    instantiate the configuration file FILE
55996 
55997 Configuration files:
55998 $config_files
55999 
56000 Report bugs to <build-dev@openjdk.java.net>.
56001 OpenJDK home page: <http://openjdk.java.net>."
56002 
56003 _ACEOF
56004 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56005 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
56006 ac_cs_version="\\
56007 OpenJDK config.status jdk9
56008 configured by $0, generated by GNU Autoconf 2.69,
56009   with options \\"\$ac_cs_config\\"
56010 
56011 Copyright (C) 2012 Free Software Foundation, Inc.
56012 This config.status script is free software; the Free Software Foundation
56013 gives unlimited permission to copy, distribute and modify it."
56014 
56015 ac_pwd='$ac_pwd'
56016 srcdir='$srcdir'
56017 AWK='$AWK'
56018 test -n "\$AWK" || AWK=awk
56019 _ACEOF
56020 
56021 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56022 # The default lists apply if the user does not specify any file.
56023 ac_need_defaults=:
56024 while test $# != 0
56025 do
56026   case $1 in
56027   --*=?*)
56028     ac_option=`expr "X$1" : 'X\([^=]*\)='`
56029     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
56030     ac_shift=:
56031     ;;
56032   --*=)
56033     ac_option=`expr "X$1" : 'X\([^=]*\)='`
56034     ac_optarg=
56035     ac_shift=:
56036     ;;
56037   *)
56038     ac_option=$1
56039     ac_optarg=$2
56040     ac_shift=shift
56041     ;;
56042   esac
56043 
56044   case $ac_option in
56045   # Handling of the options.
56046   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
56047     ac_cs_recheck=: ;;
56048   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
56049     $as_echo "$ac_cs_version"; exit ;;
56050   --config | --confi | --conf | --con | --co | --c )
56051     $as_echo "$ac_cs_config"; exit ;;
56052   --debug | --debu | --deb | --de | --d | -d )
56053     debug=: ;;
56054   --file | --fil | --fi | --f )
56055     $ac_shift
56056     case $ac_optarg in
56057     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
56058     '') as_fn_error $? "missing file argument" ;;
56059     esac
56060     as_fn_append CONFIG_FILES " '$ac_optarg'"
56061     ac_need_defaults=false;;
56062   --he | --h |  --help | --hel | -h )
56063     $as_echo "$ac_cs_usage"; exit ;;
56064   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
56065   | -silent | --silent | --silen | --sile | --sil | --si | --s)
56066     ac_cs_silent=: ;;
56067 
56068   # This is an error.
56069   -*) as_fn_error $? "unrecognized option: \`$1'
56070 Try \`$0 --help' for more information." ;;
56071 
56072   *) as_fn_append ac_config_targets " $1"
56073      ac_need_defaults=false ;;
56074 
56075   esac
56076   shift
56077 done
56078 
56079 ac_configure_extra_args=
56080 
56081 if $ac_cs_silent; then
56082   exec 6>/dev/null
56083   ac_configure_extra_args="$ac_configure_extra_args --silent"
56084 fi
56085 
56086 _ACEOF
56087 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56088 if \$ac_cs_recheck; then
56089   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
56090   shift
56091   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
56092   CONFIG_SHELL='$SHELL'
56093   export CONFIG_SHELL
56094   exec "\$@"
56095 fi
56096 
56097 _ACEOF
56098 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56099 exec 5>>config.log
56100 {
56101   echo
56102   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
56103 ## Running $as_me. ##
56104 _ASBOX
56105   $as_echo "$ac_log"
56106 } >&5
56107 
56108 _ACEOF
56109 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56110 _ACEOF
56111 
56112 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56113 
56114 # Handling of arguments.
56115 for ac_config_target in $ac_config_targets
56116 do
56117   case $ac_config_target in
56118     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
56119     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
56120     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
56121     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
56122     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
56123 
56124   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
56125   esac
56126 done
56127 
56128 
56129 # If the user did not use the arguments to specify the items to instantiate,
56130 # then the envvar interface is used.  Set only those that are not.
56131 # We use the long form for the default assignment because of an extremely
56132 # bizarre bug on SunOS 4.1.3.
56133 if $ac_need_defaults; then
56134   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
56135 fi
56136 
56137 # Have a temporary directory for convenience.  Make it in the build tree
56138 # simply because there is no reason against having it here, and in addition,
56139 # creating and moving files from /tmp can sometimes cause problems.
56140 # Hook for its removal unless debugging.
56141 # Note that there is a small window in which the directory will not be cleaned:
56142 # after its creation but before its name has been assigned to `$tmp'.
56143 $debug ||
56144 {
56145   tmp= ac_tmp=
56146   trap 'exit_status=$?
56147   : "${ac_tmp:=$tmp}"
56148   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
56149 ' 0
56150   trap 'as_fn_exit 1' 1 2 13 15
56151 }
56152 # Create a (secure) tmp directory for tmp files.
56153 
56154 {
56155   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
56156   test -d "$tmp"
56157 }  ||
56158 {
56159   tmp=./conf$$-$RANDOM
56160   (umask 077 && mkdir "$tmp")
56161 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
56162 ac_tmp=$tmp
56163 
56164 # Set up the scripts for CONFIG_FILES section.
56165 # No need to generate them if there are no CONFIG_FILES.
56166 # This happens for instance with `./config.status config.h'.
56167 if test -n "$CONFIG_FILES"; then
56168 
56169 
56170 ac_cr=`echo X | tr X '\015'`
56171 # On cygwin, bash can eat \r inside `` if the user requested igncr.
56172 # But we know of no other shell where ac_cr would be empty at this
56173 # point, so we can use a bashism as a fallback.
56174 if test "x$ac_cr" = x; then
56175   eval ac_cr=\$\'\\r\'
56176 fi
56177 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
56178 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
56179   ac_cs_awk_cr='\\r'
56180 else
56181   ac_cs_awk_cr=$ac_cr
56182 fi
56183 
56184 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
56185 _ACEOF
56186 
56187 
56188 {
56189   echo "cat >conf$$subs.awk <<_ACEOF" &&
56190   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
56191   echo "_ACEOF"
56192 } >conf$$subs.sh ||
56193   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56194 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
56195 ac_delim='%!_!# '
56196 for ac_last_try in false false false false false :; do
56197   . ./conf$$subs.sh ||
56198     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56199 
56200   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
56201   if test $ac_delim_n = $ac_delim_num; then
56202     break
56203   elif $ac_last_try; then
56204     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56205   else
56206     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
56207   fi
56208 done
56209 rm -f conf$$subs.sh
56210 
56211 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56212 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
56213 _ACEOF
56214 sed -n '
56215 h
56216 s/^/S["/; s/!.*/"]=/
56217 p
56218 g
56219 s/^[^!]*!//
56220 :repl
56221 t repl
56222 s/'"$ac_delim"'$//
56223 t delim
56224 :nl
56225 h
56226 s/\(.\{148\}\)..*/\1/
56227 t more1
56228 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
56229 p
56230 n
56231 b repl
56232 :more1
56233 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
56234 p
56235 g
56236 s/.\{148\}//
56237 t nl
56238 :delim
56239 h
56240 s/\(.\{148\}\)..*/\1/
56241 t more2
56242 s/["\\]/\\&/g; s/^/"/; s/$/"/
56243 p
56244 b
56245 :more2
56246 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
56247 p
56248 g
56249 s/.\{148\}//
56250 t delim
56251 ' <conf$$subs.awk | sed '
56252 /^[^""]/{
56253   N
56254   s/\n//
56255 }
56256 ' >>$CONFIG_STATUS || ac_write_fail=1
56257 rm -f conf$$subs.awk
56258 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56259 _ACAWK
56260 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
56261   for (key in S) S_is_set[key] = 1
56262   FS = ""
56263 
56264 }
56265 {
56266   line = $ 0
56267   nfields = split(line, field, "@")
56268   substed = 0
56269   len = length(field[1])
56270   for (i = 2; i < nfields; i++) {
56271     key = field[i]
56272     keylen = length(key)
56273     if (S_is_set[key]) {
56274       value = S[key]
56275       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
56276       len += length(value) + length(field[++i])
56277       substed = 1
56278     } else
56279       len += 1 + keylen
56280   }
56281 
56282   print line
56283 }
56284 
56285 _ACAWK
56286 _ACEOF
56287 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56288 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
56289   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
56290 else
56291   cat
56292 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
56293   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
56294 _ACEOF
56295 
56296 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
56297 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
56298 # trailing colons and then remove the whole line if VPATH becomes empty
56299 # (actually we leave an empty line to preserve line numbers).
56300 if test "x$srcdir" = x.; then
56301   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
56302 h
56303 s///
56304 s/^/:/
56305 s/[      ]*$/:/
56306 s/:\$(srcdir):/:/g
56307 s/:\${srcdir}:/:/g
56308 s/:@srcdir@:/:/g
56309 s/^:*//
56310 s/:*$//
56311 x
56312 s/\(=[   ]*\).*/\1/
56313 G
56314 s/\n//
56315 s/^[^=]*=[       ]*$//
56316 }'
56317 fi
56318 
56319 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56320 fi # test -n "$CONFIG_FILES"
56321 
56322 
56323 eval set X "  :F $CONFIG_FILES      "
56324 shift
56325 for ac_tag
56326 do
56327   case $ac_tag in
56328   :[FHLC]) ac_mode=$ac_tag; continue;;
56329   esac
56330   case $ac_mode$ac_tag in
56331   :[FHL]*:*);;
56332   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
56333   :[FH]-) ac_tag=-:-;;
56334   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
56335   esac
56336   ac_save_IFS=$IFS
56337   IFS=:
56338   set x $ac_tag
56339   IFS=$ac_save_IFS
56340   shift
56341   ac_file=$1
56342   shift
56343 
56344   case $ac_mode in
56345   :L) ac_source=$1;;
56346   :[FH])
56347     ac_file_inputs=
56348     for ac_f
56349     do
56350       case $ac_f in
56351       -) ac_f="$ac_tmp/stdin";;
56352       *) # Look for the file first in the build tree, then in the source tree
56353          # (if the path is not absolute).  The absolute path cannot be DOS-style,
56354          # because $ac_f cannot contain `:'.
56355          test -f "$ac_f" ||
56356            case $ac_f in
56357            [\\/$]*) false;;
56358            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
56359            esac ||
56360            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
56361       esac
56362       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
56363       as_fn_append ac_file_inputs " '$ac_f'"
56364     done
56365 
56366     # Let's still pretend it is `configure' which instantiates (i.e., don't
56367     # use $as_me), people would be surprised to read:
56368     #    /* config.h.  Generated by config.status.  */
56369     configure_input='Generated from '`
56370           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
56371         `' by configure.'
56372     if test x"$ac_file" != x-; then
56373       configure_input="$ac_file.  $configure_input"
56374       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
56375 $as_echo "$as_me: creating $ac_file" >&6;}
56376     fi
56377     # Neutralize special characters interpreted by sed in replacement strings.
56378     case $configure_input in #(
56379     *\&* | *\|* | *\\* )
56380        ac_sed_conf_input=`$as_echo "$configure_input" |
56381        sed 's/[\\\\&|]/\\\\&/g'`;; #(
56382     *) ac_sed_conf_input=$configure_input;;
56383     esac
56384 
56385     case $ac_tag in
56386     *:-:* | *:-) cat >"$ac_tmp/stdin" \
56387       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
56388     esac
56389     ;;
56390   esac
56391 
56392   ac_dir=`$as_dirname -- "$ac_file" ||
56393 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
56394          X"$ac_file" : 'X\(//\)[^/]' \| \
56395          X"$ac_file" : 'X\(//\)$' \| \
56396          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
56397 $as_echo X"$ac_file" |
56398     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
56399             s//\1/
56400             q
56401           }
56402           /^X\(\/\/\)[^/].*/{
56403             s//\1/
56404             q
56405           }
56406           /^X\(\/\/\)$/{
56407             s//\1/
56408             q
56409           }
56410           /^X\(\/\).*/{
56411             s//\1/
56412             q
56413           }
56414           s/.*/./; q'`
56415   as_dir="$ac_dir"; as_fn_mkdir_p
56416   ac_builddir=.
56417 
56418 case "$ac_dir" in
56419 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
56420 *)
56421   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
56422   # A ".." for each directory in $ac_dir_suffix.
56423   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
56424   case $ac_top_builddir_sub in
56425   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
56426   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
56427   esac ;;
56428 esac
56429 ac_abs_top_builddir=$ac_pwd
56430 ac_abs_builddir=$ac_pwd$ac_dir_suffix
56431 # for backward compatibility:
56432 ac_top_builddir=$ac_top_build_prefix
56433 
56434 case $srcdir in
56435   .)  # We are building in place.
56436     ac_srcdir=.
56437     ac_top_srcdir=$ac_top_builddir_sub
56438     ac_abs_top_srcdir=$ac_pwd ;;
56439   [\\/]* | ?:[\\/]* )  # Absolute name.
56440     ac_srcdir=$srcdir$ac_dir_suffix;
56441     ac_top_srcdir=$srcdir
56442     ac_abs_top_srcdir=$srcdir ;;
56443   *) # Relative name.
56444     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
56445     ac_top_srcdir=$ac_top_build_prefix$srcdir
56446     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
56447 esac
56448 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
56449 
56450 
56451   case $ac_mode in
56452   :F)
56453   #
56454   # CONFIG_FILE
56455   #
56456 
56457 _ACEOF
56458 
56459 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56460 # If the template does not know about datarootdir, expand it.
56461 # FIXME: This hack should be removed a few years after 2.60.
56462 ac_datarootdir_hack=; ac_datarootdir_seen=
56463 ac_sed_dataroot='
56464 /datarootdir/ {
56465   p
56466   q
56467 }
56468 /@datadir@/p
56469 /@docdir@/p
56470 /@infodir@/p
56471 /@localedir@/p
56472 /@mandir@/p'
56473 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
56474 *datarootdir*) ac_datarootdir_seen=yes;;
56475 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
56476   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
56477 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
56478 _ACEOF
56479 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56480   ac_datarootdir_hack='
56481   s&@datadir@&$datadir&g
56482   s&@docdir@&$docdir&g
56483   s&@infodir@&$infodir&g
56484   s&@localedir@&$localedir&g
56485   s&@mandir@&$mandir&g
56486   s&\\\${datarootdir}&$datarootdir&g' ;;
56487 esac
56488 _ACEOF
56489 
56490 # Neutralize VPATH when `$srcdir' = `.'.
56491 # Shell code in configure.ac might set extrasub.
56492 # FIXME: do we really want to maintain this feature?
56493 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56494 ac_sed_extra="$ac_vpsub
56495 $extrasub
56496 _ACEOF
56497 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56498 :t
56499 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
56500 s|@configure_input@|$ac_sed_conf_input|;t t
56501 s&@top_builddir@&$ac_top_builddir_sub&;t t
56502 s&@top_build_prefix@&$ac_top_build_prefix&;t t
56503 s&@srcdir@&$ac_srcdir&;t t
56504 s&@abs_srcdir@&$ac_abs_srcdir&;t t
56505 s&@top_srcdir@&$ac_top_srcdir&;t t
56506 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
56507 s&@builddir@&$ac_builddir&;t t
56508 s&@abs_builddir@&$ac_abs_builddir&;t t
56509 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
56510 $ac_datarootdir_hack
56511 "
56512 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
56513   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
56514 
56515 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
56516   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
56517   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
56518       "$ac_tmp/out"`; test -z "$ac_out"; } &&
56519   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
56520 which seems to be undefined.  Please make sure it is defined" >&5
56521 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
56522 which seems to be undefined.  Please make sure it is defined" >&2;}
56523 
56524   rm -f "$ac_tmp/stdin"
56525   case $ac_file in
56526   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
56527   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
56528   esac \
56529   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
56530  ;;
56531 
56532 
56533 
56534   esac
56535 
56536 done # for ac_tag
56537 
56538 
56539 as_fn_exit 0
56540 _ACEOF
56541 ac_clean_files=$ac_clean_files_save
56542 
56543 test $ac_write_fail = 0 ||
56544   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
56545 
56546 
56547 # configure is writing to config.log, and then calls config.status.
56548 # config.status does its own redirection, appending to config.log.
56549 # Unfortunately, on DOS this fails, as config.log is still kept open
56550 # by configure, so config.status won't be able to write to it; its
56551 # output is simply discarded.  So we exec the FD to /dev/null,
56552 # effectively closing config.log, so it can be properly (re)opened and
56553 # appended to by config.status.  When coming back to configure, we
56554 # need to make the FD available again.
56555 if test "$no_create" != yes; then
56556   ac_cs_success=:
56557   ac_config_status_args=
56558   test "$silent" = yes &&
56559     ac_config_status_args="$ac_config_status_args --quiet"
56560   exec 5>/dev/null
56561   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
56562   exec 5>>config.log
56563   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
56564   # would make configure fail if this is the last instruction.
56565   $ac_cs_success || as_fn_exit 1
56566 fi
56567 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
56568   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
56569 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
56570 fi
56571 
56572 
56573 # After AC_OUTPUT, we need to do final work
56574 
56575 
56576   # Try to move config.log (generated by autoconf) to the configure-support directory.
56577   if test -e ./config.log; then
56578     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
56579   fi
56580 
56581   # Rotate our log file (configure.log)
56582   if test -e "$OUTPUT_ROOT/configure.log.old"; then
56583     $RM -f "$OUTPUT_ROOT/configure.log.old"
56584   fi
56585   if test -e "$OUTPUT_ROOT/configure.log"; then
56586     $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
56587   fi
56588 
56589   # Move configure.log from current directory to the build output root
56590   if test -e ./configure.log; then
56591     echo found it
56592     $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
56593   fi
56594 
56595   # Make the compare script executable
56596   $CHMOD +x $OUTPUT_ROOT/compare.sh
56597 
56598 
56599 # Finally output some useful information to the user
56600 
56601   # Finally output some useful information to the user
56602 
56603   printf "\n"
56604   printf "====================================================\n"
56605   if test "x$no_create" != "xyes"; then
56606     if test "x$IS_RECONFIGURE" != "xyes"; then
56607       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
56608     else
56609       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
56610     fi
56611   else
56612     if test "x$IS_RECONFIGURE" != "xyes"; then
56613       printf "A configuration has been successfully checked but not created\n"
56614     else
56615       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
56616     fi
56617   fi
56618   if test "x$CONFIGURE_COMMAND_LINE" != x; then
56619     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
56620   else
56621     printf "using default settings.\n"
56622   fi
56623 
56624   printf "\n"
56625   printf "Configuration summary:\n"
56626   printf "* Debug level:    $DEBUG_LEVEL\n"
56627   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
56628   printf "* JDK variant:    $JDK_VARIANT\n"
56629   printf "* JVM variants:   $with_jvm_variants\n"
56630   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
56631 
56632   printf "\n"
56633   printf "Tools summary:\n"
56634   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
56635     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
56636   fi
56637   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
56638   if test "x$TOOLCHAIN_VERSION" != "x"; then
56639     print_version=" $TOOLCHAIN_VERSION"
56640   fi
56641   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
56642   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
56643   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
56644 
56645   printf "\n"
56646   printf "Build performance summary:\n"
56647   printf "* Cores to use:   $JOBS\n"
56648   printf "* Memory limit:   $MEMORY_SIZE MB\n"
56649   if test "x$CCACHE_STATUS" != "x"; then
56650     printf "* ccache status:  $CCACHE_STATUS\n"
56651   fi
56652   printf "\n"
56653 
56654   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
56655     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
56656     printf "will result in longer build times.\n"
56657     printf "\n"
56658   fi
56659 
56660   if test "x$FOUND_ALT_VARIABLES" != "x"; then
56661     printf "WARNING: You have old-style ALT_ environment variables set.\n"
56662     printf "These are not respected, and will be ignored. It is recommended\n"
56663     printf "that you clean your environment. The following variables are set:\n"
56664     printf "$FOUND_ALT_VARIABLES\n"
56665     printf "\n"
56666   fi
56667 
56668   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
56669     printf "WARNING: Your build output directory is not on a local disk.\n"
56670     printf "This will severely degrade build performance!\n"
56671     printf "It is recommended that you create an output directory on a local disk,\n"
56672     printf "and run the configure script again from that directory.\n"
56673     printf "\n"
56674   fi
56675 
56676   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
56677     printf "WARNING: The result of this configuration has overridden an older\n"
56678     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
56679     printf "proper build. Failure to do so might result in strange build problems.\n"
56680     printf "\n"
56681   fi
56682 
56683   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
56684     printf "WARNING: The result of this configuration was not saved.\n"
56685     printf "You should run without '--no-create | -n' to create the configuration.\n"
56686     printf "\n"
56687   fi
56688 
56689 
56690 
56691   # Locate config.log.
56692   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
56693     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
56694   elif test -e "./config.log"; then
56695     CONFIG_LOG_PATH="."
56696   fi
56697 
56698   if test -e "$CONFIG_LOG_PATH/config.log"; then
56699     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
56700     if test $? -eq 0; then
56701       printf "The following warnings were produced. Repeated here for convenience:\n"
56702       # We must quote sed expression (using []) to stop m4 from eating the [].
56703       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
56704       printf "\n"
56705     fi
56706   fi
56707