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 BUILD_ICECC
 636 ICECC
 637 ICECC_WRAPPER
 638 ICECC_CREATE_ENV
 639 ICECC_CMD
 640 ENABLE_JAVAC_SERVER
 641 ENABLE_SJAVAC
 642 SJAVAC_SERVER_JAVA_FLAGS
 643 SJAVAC_SERVER_JAVA
 644 JAVA_TOOL_FLAGS_SMALL
 645 JAVA_FLAGS_SMALL
 646 JAVA_FLAGS_JAVAC
 647 JAVA_FLAGS_BIG
 648 JAVA_FLAGS
 649 JOBS
 650 MEMORY_SIZE
 651 NUM_CORES
 652 ENABLE_INTREE_EC
 653 SALIB_NAME
 654 HOTSPOT_MAKE_ARGS
 655 LIBZIP_CAN_USE_MMAP
 656 LIBDL
 657 LIBM
 658 USE_EXTERNAL_LCMS
 659 LCMS_LIBS
 660 LCMS_CFLAGS
 661 USE_EXTERNAL_LIBZ
 662 USE_EXTERNAL_LIBPNG
 663 PNG_LIBS
 664 PNG_CFLAGS
 665 USE_EXTERNAL_LIBGIF
 666 USE_EXTERNAL_LIBJPEG
 667 LLVM_LIBS
 668 LLVM_LDFLAGS
 669 LLVM_CFLAGS
 670 LLVM_CONFIG
 671 LIBFFI_LIBS
 672 LIBFFI_CFLAGS
 673 ALSA_LIBS
 674 ALSA_CFLAGS
 675 FREETYPE_BUNDLE_LIB_PATH
 676 FREETYPE_LIBS
 677 FREETYPE_CFLAGS
 678 CUPS_CFLAGS
 679 X_EXTRA_LIBS
 680 X_LIBS
 681 X_PRE_LIBS
 682 X_CFLAGS
 683 XMKMF
 684 MSVCP_DLL
 685 MSVCR_DLL
 686 LIBCXX
 687 STATIC_CXX_SETTING
 688 FIXPATH_DETACH_FLAG
 689 FIXPATH
 690 GCOV_ENABLED
 691 ZIP_DEBUGINFO_FILES
 692 ENABLE_DEBUG_SYMBOLS
 693 STRIP_POLICY
 694 DEBUG_BINARIES
 695 NATIVE_DEBUG_SYMBOLS
 696 CFLAGS_WARNINGS_ARE_ERRORS
 697 DISABLE_WARNING_PREFIX
 698 HOTSPOT_SET_WARNINGS_AS_ERRORS
 699 WARNINGS_AS_ERRORS
 700 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 701 ZERO_ARCHFLAG
 702 LDFLAGS_TESTEXE
 703 LDFLAGS_TESTLIB
 704 LDFLAGS_CXX_JDK
 705 JDKEXE_LIBS
 706 JDKLIB_LIBS
 707 LDFLAGS_JDKEXE
 708 LDFLAGS_JDKLIB
 709 CXXFLAGS_TESTEXE
 710 CXXFLAGS_TESTLIB
 711 CFLAGS_TESTEXE
 712 CFLAGS_TESTLIB
 713 CXXFLAGS_JDKEXE
 714 CXXFLAGS_JDKLIB
 715 CFLAGS_JDKEXE
 716 CFLAGS_JDKLIB
 717 MACOSX_VERSION_MIN
 718 CXX_O_FLAG_NONE
 719 CXX_O_FLAG_DEBUG
 720 CXX_O_FLAG_NORM
 721 CXX_O_FLAG_HI
 722 CXX_O_FLAG_HIGHEST
 723 C_O_FLAG_NONE
 724 C_O_FLAG_DEBUG
 725 C_O_FLAG_NORM
 726 C_O_FLAG_HI
 727 C_O_FLAG_HIGHEST
 728 CXXFLAGS_DEBUG_SYMBOLS
 729 CFLAGS_DEBUG_SYMBOLS
 730 CXX_FLAG_DEPS
 731 C_FLAG_DEPS
 732 SET_SHARED_LIBRARY_MAPFILE
 733 SET_SHARED_LIBRARY_NAME
 734 SET_SHARED_LIBRARY_ORIGIN
 735 SET_EXECUTABLE_ORIGIN
 736 CXX_FLAG_REORDER
 737 C_FLAG_REORDER
 738 RC_FLAGS
 739 AR_OUT_OPTION
 740 LD_OUT_OPTION
 741 EXE_OUT_OPTION
 742 CC_OUT_OPTION
 743 STRIPFLAGS
 744 ARFLAGS
 745 COMPILER_TARGET_BITS_FLAG
 746 JT_HOME
 747 JTREGEXE
 748 USING_BROKEN_SUSE_LD
 749 PACKAGE_PATH
 750 USE_CLANG
 751 HOTSPOT_LD
 752 HOTSPOT_CXX
 753 HOTSPOT_RC
 754 HOTSPOT_MT
 755 BUILD_AS
 756 BUILD_LD
 757 BUILD_AR
 758 BUILD_NM
 759 BUILD_CXX
 760 BUILD_CC
 761 BUILD_SYSROOT_LDFLAGS
 762 BUILD_SYSROOT_CFLAGS
 763 ac_ct_OBJDUMP
 764 OBJDUMP
 765 ac_ct_OBJCOPY
 766 OBJCOPY
 767 ac_ct_NM
 768 ac_ct_STRIP
 769 GNM
 770 NM
 771 STRIP
 772 MSBUILD
 773 DUMPBIN
 774 RC
 775 MT
 776 LIPO
 777 ac_ct_AR
 778 AR
 779 AS
 780 LDCXX
 781 LD
 782 CXXCPP
 783 CPP
 784 ac_ct_CXX
 785 CXXFLAGS
 786 CXX
 787 ac_ct_PROPER_COMPILER_CXX
 788 PROPER_COMPILER_CXX
 789 TOOLCHAIN_PATH_CXX
 790 POTENTIAL_CXX
 791 OBJEXT
 792 EXEEXT
 793 ac_ct_CC
 794 CPPFLAGS
 795 LDFLAGS
 796 CFLAGS
 797 CC
 798 ac_ct_PROPER_COMPILER_CC
 799 PROPER_COMPILER_CC
 800 TOOLCHAIN_PATH_CC
 801 POTENTIAL_CC
 802 VS_LIB
 803 VS_INCLUDE
 804 VS_PATH
 805 CYGWIN_LINK
 806 SYSROOT_LDFLAGS
 807 SYSROOT_CFLAGS
 808 LEGACY_EXTRA_LDFLAGS
 809 LEGACY_EXTRA_CXXFLAGS
 810 LEGACY_EXTRA_CFLAGS
 811 EXE_SUFFIX
 812 OBJ_SUFFIX
 813 STATIC_LIBRARY
 814 SHARED_LIBRARY
 815 STATIC_LIBRARY_SUFFIX
 816 SHARED_LIBRARY_SUFFIX
 817 LIBRARY_PREFIX
 818 TOOLCHAIN_TYPE
 819 STATIC_BUILD
 820 BUILD_HOTSPOT
 821 HOTSPOT_DIST
 822 BUILD_OUTPUT
 823 JDK_TOPDIR
 824 NASHORN_TOPDIR
 825 HOTSPOT_TOPDIR
 826 JAXWS_TOPDIR
 827 JAXP_TOPDIR
 828 CORBA_TOPDIR
 829 LANGTOOLS_TOPDIR
 830 BOOT_JDK_BITS
 831 JAVAC_FLAGS
 832 BOOT_JDK_SOURCETARGET
 833 JARSIGNER
 834 JAR
 835 JAVAH
 836 JAVAC
 837 JAVA
 838 BOOT_JDK
 839 JAVA_CHECK
 840 JAVAC_CHECK
 841 VERSION_IS_GA
 842 VERSION_SHORT
 843 VERSION_STRING
 844 VERSION_NUMBER_FOUR_POSITIONS
 845 VERSION_NUMBER
 846 VERSION_OPT
 847 VERSION_BUILD
 848 VERSION_PRE
 849 VERSION_PATCH
 850 VERSION_SECURITY
 851 VERSION_MINOR
 852 VERSION_MAJOR
 853 MACOSX_BUNDLE_ID_BASE
 854 MACOSX_BUNDLE_NAME_BASE
 855 COMPANY_NAME
 856 JDK_RC_PLATFORM_NAME
 857 PRODUCT_SUFFIX
 858 PRODUCT_NAME
 859 LAUNCHER_NAME
 860 COPYRIGHT_YEAR
 861 COMPRESS_JARS
 862 UNLIMITED_CRYPTO
 863 CACERTS_FILE
 864 TEST_IN_BUILD
 865 BUILD_HEADLESS
 866 SUPPORT_HEADFUL
 867 SUPPORT_HEADLESS
 868 OS_VERSION_MICRO
 869 OS_VERSION_MINOR
 870 OS_VERSION_MAJOR
 871 PKG_CONFIG
 872 BASH_ARGS
 873 SETFILE
 874 CODESIGN
 875 XATTR
 876 DSYMUTIL
 877 IS_GNU_TIME
 878 PATCH
 879 TIME
 880 STAT
 881 HG
 882 READELF
 883 OTOOL
 884 LDD
 885 ZIP
 886 UNZIP
 887 FIND_DELETE
 888 OUTPUT_SYNC
 889 OUTPUT_SYNC_SUPPORTED
 890 CHECK_TOOLSDIR_MAKE
 891 CHECK_TOOLSDIR_GMAKE
 892 CHECK_MAKE
 893 CHECK_GMAKE
 894 MAKE
 895 PKGHANDLER
 896 CONFIGURESUPPORT_OUTPUTDIR
 897 OUTPUT_ROOT
 898 CONF_NAME
 899 SPEC
 900 SDKROOT
 901 XCODEBUILD
 902 BUILD_VARIANT_RELEASE
 903 DEBUG_CLASSFILES
 904 FASTDEBUG
 905 VARIANT
 906 DEBUG_LEVEL
 907 MACOSX_UNIVERSAL
 908 INCLUDE_SA
 909 JVM_VARIANT_CORE
 910 JVM_VARIANT_ZEROSHARK
 911 JVM_VARIANT_ZERO
 912 JVM_VARIANT_KERNEL
 913 JVM_VARIANT_MINIMAL1
 914 JVM_VARIANT_CLIENT
 915 JVM_VARIANT_SERVER
 916 JVM_VARIANTS
 917 JVM_INTERPRETER
 918 JDK_VARIANT
 919 SET_OPENJDK
 920 CANONICAL_TOPDIR
 921 ORIGINAL_TOPDIR
 922 TOPDIR
 923 PATH_SEP
 924 ZERO_ARCHDEF
 925 DEFINE_CROSS_COMPILE_ARCH
 926 LP64
 927 OPENJDK_TARGET_OS_EXPORT_DIR
 928 OPENJDK_TARGET_CPU_JLI_CFLAGS
 929 OPENJDK_TARGET_CPU_OSARCH
 930 OPENJDK_TARGET_CPU_ISADIR
 931 OPENJDK_TARGET_CPU_LIBDIR
 932 OPENJDK_TARGET_CPU_LEGACY_LIB
 933 OPENJDK_TARGET_CPU_LEGACY
 934 REQUIRED_OS_VERSION
 935 REQUIRED_OS_NAME
 936 COMPILE_TYPE
 937 OPENJDK_TARGET_CPU_ENDIAN
 938 OPENJDK_TARGET_CPU_BITS
 939 OPENJDK_TARGET_CPU_ARCH
 940 OPENJDK_TARGET_CPU
 941 OPENJDK_TARGET_OS_ENV
 942 OPENJDK_TARGET_OS_TYPE
 943 OPENJDK_TARGET_OS
 944 OPENJDK_BUILD_CPU_ENDIAN
 945 OPENJDK_BUILD_CPU_BITS
 946 OPENJDK_BUILD_CPU_ARCH
 947 OPENJDK_BUILD_CPU
 948 OPENJDK_BUILD_OS_ENV
 949 OPENJDK_BUILD_OS_TYPE
 950 OPENJDK_BUILD_OS
 951 OPENJDK_BUILD_AUTOCONF_NAME
 952 OPENJDK_TARGET_AUTOCONF_NAME
 953 target_os
 954 target_vendor
 955 target_cpu
 956 target
 957 host_os
 958 host_vendor
 959 host_cpu
 960 host
 961 build_os
 962 build_vendor
 963 build_cpu
 964 build
 965 NICE
 966 CPIO
 967 DF
 968 READLINK
 969 CYGPATH
 970 SED
 971 FGREP
 972 EGREP
 973 GREP
 974 AWK
 975 XARGS
 976 WHICH
 977 WC
 978 UNIQ
 979 UNAME
 980 TR
 981 TOUCH
 982 TEE
 983 TAR
 984 TAIL
 985 SORT
 986 SH
 987 RMDIR
 988 RM
 989 PRINTF
 990 NAWK
 991 MV
 992 MKTEMP
 993 MKDIR
 994 LS
 995 LN
 996 HEAD
 997 FIND
 998 FILE
 999 EXPR
1000 ECHO
1001 DIRNAME
1002 DIFF
1003 DATE
1004 CUT
1005 CP
1006 COMM
1007 CMP
1008 CHMOD
1009 CAT
1010 BASH
1011 BASENAME
1012 DATE_WHEN_CONFIGURED
1013 ORIGINAL_PATH
1014 CONFIGURE_COMMAND_LINE
1015 target_alias
1016 host_alias
1017 build_alias
1018 LIBS
1019 ECHO_T
1020 ECHO_N
1021 ECHO_C
1022 DEFS
1023 mandir
1024 localedir
1025 libdir
1026 psdir
1027 pdfdir
1028 dvidir
1029 htmldir
1030 infodir
1031 docdir
1032 oldincludedir
1033 includedir
1034 localstatedir
1035 sharedstatedir
1036 sysconfdir
1037 datadir
1038 datarootdir
1039 libexecdir
1040 sbindir
1041 bindir
1042 program_transform_name
1043 prefix
1044 exec_prefix
1045 PACKAGE_URL
1046 PACKAGE_BUGREPORT
1047 PACKAGE_STRING
1048 PACKAGE_VERSION
1049 PACKAGE_TARNAME
1050 PACKAGE_NAME
1051 PATH_SEPARATOR
1052 SHELL'
1053 ac_subst_files=''
1054 ac_user_opts='
1055 enable_option_checking
1056 with_target_bits
1057 enable_openjdk_only
1058 with_custom_make_dir
1059 with_jdk_variant
1060 with_jvm_interpreter
1061 with_jvm_variants
1062 enable_debug
1063 with_debug_level
1064 with_devkit
1065 with_sys_root
1066 with_sysroot
1067 with_tools_dir
1068 with_toolchain_path
1069 with_extra_path
1070 with_sdk_name
1071 with_conf_name
1072 with_output_sync
1073 enable_headful
1074 enable_hotspot_test_in_build
1075 with_cacerts_file
1076 enable_unlimited_crypto
1077 with_copyright_year
1078 with_milestone
1079 with_update_version
1080 with_user_release_suffix
1081 with_build_number
1082 with_version_string
1083 with_version_pre
1084 with_version_opt
1085 with_version_build
1086 with_version_major
1087 with_version_minor
1088 with_version_security
1089 with_version_patch
1090 with_boot_jdk
1091 with_add_source_root
1092 with_override_source_root
1093 with_adds_and_overrides
1094 with_override_langtools
1095 with_override_corba
1096 with_override_jaxp
1097 with_override_jaxws
1098 with_override_hotspot
1099 with_override_nashorn
1100 with_override_jdk
1101 with_import_hotspot
1102 enable_static_build
1103 with_toolchain_type
1104 with_extra_cflags
1105 with_extra_cxxflags
1106 with_extra_ldflags
1107 with_toolchain_version
1108 with_build_devkit
1109 with_jtreg
1110 enable_warnings_as_errors
1111 with_native_debug_symbols
1112 enable_debug_symbols
1113 enable_zip_debug_info
1114 enable_native_coverage
1115 with_stdc__lib
1116 with_msvcr_dll
1117 with_msvcp_dll
1118 with_x
1119 with_cups
1120 with_cups_include
1121 with_freetype
1122 with_freetype_include
1123 with_freetype_lib
1124 with_freetype_src
1125 enable_freetype_bundling
1126 with_alsa
1127 with_alsa_include
1128 with_alsa_lib
1129 with_libffi
1130 with_libffi_include
1131 with_libffi_lib
1132 with_libjpeg
1133 with_giflib
1134 with_libpng
1135 with_zlib
1136 with_lcms
1137 with_dxsdk
1138 with_dxsdk_lib
1139 with_dxsdk_include
1140 with_num_cores
1141 with_memory_size
1142 with_jobs
1143 with_boot_jdk_jvmargs
1144 with_sjavac_server_java
1145 enable_sjavac
1146 enable_javac_server
1147 enable_icecc
1148 enable_precompiled_headers
1149 enable_ccache
1150 with_ccache_dir
1151 '
1152       ac_precious_vars='build_alias
1153 host_alias
1154 target_alias
1155 BASENAME
1156 BASH
1157 CAT
1158 CHMOD
1159 CMP
1160 COMM
1161 CP
1162 CUT
1163 DATE
1164 DIFF
1165 DIRNAME
1166 ECHO
1167 EXPR
1168 FILE
1169 FIND
1170 HEAD
1171 LN
1172 LS
1173 MKDIR
1174 MKTEMP
1175 MV
1176 NAWK
1177 PRINTF
1178 RM
1179 RMDIR
1180 SH
1181 SORT
1182 TAIL
1183 TAR
1184 TEE
1185 TOUCH
1186 TR
1187 UNAME
1188 UNIQ
1189 WC
1190 WHICH
1191 XARGS
1192 AWK
1193 GREP
1194 EGREP
1195 FGREP
1196 SED
1197 CYGPATH
1198 READLINK
1199 DF
1200 CPIO
1201 NICE
1202 MAKE
1203 UNZIP
1204 ZIP
1205 LDD
1206 OTOOL
1207 READELF
1208 HG
1209 STAT
1210 TIME
1211 PATCH
1212 DSYMUTIL
1213 XATTR
1214 CODESIGN
1215 SETFILE
1216 PKG_CONFIG
1217 JAVA
1218 JAVAC
1219 JAVAH
1220 JAR
1221 JARSIGNER
1222 CC
1223 CFLAGS
1224 LDFLAGS
1225 LIBS
1226 CPPFLAGS
1227 CXX
1228 CXXFLAGS
1229 CCC
1230 CPP
1231 CXXCPP
1232 AS
1233 AR
1234 LIPO
1235 STRIP
1236 NM
1237 GNM
1238 OBJCOPY
1239 OBJDUMP
1240 BUILD_CC
1241 BUILD_CXX
1242 BUILD_NM
1243 BUILD_AR
1244 JTREGEXE
1245 XMKMF
1246 FREETYPE_CFLAGS
1247 FREETYPE_LIBS
1248 ALSA_CFLAGS
1249 ALSA_LIBS
1250 LIBFFI_CFLAGS
1251 LIBFFI_LIBS
1252 PNG_CFLAGS
1253 PNG_LIBS
1254 LCMS_CFLAGS
1255 LCMS_LIBS
1256 ICECC_CMD
1257 ICECC_CREATE_ENV
1258 ICECC_WRAPPER
1259 CCACHE'
1260 
1261 
1262 # Initialize some variables set by options.
1263 ac_init_help=
1264 ac_init_version=false
1265 ac_unrecognized_opts=
1266 ac_unrecognized_sep=
1267 # The variables have the same names as the options, with
1268 # dashes changed to underlines.
1269 cache_file=/dev/null
1270 exec_prefix=NONE
1271 no_create=
1272 no_recursion=
1273 prefix=NONE
1274 program_prefix=NONE
1275 program_suffix=NONE
1276 program_transform_name=s,x,x,
1277 silent=
1278 site=
1279 srcdir=
1280 verbose=
1281 x_includes=NONE
1282 x_libraries=NONE
1283 
1284 # Installation directory options.
1285 # These are left unexpanded so users can "make install exec_prefix=/foo"
1286 # and all the variables that are supposed to be based on exec_prefix
1287 # by default will actually change.
1288 # Use braces instead of parens because sh, perl, etc. also accept them.
1289 # (The list follows the same order as the GNU Coding Standards.)
1290 bindir='${exec_prefix}/bin'
1291 sbindir='${exec_prefix}/sbin'
1292 libexecdir='${exec_prefix}/libexec'
1293 datarootdir='${prefix}/share'
1294 datadir='${datarootdir}'
1295 sysconfdir='${prefix}/etc'
1296 sharedstatedir='${prefix}/com'
1297 localstatedir='${prefix}/var'
1298 includedir='${prefix}/include'
1299 oldincludedir='/usr/include'
1300 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1301 infodir='${datarootdir}/info'
1302 htmldir='${docdir}'
1303 dvidir='${docdir}'
1304 pdfdir='${docdir}'
1305 psdir='${docdir}'
1306 libdir='${exec_prefix}/lib'
1307 localedir='${datarootdir}/locale'
1308 mandir='${datarootdir}/man'
1309 
1310 ac_prev=
1311 ac_dashdash=
1312 for ac_option
1313 do
1314   # If the previous option needs an argument, assign it.
1315   if test -n "$ac_prev"; then
1316     eval $ac_prev=\$ac_option
1317     ac_prev=
1318     continue
1319   fi
1320 
1321   case $ac_option in
1322   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1323   *=)   ac_optarg= ;;
1324   *)    ac_optarg=yes ;;
1325   esac
1326 
1327   # Accept the important Cygnus configure options, so we can diagnose typos.
1328 
1329   case $ac_dashdash$ac_option in
1330   --)
1331     ac_dashdash=yes ;;
1332 
1333   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1334     ac_prev=bindir ;;
1335   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1336     bindir=$ac_optarg ;;
1337 
1338   -build | --build | --buil | --bui | --bu)
1339     ac_prev=build_alias ;;
1340   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1341     build_alias=$ac_optarg ;;
1342 
1343   -cache-file | --cache-file | --cache-fil | --cache-fi \
1344   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1345     ac_prev=cache_file ;;
1346   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1347   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1348     cache_file=$ac_optarg ;;
1349 
1350   --config-cache | -C)
1351     cache_file=config.cache ;;
1352 
1353   -datadir | --datadir | --datadi | --datad)
1354     ac_prev=datadir ;;
1355   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1356     datadir=$ac_optarg ;;
1357 
1358   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1359   | --dataroo | --dataro | --datar)
1360     ac_prev=datarootdir ;;
1361   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1362   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1363     datarootdir=$ac_optarg ;;
1364 
1365   -disable-* | --disable-*)
1366     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1367     # Reject names that are not valid shell variable names.
1368     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1369       as_fn_error $? "invalid feature name: $ac_useropt"
1370     ac_useropt_orig=$ac_useropt
1371     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1372     case $ac_user_opts in
1373       *"
1374 "enable_$ac_useropt"
1375 "*) ;;
1376       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1377          ac_unrecognized_sep=', ';;
1378     esac
1379     eval enable_$ac_useropt=no ;;
1380 
1381   -docdir | --docdir | --docdi | --doc | --do)
1382     ac_prev=docdir ;;
1383   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1384     docdir=$ac_optarg ;;
1385 
1386   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1387     ac_prev=dvidir ;;
1388   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1389     dvidir=$ac_optarg ;;
1390 
1391   -enable-* | --enable-*)
1392     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1393     # Reject names that are not valid shell variable names.
1394     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1395       as_fn_error $? "invalid feature name: $ac_useropt"
1396     ac_useropt_orig=$ac_useropt
1397     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1398     case $ac_user_opts in
1399       *"
1400 "enable_$ac_useropt"
1401 "*) ;;
1402       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1403          ac_unrecognized_sep=', ';;
1404     esac
1405     eval enable_$ac_useropt=\$ac_optarg ;;
1406 
1407   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1408   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1409   | --exec | --exe | --ex)
1410     ac_prev=exec_prefix ;;
1411   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1412   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1413   | --exec=* | --exe=* | --ex=*)
1414     exec_prefix=$ac_optarg ;;
1415 
1416   -gas | --gas | --ga | --g)
1417     # Obsolete; use --with-gas.
1418     with_gas=yes ;;
1419 
1420   -help | --help | --hel | --he | -h)
1421     ac_init_help=long ;;
1422   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1423     ac_init_help=recursive ;;
1424   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1425     ac_init_help=short ;;
1426 
1427   -host | --host | --hos | --ho)
1428     ac_prev=host_alias ;;
1429   -host=* | --host=* | --hos=* | --ho=*)
1430     host_alias=$ac_optarg ;;
1431 
1432   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1433     ac_prev=htmldir ;;
1434   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1435   | --ht=*)
1436     htmldir=$ac_optarg ;;
1437 
1438   -includedir | --includedir | --includedi | --included | --include \
1439   | --includ | --inclu | --incl | --inc)
1440     ac_prev=includedir ;;
1441   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1442   | --includ=* | --inclu=* | --incl=* | --inc=*)
1443     includedir=$ac_optarg ;;
1444 
1445   -infodir | --infodir | --infodi | --infod | --info | --inf)
1446     ac_prev=infodir ;;
1447   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1448     infodir=$ac_optarg ;;
1449 
1450   -libdir | --libdir | --libdi | --libd)
1451     ac_prev=libdir ;;
1452   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1453     libdir=$ac_optarg ;;
1454 
1455   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1456   | --libexe | --libex | --libe)
1457     ac_prev=libexecdir ;;
1458   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1459   | --libexe=* | --libex=* | --libe=*)
1460     libexecdir=$ac_optarg ;;
1461 
1462   -localedir | --localedir | --localedi | --localed | --locale)
1463     ac_prev=localedir ;;
1464   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1465     localedir=$ac_optarg ;;
1466 
1467   -localstatedir | --localstatedir | --localstatedi | --localstated \
1468   | --localstate | --localstat | --localsta | --localst | --locals)
1469     ac_prev=localstatedir ;;
1470   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1471   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1472     localstatedir=$ac_optarg ;;
1473 
1474   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1475     ac_prev=mandir ;;
1476   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1477     mandir=$ac_optarg ;;
1478 
1479   -nfp | --nfp | --nf)
1480     # Obsolete; use --without-fp.
1481     with_fp=no ;;
1482 
1483   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1484   | --no-cr | --no-c | -n)
1485     no_create=yes ;;
1486 
1487   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1488   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1489     no_recursion=yes ;;
1490 
1491   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1492   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1493   | --oldin | --oldi | --old | --ol | --o)
1494     ac_prev=oldincludedir ;;
1495   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1496   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1497   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1498     oldincludedir=$ac_optarg ;;
1499 
1500   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1501     ac_prev=prefix ;;
1502   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1503     prefix=$ac_optarg ;;
1504 
1505   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1506   | --program-pre | --program-pr | --program-p)
1507     ac_prev=program_prefix ;;
1508   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1509   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1510     program_prefix=$ac_optarg ;;
1511 
1512   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1513   | --program-suf | --program-su | --program-s)
1514     ac_prev=program_suffix ;;
1515   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1516   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1517     program_suffix=$ac_optarg ;;
1518 
1519   -program-transform-name | --program-transform-name \
1520   | --program-transform-nam | --program-transform-na \
1521   | --program-transform-n | --program-transform- \
1522   | --program-transform | --program-transfor \
1523   | --program-transfo | --program-transf \
1524   | --program-trans | --program-tran \
1525   | --progr-tra | --program-tr | --program-t)
1526     ac_prev=program_transform_name ;;
1527   -program-transform-name=* | --program-transform-name=* \
1528   | --program-transform-nam=* | --program-transform-na=* \
1529   | --program-transform-n=* | --program-transform-=* \
1530   | --program-transform=* | --program-transfor=* \
1531   | --program-transfo=* | --program-transf=* \
1532   | --program-trans=* | --program-tran=* \
1533   | --progr-tra=* | --program-tr=* | --program-t=*)
1534     program_transform_name=$ac_optarg ;;
1535 
1536   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1537     ac_prev=pdfdir ;;
1538   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1539     pdfdir=$ac_optarg ;;
1540 
1541   -psdir | --psdir | --psdi | --psd | --ps)
1542     ac_prev=psdir ;;
1543   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1544     psdir=$ac_optarg ;;
1545 
1546   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1547   | -silent | --silent | --silen | --sile | --sil)
1548     silent=yes ;;
1549 
1550   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1551     ac_prev=sbindir ;;
1552   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1553   | --sbi=* | --sb=*)
1554     sbindir=$ac_optarg ;;
1555 
1556   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1557   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1558   | --sharedst | --shareds | --shared | --share | --shar \
1559   | --sha | --sh)
1560     ac_prev=sharedstatedir ;;
1561   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1562   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1563   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1564   | --sha=* | --sh=*)
1565     sharedstatedir=$ac_optarg ;;
1566 
1567   -site | --site | --sit)
1568     ac_prev=site ;;
1569   -site=* | --site=* | --sit=*)
1570     site=$ac_optarg ;;
1571 
1572   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1573     ac_prev=srcdir ;;
1574   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1575     srcdir=$ac_optarg ;;
1576 
1577   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1578   | --syscon | --sysco | --sysc | --sys | --sy)
1579     ac_prev=sysconfdir ;;
1580   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1581   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1582     sysconfdir=$ac_optarg ;;
1583 
1584   -target | --target | --targe | --targ | --tar | --ta | --t)
1585     ac_prev=target_alias ;;
1586   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1587     target_alias=$ac_optarg ;;
1588 
1589   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1590     verbose=yes ;;
1591 
1592   -version | --version | --versio | --versi | --vers | -V)
1593     ac_init_version=: ;;
1594 
1595   -with-* | --with-*)
1596     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1597     # Reject names that are not valid shell variable names.
1598     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1599       as_fn_error $? "invalid package name: $ac_useropt"
1600     ac_useropt_orig=$ac_useropt
1601     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1602     case $ac_user_opts in
1603       *"
1604 "with_$ac_useropt"
1605 "*) ;;
1606       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1607          ac_unrecognized_sep=', ';;
1608     esac
1609     eval with_$ac_useropt=\$ac_optarg ;;
1610 
1611   -without-* | --without-*)
1612     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1613     # Reject names that are not valid shell variable names.
1614     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1615       as_fn_error $? "invalid package name: $ac_useropt"
1616     ac_useropt_orig=$ac_useropt
1617     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1618     case $ac_user_opts in
1619       *"
1620 "with_$ac_useropt"
1621 "*) ;;
1622       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1623          ac_unrecognized_sep=', ';;
1624     esac
1625     eval with_$ac_useropt=no ;;
1626 
1627   --x)
1628     # Obsolete; use --with-x.
1629     with_x=yes ;;
1630 
1631   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1632   | --x-incl | --x-inc | --x-in | --x-i)
1633     ac_prev=x_includes ;;
1634   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1635   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1636     x_includes=$ac_optarg ;;
1637 
1638   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1639   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1640     ac_prev=x_libraries ;;
1641   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1642   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1643     x_libraries=$ac_optarg ;;
1644 
1645   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1646 Try \`$0 --help' for more information"
1647     ;;
1648 
1649   *=*)
1650     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1651     # Reject names that are not valid shell variable names.
1652     case $ac_envvar in #(
1653       '' | [0-9]* | *[!_$as_cr_alnum]* )
1654       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1655     esac
1656     eval $ac_envvar=\$ac_optarg
1657     export $ac_envvar ;;
1658 
1659   *)
1660     # FIXME: should be removed in autoconf 3.0.
1661     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1662     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1663       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1664     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1665     ;;
1666 
1667   esac
1668 done
1669 
1670 if test -n "$ac_prev"; then
1671   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1672   as_fn_error $? "missing argument to $ac_option"
1673 fi
1674 
1675 if test -n "$ac_unrecognized_opts"; then
1676   case $enable_option_checking in
1677     no) ;;
1678     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1679     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1680   esac
1681 fi
1682 
1683 # Check all directory arguments for consistency.
1684 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1685                 datadir sysconfdir sharedstatedir localstatedir includedir \
1686                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1687                 libdir localedir mandir
1688 do
1689   eval ac_val=\$$ac_var
1690   # Remove trailing slashes.
1691   case $ac_val in
1692     */ )
1693       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1694       eval $ac_var=\$ac_val;;
1695   esac
1696   # Be sure to have absolute directory names.
1697   case $ac_val in
1698     [\\/$]* | ?:[\\/]* )  continue;;
1699     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1700   esac
1701   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1702 done
1703 
1704 # There might be people who depend on the old broken behavior: `$host'
1705 # used to hold the argument of --host etc.
1706 # FIXME: To remove some day.
1707 build=$build_alias
1708 host=$host_alias
1709 target=$target_alias
1710 
1711 # FIXME: To remove some day.
1712 if test "x$host_alias" != x; then
1713   if test "x$build_alias" = x; then
1714     cross_compiling=maybe
1715   elif test "x$build_alias" != "x$host_alias"; then
1716     cross_compiling=yes
1717   fi
1718 fi
1719 
1720 ac_tool_prefix=
1721 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1722 
1723 test "$silent" = yes && exec 6>/dev/null
1724 
1725 
1726 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1727 ac_ls_di=`ls -di .` &&
1728 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1729   as_fn_error $? "working directory cannot be determined"
1730 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1731   as_fn_error $? "pwd does not report name of working directory"
1732 
1733 
1734 # Find the source files, if location was not specified.
1735 if test -z "$srcdir"; then
1736   ac_srcdir_defaulted=yes
1737   # Try the directory containing this script, then the parent directory.
1738   ac_confdir=`$as_dirname -- "$as_myself" ||
1739 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1740          X"$as_myself" : 'X\(//\)[^/]' \| \
1741          X"$as_myself" : 'X\(//\)$' \| \
1742          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1743 $as_echo X"$as_myself" |
1744     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1745             s//\1/
1746             q
1747           }
1748           /^X\(\/\/\)[^/].*/{
1749             s//\1/
1750             q
1751           }
1752           /^X\(\/\/\)$/{
1753             s//\1/
1754             q
1755           }
1756           /^X\(\/\).*/{
1757             s//\1/
1758             q
1759           }
1760           s/.*/./; q'`
1761   srcdir=$ac_confdir
1762   if test ! -r "$srcdir/$ac_unique_file"; then
1763     srcdir=..
1764   fi
1765 else
1766   ac_srcdir_defaulted=no
1767 fi
1768 if test ! -r "$srcdir/$ac_unique_file"; then
1769   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1770   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1771 fi
1772 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1773 ac_abs_confdir=`(
1774         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1775         pwd)`
1776 # When building in place, set srcdir=.
1777 if test "$ac_abs_confdir" = "$ac_pwd"; then
1778   srcdir=.
1779 fi
1780 # Remove unnecessary trailing slashes from srcdir.
1781 # Double slashes in file names in object file debugging info
1782 # mess up M-x gdb in Emacs.
1783 case $srcdir in
1784 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1785 esac
1786 for ac_var in $ac_precious_vars; do
1787   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1788   eval ac_env_${ac_var}_value=\$${ac_var}
1789   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1790   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1791 done
1792 
1793 #
1794 # Report the --help message.
1795 #
1796 if test "$ac_init_help" = "long"; then
1797   # Omit some internal or obsolete options to make the list less imposing.
1798   # This message is too long to be a string in the A/UX 3.1 sh.
1799   cat <<_ACEOF
1800 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1801 
1802 Usage: $0 [OPTION]... [VAR=VALUE]...
1803 
1804 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1805 VAR=VALUE.  See below for descriptions of some of the useful variables.
1806 
1807 Defaults for the options are specified in brackets.
1808 
1809 Configuration:
1810   -h, --help              display this help and exit
1811       --help=short        display options specific to this package
1812       --help=recursive    display the short help of all the included packages
1813   -V, --version           display version information and exit
1814   -q, --quiet, --silent   do not print \`checking ...' messages
1815       --cache-file=FILE   cache test results in FILE [disabled]
1816   -C, --config-cache      alias for \`--cache-file=config.cache'
1817   -n, --no-create         do not create output files
1818       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1819 
1820 Installation directories:
1821   --prefix=PREFIX         install architecture-independent files in PREFIX
1822                           [$ac_default_prefix]
1823   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1824                           [PREFIX]
1825 
1826 By default, \`make install' will install all the files in
1827 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1828 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1829 for instance \`--prefix=\$HOME'.
1830 
1831 For better control, use the options below.
1832 
1833 Fine tuning of the installation directories:
1834   --bindir=DIR            user executables [EPREFIX/bin]
1835   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1836   --libexecdir=DIR        program executables [EPREFIX/libexec]
1837   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1838   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1839   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1840   --libdir=DIR            object code libraries [EPREFIX/lib]
1841   --includedir=DIR        C header files [PREFIX/include]
1842   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1843   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1844   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1845   --infodir=DIR           info documentation [DATAROOTDIR/info]
1846   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1847   --mandir=DIR            man documentation [DATAROOTDIR/man]
1848   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1849   --htmldir=DIR           html documentation [DOCDIR]
1850   --dvidir=DIR            dvi documentation [DOCDIR]
1851   --pdfdir=DIR            pdf documentation [DOCDIR]
1852   --psdir=DIR             ps documentation [DOCDIR]
1853 _ACEOF
1854 
1855   cat <<\_ACEOF
1856 
1857 X features:
1858   --x-includes=DIR    X include files are in DIR
1859   --x-libraries=DIR   X library files are in DIR
1860 
1861 System types:
1862   --build=BUILD     configure for building on BUILD [guessed]
1863   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1864   --target=TARGET   configure for building compilers for TARGET [HOST]
1865 _ACEOF
1866 fi
1867 
1868 if test -n "$ac_init_help"; then
1869   case $ac_init_help in
1870      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1871    esac
1872   cat <<\_ACEOF
1873 
1874 Optional Features:
1875   --disable-option-checking  ignore unrecognized --enable/--with options
1876   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1877   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1878   --enable-openjdk-only   suppress building custom source even if present
1879                           [disabled]
1880   --enable-debug          set the debug level to fastdebug (shorthand for
1881                           --with-debug-level=fastdebug) [disabled]
1882   --disable-headful       disable building headful support (graphical UI
1883                           support) [enabled]
1884   --enable-hotspot-test-in-build
1885                           run the Queens test after Hotspot build [disabled]
1886   --enable-unlimited-crypto
1887                           Enable unlimited crypto policy [disabled]
1888   --enable-static-build   enable static library build [disabled]
1889   --disable-warnings-as-errors
1890                           do not consider native warnings to be an error
1891                           [enabled]
1892   --enable-debug-symbols  Deprecated. Option is kept for backwards
1893                           compatibility and is ignored
1894   --enable-zip-debug-info Deprecated. Option is kept for backwards
1895                           compatibility and is ignored
1896   --enable-native-coverage
1897                           enable native compilation with code coverage
1898                           data[disabled]
1899   --disable-freetype-bundling
1900                           disable bundling of the freetype library with the
1901                           build result [enabled on Windows or when using
1902                           --with-freetype, disabled otherwise]
1903   --enable-sjavac         use sjavac to do fast incremental compiles
1904                           [disabled]
1905   --disable-javac-server  disable javac server [enabled]
1906   --enable-icecc          enable distribted compilation of native code using
1907                           icecc/icecream [disabled]
1908   --disable-precompiled-headers
1909                           disable using precompiled headers when compiling C++
1910                           [enabled]
1911   --enable-ccache         enable using ccache to speed up recompilations
1912                           [disabled]
1913 
1914 Optional Packages:
1915   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1916   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1917   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1918                           support it), e.g. --with-target-bits=32 [guessed]
1919   --with-custom-make-dir  Deprecated. Option is kept for backwards
1920                           compatibility and is ignored
1921   --with-jdk-variant      JDK variant to build (normal) [normal]
1922   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1923   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1924                           client, minimal1, kernel, zero, zeroshark, core)
1925                           [server]
1926   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1927                           optimized (HotSpot build only)) [release]
1928   --with-devkit           use this devkit for compilers, tools and resources
1929   --with-sys-root         alias for --with-sysroot for backwards compatability
1930   --with-sysroot          use this directory as sysroot
1931   --with-tools-dir        alias for --with-toolchain-path for backwards
1932                           compatibility
1933   --with-toolchain-path   prepend these directories when searching for
1934                           toolchain binaries (compilers etc)
1935   --with-extra-path       prepend these directories to the default path
1936   --with-sdk-name         use the platform SDK of the given name. [macosx]
1937   --with-conf-name        use this as the name of the configuration [generated
1938                           from important configuration options]
1939   --with-output-sync      set make output sync type if supported by make.
1940                           [recurse]
1941   --with-cacerts-file     specify alternative cacerts file
1942   --with-copyright-year   Set copyright year value for build [current year]
1943   --with-milestone        Deprecated. Option is kept for backwards
1944                           compatibility and is ignored
1945   --with-update-version   Deprecated. Option is kept for backwards
1946                           compatibility and is ignored
1947   --with-user-release-suffix
1948                           Deprecated. Option is kept for backwards
1949                           compatibility and is ignored
1950   --with-build-number     Deprecated. Option is kept for backwards
1951                           compatibility and is ignored
1952   --with-version-string   Set version string [calculated]
1953   --with-version-pre      Set the base part of the version 'PRE' field
1954                           (pre-release identifier) ['internal']
1955   --with-version-opt      Set version 'OPT' field (build metadata)
1956                           [<timestamp>.<user>.<dirname>]
1957   --with-version-build    Set version 'BUILD' field (build number) [not
1958                           specified]
1959   --with-version-major    Set version 'MAJOR' field (first number) [current
1960                           source value]
1961   --with-version-minor    Set version 'MINOR' field (second number) [current
1962                           source value]
1963   --with-version-security Set version 'SECURITY' field (third number) [current
1964                           source value]
1965   --with-version-patch    Set version 'PATCH' field (fourth number) [not
1966                           specified]
1967   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1968   --with-add-source-root  Deprecated. Option is kept for backwards
1969                           compatibility and is ignored
1970   --with-override-source-root
1971                           Deprecated. Option is kept for backwards
1972                           compatibility and is ignored
1973   --with-adds-and-overrides
1974                           Deprecated. Option is kept for backwards
1975                           compatibility and is ignored
1976   --with-override-langtools
1977                           Deprecated. Option is kept for backwards
1978                           compatibility and is ignored
1979   --with-override-corba   Deprecated. Option is kept for backwards
1980                           compatibility and is ignored
1981   --with-override-jaxp    Deprecated. Option is kept for backwards
1982                           compatibility and is ignored
1983   --with-override-jaxws   Deprecated. Option is kept for backwards
1984                           compatibility and is ignored
1985   --with-override-hotspot Deprecated. Option is kept for backwards
1986                           compatibility and is ignored
1987   --with-override-nashorn Deprecated. Option is kept for backwards
1988                           compatibility and is ignored
1989   --with-override-jdk     Deprecated. Option is kept for backwards
1990                           compatibility and is ignored
1991   --with-import-hotspot   import hotspot binaries from this jdk image or
1992                           hotspot build dist dir instead of building from
1993                           source
1994   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1995                           to show possible values [platform dependent]
1996   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1997   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1998   --with-extra-ldflags    extra flags to be used when linking jdk
1999   --with-toolchain-version
2000                           the version of the toolchain to look for, use
2001                           '--help' to show possible values [platform
2002                           dependent]
2003   --with-build-devkit     Devkit to use for the build platform toolchain
2004   --with-jtreg            Regression Test Harness [probed]
2005   --with-native-debug-symbols
2006                           set the native debug symbol configuration (none,
2007                           internal, external, zipped) [zipped]
2008   --with-stdc++lib=<static>,<dynamic>,<default>
2009                           force linking of the C++ runtime on Linux to either
2010                           static or dynamic, default is static with dynamic as
2011                           fallback
2012   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2013                           (Windows only) [probed]
2014   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2015                           (Windows only) [probed]
2016   --with-x                use the X Window System
2017   --with-cups             specify prefix directory for the cups package
2018                           (expecting the headers under PATH/include)
2019   --with-cups-include     specify directory for the cups include files
2020   --with-freetype         specify prefix directory for the freetype package
2021                           (expecting the libraries under PATH/lib and the
2022                           headers under PATH/include)
2023   --with-freetype-include specify directory for the freetype include files
2024   --with-freetype-lib     specify directory for the freetype library
2025   --with-freetype-src     specify directory with freetype sources to
2026                           automatically build the library (experimental,
2027                           Windows-only)
2028   --with-alsa             specify prefix directory for the alsa package
2029                           (expecting the libraries under PATH/lib and the
2030                           headers under PATH/include)
2031   --with-alsa-include     specify directory for the alsa include files
2032   --with-alsa-lib         specify directory for the alsa library
2033   --with-libffi           specify prefix directory for the libffi package
2034                           (expecting the libraries under PATH/lib and the
2035                           headers under PATH/include)
2036   --with-libffi-include   specify directory for the libffi include files
2037   --with-libffi-lib       specify directory for the libffi library
2038   --with-libjpeg          use libjpeg from build system or OpenJDK source
2039                           (system, bundled) [bundled]
2040   --with-giflib           use giflib from build system or OpenJDK source
2041                           (system, bundled) [bundled]
2042   --with-libpng           use libpng from build system or OpenJDK source
2043                           (system, bundled) [bundled]
2044   --with-zlib             use zlib from build system or OpenJDK source
2045                           (system, bundled) [bundled]
2046   --with-lcms             use lcms2 from build system or OpenJDK source
2047                           (system, bundled) [bundled]
2048   --with-dxsdk            Deprecated. Option is kept for backwards
2049                           compatibility and is ignored
2050   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2051                           compatibility and is ignored
2052   --with-dxsdk-include    Deprecated. Option is kept for backwards
2053                           compatibility and is ignored
2054   --with-num-cores        number of cores in the build system, e.g.
2055                           --with-num-cores=8 [probed]
2056   --with-memory-size      memory (in MB) available in the build system, e.g.
2057                           --with-memory-size=1024 [probed]
2058   --with-jobs             number of parallel jobs to let make run [calculated
2059                           based on cores and memory]
2060   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2061                           invocations of boot JDK, overriding the default
2062                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2063                           -enableassertions"
2064   --with-sjavac-server-java
2065                           use this java binary for running the sjavac
2066                           background server [Boot JDK java]
2067   --with-ccache-dir       where to store ccache files [~/.ccache]
2068 
2069 Some influential environment variables:
2070   BASENAME    Override default value for BASENAME
2071   BASH        Override default value for BASH
2072   CAT         Override default value for CAT
2073   CHMOD       Override default value for CHMOD
2074   CMP         Override default value for CMP
2075   COMM        Override default value for COMM
2076   CP          Override default value for CP
2077   CUT         Override default value for CUT
2078   DATE        Override default value for DATE
2079   DIFF        Override default value for DIFF
2080   DIRNAME     Override default value for DIRNAME
2081   ECHO        Override default value for ECHO
2082   EXPR        Override default value for EXPR
2083   FILE        Override default value for FILE
2084   FIND        Override default value for FIND
2085   HEAD        Override default value for HEAD
2086   LN          Override default value for LN
2087   LS          Override default value for LS
2088   MKDIR       Override default value for MKDIR
2089   MKTEMP      Override default value for MKTEMP
2090   MV          Override default value for MV
2091   NAWK        Override default value for NAWK
2092   PRINTF      Override default value for PRINTF
2093   RM          Override default value for RM
2094   RMDIR       Override default value for RMDIR
2095   SH          Override default value for SH
2096   SORT        Override default value for SORT
2097   TAIL        Override default value for TAIL
2098   TAR         Override default value for TAR
2099   TEE         Override default value for TEE
2100   TOUCH       Override default value for TOUCH
2101   TR          Override default value for TR
2102   UNAME       Override default value for UNAME
2103   UNIQ        Override default value for UNIQ
2104   WC          Override default value for WC
2105   WHICH       Override default value for WHICH
2106   XARGS       Override default value for XARGS
2107   AWK         Override default value for AWK
2108   GREP        Override default value for GREP
2109   EGREP       Override default value for EGREP
2110   FGREP       Override default value for FGREP
2111   SED         Override default value for SED
2112   CYGPATH     Override default value for CYGPATH
2113   READLINK    Override default value for READLINK
2114   DF          Override default value for DF
2115   CPIO        Override default value for CPIO
2116   NICE        Override default value for NICE
2117   MAKE        Override default value for MAKE
2118   UNZIP       Override default value for UNZIP
2119   ZIP         Override default value for ZIP
2120   LDD         Override default value for LDD
2121   OTOOL       Override default value for OTOOL
2122   READELF     Override default value for READELF
2123   HG          Override default value for HG
2124   STAT        Override default value for STAT
2125   TIME        Override default value for TIME
2126   PATCH       Override default value for PATCH
2127   DSYMUTIL    Override default value for DSYMUTIL
2128   XATTR       Override default value for XATTR
2129   CODESIGN    Override default value for CODESIGN
2130   SETFILE     Override default value for SETFILE
2131   PKG_CONFIG  path to pkg-config utility
2132   JAVA        Override default value for JAVA
2133   JAVAC       Override default value for JAVAC
2134   JAVAH       Override default value for JAVAH
2135   JAR         Override default value for JAR
2136   JARSIGNER   Override default value for JARSIGNER
2137   CC          C compiler command
2138   CFLAGS      C compiler flags
2139   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2140               nonstandard directory <lib dir>
2141   LIBS        libraries to pass to the linker, e.g. -l<library>
2142   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2143               you have headers in a nonstandard directory <include dir>
2144   CXX         C++ compiler command
2145   CXXFLAGS    C++ compiler flags
2146   CPP         C preprocessor
2147   CXXCPP      C++ preprocessor
2148   AS          Override default value for AS
2149   AR          Override default value for AR
2150   LIPO        Override default value for LIPO
2151   STRIP       Override default value for STRIP
2152   NM          Override default value for NM
2153   GNM         Override default value for GNM
2154   OBJCOPY     Override default value for OBJCOPY
2155   OBJDUMP     Override default value for OBJDUMP
2156   BUILD_CC    Override default value for BUILD_CC
2157   BUILD_CXX   Override default value for BUILD_CXX
2158   BUILD_NM    Override default value for BUILD_NM
2159   BUILD_AR    Override default value for BUILD_AR
2160   JTREGEXE    Override default value for JTREGEXE
2161   XMKMF       Path to xmkmf, Makefile generator for X Window System
2162   FREETYPE_CFLAGS
2163               C compiler flags for FREETYPE, overriding pkg-config
2164   FREETYPE_LIBS
2165               linker flags for FREETYPE, overriding pkg-config
2166   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2167   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2168   LIBFFI_CFLAGS
2169               C compiler flags for LIBFFI, overriding pkg-config
2170   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2171   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2172   PNG_LIBS    linker flags for PNG, overriding pkg-config
2173   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2174   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2175   ICECC_CMD   Override default value for ICECC_CMD
2176   ICECC_CREATE_ENV
2177               Override default value for ICECC_CREATE_ENV
2178   ICECC_WRAPPER
2179               Override default value for ICECC_WRAPPER
2180   CCACHE      Override default value for CCACHE
2181 
2182 Use these variables to override the choices made by `configure' or to help
2183 it to find libraries and programs with nonstandard names/locations.
2184 
2185 Report bugs to <build-dev@openjdk.java.net>.
2186 OpenJDK home page: <http://openjdk.java.net>.
2187 _ACEOF
2188 ac_status=$?
2189 fi
2190 
2191 if test "$ac_init_help" = "recursive"; then
2192   # If there are subdirs, report their specific --help.
2193   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2194     test -d "$ac_dir" ||
2195       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2196       continue
2197     ac_builddir=.
2198 
2199 case "$ac_dir" in
2200 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2201 *)
2202   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2203   # A ".." for each directory in $ac_dir_suffix.
2204   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2205   case $ac_top_builddir_sub in
2206   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2207   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2208   esac ;;
2209 esac
2210 ac_abs_top_builddir=$ac_pwd
2211 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2212 # for backward compatibility:
2213 ac_top_builddir=$ac_top_build_prefix
2214 
2215 case $srcdir in
2216   .)  # We are building in place.
2217     ac_srcdir=.
2218     ac_top_srcdir=$ac_top_builddir_sub
2219     ac_abs_top_srcdir=$ac_pwd ;;
2220   [\\/]* | ?:[\\/]* )  # Absolute name.
2221     ac_srcdir=$srcdir$ac_dir_suffix;
2222     ac_top_srcdir=$srcdir
2223     ac_abs_top_srcdir=$srcdir ;;
2224   *) # Relative name.
2225     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2226     ac_top_srcdir=$ac_top_build_prefix$srcdir
2227     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2228 esac
2229 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2230 
2231     cd "$ac_dir" || { ac_status=$?; continue; }
2232     # Check for guested configure.
2233     if test -f "$ac_srcdir/configure.gnu"; then
2234       echo &&
2235       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2236     elif test -f "$ac_srcdir/configure"; then
2237       echo &&
2238       $SHELL "$ac_srcdir/configure" --help=recursive
2239     else
2240       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2241     fi || ac_status=$?
2242     cd "$ac_pwd" || { ac_status=$?; break; }
2243   done
2244 fi
2245 
2246 test -n "$ac_init_help" && exit $ac_status
2247 if $ac_init_version; then
2248   cat <<\_ACEOF
2249 OpenJDK configure jdk9
2250 generated by GNU Autoconf 2.69
2251 
2252 Copyright (C) 2012 Free Software Foundation, Inc.
2253 This configure script is free software; the Free Software Foundation
2254 gives unlimited permission to copy, distribute and modify it.
2255 _ACEOF
2256   exit
2257 fi
2258 
2259 ## ------------------------ ##
2260 ## Autoconf initialization. ##
2261 ## ------------------------ ##
2262 
2263 # ac_fn_c_try_compile LINENO
2264 # --------------------------
2265 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2266 ac_fn_c_try_compile ()
2267 {
2268   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2269   rm -f conftest.$ac_objext
2270   if { { ac_try="$ac_compile"
2271 case "(($ac_try" in
2272   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2273   *) ac_try_echo=$ac_try;;
2274 esac
2275 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2276 $as_echo "$ac_try_echo"; } >&5
2277   (eval "$ac_compile") 2>conftest.err
2278   ac_status=$?
2279   if test -s conftest.err; then
2280     grep -v '^ *+' conftest.err >conftest.er1
2281     cat conftest.er1 >&5
2282     mv -f conftest.er1 conftest.err
2283   fi
2284   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2285   test $ac_status = 0; } && {
2286          test -z "$ac_c_werror_flag" ||
2287          test ! -s conftest.err
2288        } && test -s conftest.$ac_objext; then :
2289   ac_retval=0
2290 else
2291   $as_echo "$as_me: failed program was:" >&5
2292 sed 's/^/| /' conftest.$ac_ext >&5
2293 
2294         ac_retval=1
2295 fi
2296   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2297   as_fn_set_status $ac_retval
2298 
2299 } # ac_fn_c_try_compile
2300 
2301 # ac_fn_cxx_try_compile LINENO
2302 # ----------------------------
2303 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2304 ac_fn_cxx_try_compile ()
2305 {
2306   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2307   rm -f conftest.$ac_objext
2308   if { { ac_try="$ac_compile"
2309 case "(($ac_try" in
2310   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2311   *) ac_try_echo=$ac_try;;
2312 esac
2313 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2314 $as_echo "$ac_try_echo"; } >&5
2315   (eval "$ac_compile") 2>conftest.err
2316   ac_status=$?
2317   if test -s conftest.err; then
2318     grep -v '^ *+' conftest.err >conftest.er1
2319     cat conftest.er1 >&5
2320     mv -f conftest.er1 conftest.err
2321   fi
2322   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2323   test $ac_status = 0; } && {
2324          test -z "$ac_cxx_werror_flag" ||
2325          test ! -s conftest.err
2326        } && test -s conftest.$ac_objext; then :
2327   ac_retval=0
2328 else
2329   $as_echo "$as_me: failed program was:" >&5
2330 sed 's/^/| /' conftest.$ac_ext >&5
2331 
2332         ac_retval=1
2333 fi
2334   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2335   as_fn_set_status $ac_retval
2336 
2337 } # ac_fn_cxx_try_compile
2338 
2339 # ac_fn_c_try_cpp LINENO
2340 # ----------------------
2341 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2342 ac_fn_c_try_cpp ()
2343 {
2344   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2345   if { { ac_try="$ac_cpp conftest.$ac_ext"
2346 case "(($ac_try" in
2347   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2348   *) ac_try_echo=$ac_try;;
2349 esac
2350 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2351 $as_echo "$ac_try_echo"; } >&5
2352   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2353   ac_status=$?
2354   if test -s conftest.err; then
2355     grep -v '^ *+' conftest.err >conftest.er1
2356     cat conftest.er1 >&5
2357     mv -f conftest.er1 conftest.err
2358   fi
2359   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2360   test $ac_status = 0; } > conftest.i && {
2361          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2362          test ! -s conftest.err
2363        }; then :
2364   ac_retval=0
2365 else
2366   $as_echo "$as_me: failed program was:" >&5
2367 sed 's/^/| /' conftest.$ac_ext >&5
2368 
2369     ac_retval=1
2370 fi
2371   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2372   as_fn_set_status $ac_retval
2373 
2374 } # ac_fn_c_try_cpp
2375 
2376 # ac_fn_cxx_try_cpp LINENO
2377 # ------------------------
2378 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2379 ac_fn_cxx_try_cpp ()
2380 {
2381   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2382   if { { ac_try="$ac_cpp conftest.$ac_ext"
2383 case "(($ac_try" in
2384   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2385   *) ac_try_echo=$ac_try;;
2386 esac
2387 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2388 $as_echo "$ac_try_echo"; } >&5
2389   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2390   ac_status=$?
2391   if test -s conftest.err; then
2392     grep -v '^ *+' conftest.err >conftest.er1
2393     cat conftest.er1 >&5
2394     mv -f conftest.er1 conftest.err
2395   fi
2396   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2397   test $ac_status = 0; } > conftest.i && {
2398          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2399          test ! -s conftest.err
2400        }; then :
2401   ac_retval=0
2402 else
2403   $as_echo "$as_me: failed program was:" >&5
2404 sed 's/^/| /' conftest.$ac_ext >&5
2405 
2406     ac_retval=1
2407 fi
2408   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2409   as_fn_set_status $ac_retval
2410 
2411 } # ac_fn_cxx_try_cpp
2412 
2413 # ac_fn_c_try_link LINENO
2414 # -----------------------
2415 # Try to link conftest.$ac_ext, and return whether this succeeded.
2416 ac_fn_c_try_link ()
2417 {
2418   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2419   rm -f conftest.$ac_objext conftest$ac_exeext
2420   if { { ac_try="$ac_link"
2421 case "(($ac_try" in
2422   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2423   *) ac_try_echo=$ac_try;;
2424 esac
2425 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2426 $as_echo "$ac_try_echo"; } >&5
2427   (eval "$ac_link") 2>conftest.err
2428   ac_status=$?
2429   if test -s conftest.err; then
2430     grep -v '^ *+' conftest.err >conftest.er1
2431     cat conftest.er1 >&5
2432     mv -f conftest.er1 conftest.err
2433   fi
2434   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2435   test $ac_status = 0; } && {
2436          test -z "$ac_c_werror_flag" ||
2437          test ! -s conftest.err
2438        } && test -s conftest$ac_exeext && {
2439          test "$cross_compiling" = yes ||
2440          test -x conftest$ac_exeext
2441        }; then :
2442   ac_retval=0
2443 else
2444   $as_echo "$as_me: failed program was:" >&5
2445 sed 's/^/| /' conftest.$ac_ext >&5
2446 
2447         ac_retval=1
2448 fi
2449   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2450   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2451   # interfere with the next link command; also delete a directory that is
2452   # left behind by Apple's compiler.  We do this before executing the actions.
2453   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2454   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2455   as_fn_set_status $ac_retval
2456 
2457 } # ac_fn_c_try_link
2458 
2459 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2460 # ---------------------------------------------------------
2461 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2462 # the include files in INCLUDES and setting the cache variable VAR
2463 # accordingly.
2464 ac_fn_cxx_check_header_mongrel ()
2465 {
2466   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2467   if eval \${$3+:} false; then :
2468   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2469 $as_echo_n "checking for $2... " >&6; }
2470 if eval \${$3+:} false; then :
2471   $as_echo_n "(cached) " >&6
2472 fi
2473 eval ac_res=\$$3
2474                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2475 $as_echo "$ac_res" >&6; }
2476 else
2477   # Is the header compilable?
2478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2479 $as_echo_n "checking $2 usability... " >&6; }
2480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2481 /* end confdefs.h.  */
2482 $4
2483 #include <$2>
2484 _ACEOF
2485 if ac_fn_cxx_try_compile "$LINENO"; then :
2486   ac_header_compiler=yes
2487 else
2488   ac_header_compiler=no
2489 fi
2490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2492 $as_echo "$ac_header_compiler" >&6; }
2493 
2494 # Is the header present?
2495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2496 $as_echo_n "checking $2 presence... " >&6; }
2497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2498 /* end confdefs.h.  */
2499 #include <$2>
2500 _ACEOF
2501 if ac_fn_cxx_try_cpp "$LINENO"; then :
2502   ac_header_preproc=yes
2503 else
2504   ac_header_preproc=no
2505 fi
2506 rm -f conftest.err conftest.i conftest.$ac_ext
2507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2508 $as_echo "$ac_header_preproc" >&6; }
2509 
2510 # So?  What about this header?
2511 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2512   yes:no: )
2513     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2514 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2515     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2516 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2517     ;;
2518   no:yes:* )
2519     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2520 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2521     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2522 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2523     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2524 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2525     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2526 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2527     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2528 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2529 ( $as_echo "## ----------------------------------------- ##
2530 ## Report this to build-dev@openjdk.java.net ##
2531 ## ----------------------------------------- ##"
2532      ) | sed "s/^/$as_me: WARNING:     /" >&2
2533     ;;
2534 esac
2535   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2536 $as_echo_n "checking for $2... " >&6; }
2537 if eval \${$3+:} false; then :
2538   $as_echo_n "(cached) " >&6
2539 else
2540   eval "$3=\$ac_header_compiler"
2541 fi
2542 eval ac_res=\$$3
2543                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2544 $as_echo "$ac_res" >&6; }
2545 fi
2546   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2547 
2548 } # ac_fn_cxx_check_header_mongrel
2549 
2550 # ac_fn_cxx_try_run LINENO
2551 # ------------------------
2552 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2553 # that executables *can* be run.
2554 ac_fn_cxx_try_run ()
2555 {
2556   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2557   if { { ac_try="$ac_link"
2558 case "(($ac_try" in
2559   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2560   *) ac_try_echo=$ac_try;;
2561 esac
2562 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2563 $as_echo "$ac_try_echo"; } >&5
2564   (eval "$ac_link") 2>&5
2565   ac_status=$?
2566   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2567   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2568   { { case "(($ac_try" in
2569   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2570   *) ac_try_echo=$ac_try;;
2571 esac
2572 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2573 $as_echo "$ac_try_echo"; } >&5
2574   (eval "$ac_try") 2>&5
2575   ac_status=$?
2576   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2577   test $ac_status = 0; }; }; then :
2578   ac_retval=0
2579 else
2580   $as_echo "$as_me: program exited with status $ac_status" >&5
2581        $as_echo "$as_me: failed program was:" >&5
2582 sed 's/^/| /' conftest.$ac_ext >&5
2583 
2584        ac_retval=$ac_status
2585 fi
2586   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2587   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2588   as_fn_set_status $ac_retval
2589 
2590 } # ac_fn_cxx_try_run
2591 
2592 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2593 # ---------------------------------------------------------
2594 # Tests whether HEADER exists and can be compiled using the include files in
2595 # INCLUDES, setting the cache variable VAR accordingly.
2596 ac_fn_cxx_check_header_compile ()
2597 {
2598   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2599   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2600 $as_echo_n "checking for $2... " >&6; }
2601 if eval \${$3+:} false; then :
2602   $as_echo_n "(cached) " >&6
2603 else
2604   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2605 /* end confdefs.h.  */
2606 $4
2607 #include <$2>
2608 _ACEOF
2609 if ac_fn_cxx_try_compile "$LINENO"; then :
2610   eval "$3=yes"
2611 else
2612   eval "$3=no"
2613 fi
2614 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2615 fi
2616 eval ac_res=\$$3
2617                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2618 $as_echo "$ac_res" >&6; }
2619   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2620 
2621 } # ac_fn_cxx_check_header_compile
2622 
2623 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2624 # ----------------------------------------------
2625 # Tries to find the compile-time value of EXPR in a program that includes
2626 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2627 # computed
2628 ac_fn_cxx_compute_int ()
2629 {
2630   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2631   if test "$cross_compiling" = yes; then
2632     # Depending upon the size, compute the lo and hi bounds.
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) >= 0)];
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=0 ac_mid=0
2649   while :; do
2650     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2651 /* end confdefs.h.  */
2652 $4
2653 int
2654 main ()
2655 {
2656 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2657 test_array [0] = 0;
2658 return test_array [0];
2659 
2660   ;
2661   return 0;
2662 }
2663 _ACEOF
2664 if ac_fn_cxx_try_compile "$LINENO"; then :
2665   ac_hi=$ac_mid; break
2666 else
2667   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2668                         if test $ac_lo -le $ac_mid; then
2669                           ac_lo= ac_hi=
2670                           break
2671                         fi
2672                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2673 fi
2674 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2675   done
2676 else
2677   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2678 /* end confdefs.h.  */
2679 $4
2680 int
2681 main ()
2682 {
2683 static int test_array [1 - 2 * !(($2) < 0)];
2684 test_array [0] = 0;
2685 return test_array [0];
2686 
2687   ;
2688   return 0;
2689 }
2690 _ACEOF
2691 if ac_fn_cxx_try_compile "$LINENO"; then :
2692   ac_hi=-1 ac_mid=-1
2693   while :; do
2694     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2695 /* end confdefs.h.  */
2696 $4
2697 int
2698 main ()
2699 {
2700 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2701 test_array [0] = 0;
2702 return test_array [0];
2703 
2704   ;
2705   return 0;
2706 }
2707 _ACEOF
2708 if ac_fn_cxx_try_compile "$LINENO"; then :
2709   ac_lo=$ac_mid; break
2710 else
2711   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2712                         if test $ac_mid -le $ac_hi; then
2713                           ac_lo= ac_hi=
2714                           break
2715                         fi
2716                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2717 fi
2718 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2719   done
2720 else
2721   ac_lo= ac_hi=
2722 fi
2723 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2724 fi
2725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2726 # Binary search between lo and hi bounds.
2727 while test "x$ac_lo" != "x$ac_hi"; do
2728   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2729   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2730 /* end confdefs.h.  */
2731 $4
2732 int
2733 main ()
2734 {
2735 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2736 test_array [0] = 0;
2737 return test_array [0];
2738 
2739   ;
2740   return 0;
2741 }
2742 _ACEOF
2743 if ac_fn_cxx_try_compile "$LINENO"; then :
2744   ac_hi=$ac_mid
2745 else
2746   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2747 fi
2748 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2749 done
2750 case $ac_lo in #((
2751 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2752 '') ac_retval=1 ;;
2753 esac
2754   else
2755     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2756 /* end confdefs.h.  */
2757 $4
2758 static long int longval () { return $2; }
2759 static unsigned long int ulongval () { return $2; }
2760 #include <stdio.h>
2761 #include <stdlib.h>
2762 int
2763 main ()
2764 {
2765 
2766   FILE *f = fopen ("conftest.val", "w");
2767   if (! f)
2768     return 1;
2769   if (($2) < 0)
2770     {
2771       long int i = longval ();
2772       if (i != ($2))
2773         return 1;
2774       fprintf (f, "%ld", i);
2775     }
2776   else
2777     {
2778       unsigned long int i = ulongval ();
2779       if (i != ($2))
2780         return 1;
2781       fprintf (f, "%lu", i);
2782     }
2783   /* Do not output a trailing newline, as this causes \r\n confusion
2784      on some platforms.  */
2785   return ferror (f) || fclose (f) != 0;
2786 
2787   ;
2788   return 0;
2789 }
2790 _ACEOF
2791 if ac_fn_cxx_try_run "$LINENO"; then :
2792   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2793 else
2794   ac_retval=1
2795 fi
2796 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2797   conftest.$ac_objext conftest.beam conftest.$ac_ext
2798 rm -f conftest.val
2799 
2800   fi
2801   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2802   as_fn_set_status $ac_retval
2803 
2804 } # ac_fn_cxx_compute_int
2805 
2806 # ac_fn_cxx_try_link LINENO
2807 # -------------------------
2808 # Try to link conftest.$ac_ext, and return whether this succeeded.
2809 ac_fn_cxx_try_link ()
2810 {
2811   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2812   rm -f conftest.$ac_objext conftest$ac_exeext
2813   if { { ac_try="$ac_link"
2814 case "(($ac_try" in
2815   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2816   *) ac_try_echo=$ac_try;;
2817 esac
2818 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2819 $as_echo "$ac_try_echo"; } >&5
2820   (eval "$ac_link") 2>conftest.err
2821   ac_status=$?
2822   if test -s conftest.err; then
2823     grep -v '^ *+' conftest.err >conftest.er1
2824     cat conftest.er1 >&5
2825     mv -f conftest.er1 conftest.err
2826   fi
2827   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2828   test $ac_status = 0; } && {
2829          test -z "$ac_cxx_werror_flag" ||
2830          test ! -s conftest.err
2831        } && test -s conftest$ac_exeext && {
2832          test "$cross_compiling" = yes ||
2833          test -x conftest$ac_exeext
2834        }; then :
2835   ac_retval=0
2836 else
2837   $as_echo "$as_me: failed program was:" >&5
2838 sed 's/^/| /' conftest.$ac_ext >&5
2839 
2840         ac_retval=1
2841 fi
2842   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2843   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2844   # interfere with the next link command; also delete a directory that is
2845   # left behind by Apple's compiler.  We do this before executing the actions.
2846   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2847   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2848   as_fn_set_status $ac_retval
2849 
2850 } # ac_fn_cxx_try_link
2851 
2852 # ac_fn_cxx_check_func LINENO FUNC VAR
2853 # ------------------------------------
2854 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2855 ac_fn_cxx_check_func ()
2856 {
2857   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2858   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2859 $as_echo_n "checking for $2... " >&6; }
2860 if eval \${$3+:} false; then :
2861   $as_echo_n "(cached) " >&6
2862 else
2863   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2864 /* end confdefs.h.  */
2865 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2866    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2867 #define $2 innocuous_$2
2868 
2869 /* System header to define __stub macros and hopefully few prototypes,
2870     which can conflict with char $2 (); below.
2871     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2872     <limits.h> exists even on freestanding compilers.  */
2873 
2874 #ifdef __STDC__
2875 # include <limits.h>
2876 #else
2877 # include <assert.h>
2878 #endif
2879 
2880 #undef $2
2881 
2882 /* Override any GCC internal prototype to avoid an error.
2883    Use char because int might match the return type of a GCC
2884    builtin and then its argument prototype would still apply.  */
2885 #ifdef __cplusplus
2886 extern "C"
2887 #endif
2888 char $2 ();
2889 /* The GNU C library defines this for functions which it implements
2890     to always fail with ENOSYS.  Some functions are actually named
2891     something starting with __ and the normal name is an alias.  */
2892 #if defined __stub_$2 || defined __stub___$2
2893 choke me
2894 #endif
2895 
2896 int
2897 main ()
2898 {
2899 return $2 ();
2900   ;
2901   return 0;
2902 }
2903 _ACEOF
2904 if ac_fn_cxx_try_link "$LINENO"; then :
2905   eval "$3=yes"
2906 else
2907   eval "$3=no"
2908 fi
2909 rm -f core conftest.err conftest.$ac_objext \
2910     conftest$ac_exeext conftest.$ac_ext
2911 fi
2912 eval ac_res=\$$3
2913                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2914 $as_echo "$ac_res" >&6; }
2915   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2916 
2917 } # ac_fn_cxx_check_func
2918 
2919 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2920 # -------------------------------------------------------
2921 # Tests whether HEADER exists and can be compiled using the include files in
2922 # INCLUDES, setting the cache variable VAR accordingly.
2923 ac_fn_c_check_header_compile ()
2924 {
2925   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2926   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2927 $as_echo_n "checking for $2... " >&6; }
2928 if eval \${$3+:} false; then :
2929   $as_echo_n "(cached) " >&6
2930 else
2931   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2932 /* end confdefs.h.  */
2933 $4
2934 #include <$2>
2935 _ACEOF
2936 if ac_fn_c_try_compile "$LINENO"; then :
2937   eval "$3=yes"
2938 else
2939   eval "$3=no"
2940 fi
2941 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2942 fi
2943 eval ac_res=\$$3
2944                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2945 $as_echo "$ac_res" >&6; }
2946   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2947 
2948 } # ac_fn_c_check_header_compile
2949 cat >config.log <<_ACEOF
2950 This file contains any messages produced by compilers while
2951 running configure, to aid debugging if configure makes a mistake.
2952 
2953 It was created by OpenJDK $as_me jdk9, which was
2954 generated by GNU Autoconf 2.69.  Invocation command line was
2955 
2956   $ $0 $@
2957 
2958 _ACEOF
2959 exec 5>>config.log
2960 {
2961 cat <<_ASUNAME
2962 ## --------- ##
2963 ## Platform. ##
2964 ## --------- ##
2965 
2966 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2967 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2968 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2969 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2970 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2971 
2972 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2973 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2974 
2975 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2976 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2977 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2978 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2979 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2980 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2981 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2982 
2983 _ASUNAME
2984 
2985 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2986 for as_dir in $PATH
2987 do
2988   IFS=$as_save_IFS
2989   test -z "$as_dir" && as_dir=.
2990     $as_echo "PATH: $as_dir"
2991   done
2992 IFS=$as_save_IFS
2993 
2994 } >&5
2995 
2996 cat >&5 <<_ACEOF
2997 
2998 
2999 ## ----------- ##
3000 ## Core tests. ##
3001 ## ----------- ##
3002 
3003 _ACEOF
3004 
3005 
3006 # Keep a trace of the command line.
3007 # Strip out --no-create and --no-recursion so they do not pile up.
3008 # Strip out --silent because we don't want to record it for future runs.
3009 # Also quote any args containing shell meta-characters.
3010 # Make two passes to allow for proper duplicate-argument suppression.
3011 ac_configure_args=
3012 ac_configure_args0=
3013 ac_configure_args1=
3014 ac_must_keep_next=false
3015 for ac_pass in 1 2
3016 do
3017   for ac_arg
3018   do
3019     case $ac_arg in
3020     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3021     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3022     | -silent | --silent | --silen | --sile | --sil)
3023       continue ;;
3024     *\'*)
3025       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3026     esac
3027     case $ac_pass in
3028     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3029     2)
3030       as_fn_append ac_configure_args1 " '$ac_arg'"
3031       if test $ac_must_keep_next = true; then
3032         ac_must_keep_next=false # Got value, back to normal.
3033       else
3034         case $ac_arg in
3035           *=* | --config-cache | -C | -disable-* | --disable-* \
3036           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3037           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3038           | -with-* | --with-* | -without-* | --without-* | --x)
3039             case "$ac_configure_args0 " in
3040               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3041             esac
3042             ;;
3043           -* ) ac_must_keep_next=true ;;
3044         esac
3045       fi
3046       as_fn_append ac_configure_args " '$ac_arg'"
3047       ;;
3048     esac
3049   done
3050 done
3051 { ac_configure_args0=; unset ac_configure_args0;}
3052 { ac_configure_args1=; unset ac_configure_args1;}
3053 
3054 # When interrupted or exit'd, cleanup temporary files, and complete
3055 # config.log.  We remove comments because anyway the quotes in there
3056 # would cause problems or look ugly.
3057 # WARNING: Use '\'' to represent an apostrophe within the trap.
3058 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3059 trap 'exit_status=$?
3060   # Save into config.log some information that might help in debugging.
3061   {
3062     echo
3063 
3064     $as_echo "## ---------------- ##
3065 ## Cache variables. ##
3066 ## ---------------- ##"
3067     echo
3068     # The following way of writing the cache mishandles newlines in values,
3069 (
3070   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3071     eval ac_val=\$$ac_var
3072     case $ac_val in #(
3073     *${as_nl}*)
3074       case $ac_var in #(
3075       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3076 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3077       esac
3078       case $ac_var in #(
3079       _ | IFS | as_nl) ;; #(
3080       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3081       *) { eval $ac_var=; unset $ac_var;} ;;
3082       esac ;;
3083     esac
3084   done
3085   (set) 2>&1 |
3086     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3087     *${as_nl}ac_space=\ *)
3088       sed -n \
3089         "s/'\''/'\''\\\\'\'''\''/g;
3090           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3091       ;; #(
3092     *)
3093       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3094       ;;
3095     esac |
3096     sort
3097 )
3098     echo
3099 
3100     $as_echo "## ----------------- ##
3101 ## Output variables. ##
3102 ## ----------------- ##"
3103     echo
3104     for ac_var in $ac_subst_vars
3105     do
3106       eval ac_val=\$$ac_var
3107       case $ac_val in
3108       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3109       esac
3110       $as_echo "$ac_var='\''$ac_val'\''"
3111     done | sort
3112     echo
3113 
3114     if test -n "$ac_subst_files"; then
3115       $as_echo "## ------------------- ##
3116 ## File substitutions. ##
3117 ## ------------------- ##"
3118       echo
3119       for ac_var in $ac_subst_files
3120       do
3121         eval ac_val=\$$ac_var
3122         case $ac_val in
3123         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3124         esac
3125         $as_echo "$ac_var='\''$ac_val'\''"
3126       done | sort
3127       echo
3128     fi
3129 
3130     if test -s confdefs.h; then
3131       $as_echo "## ----------- ##
3132 ## confdefs.h. ##
3133 ## ----------- ##"
3134       echo
3135       cat confdefs.h
3136       echo
3137     fi
3138     test "$ac_signal" != 0 &&
3139       $as_echo "$as_me: caught signal $ac_signal"
3140     $as_echo "$as_me: exit $exit_status"
3141   } >&5
3142   rm -f core *.core core.conftest.* &&
3143     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3144     exit $exit_status
3145 ' 0
3146 for ac_signal in 1 2 13 15; do
3147   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3148 done
3149 ac_signal=0
3150 
3151 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3152 rm -f -r conftest* confdefs.h
3153 
3154 $as_echo "/* confdefs.h */" > confdefs.h
3155 
3156 # Predefined preprocessor variables.
3157 
3158 cat >>confdefs.h <<_ACEOF
3159 #define PACKAGE_NAME "$PACKAGE_NAME"
3160 _ACEOF
3161 
3162 cat >>confdefs.h <<_ACEOF
3163 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3164 _ACEOF
3165 
3166 cat >>confdefs.h <<_ACEOF
3167 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3168 _ACEOF
3169 
3170 cat >>confdefs.h <<_ACEOF
3171 #define PACKAGE_STRING "$PACKAGE_STRING"
3172 _ACEOF
3173 
3174 cat >>confdefs.h <<_ACEOF
3175 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3176 _ACEOF
3177 
3178 cat >>confdefs.h <<_ACEOF
3179 #define PACKAGE_URL "$PACKAGE_URL"
3180 _ACEOF
3181 
3182 
3183 # Let the site file select an alternate cache file if it wants to.
3184 # Prefer an explicitly selected file to automatically selected ones.
3185 ac_site_file1=NONE
3186 ac_site_file2=NONE
3187 if test -n "$CONFIG_SITE"; then
3188   # We do not want a PATH search for config.site.
3189   case $CONFIG_SITE in #((
3190     -*)  ac_site_file1=./$CONFIG_SITE;;
3191     */*) ac_site_file1=$CONFIG_SITE;;
3192     *)   ac_site_file1=./$CONFIG_SITE;;
3193   esac
3194 elif test "x$prefix" != xNONE; then
3195   ac_site_file1=$prefix/share/config.site
3196   ac_site_file2=$prefix/etc/config.site
3197 else
3198   ac_site_file1=$ac_default_prefix/share/config.site
3199   ac_site_file2=$ac_default_prefix/etc/config.site
3200 fi
3201 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3202 do
3203   test "x$ac_site_file" = xNONE && continue
3204   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3205     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3206 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3207     sed 's/^/| /' "$ac_site_file" >&5
3208     . "$ac_site_file" \
3209       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3210 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3211 as_fn_error $? "failed to load site script $ac_site_file
3212 See \`config.log' for more details" "$LINENO" 5; }
3213   fi
3214 done
3215 
3216 if test -r "$cache_file"; then
3217   # Some versions of bash will fail to source /dev/null (special files
3218   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3219   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3220     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3221 $as_echo "$as_me: loading cache $cache_file" >&6;}
3222     case $cache_file in
3223       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3224       *)                      . "./$cache_file";;
3225     esac
3226   fi
3227 else
3228   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3229 $as_echo "$as_me: creating cache $cache_file" >&6;}
3230   >$cache_file
3231 fi
3232 
3233 # Check that the precious variables saved in the cache have kept the same
3234 # value.
3235 ac_cache_corrupted=false
3236 for ac_var in $ac_precious_vars; do
3237   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3238   eval ac_new_set=\$ac_env_${ac_var}_set
3239   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3240   eval ac_new_val=\$ac_env_${ac_var}_value
3241   case $ac_old_set,$ac_new_set in
3242     set,)
3243       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3244 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3245       ac_cache_corrupted=: ;;
3246     ,set)
3247       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3248 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3249       ac_cache_corrupted=: ;;
3250     ,);;
3251     *)
3252       if test "x$ac_old_val" != "x$ac_new_val"; then
3253         # differences in whitespace do not lead to failure.
3254         ac_old_val_w=`echo x $ac_old_val`
3255         ac_new_val_w=`echo x $ac_new_val`
3256         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3257           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3258 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3259           ac_cache_corrupted=:
3260         else
3261           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3262 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3263           eval $ac_var=\$ac_old_val
3264         fi
3265         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3266 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3267         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3268 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3269       fi;;
3270   esac
3271   # Pass precious variables to config.status.
3272   if test "$ac_new_set" = set; then
3273     case $ac_new_val in
3274     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3275     *) ac_arg=$ac_var=$ac_new_val ;;
3276     esac
3277     case " $ac_configure_args " in
3278       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3279       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3280     esac
3281   fi
3282 done
3283 if $ac_cache_corrupted; then
3284   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3285 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3286   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3287 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3288   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3289 fi
3290 ## -------------------- ##
3291 ## Main body of script. ##
3292 ## -------------------- ##
3293 
3294 ac_ext=c
3295 ac_cpp='$CPP $CPPFLAGS'
3296 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3297 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3298 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3299 
3300 
3301 
3302 ac_aux_dir=
3303 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3304   if test -f "$ac_dir/install-sh"; then
3305     ac_aux_dir=$ac_dir
3306     ac_install_sh="$ac_aux_dir/install-sh -c"
3307     break
3308   elif test -f "$ac_dir/install.sh"; then
3309     ac_aux_dir=$ac_dir
3310     ac_install_sh="$ac_aux_dir/install.sh -c"
3311     break
3312   elif test -f "$ac_dir/shtool"; then
3313     ac_aux_dir=$ac_dir
3314     ac_install_sh="$ac_aux_dir/shtool install -c"
3315     break
3316   fi
3317 done
3318 if test -z "$ac_aux_dir"; then
3319   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
3320 fi
3321 
3322 # These three variables are undocumented and unsupported,
3323 # and are intended to be withdrawn in a future Autoconf release.
3324 # They can cause serious problems if a builder's source tree is in a directory
3325 # whose full name contains unusual characters.
3326 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3327 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3328 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3329 
3330 
3331 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3332 
3333 #
3334 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3335 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3336 #
3337 # This code is free software; you can redistribute it and/or modify it
3338 # under the terms of the GNU General Public License version 2 only, as
3339 # published by the Free Software Foundation.  Oracle designates this
3340 # particular file as subject to the "Classpath" exception as provided
3341 # by Oracle in the LICENSE file that accompanied this code.
3342 #
3343 # This code is distributed in the hope that it will be useful, but WITHOUT
3344 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3345 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3346 # version 2 for more details (a copy is included in the LICENSE file that
3347 # accompanied this code).
3348 #
3349 # You should have received a copy of the GNU General Public License version
3350 # 2 along with this work; if not, write to the Free Software Foundation,
3351 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3352 #
3353 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3354 # or visit www.oracle.com if you need additional information or have any
3355 # questions.
3356 #
3357 
3358 #
3359 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3360 #
3361 # This program is free software; you can redistribute it and/or modify
3362 # it under the terms of the GNU General Public License as published by
3363 # the Free Software Foundation; either version 2 of the License, or
3364 # (at your option) any later version.
3365 #
3366 # This program is distributed in the hope that it will be useful, but
3367 # WITHOUT ANY WARRANTY; without even the implied warranty of
3368 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3369 # General Public License for more details.
3370 #
3371 # You should have received a copy of the GNU General Public License
3372 # along with this program; if not, write to the Free Software
3373 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3374 #
3375 # As a special exception to the GNU General Public License, if you
3376 # distribute this file as part of a program that contains a
3377 # configuration script generated by Autoconf, you may include it under
3378 # the same distribution terms that you use for the rest of that program.
3379 
3380 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3381 # ----------------------------------
3382 # PKG_PROG_PKG_CONFIG
3383 
3384 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3385 #
3386 # Check to see whether a particular set of modules exists.  Similar
3387 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3388 #
3389 #
3390 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3391 # this or PKG_CHECK_MODULES is called, or make sure to call
3392 # PKG_CHECK_EXISTS manually
3393 # --------------------------------------------------------------
3394 
3395 
3396 
3397 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3398 # ---------------------------------------------
3399 # _PKG_CONFIG
3400 
3401 # _PKG_SHORT_ERRORS_SUPPORTED
3402 # -----------------------------
3403 # _PKG_SHORT_ERRORS_SUPPORTED
3404 
3405 
3406 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3407 # [ACTION-IF-NOT-FOUND])
3408 #
3409 #
3410 # Note that if there is a possibility the first call to
3411 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3412 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3413 #
3414 #
3415 # --------------------------------------------------------------
3416 # PKG_CHECK_MODULES
3417 
3418 
3419 # Include these first...
3420 #
3421 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3422 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3423 #
3424 # This code is free software; you can redistribute it and/or modify it
3425 # under the terms of the GNU General Public License version 2 only, as
3426 # published by the Free Software Foundation.  Oracle designates this
3427 # particular file as subject to the "Classpath" exception as provided
3428 # by Oracle in the LICENSE file that accompanied this code.
3429 #
3430 # This code is distributed in the hope that it will be useful, but WITHOUT
3431 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3432 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3433 # version 2 for more details (a copy is included in the LICENSE file that
3434 # accompanied this code).
3435 #
3436 # You should have received a copy of the GNU General Public License version
3437 # 2 along with this work; if not, write to the Free Software Foundation,
3438 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3439 #
3440 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3441 # or visit www.oracle.com if you need additional information or have any
3442 # questions.
3443 #
3444 
3445 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3446 # If so, then append $1 to $2 \
3447 # Also set JVM_ARG_OK to true/false depending on outcome.
3448 
3449 
3450 # Appends a string to a path variable, only adding the : when needed.
3451 
3452 
3453 # Prepends a string to a path variable, only adding the : when needed.
3454 
3455 
3456 # This will make sure the given variable points to a full and proper
3457 # path. This means:
3458 # 1) There will be no spaces in the path. On unix platforms,
3459 #    spaces in the path will result in an error. On Windows,
3460 #    the path will be rewritten using short-style to be space-free.
3461 # 2) The path will be absolute, and it will be in unix-style (on
3462 #     cygwin).
3463 # $1: The name of the variable to fix
3464 
3465 
3466 # This will make sure the given variable points to a executable
3467 # with a full and proper path. This means:
3468 # 1) There will be no spaces in the path. On unix platforms,
3469 #    spaces in the path will result in an error. On Windows,
3470 #    the path will be rewritten using short-style to be space-free.
3471 # 2) The path will be absolute, and it will be in unix-style (on
3472 #     cygwin).
3473 # Any arguments given to the executable is preserved.
3474 # If the input variable does not have a directory specification, then
3475 # it need to be in the PATH.
3476 # $1: The name of the variable to fix
3477 
3478 
3479 
3480 
3481 # Register a --with argument but mark it as deprecated
3482 # $1: The name of the with argument to deprecate, not including --with-
3483 
3484 
3485 # Register a --enable argument but mark it as deprecated
3486 # $1: The name of the with argument to deprecate, not including --enable-
3487 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3488 # $3: Messages to user.
3489 
3490 
3491 
3492 
3493 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3494 # $1: variable to check
3495 
3496 
3497 # Check that there are no unprocessed overridden variables left.
3498 # If so, they are an incorrect argument and we will exit with an error.
3499 
3500 
3501 # Setup a tool for the given variable. If correctly specified by the user,
3502 # use that value, otherwise search for the tool using the supplied code snippet.
3503 # $1: variable to set
3504 # $2: code snippet to call to look for the tool
3505 # $3: code snippet to call if variable was used to find tool
3506 
3507 
3508 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3509 # $1: variable to set
3510 # $2: executable name (or list of names) to look for
3511 
3512 
3513 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3514 # $1: variable to set
3515 # $2: executable name (or list of names) to look for
3516 
3517 
3518 # Like BASIC_PATH_PROGS but fails if no tool was found.
3519 # $1: variable to set
3520 # $2: executable name (or list of names) to look for
3521 
3522 
3523 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3524 # $1: variable to set
3525 # $2: autoconf macro to call to look for the special tool
3526 
3527 
3528 # Setup the most fundamental tools that relies on not much else to set up,
3529 # but is used by much of the early bootstrap code.
3530 
3531 
3532 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3533 
3534 
3535 # Evaluates platform specific overrides for devkit variables.
3536 # $1: Name of variable
3537 
3538 
3539 
3540 
3541 
3542 
3543 #%%% Simple tools %%%
3544 
3545 # Check if we have found a usable version of make
3546 # $1: the path to a potential make binary (or empty)
3547 # $2: the description on how we found this
3548 
3549 
3550 
3551 
3552 # Goes looking for a usable version of GNU make.
3553 
3554 
3555 
3556 
3557 
3558 
3559 # Check if build directory is on local disk. If not possible to determine,
3560 # we prefer to claim it's local.
3561 # Argument 1: directory to test
3562 # Argument 2: what to do if it is on local disk
3563 # Argument 3: what to do otherwise (remote disk or failure)
3564 
3565 
3566 # Check that source files have basic read permissions set. This might
3567 # not be the case in cygwin in certain conditions.
3568 
3569 
3570 
3571 
3572 # Check for support for specific options in bash
3573 
3574 
3575 # Code to run after AC_OUTPUT
3576 
3577 
3578 #
3579 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3580 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3581 #
3582 # This code is free software; you can redistribute it and/or modify it
3583 # under the terms of the GNU General Public License version 2 only, as
3584 # published by the Free Software Foundation.  Oracle designates this
3585 # particular file as subject to the "Classpath" exception as provided
3586 # by Oracle in the LICENSE file that accompanied this code.
3587 #
3588 # This code is distributed in the hope that it will be useful, but WITHOUT
3589 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3590 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3591 # version 2 for more details (a copy is included in the LICENSE file that
3592 # accompanied this code).
3593 #
3594 # You should have received a copy of the GNU General Public License version
3595 # 2 along with this work; if not, write to the Free Software Foundation,
3596 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3597 #
3598 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3599 # or visit www.oracle.com if you need additional information or have any
3600 # questions.
3601 #
3602 
3603 
3604 
3605 
3606 
3607 # Helper function which possibly converts a path using DOS-style short mode.
3608 # If so, the updated path is stored in $new_path.
3609 # $1: The path to check
3610 
3611 
3612 # Helper function which possibly converts a path using DOS-style short mode.
3613 # If so, the updated path is stored in $new_path.
3614 # $1: The path to check
3615 
3616 
3617 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3618 # and could probably be heavily simplified. However, all changes in this
3619 # area tend to need lot of testing in different scenarios, and in lack of
3620 # proper unit testing, cleaning this up has not been deemed worth the effort
3621 # at the moment.
3622 
3623 
3624 
3625 
3626 
3627 
3628 
3629 
3630 
3631 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3632 
3633 
3634 
3635 
3636 # ... then the rest
3637 #
3638 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3639 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3640 #
3641 # This code is free software; you can redistribute it and/or modify it
3642 # under the terms of the GNU General Public License version 2 only, as
3643 # published by the Free Software Foundation.  Oracle designates this
3644 # particular file as subject to the "Classpath" exception as provided
3645 # by Oracle in the LICENSE file that accompanied this code.
3646 #
3647 # This code is distributed in the hope that it will be useful, but WITHOUT
3648 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3649 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3650 # version 2 for more details (a copy is included in the LICENSE file that
3651 # accompanied this code).
3652 #
3653 # You should have received a copy of the GNU General Public License version
3654 # 2 along with this work; if not, write to the Free Software Foundation,
3655 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3656 #
3657 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3658 # or visit www.oracle.com if you need additional information or have any
3659 # questions.
3660 #
3661 
3662 ########################################################################
3663 # This file handles detection of the Boot JDK. The Boot JDK detection
3664 # process has been developed as a response to solve a complex real-world
3665 # problem. Initially, it was simple, but it has grown as platform after
3666 # platform, idiosyncracy after idiosyncracy has been supported.
3667 #
3668 # The basic idea is this:
3669 # 1) You need an acceptable *) JDK to use as a Boot JDK
3670 # 2) There are several ways to locate a JDK, that are mostly platform
3671 #    dependent **)
3672 # 3) You can have multiple JDKs installed
3673 # 4) If possible, configure should try to dig out an acceptable JDK
3674 #    automatically, without having to resort to command-line options
3675 #
3676 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3677 #     javac) and not a JRE, etc.
3678 #
3679 # **) On Windows we typically use a well-known path.
3680 #     On MacOSX we typically use the tool java_home.
3681 #     On Linux we typically find javac in the $PATH, and then follow a
3682 #     chain of symlinks that often ends up in a real JDK.
3683 #
3684 # This leads to the code where we check in different ways to locate a
3685 # JDK, and if one is found, check if it is acceptable. If not, we print
3686 # our reasons for rejecting it (useful when debugging non-working
3687 # configure situations) and continue checking the next one.
3688 ########################################################################
3689 
3690 # Execute the check given as argument, and verify the result
3691 # If the Boot JDK was previously found, do nothing
3692 # $1 A command line (typically autoconf macro) to execute
3693 
3694 
3695 # Test: Is bootjdk explicitely set by command line arguments?
3696 
3697 
3698 # Test: Is $JAVA_HOME set?
3699 
3700 
3701 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3702 
3703 
3704 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3705 # $1: Argument to the java_home binary (optional)
3706 
3707 
3708 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3709 
3710 
3711 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3712 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3713 # $1 = Path to directory containing jdk installations.
3714 # $2 = String to append to the found JDK directory to get the proper JDK home
3715 
3716 
3717 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3718 # environmental variable as base for where to look.
3719 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3720 
3721 
3722 # Test: Is there a JDK installed in default, well-known locations?
3723 
3724 
3725 # Check that a command-line tool in the Boot JDK is correct
3726 # $1 = name of variable to assign
3727 # $2 = name of binary
3728 
3729 
3730 ###############################################################################
3731 #
3732 # We need a Boot JDK to bootstrap the build.
3733 #
3734 
3735 
3736 
3737 
3738 
3739 #
3740 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3741 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3742 #
3743 # This code is free software; you can redistribute it and/or modify it
3744 # under the terms of the GNU General Public License version 2 only, as
3745 # published by the Free Software Foundation.  Oracle designates this
3746 # particular file as subject to the "Classpath" exception as provided
3747 # by Oracle in the LICENSE file that accompanied this code.
3748 #
3749 # This code is distributed in the hope that it will be useful, but WITHOUT
3750 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3751 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3752 # version 2 for more details (a copy is included in the LICENSE file that
3753 # accompanied this code).
3754 #
3755 # You should have received a copy of the GNU General Public License version
3756 # 2 along with this work; if not, write to the Free Software Foundation,
3757 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3758 #
3759 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3760 # or visit www.oracle.com if you need additional information or have any
3761 # questions.
3762 #
3763 
3764 
3765 
3766 
3767 
3768 
3769 
3770 
3771 
3772 
3773 
3774 
3775 
3776 
3777 
3778 ################################################################################
3779 #
3780 # Optionally enable distributed compilation of native code using icecc/icecream
3781 #
3782 
3783 
3784 
3785 
3786 
3787 
3788 
3789 #
3790 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3791 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3792 #
3793 # This code is free software; you can redistribute it and/or modify it
3794 # under the terms of the GNU General Public License version 2 only, as
3795 # published by the Free Software Foundation.  Oracle designates this
3796 # particular file as subject to the "Classpath" exception as provided
3797 # by Oracle in the LICENSE file that accompanied this code.
3798 #
3799 # This code is distributed in the hope that it will be useful, but WITHOUT
3800 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3801 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3802 # version 2 for more details (a copy is included in the LICENSE file that
3803 # accompanied this code).
3804 #
3805 # You should have received a copy of the GNU General Public License version
3806 # 2 along with this work; if not, write to the Free Software Foundation,
3807 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3808 #
3809 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3810 # or visit www.oracle.com if you need additional information or have any
3811 # questions.
3812 #
3813 
3814 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3815 # corresponding configure arguments instead
3816 
3817 
3818 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3819 # that configure can use them while detecting compilers.
3820 # TOOLCHAIN_TYPE is available here.
3821 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
3822 
3823 
3824 
3825 
3826 
3827 
3828 # Documentation on common flags used for solstudio in HIGHEST.
3829 #
3830 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3831 #          done with care, there are some assumptions below that need to
3832 #          be understood about the use of pointers, and IEEE behavior.
3833 #
3834 # -fns: Use non-standard floating point mode (not IEEE 754)
3835 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3836 # -fsingle: Use single precision floating point with 'float'
3837 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
3838 #   (Source with excessing pointer casting and data access with mixed
3839 #    pointer types are not recommended)
3840 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3841 #   (If you expect perfect errno behavior, do not use this)
3842 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3843 # -xrestrict: Pointer parameters to functions do not overlap
3844 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3845 #    If you pass in multiple pointers to the same data, do not use this)
3846 # -xlibmil: Inline some library routines
3847 #   (If you expect perfect errno behavior, do not use this)
3848 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3849 #   (If you expect perfect errno behavior, do not use this)
3850 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3851 
3852     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3853     # Bug?
3854     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3855     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3856     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3857     #fi
3858 
3859 
3860 
3861 
3862 
3863 # FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3864 #                                   [RUN-IF-FALSE])
3865 # ------------------------------------------------------------
3866 # Check that the c and c++ compilers support an argument
3867 
3868 
3869 # FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3870 #                                    [RUN-IF-FALSE])
3871 # ------------------------------------------------------------
3872 # Check that the linker support an argument
3873 
3874 
3875 
3876 
3877 #
3878 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3879 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3880 #
3881 # This code is free software; you can redistribute it and/or modify it
3882 # under the terms of the GNU General Public License version 2 only, as
3883 # published by the Free Software Foundation.  Oracle designates this
3884 # particular file as subject to the "Classpath" exception as provided
3885 # by Oracle in the LICENSE file that accompanied this code.
3886 #
3887 # This code is distributed in the hope that it will be useful, but WITHOUT
3888 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3889 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3890 # version 2 for more details (a copy is included in the LICENSE file that
3891 # accompanied this code).
3892 #
3893 # You should have received a copy of the GNU General Public License version
3894 # 2 along with this work; if not, write to the Free Software Foundation,
3895 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3896 #
3897 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3898 # or visit www.oracle.com if you need additional information or have any
3899 # questions.
3900 #
3901 
3902 
3903 
3904 
3905 
3906 cygwin_help() {
3907   case $1 in
3908     unzip)
3909       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3910       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3911       ;;
3912     zip)
3913       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3914       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3915       ;;
3916     make)
3917       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3918       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3919       ;;
3920     freetype)
3921       HELP_MSG="
3922 The freetype library can now be build during the configure process.
3923 Download the freetype sources and unpack them into an arbitrary directory:
3924 
3925 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3926 tar -xzf freetype-2.5.3.tar.gz
3927 
3928 Then run configure with '--with-freetype-src=<freetype_src>'. This will
3929 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3930 builds or into '<freetype_src>/lib32' for 32-bit builds.
3931 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3932 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3933       ;;
3934   esac
3935 }
3936 
3937 msys_help() {
3938   PKGHANDLER_COMMAND=""
3939 }
3940 
3941 apt_help() {
3942   case $1 in
3943     reduced)
3944       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3945     devkit)
3946       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3947     openjdk)
3948       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3949     alsa)
3950       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3951     cups)
3952       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3953     freetype)
3954       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3955     ffi)
3956       PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3957     x11)
3958       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3959     ccache)
3960       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3961   esac
3962 }
3963 
3964 yum_help() {
3965   case $1 in
3966     devkit)
3967       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3968     openjdk)
3969       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3970     alsa)
3971       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3972     cups)
3973       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3974     freetype)
3975       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3976     x11)
3977       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3978     ccache)
3979       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3980   esac
3981 }
3982 
3983 port_help() {
3984   PKGHANDLER_COMMAND=""
3985 }
3986 
3987 pkgutil_help() {
3988   PKGHANDLER_COMMAND=""
3989 }
3990 
3991 pkgadd_help() {
3992   PKGHANDLER_COMMAND=""
3993 }
3994 
3995 # This function will check if we're called from the "configure" wrapper while
3996 # printing --help. If so, we will print out additional information that can
3997 # only be extracted within the autoconf script, and then exit. This must be
3998 # called at the very beginning in configure.ac.
3999 
4000 
4001 
4002 
4003 
4004 
4005 #
4006 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4007 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4008 #
4009 # This code is free software; you can redistribute it and/or modify it
4010 # under the terms of the GNU General Public License version 2 only, as
4011 # published by the Free Software Foundation.  Oracle designates this
4012 # particular file as subject to the "Classpath" exception as provided
4013 # by Oracle in the LICENSE file that accompanied this code.
4014 #
4015 # This code is distributed in the hope that it will be useful, but WITHOUT
4016 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4017 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4018 # version 2 for more details (a copy is included in the LICENSE file that
4019 # accompanied this code).
4020 #
4021 # You should have received a copy of the GNU General Public License version
4022 # 2 along with this work; if not, write to the Free Software Foundation,
4023 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4024 #
4025 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4026 # or visit www.oracle.com if you need additional information or have any
4027 # questions.
4028 #
4029 
4030 
4031 
4032 
4033 
4034 
4035 
4036 
4037 
4038 
4039 ###############################################################################
4040 #
4041 # Should we build only OpenJDK even if closed sources are present?
4042 #
4043 
4044 
4045 
4046 
4047 
4048 
4049 ###############################################################################
4050 #
4051 # Enable or disable the elliptic curve crypto implementation
4052 #
4053 
4054 
4055 
4056 
4057 
4058 ################################################################################
4059 #
4060 # Gcov coverage data for hotspot
4061 #
4062 
4063 
4064 ################################################################################
4065 #
4066 # Static build support.  When enabled will generate static
4067 # libraries instead of shared libraries for all JDK libs.
4068 #
4069 
4070 
4071 
4072 
4073 #
4074 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4075 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4076 #
4077 # This code is free software; you can redistribute it and/or modify it
4078 # under the terms of the GNU General Public License version 2 only, as
4079 # published by the Free Software Foundation.  Oracle designates this
4080 # particular file as subject to the "Classpath" exception as provided
4081 # by Oracle in the LICENSE file that accompanied this code.
4082 #
4083 # This code is distributed in the hope that it will be useful, but WITHOUT
4084 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4085 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4086 # version 2 for more details (a copy is included in the LICENSE file that
4087 # accompanied this code).
4088 #
4089 # You should have received a copy of the GNU General Public License version
4090 # 2 along with this work; if not, write to the Free Software Foundation,
4091 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4092 #
4093 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4094 # or visit www.oracle.com if you need additional information or have any
4095 # questions.
4096 #
4097 
4098 ###############################################################################
4099 #
4100 # Setup version numbers
4101 #
4102 
4103 # Verify that a given string represents a valid version number, and assign it
4104 # to a variable.
4105 
4106 # Argument 1: the variable to assign to
4107 # Argument 2: the value given by the user
4108 
4109 
4110 
4111 
4112 #
4113 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4114 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4115 #
4116 # This code is free software; you can redistribute it and/or modify it
4117 # under the terms of the GNU General Public License version 2 only, as
4118 # published by the Free Software Foundation.  Oracle designates this
4119 # particular file as subject to the "Classpath" exception as provided
4120 # by Oracle in the LICENSE file that accompanied this code.
4121 #
4122 # This code is distributed in the hope that it will be useful, but WITHOUT
4123 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4124 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4125 # version 2 for more details (a copy is included in the LICENSE file that
4126 # accompanied this code).
4127 #
4128 # You should have received a copy of the GNU General Public License version
4129 # 2 along with this work; if not, write to the Free Software Foundation,
4130 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4131 #
4132 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4133 # or visit www.oracle.com if you need additional information or have any
4134 # questions.
4135 #
4136 
4137 # Major library component reside in separate files.
4138 #
4139 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4140 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4141 #
4142 # This code is free software; you can redistribute it and/or modify it
4143 # under the terms of the GNU General Public License version 2 only, as
4144 # published by the Free Software Foundation.  Oracle designates this
4145 # particular file as subject to the "Classpath" exception as provided
4146 # by Oracle in the LICENSE file that accompanied this code.
4147 #
4148 # This code is distributed in the hope that it will be useful, but WITHOUT
4149 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4150 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4151 # version 2 for more details (a copy is included in the LICENSE file that
4152 # accompanied this code).
4153 #
4154 # You should have received a copy of the GNU General Public License version
4155 # 2 along with this work; if not, write to the Free Software Foundation,
4156 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4157 #
4158 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4159 # or visit www.oracle.com if you need additional information or have any
4160 # questions.
4161 #
4162 
4163 ################################################################################
4164 # Setup alsa (Advanced Linux Sound Architecture)
4165 ################################################################################
4166 
4167 
4168 #
4169 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4170 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4171 #
4172 # This code is free software; you can redistribute it and/or modify it
4173 # under the terms of the GNU General Public License version 2 only, as
4174 # published by the Free Software Foundation.  Oracle designates this
4175 # particular file as subject to the "Classpath" exception as provided
4176 # by Oracle in the LICENSE file that accompanied this code.
4177 #
4178 # This code is distributed in the hope that it will be useful, but WITHOUT
4179 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4180 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4181 # version 2 for more details (a copy is included in the LICENSE file that
4182 # accompanied this code).
4183 #
4184 # You should have received a copy of the GNU General Public License version
4185 # 2 along with this work; if not, write to the Free Software Foundation,
4186 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4187 #
4188 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4189 # or visit www.oracle.com if you need additional information or have any
4190 # questions.
4191 #
4192 
4193 ################################################################################
4194 # Setup bundled libraries.
4195 #
4196 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4197 # OpenJDK repository. Default is to use these libraries as bundled, but they
4198 # might be replaced by en external version by the user.
4199 ################################################################################
4200 
4201 
4202 ################################################################################
4203 # Setup libjpeg
4204 ################################################################################
4205 
4206 
4207 ################################################################################
4208 # Setup giflib
4209 ################################################################################
4210 
4211 
4212 ################################################################################
4213 # Setup libpng
4214 ################################################################################
4215 
4216 
4217 ################################################################################
4218 # Setup zlib
4219 ################################################################################
4220 
4221 
4222 ################################################################################
4223 # Setup lcms (Little CMS)
4224 ################################################################################
4225 
4226 
4227 #
4228 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4229 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4230 #
4231 # This code is free software; you can redistribute it and/or modify it
4232 # under the terms of the GNU General Public License version 2 only, as
4233 # published by the Free Software Foundation.  Oracle designates this
4234 # particular file as subject to the "Classpath" exception as provided
4235 # by Oracle in the LICENSE file that accompanied this code.
4236 #
4237 # This code is distributed in the hope that it will be useful, but WITHOUT
4238 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4239 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4240 # version 2 for more details (a copy is included in the LICENSE file that
4241 # accompanied this code).
4242 #
4243 # You should have received a copy of the GNU General Public License version
4244 # 2 along with this work; if not, write to the Free Software Foundation,
4245 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4246 #
4247 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4248 # or visit www.oracle.com if you need additional information or have any
4249 # questions.
4250 #
4251 
4252 ################################################################################
4253 # Setup cups (Common Unix Printing System)
4254 ################################################################################
4255 
4256 
4257 #
4258 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4259 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4260 #
4261 # This code is free software; you can redistribute it and/or modify it
4262 # under the terms of the GNU General Public License version 2 only, as
4263 # published by the Free Software Foundation.  Oracle designates this
4264 # particular file as subject to the "Classpath" exception as provided
4265 # by Oracle in the LICENSE file that accompanied this code.
4266 #
4267 # This code is distributed in the hope that it will be useful, but WITHOUT
4268 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4269 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4270 # version 2 for more details (a copy is included in the LICENSE file that
4271 # accompanied this code).
4272 #
4273 # You should have received a copy of the GNU General Public License version
4274 # 2 along with this work; if not, write to the Free Software Foundation,
4275 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4276 #
4277 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4278 # or visit www.oracle.com if you need additional information or have any
4279 # questions.
4280 #
4281 
4282 ################################################################################
4283 # Setup libffi (Foreign Function Interface)
4284 ################################################################################
4285 
4286 
4287 #
4288 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4289 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4290 #
4291 # This code is free software; you can redistribute it and/or modify it
4292 # under the terms of the GNU General Public License version 2 only, as
4293 # published by the Free Software Foundation.  Oracle designates this
4294 # particular file as subject to the "Classpath" exception as provided
4295 # by Oracle in the LICENSE file that accompanied this code.
4296 #
4297 # This code is distributed in the hope that it will be useful, but WITHOUT
4298 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4299 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4300 # version 2 for more details (a copy is included in the LICENSE file that
4301 # accompanied this code).
4302 #
4303 # You should have received a copy of the GNU General Public License version
4304 # 2 along with this work; if not, write to the Free Software Foundation,
4305 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4306 #
4307 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4308 # or visit www.oracle.com if you need additional information or have any
4309 # questions.
4310 #
4311 
4312 ################################################################################
4313 # Build the freetype lib from source
4314 ################################################################################
4315 
4316 
4317 ################################################################################
4318 # Check if a potential freeype library match is correct and usable
4319 ################################################################################
4320 
4321 
4322 ################################################################################
4323 # Setup freetype (The FreeType2 font rendering library)
4324 ################################################################################
4325 
4326 
4327 #
4328 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4329 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4330 #
4331 # This code is free software; you can redistribute it and/or modify it
4332 # under the terms of the GNU General Public License version 2 only, as
4333 # published by the Free Software Foundation.  Oracle designates this
4334 # particular file as subject to the "Classpath" exception as provided
4335 # by Oracle in the LICENSE file that accompanied this code.
4336 #
4337 # This code is distributed in the hope that it will be useful, but WITHOUT
4338 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4339 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4340 # version 2 for more details (a copy is included in the LICENSE file that
4341 # accompanied this code).
4342 #
4343 # You should have received a copy of the GNU General Public License version
4344 # 2 along with this work; if not, write to the Free Software Foundation,
4345 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4346 #
4347 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4348 # or visit www.oracle.com if you need additional information or have any
4349 # questions.
4350 #
4351 
4352 ################################################################################
4353 # Setup the standard C/C++ runtime libraries.
4354 #
4355 # Most importantly, determine if stdc++ should be linked statically or
4356 # dynamically.
4357 ################################################################################
4358 
4359 
4360 #
4361 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4362 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4363 #
4364 # This code is free software; you can redistribute it and/or modify it
4365 # under the terms of the GNU General Public License version 2 only, as
4366 # published by the Free Software Foundation.  Oracle designates this
4367 # particular file as subject to the "Classpath" exception as provided
4368 # by Oracle in the LICENSE file that accompanied this code.
4369 #
4370 # This code is distributed in the hope that it will be useful, but WITHOUT
4371 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4372 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4373 # version 2 for more details (a copy is included in the LICENSE file that
4374 # accompanied this code).
4375 #
4376 # You should have received a copy of the GNU General Public License version
4377 # 2 along with this work; if not, write to the Free Software Foundation,
4378 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4379 #
4380 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4381 # or visit www.oracle.com if you need additional information or have any
4382 # questions.
4383 #
4384 
4385 ################################################################################
4386 # Setup X11 Windows system
4387 ################################################################################
4388 
4389 
4390 
4391 ################################################################################
4392 # Determine which libraries are needed for this configuration
4393 ################################################################################
4394 
4395 
4396 ################################################################################
4397 # Parse library options, and setup needed libraries
4398 ################################################################################
4399 
4400 
4401 ################################################################################
4402 # Setup llvm (Low-Level VM)
4403 ################################################################################
4404 
4405 
4406 ################################################################################
4407 # Setup various libraries, typically small system libraries
4408 ################################################################################
4409 
4410 
4411 #
4412 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4413 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4414 #
4415 # This code is free software; you can redistribute it and/or modify it
4416 # under the terms of the GNU General Public License version 2 only, as
4417 # published by the Free Software Foundation.  Oracle designates this
4418 # particular file as subject to the "Classpath" exception as provided
4419 # by Oracle in the LICENSE file that accompanied this code.
4420 #
4421 # This code is distributed in the hope that it will be useful, but WITHOUT
4422 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4423 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4424 # version 2 for more details (a copy is included in the LICENSE file that
4425 # accompanied this code).
4426 #
4427 # You should have received a copy of the GNU General Public License version
4428 # 2 along with this work; if not, write to the Free Software Foundation,
4429 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4430 #
4431 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4432 # or visit www.oracle.com if you need additional information or have any
4433 # questions.
4434 #
4435 
4436 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4437 # Converts autoconf style CPU name to OpenJDK style, into
4438 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4439 
4440 
4441 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4442 # Converts autoconf style OS name to OpenJDK style, into
4443 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4444 
4445 
4446 # Expects $host_os $host_cpu $build_os and $build_cpu
4447 # and $with_target_bits to have been setup!
4448 #
4449 # Translate the standard triplet(quadruplet) definition
4450 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4451 # OPENJDK_BUILD_OS, etc.
4452 
4453 
4454 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4455 # accordingly. Must be done after setting up build and target system, but before
4456 # doing anything else with these values.
4457 
4458 
4459 # Setup the legacy variables, for controlling the old makefiles.
4460 #
4461 
4462 
4463 
4464 
4465 #%%% Build and target systems %%%
4466 
4467 
4468 
4469 
4470 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4471 # Add -mX to various FLAGS variables.
4472 
4473 
4474 
4475 
4476 
4477 
4478 #
4479 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4480 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4481 #
4482 # This code is free software; you can redistribute it and/or modify it
4483 # under the terms of the GNU General Public License version 2 only, as
4484 # published by the Free Software Foundation.  Oracle designates this
4485 # particular file as subject to the "Classpath" exception as provided
4486 # by Oracle in the LICENSE file that accompanied this code.
4487 #
4488 # This code is distributed in the hope that it will be useful, but WITHOUT
4489 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4490 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4491 # version 2 for more details (a copy is included in the LICENSE file that
4492 # accompanied this code).
4493 #
4494 # You should have received a copy of the GNU General Public License version
4495 # 2 along with this work; if not, write to the Free Software Foundation,
4496 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4497 #
4498 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4499 # or visit www.oracle.com if you need additional information or have any
4500 # questions.
4501 #
4502 
4503 
4504 
4505 
4506 
4507 
4508 
4509 #
4510 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4511 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4512 #
4513 # This code is free software; you can redistribute it and/or modify it
4514 # under the terms of the GNU General Public License version 2 only, as
4515 # published by the Free Software Foundation.  Oracle designates this
4516 # particular file as subject to the "Classpath" exception as provided
4517 # by Oracle in the LICENSE file that accompanied this code.
4518 #
4519 # This code is distributed in the hope that it will be useful, but WITHOUT
4520 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4521 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4522 # version 2 for more details (a copy is included in the LICENSE file that
4523 # accompanied this code).
4524 #
4525 # You should have received a copy of the GNU General Public License version
4526 # 2 along with this work; if not, write to the Free Software Foundation,
4527 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4528 #
4529 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4530 # or visit www.oracle.com if you need additional information or have any
4531 # questions.
4532 #
4533 
4534 ########################################################################
4535 # This file is responsible for detecting, verifying and setting up the
4536 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4537 # proper paths to the binaries, but it will not setup any flags.
4538 #
4539 # The binaries used is determined by the toolchain type, which is the family of
4540 # compilers and related tools that are used.
4541 ########################################################################
4542 
4543 
4544 # All valid toolchains, regardless of platform (used by help.m4)
4545 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4546 
4547 # These toolchains are valid on different platforms
4548 VALID_TOOLCHAINS_linux="gcc clang"
4549 VALID_TOOLCHAINS_solaris="solstudio"
4550 VALID_TOOLCHAINS_macosx="gcc clang"
4551 VALID_TOOLCHAINS_aix="xlc"
4552 VALID_TOOLCHAINS_windows="microsoft"
4553 
4554 # Toolchain descriptions
4555 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4556 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4557 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4558 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4559 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4560 
4561 # Setup a number of variables describing how native output files are
4562 # named on this platform/toolchain.
4563 
4564 
4565 # Determine which toolchain type to use, and make sure it is valid for this
4566 # platform. Setup various information about the selected toolchain.
4567 
4568 
4569 # Before we start detecting the toolchain executables, we might need some
4570 # special setup, e.g. additional paths etc.
4571 
4572 
4573 # Restore path, etc
4574 
4575 
4576 # Check if a compiler is of the toolchain type we expect, and save the version
4577 # information from it. If the compiler does not match the expected type,
4578 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4579 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4580 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4581 #
4582 # $1 = compiler to test (CC or CXX)
4583 # $2 = human readable name of compiler (C or C++)
4584 
4585 
4586 # Try to locate the given C or C++ compiler in the path, or otherwise.
4587 #
4588 # $1 = compiler to test (CC or CXX)
4589 # $2 = human readable name of compiler (C or C++)
4590 # $3 = list of compiler names to search for
4591 
4592 
4593 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4594 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4595 # archiver (AR). Verify that the compilers are correct according to the
4596 # toolchain type.
4597 
4598 
4599 # Setup additional tools that is considered a part of the toolchain, but not the
4600 # core part. Many of these are highly platform-specific and do not exist,
4601 # and/or are not needed on all platforms.
4602 
4603 
4604 # Setup the build tools (i.e, the compiler and linker used to build programs
4605 # that should be run on the build platform, not the target platform, as a build
4606 # helper). Since the non-cross-compile case uses the normal, target compilers
4607 # for this, we can only do this after these have been setup.
4608 
4609 
4610 # Setup legacy variables that are still needed as alternative ways to refer to
4611 # parts of the toolchain.
4612 
4613 
4614 # Do some additional checks on the detected tools.
4615 
4616 
4617 # Setup the JTReg Regression Test Harness.
4618 
4619 
4620 #
4621 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4622 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4623 #
4624 # This code is free software; you can redistribute it and/or modify it
4625 # under the terms of the GNU General Public License version 2 only, as
4626 # published by the Free Software Foundation.  Oracle designates this
4627 # particular file as subject to the "Classpath" exception as provided
4628 # by Oracle in the LICENSE file that accompanied this code.
4629 #
4630 # This code is distributed in the hope that it will be useful, but WITHOUT
4631 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4632 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4633 # version 2 for more details (a copy is included in the LICENSE file that
4634 # accompanied this code).
4635 #
4636 # You should have received a copy of the GNU General Public License version
4637 # 2 along with this work; if not, write to the Free Software Foundation,
4638 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4639 #
4640 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4641 # or visit www.oracle.com if you need additional information or have any
4642 # questions.
4643 #
4644 
4645 ################################################################################
4646 # The order of these defines the priority by which we try to find them.
4647 VALID_VS_VERSIONS="2013 2012 2010"
4648 
4649 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4650 VS_VERSION_INTERNAL_2010=100
4651 VS_MSVCR_2010=msvcr100.dll
4652 # We don't use msvcp on Visual Studio 2010
4653 #VS_MSVCP_2010=msvcp100.dll
4654 VS_ENVVAR_2010="VS100COMNTOOLS"
4655 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4656 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4657 VS_VS_PLATFORM_NAME_2010="v100"
4658 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4659 
4660 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4661 VS_VERSION_INTERNAL_2012=110
4662 VS_MSVCR_2012=msvcr110.dll
4663 VS_MSVCP_2012=msvcp110.dll
4664 VS_ENVVAR_2012="VS110COMNTOOLS"
4665 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4666 VS_SDK_INSTALLDIR_2012=
4667 VS_VS_PLATFORM_NAME_2012="v110"
4668 VS_SDK_PLATFORM_NAME_2012=
4669 
4670 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4671 VS_VERSION_INTERNAL_2013=120
4672 VS_MSVCR_2013=msvcr120.dll
4673 VS_MSVCP_2013=msvcp120.dll
4674 VS_ENVVAR_2013="VS120COMNTOOLS"
4675 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4676 VS_SDK_INSTALLDIR_2013=
4677 VS_VS_PLATFORM_NAME_2013="v120"
4678 VS_SDK_PLATFORM_NAME_2013=
4679 
4680 ################################################################################
4681 
4682 
4683 
4684 ################################################################################
4685 
4686 
4687 
4688 ################################################################################
4689 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4690 # build environment and assigns it to VS_ENV_CMD
4691 
4692 
4693 ################################################################################
4694 
4695 
4696 
4697 ################################################################################
4698 # Check if the VS env variables were setup prior to running configure.
4699 # If not, then find vcvarsall.bat and run it automatically, and integrate
4700 # the set env variables into the spec file.
4701 
4702 
4703 
4704 
4705 
4706 
4707 
4708 
4709 
4710 
4711 
4712 
4713 
4714 
4715 # This line needs to be here, verbatim, after all includes and the dummy hook
4716 # definitions. It is replaced with custom functionality when building
4717 # custom sources.
4718 #CUSTOM_AUTOCONF_INCLUDE
4719 
4720 # Do not change or remove the following line, it is needed for consistency checks:
4721 DATE_WHEN_GENERATED=1449552417
4722 
4723 ###############################################################################
4724 #
4725 # Initialization / Boot-strapping
4726 #
4727 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4728 # thus it jumps back and forth, each time gaining something needed later on.
4729 #
4730 ###############################################################################
4731 
4732 # If we are requested to print additional help, do that and then exit.
4733 # This must be the very first call.
4734 
4735   if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4736     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4737     $PRINTF "Which are valid to use depends on the build platform.\n"
4738     for toolchain in $VALID_TOOLCHAINS_all; do
4739       # Use indirect variable referencing
4740       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4741       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4742       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4743     done
4744 
4745     # And now exit directly
4746     exit 0
4747   fi
4748 
4749 
4750 # Basic initialization that must happen first of all in the normal process.
4751 
4752   # Save the original command line. This is passed to us by the wrapper configure script.
4753 
4754   # Save the path variable before it gets changed
4755   ORIGINAL_PATH="$PATH"
4756 
4757   DATE_WHEN_CONFIGURED=`LANG=C date`
4758 
4759   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4760 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4761   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4762 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4763 
4764 
4765   # Start with tools that do not need have cross compilation support
4766   # and can be expected to be found in the default PATH. These tools are
4767   # used by configure.
4768 
4769   # First are all the simple required tools.
4770 
4771 
4772 
4773   # Publish this variable in the help.
4774 
4775 
4776   if [ -z "${BASENAME+x}" ]; then
4777     # The variable is not set by user, try to locate tool using the code snippet
4778     for ac_prog in basename
4779 do
4780   # Extract the first word of "$ac_prog", so it can be a program name with args.
4781 set dummy $ac_prog; ac_word=$2
4782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4783 $as_echo_n "checking for $ac_word... " >&6; }
4784 if ${ac_cv_path_BASENAME+:} false; then :
4785   $as_echo_n "(cached) " >&6
4786 else
4787   case $BASENAME in
4788   [\\/]* | ?:[\\/]*)
4789   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4790   ;;
4791   *)
4792   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4793 for as_dir in $PATH
4794 do
4795   IFS=$as_save_IFS
4796   test -z "$as_dir" && as_dir=.
4797     for ac_exec_ext in '' $ac_executable_extensions; do
4798   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4799     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4800     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4801     break 2
4802   fi
4803 done
4804   done
4805 IFS=$as_save_IFS
4806 
4807   ;;
4808 esac
4809 fi
4810 BASENAME=$ac_cv_path_BASENAME
4811 if test -n "$BASENAME"; then
4812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4813 $as_echo "$BASENAME" >&6; }
4814 else
4815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4816 $as_echo "no" >&6; }
4817 fi
4818 
4819 
4820   test -n "$BASENAME" && break
4821 done
4822 
4823   else
4824     # The variable is set, but is it from the command line or the environment?
4825 
4826     # Try to remove the string !BASENAME! from our list.
4827     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4828     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4829       # If it failed, the variable was not from the command line. Ignore it,
4830       # but warn the user (except for BASH, which is always set by the calling BASH).
4831       if test "xBASENAME" != xBASH; then
4832         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4833 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4834       fi
4835       # Try to locate tool using the code snippet
4836       for ac_prog in basename
4837 do
4838   # Extract the first word of "$ac_prog", so it can be a program name with args.
4839 set dummy $ac_prog; ac_word=$2
4840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4841 $as_echo_n "checking for $ac_word... " >&6; }
4842 if ${ac_cv_path_BASENAME+:} false; then :
4843   $as_echo_n "(cached) " >&6
4844 else
4845   case $BASENAME in
4846   [\\/]* | ?:[\\/]*)
4847   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4848   ;;
4849   *)
4850   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4851 for as_dir in $PATH
4852 do
4853   IFS=$as_save_IFS
4854   test -z "$as_dir" && as_dir=.
4855     for ac_exec_ext in '' $ac_executable_extensions; do
4856   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4857     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4858     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4859     break 2
4860   fi
4861 done
4862   done
4863 IFS=$as_save_IFS
4864 
4865   ;;
4866 esac
4867 fi
4868 BASENAME=$ac_cv_path_BASENAME
4869 if test -n "$BASENAME"; then
4870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4871 $as_echo "$BASENAME" >&6; }
4872 else
4873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4874 $as_echo "no" >&6; }
4875 fi
4876 
4877 
4878   test -n "$BASENAME" && break
4879 done
4880 
4881     else
4882       # If it succeeded, then it was overridden by the user. We will use it
4883       # for the tool.
4884 
4885       # First remove it from the list of overridden variables, so we can test
4886       # for unknown variables in the end.
4887       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4888 
4889       # Check if we try to supply an empty value
4890       if test "x$BASENAME" = x; then
4891         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4892 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4893         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4894 $as_echo_n "checking for BASENAME... " >&6; }
4895         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4896 $as_echo "disabled" >&6; }
4897       else
4898         # Check if the provided tool contains a complete path.
4899         tool_specified="$BASENAME"
4900         tool_basename="${tool_specified##*/}"
4901         if test "x$tool_basename" = "x$tool_specified"; then
4902           # A command without a complete path is provided, search $PATH.
4903           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4904 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4905           # Extract the first word of "$tool_basename", so it can be a program name with args.
4906 set dummy $tool_basename; ac_word=$2
4907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4908 $as_echo_n "checking for $ac_word... " >&6; }
4909 if ${ac_cv_path_BASENAME+:} false; then :
4910   $as_echo_n "(cached) " >&6
4911 else
4912   case $BASENAME in
4913   [\\/]* | ?:[\\/]*)
4914   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4915   ;;
4916   *)
4917   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4918 for as_dir in $PATH
4919 do
4920   IFS=$as_save_IFS
4921   test -z "$as_dir" && as_dir=.
4922     for ac_exec_ext in '' $ac_executable_extensions; do
4923   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4924     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4925     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4926     break 2
4927   fi
4928 done
4929   done
4930 IFS=$as_save_IFS
4931 
4932   ;;
4933 esac
4934 fi
4935 BASENAME=$ac_cv_path_BASENAME
4936 if test -n "$BASENAME"; then
4937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4938 $as_echo "$BASENAME" >&6; }
4939 else
4940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4941 $as_echo "no" >&6; }
4942 fi
4943 
4944 
4945           if test "x$BASENAME" = x; then
4946             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4947           fi
4948         else
4949           # Otherwise we believe it is a complete path. Use it as it is.
4950           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4951 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4952           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4953 $as_echo_n "checking for BASENAME... " >&6; }
4954           if test ! -x "$tool_specified"; then
4955             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4956 $as_echo "not found" >&6; }
4957             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4958           fi
4959           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4960 $as_echo "$tool_specified" >&6; }
4961         fi
4962       fi
4963     fi
4964 
4965   fi
4966 
4967 
4968 
4969   if test "x$BASENAME" = x; then
4970     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4971   fi
4972 
4973 
4974 
4975 
4976 
4977   # Publish this variable in the help.
4978 
4979 
4980   if [ -z "${BASH+x}" ]; then
4981     # The variable is not set by user, try to locate tool using the code snippet
4982     for ac_prog in bash
4983 do
4984   # Extract the first word of "$ac_prog", so it can be a program name with args.
4985 set dummy $ac_prog; ac_word=$2
4986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4987 $as_echo_n "checking for $ac_word... " >&6; }
4988 if ${ac_cv_path_BASH+:} false; then :
4989   $as_echo_n "(cached) " >&6
4990 else
4991   case $BASH in
4992   [\\/]* | ?:[\\/]*)
4993   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4994   ;;
4995   *)
4996   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4997 for as_dir in $PATH
4998 do
4999   IFS=$as_save_IFS
5000   test -z "$as_dir" && as_dir=.
5001     for ac_exec_ext in '' $ac_executable_extensions; do
5002   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5003     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5004     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5005     break 2
5006   fi
5007 done
5008   done
5009 IFS=$as_save_IFS
5010 
5011   ;;
5012 esac
5013 fi
5014 BASH=$ac_cv_path_BASH
5015 if test -n "$BASH"; then
5016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5017 $as_echo "$BASH" >&6; }
5018 else
5019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5020 $as_echo "no" >&6; }
5021 fi
5022 
5023 
5024   test -n "$BASH" && break
5025 done
5026 
5027   else
5028     # The variable is set, but is it from the command line or the environment?
5029 
5030     # Try to remove the string !BASH! from our list.
5031     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5032     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5033       # If it failed, the variable was not from the command line. Ignore it,
5034       # but warn the user (except for BASH, which is always set by the calling BASH).
5035       if test "xBASH" != xBASH; then
5036         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5037 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5038       fi
5039       # Try to locate tool using the code snippet
5040       for ac_prog in bash
5041 do
5042   # Extract the first word of "$ac_prog", so it can be a program name with args.
5043 set dummy $ac_prog; ac_word=$2
5044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5045 $as_echo_n "checking for $ac_word... " >&6; }
5046 if ${ac_cv_path_BASH+:} false; then :
5047   $as_echo_n "(cached) " >&6
5048 else
5049   case $BASH in
5050   [\\/]* | ?:[\\/]*)
5051   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5052   ;;
5053   *)
5054   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5055 for as_dir in $PATH
5056 do
5057   IFS=$as_save_IFS
5058   test -z "$as_dir" && as_dir=.
5059     for ac_exec_ext in '' $ac_executable_extensions; do
5060   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5061     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5062     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5063     break 2
5064   fi
5065 done
5066   done
5067 IFS=$as_save_IFS
5068 
5069   ;;
5070 esac
5071 fi
5072 BASH=$ac_cv_path_BASH
5073 if test -n "$BASH"; then
5074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5075 $as_echo "$BASH" >&6; }
5076 else
5077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5078 $as_echo "no" >&6; }
5079 fi
5080 
5081 
5082   test -n "$BASH" && break
5083 done
5084 
5085     else
5086       # If it succeeded, then it was overridden by the user. We will use it
5087       # for the tool.
5088 
5089       # First remove it from the list of overridden variables, so we can test
5090       # for unknown variables in the end.
5091       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5092 
5093       # Check if we try to supply an empty value
5094       if test "x$BASH" = x; then
5095         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5096 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5097         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5098 $as_echo_n "checking for BASH... " >&6; }
5099         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5100 $as_echo "disabled" >&6; }
5101       else
5102         # Check if the provided tool contains a complete path.
5103         tool_specified="$BASH"
5104         tool_basename="${tool_specified##*/}"
5105         if test "x$tool_basename" = "x$tool_specified"; then
5106           # A command without a complete path is provided, search $PATH.
5107           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5108 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5109           # Extract the first word of "$tool_basename", so it can be a program name with args.
5110 set dummy $tool_basename; ac_word=$2
5111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5112 $as_echo_n "checking for $ac_word... " >&6; }
5113 if ${ac_cv_path_BASH+:} false; then :
5114   $as_echo_n "(cached) " >&6
5115 else
5116   case $BASH in
5117   [\\/]* | ?:[\\/]*)
5118   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5119   ;;
5120   *)
5121   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5122 for as_dir in $PATH
5123 do
5124   IFS=$as_save_IFS
5125   test -z "$as_dir" && as_dir=.
5126     for ac_exec_ext in '' $ac_executable_extensions; do
5127   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5128     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5129     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5130     break 2
5131   fi
5132 done
5133   done
5134 IFS=$as_save_IFS
5135 
5136   ;;
5137 esac
5138 fi
5139 BASH=$ac_cv_path_BASH
5140 if test -n "$BASH"; then
5141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5142 $as_echo "$BASH" >&6; }
5143 else
5144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5145 $as_echo "no" >&6; }
5146 fi
5147 
5148 
5149           if test "x$BASH" = x; then
5150             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5151           fi
5152         else
5153           # Otherwise we believe it is a complete path. Use it as it is.
5154           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5155 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5156           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5157 $as_echo_n "checking for BASH... " >&6; }
5158           if test ! -x "$tool_specified"; then
5159             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5160 $as_echo "not found" >&6; }
5161             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5162           fi
5163           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5164 $as_echo "$tool_specified" >&6; }
5165         fi
5166       fi
5167     fi
5168 
5169   fi
5170 
5171 
5172 
5173   if test "x$BASH" = x; then
5174     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5175   fi
5176 
5177 
5178 
5179 
5180 
5181   # Publish this variable in the help.
5182 
5183 
5184   if [ -z "${CAT+x}" ]; then
5185     # The variable is not set by user, try to locate tool using the code snippet
5186     for ac_prog in cat
5187 do
5188   # Extract the first word of "$ac_prog", so it can be a program name with args.
5189 set dummy $ac_prog; ac_word=$2
5190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5191 $as_echo_n "checking for $ac_word... " >&6; }
5192 if ${ac_cv_path_CAT+:} false; then :
5193   $as_echo_n "(cached) " >&6
5194 else
5195   case $CAT in
5196   [\\/]* | ?:[\\/]*)
5197   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5198   ;;
5199   *)
5200   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5201 for as_dir in $PATH
5202 do
5203   IFS=$as_save_IFS
5204   test -z "$as_dir" && as_dir=.
5205     for ac_exec_ext in '' $ac_executable_extensions; do
5206   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5207     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5208     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5209     break 2
5210   fi
5211 done
5212   done
5213 IFS=$as_save_IFS
5214 
5215   ;;
5216 esac
5217 fi
5218 CAT=$ac_cv_path_CAT
5219 if test -n "$CAT"; then
5220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5221 $as_echo "$CAT" >&6; }
5222 else
5223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5224 $as_echo "no" >&6; }
5225 fi
5226 
5227 
5228   test -n "$CAT" && break
5229 done
5230 
5231   else
5232     # The variable is set, but is it from the command line or the environment?
5233 
5234     # Try to remove the string !CAT! from our list.
5235     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5236     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5237       # If it failed, the variable was not from the command line. Ignore it,
5238       # but warn the user (except for BASH, which is always set by the calling BASH).
5239       if test "xCAT" != xBASH; then
5240         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5241 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5242       fi
5243       # Try to locate tool using the code snippet
5244       for ac_prog in cat
5245 do
5246   # Extract the first word of "$ac_prog", so it can be a program name with args.
5247 set dummy $ac_prog; ac_word=$2
5248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5249 $as_echo_n "checking for $ac_word... " >&6; }
5250 if ${ac_cv_path_CAT+:} false; then :
5251   $as_echo_n "(cached) " >&6
5252 else
5253   case $CAT in
5254   [\\/]* | ?:[\\/]*)
5255   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5256   ;;
5257   *)
5258   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5259 for as_dir in $PATH
5260 do
5261   IFS=$as_save_IFS
5262   test -z "$as_dir" && as_dir=.
5263     for ac_exec_ext in '' $ac_executable_extensions; do
5264   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5265     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5266     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5267     break 2
5268   fi
5269 done
5270   done
5271 IFS=$as_save_IFS
5272 
5273   ;;
5274 esac
5275 fi
5276 CAT=$ac_cv_path_CAT
5277 if test -n "$CAT"; then
5278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5279 $as_echo "$CAT" >&6; }
5280 else
5281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5282 $as_echo "no" >&6; }
5283 fi
5284 
5285 
5286   test -n "$CAT" && break
5287 done
5288 
5289     else
5290       # If it succeeded, then it was overridden by the user. We will use it
5291       # for the tool.
5292 
5293       # First remove it from the list of overridden variables, so we can test
5294       # for unknown variables in the end.
5295       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5296 
5297       # Check if we try to supply an empty value
5298       if test "x$CAT" = x; then
5299         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5300 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5301         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5302 $as_echo_n "checking for CAT... " >&6; }
5303         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5304 $as_echo "disabled" >&6; }
5305       else
5306         # Check if the provided tool contains a complete path.
5307         tool_specified="$CAT"
5308         tool_basename="${tool_specified##*/}"
5309         if test "x$tool_basename" = "x$tool_specified"; then
5310           # A command without a complete path is provided, search $PATH.
5311           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5312 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5313           # Extract the first word of "$tool_basename", so it can be a program name with args.
5314 set dummy $tool_basename; ac_word=$2
5315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5316 $as_echo_n "checking for $ac_word... " >&6; }
5317 if ${ac_cv_path_CAT+:} false; then :
5318   $as_echo_n "(cached) " >&6
5319 else
5320   case $CAT in
5321   [\\/]* | ?:[\\/]*)
5322   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5323   ;;
5324   *)
5325   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5326 for as_dir in $PATH
5327 do
5328   IFS=$as_save_IFS
5329   test -z "$as_dir" && as_dir=.
5330     for ac_exec_ext in '' $ac_executable_extensions; do
5331   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5332     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5334     break 2
5335   fi
5336 done
5337   done
5338 IFS=$as_save_IFS
5339 
5340   ;;
5341 esac
5342 fi
5343 CAT=$ac_cv_path_CAT
5344 if test -n "$CAT"; then
5345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5346 $as_echo "$CAT" >&6; }
5347 else
5348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5349 $as_echo "no" >&6; }
5350 fi
5351 
5352 
5353           if test "x$CAT" = x; then
5354             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5355           fi
5356         else
5357           # Otherwise we believe it is a complete path. Use it as it is.
5358           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5359 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5360           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5361 $as_echo_n "checking for CAT... " >&6; }
5362           if test ! -x "$tool_specified"; then
5363             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5364 $as_echo "not found" >&6; }
5365             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5366           fi
5367           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5368 $as_echo "$tool_specified" >&6; }
5369         fi
5370       fi
5371     fi
5372 
5373   fi
5374 
5375 
5376 
5377   if test "x$CAT" = x; then
5378     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5379   fi
5380 
5381 
5382 
5383 
5384 
5385   # Publish this variable in the help.
5386 
5387 
5388   if [ -z "${CHMOD+x}" ]; then
5389     # The variable is not set by user, try to locate tool using the code snippet
5390     for ac_prog in chmod
5391 do
5392   # Extract the first word of "$ac_prog", so it can be a program name with args.
5393 set dummy $ac_prog; ac_word=$2
5394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5395 $as_echo_n "checking for $ac_word... " >&6; }
5396 if ${ac_cv_path_CHMOD+:} false; then :
5397   $as_echo_n "(cached) " >&6
5398 else
5399   case $CHMOD in
5400   [\\/]* | ?:[\\/]*)
5401   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5402   ;;
5403   *)
5404   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5405 for as_dir in $PATH
5406 do
5407   IFS=$as_save_IFS
5408   test -z "$as_dir" && as_dir=.
5409     for ac_exec_ext in '' $ac_executable_extensions; do
5410   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5411     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5412     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5413     break 2
5414   fi
5415 done
5416   done
5417 IFS=$as_save_IFS
5418 
5419   ;;
5420 esac
5421 fi
5422 CHMOD=$ac_cv_path_CHMOD
5423 if test -n "$CHMOD"; then
5424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5425 $as_echo "$CHMOD" >&6; }
5426 else
5427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5428 $as_echo "no" >&6; }
5429 fi
5430 
5431 
5432   test -n "$CHMOD" && break
5433 done
5434 
5435   else
5436     # The variable is set, but is it from the command line or the environment?
5437 
5438     # Try to remove the string !CHMOD! from our list.
5439     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5440     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5441       # If it failed, the variable was not from the command line. Ignore it,
5442       # but warn the user (except for BASH, which is always set by the calling BASH).
5443       if test "xCHMOD" != xBASH; then
5444         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5445 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5446       fi
5447       # Try to locate tool using the code snippet
5448       for ac_prog in chmod
5449 do
5450   # Extract the first word of "$ac_prog", so it can be a program name with args.
5451 set dummy $ac_prog; ac_word=$2
5452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5453 $as_echo_n "checking for $ac_word... " >&6; }
5454 if ${ac_cv_path_CHMOD+:} false; then :
5455   $as_echo_n "(cached) " >&6
5456 else
5457   case $CHMOD in
5458   [\\/]* | ?:[\\/]*)
5459   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5460   ;;
5461   *)
5462   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5463 for as_dir in $PATH
5464 do
5465   IFS=$as_save_IFS
5466   test -z "$as_dir" && as_dir=.
5467     for ac_exec_ext in '' $ac_executable_extensions; do
5468   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5469     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5470     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5471     break 2
5472   fi
5473 done
5474   done
5475 IFS=$as_save_IFS
5476 
5477   ;;
5478 esac
5479 fi
5480 CHMOD=$ac_cv_path_CHMOD
5481 if test -n "$CHMOD"; then
5482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5483 $as_echo "$CHMOD" >&6; }
5484 else
5485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5486 $as_echo "no" >&6; }
5487 fi
5488 
5489 
5490   test -n "$CHMOD" && break
5491 done
5492 
5493     else
5494       # If it succeeded, then it was overridden by the user. We will use it
5495       # for the tool.
5496 
5497       # First remove it from the list of overridden variables, so we can test
5498       # for unknown variables in the end.
5499       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5500 
5501       # Check if we try to supply an empty value
5502       if test "x$CHMOD" = x; then
5503         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5504 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5505         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5506 $as_echo_n "checking for CHMOD... " >&6; }
5507         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5508 $as_echo "disabled" >&6; }
5509       else
5510         # Check if the provided tool contains a complete path.
5511         tool_specified="$CHMOD"
5512         tool_basename="${tool_specified##*/}"
5513         if test "x$tool_basename" = "x$tool_specified"; then
5514           # A command without a complete path is provided, search $PATH.
5515           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5516 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5517           # Extract the first word of "$tool_basename", so it can be a program name with args.
5518 set dummy $tool_basename; ac_word=$2
5519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5520 $as_echo_n "checking for $ac_word... " >&6; }
5521 if ${ac_cv_path_CHMOD+:} false; then :
5522   $as_echo_n "(cached) " >&6
5523 else
5524   case $CHMOD in
5525   [\\/]* | ?:[\\/]*)
5526   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5527   ;;
5528   *)
5529   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5530 for as_dir in $PATH
5531 do
5532   IFS=$as_save_IFS
5533   test -z "$as_dir" && as_dir=.
5534     for ac_exec_ext in '' $ac_executable_extensions; do
5535   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5536     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5537     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5538     break 2
5539   fi
5540 done
5541   done
5542 IFS=$as_save_IFS
5543 
5544   ;;
5545 esac
5546 fi
5547 CHMOD=$ac_cv_path_CHMOD
5548 if test -n "$CHMOD"; then
5549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5550 $as_echo "$CHMOD" >&6; }
5551 else
5552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5553 $as_echo "no" >&6; }
5554 fi
5555 
5556 
5557           if test "x$CHMOD" = x; then
5558             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5559           fi
5560         else
5561           # Otherwise we believe it is a complete path. Use it as it is.
5562           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5563 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5564           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5565 $as_echo_n "checking for CHMOD... " >&6; }
5566           if test ! -x "$tool_specified"; then
5567             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5568 $as_echo "not found" >&6; }
5569             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5570           fi
5571           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5572 $as_echo "$tool_specified" >&6; }
5573         fi
5574       fi
5575     fi
5576 
5577   fi
5578 
5579 
5580 
5581   if test "x$CHMOD" = x; then
5582     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5583   fi
5584 
5585 
5586 
5587 
5588 
5589   # Publish this variable in the help.
5590 
5591 
5592   if [ -z "${CMP+x}" ]; then
5593     # The variable is not set by user, try to locate tool using the code snippet
5594     for ac_prog in cmp
5595 do
5596   # Extract the first word of "$ac_prog", so it can be a program name with args.
5597 set dummy $ac_prog; ac_word=$2
5598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5599 $as_echo_n "checking for $ac_word... " >&6; }
5600 if ${ac_cv_path_CMP+:} false; then :
5601   $as_echo_n "(cached) " >&6
5602 else
5603   case $CMP in
5604   [\\/]* | ?:[\\/]*)
5605   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5606   ;;
5607   *)
5608   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5609 for as_dir in $PATH
5610 do
5611   IFS=$as_save_IFS
5612   test -z "$as_dir" && as_dir=.
5613     for ac_exec_ext in '' $ac_executable_extensions; do
5614   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5615     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5616     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5617     break 2
5618   fi
5619 done
5620   done
5621 IFS=$as_save_IFS
5622 
5623   ;;
5624 esac
5625 fi
5626 CMP=$ac_cv_path_CMP
5627 if test -n "$CMP"; then
5628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5629 $as_echo "$CMP" >&6; }
5630 else
5631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5632 $as_echo "no" >&6; }
5633 fi
5634 
5635 
5636   test -n "$CMP" && break
5637 done
5638 
5639   else
5640     # The variable is set, but is it from the command line or the environment?
5641 
5642     # Try to remove the string !CMP! from our list.
5643     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5644     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5645       # If it failed, the variable was not from the command line. Ignore it,
5646       # but warn the user (except for BASH, which is always set by the calling BASH).
5647       if test "xCMP" != xBASH; then
5648         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5649 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5650       fi
5651       # Try to locate tool using the code snippet
5652       for ac_prog in cmp
5653 do
5654   # Extract the first word of "$ac_prog", so it can be a program name with args.
5655 set dummy $ac_prog; ac_word=$2
5656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5657 $as_echo_n "checking for $ac_word... " >&6; }
5658 if ${ac_cv_path_CMP+:} false; then :
5659   $as_echo_n "(cached) " >&6
5660 else
5661   case $CMP in
5662   [\\/]* | ?:[\\/]*)
5663   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5664   ;;
5665   *)
5666   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5667 for as_dir in $PATH
5668 do
5669   IFS=$as_save_IFS
5670   test -z "$as_dir" && as_dir=.
5671     for ac_exec_ext in '' $ac_executable_extensions; do
5672   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5673     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5674     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5675     break 2
5676   fi
5677 done
5678   done
5679 IFS=$as_save_IFS
5680 
5681   ;;
5682 esac
5683 fi
5684 CMP=$ac_cv_path_CMP
5685 if test -n "$CMP"; then
5686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5687 $as_echo "$CMP" >&6; }
5688 else
5689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5690 $as_echo "no" >&6; }
5691 fi
5692 
5693 
5694   test -n "$CMP" && break
5695 done
5696 
5697     else
5698       # If it succeeded, then it was overridden by the user. We will use it
5699       # for the tool.
5700 
5701       # First remove it from the list of overridden variables, so we can test
5702       # for unknown variables in the end.
5703       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5704 
5705       # Check if we try to supply an empty value
5706       if test "x$CMP" = x; then
5707         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5708 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5709         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5710 $as_echo_n "checking for CMP... " >&6; }
5711         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5712 $as_echo "disabled" >&6; }
5713       else
5714         # Check if the provided tool contains a complete path.
5715         tool_specified="$CMP"
5716         tool_basename="${tool_specified##*/}"
5717         if test "x$tool_basename" = "x$tool_specified"; then
5718           # A command without a complete path is provided, search $PATH.
5719           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5720 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5721           # Extract the first word of "$tool_basename", so it can be a program name with args.
5722 set dummy $tool_basename; ac_word=$2
5723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5724 $as_echo_n "checking for $ac_word... " >&6; }
5725 if ${ac_cv_path_CMP+:} false; then :
5726   $as_echo_n "(cached) " >&6
5727 else
5728   case $CMP in
5729   [\\/]* | ?:[\\/]*)
5730   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5731   ;;
5732   *)
5733   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5734 for as_dir in $PATH
5735 do
5736   IFS=$as_save_IFS
5737   test -z "$as_dir" && as_dir=.
5738     for ac_exec_ext in '' $ac_executable_extensions; do
5739   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5740     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5741     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5742     break 2
5743   fi
5744 done
5745   done
5746 IFS=$as_save_IFS
5747 
5748   ;;
5749 esac
5750 fi
5751 CMP=$ac_cv_path_CMP
5752 if test -n "$CMP"; then
5753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5754 $as_echo "$CMP" >&6; }
5755 else
5756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5757 $as_echo "no" >&6; }
5758 fi
5759 
5760 
5761           if test "x$CMP" = x; then
5762             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5763           fi
5764         else
5765           # Otherwise we believe it is a complete path. Use it as it is.
5766           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5767 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5768           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5769 $as_echo_n "checking for CMP... " >&6; }
5770           if test ! -x "$tool_specified"; then
5771             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5772 $as_echo "not found" >&6; }
5773             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5774           fi
5775           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5776 $as_echo "$tool_specified" >&6; }
5777         fi
5778       fi
5779     fi
5780 
5781   fi
5782 
5783 
5784 
5785   if test "x$CMP" = x; then
5786     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5787   fi
5788 
5789 
5790 
5791 
5792 
5793   # Publish this variable in the help.
5794 
5795 
5796   if [ -z "${COMM+x}" ]; then
5797     # The variable is not set by user, try to locate tool using the code snippet
5798     for ac_prog in comm
5799 do
5800   # Extract the first word of "$ac_prog", so it can be a program name with args.
5801 set dummy $ac_prog; ac_word=$2
5802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5803 $as_echo_n "checking for $ac_word... " >&6; }
5804 if ${ac_cv_path_COMM+:} false; then :
5805   $as_echo_n "(cached) " >&6
5806 else
5807   case $COMM in
5808   [\\/]* | ?:[\\/]*)
5809   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5810   ;;
5811   *)
5812   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5813 for as_dir in $PATH
5814 do
5815   IFS=$as_save_IFS
5816   test -z "$as_dir" && as_dir=.
5817     for ac_exec_ext in '' $ac_executable_extensions; do
5818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5819     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5821     break 2
5822   fi
5823 done
5824   done
5825 IFS=$as_save_IFS
5826 
5827   ;;
5828 esac
5829 fi
5830 COMM=$ac_cv_path_COMM
5831 if test -n "$COMM"; then
5832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5833 $as_echo "$COMM" >&6; }
5834 else
5835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5836 $as_echo "no" >&6; }
5837 fi
5838 
5839 
5840   test -n "$COMM" && break
5841 done
5842 
5843   else
5844     # The variable is set, but is it from the command line or the environment?
5845 
5846     # Try to remove the string !COMM! from our list.
5847     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5848     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5849       # If it failed, the variable was not from the command line. Ignore it,
5850       # but warn the user (except for BASH, which is always set by the calling BASH).
5851       if test "xCOMM" != xBASH; then
5852         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5853 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5854       fi
5855       # Try to locate tool using the code snippet
5856       for ac_prog in comm
5857 do
5858   # Extract the first word of "$ac_prog", so it can be a program name with args.
5859 set dummy $ac_prog; ac_word=$2
5860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5861 $as_echo_n "checking for $ac_word... " >&6; }
5862 if ${ac_cv_path_COMM+:} false; then :
5863   $as_echo_n "(cached) " >&6
5864 else
5865   case $COMM in
5866   [\\/]* | ?:[\\/]*)
5867   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5868   ;;
5869   *)
5870   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5871 for as_dir in $PATH
5872 do
5873   IFS=$as_save_IFS
5874   test -z "$as_dir" && as_dir=.
5875     for ac_exec_ext in '' $ac_executable_extensions; do
5876   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5877     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5878     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5879     break 2
5880   fi
5881 done
5882   done
5883 IFS=$as_save_IFS
5884 
5885   ;;
5886 esac
5887 fi
5888 COMM=$ac_cv_path_COMM
5889 if test -n "$COMM"; then
5890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5891 $as_echo "$COMM" >&6; }
5892 else
5893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5894 $as_echo "no" >&6; }
5895 fi
5896 
5897 
5898   test -n "$COMM" && break
5899 done
5900 
5901     else
5902       # If it succeeded, then it was overridden by the user. We will use it
5903       # for the tool.
5904 
5905       # First remove it from the list of overridden variables, so we can test
5906       # for unknown variables in the end.
5907       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5908 
5909       # Check if we try to supply an empty value
5910       if test "x$COMM" = x; then
5911         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5912 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5913         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5914 $as_echo_n "checking for COMM... " >&6; }
5915         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5916 $as_echo "disabled" >&6; }
5917       else
5918         # Check if the provided tool contains a complete path.
5919         tool_specified="$COMM"
5920         tool_basename="${tool_specified##*/}"
5921         if test "x$tool_basename" = "x$tool_specified"; then
5922           # A command without a complete path is provided, search $PATH.
5923           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5924 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5925           # Extract the first word of "$tool_basename", so it can be a program name with args.
5926 set dummy $tool_basename; ac_word=$2
5927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5928 $as_echo_n "checking for $ac_word... " >&6; }
5929 if ${ac_cv_path_COMM+:} false; then :
5930   $as_echo_n "(cached) " >&6
5931 else
5932   case $COMM in
5933   [\\/]* | ?:[\\/]*)
5934   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5935   ;;
5936   *)
5937   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5938 for as_dir in $PATH
5939 do
5940   IFS=$as_save_IFS
5941   test -z "$as_dir" && as_dir=.
5942     for ac_exec_ext in '' $ac_executable_extensions; do
5943   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5944     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5945     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5946     break 2
5947   fi
5948 done
5949   done
5950 IFS=$as_save_IFS
5951 
5952   ;;
5953 esac
5954 fi
5955 COMM=$ac_cv_path_COMM
5956 if test -n "$COMM"; then
5957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5958 $as_echo "$COMM" >&6; }
5959 else
5960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5961 $as_echo "no" >&6; }
5962 fi
5963 
5964 
5965           if test "x$COMM" = x; then
5966             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5967           fi
5968         else
5969           # Otherwise we believe it is a complete path. Use it as it is.
5970           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5971 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5972           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5973 $as_echo_n "checking for COMM... " >&6; }
5974           if test ! -x "$tool_specified"; then
5975             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5976 $as_echo "not found" >&6; }
5977             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5978           fi
5979           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5980 $as_echo "$tool_specified" >&6; }
5981         fi
5982       fi
5983     fi
5984 
5985   fi
5986 
5987 
5988 
5989   if test "x$COMM" = x; then
5990     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5991   fi
5992 
5993 
5994 
5995 
5996 
5997   # Publish this variable in the help.
5998 
5999 
6000   if [ -z "${CP+x}" ]; then
6001     # The variable is not set by user, try to locate tool using the code snippet
6002     for ac_prog in cp
6003 do
6004   # Extract the first word of "$ac_prog", so it can be a program name with args.
6005 set dummy $ac_prog; ac_word=$2
6006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6007 $as_echo_n "checking for $ac_word... " >&6; }
6008 if ${ac_cv_path_CP+:} false; then :
6009   $as_echo_n "(cached) " >&6
6010 else
6011   case $CP in
6012   [\\/]* | ?:[\\/]*)
6013   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6014   ;;
6015   *)
6016   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6017 for as_dir in $PATH
6018 do
6019   IFS=$as_save_IFS
6020   test -z "$as_dir" && as_dir=.
6021     for ac_exec_ext in '' $ac_executable_extensions; do
6022   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6023     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6024     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6025     break 2
6026   fi
6027 done
6028   done
6029 IFS=$as_save_IFS
6030 
6031   ;;
6032 esac
6033 fi
6034 CP=$ac_cv_path_CP
6035 if test -n "$CP"; then
6036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6037 $as_echo "$CP" >&6; }
6038 else
6039   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6040 $as_echo "no" >&6; }
6041 fi
6042 
6043 
6044   test -n "$CP" && break
6045 done
6046 
6047   else
6048     # The variable is set, but is it from the command line or the environment?
6049 
6050     # Try to remove the string !CP! from our list.
6051     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6052     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6053       # If it failed, the variable was not from the command line. Ignore it,
6054       # but warn the user (except for BASH, which is always set by the calling BASH).
6055       if test "xCP" != xBASH; then
6056         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6057 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6058       fi
6059       # Try to locate tool using the code snippet
6060       for ac_prog in cp
6061 do
6062   # Extract the first word of "$ac_prog", so it can be a program name with args.
6063 set dummy $ac_prog; ac_word=$2
6064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6065 $as_echo_n "checking for $ac_word... " >&6; }
6066 if ${ac_cv_path_CP+:} false; then :
6067   $as_echo_n "(cached) " >&6
6068 else
6069   case $CP in
6070   [\\/]* | ?:[\\/]*)
6071   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6072   ;;
6073   *)
6074   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6075 for as_dir in $PATH
6076 do
6077   IFS=$as_save_IFS
6078   test -z "$as_dir" && as_dir=.
6079     for ac_exec_ext in '' $ac_executable_extensions; do
6080   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6081     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6082     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6083     break 2
6084   fi
6085 done
6086   done
6087 IFS=$as_save_IFS
6088 
6089   ;;
6090 esac
6091 fi
6092 CP=$ac_cv_path_CP
6093 if test -n "$CP"; then
6094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6095 $as_echo "$CP" >&6; }
6096 else
6097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6098 $as_echo "no" >&6; }
6099 fi
6100 
6101 
6102   test -n "$CP" && break
6103 done
6104 
6105     else
6106       # If it succeeded, then it was overridden by the user. We will use it
6107       # for the tool.
6108 
6109       # First remove it from the list of overridden variables, so we can test
6110       # for unknown variables in the end.
6111       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6112 
6113       # Check if we try to supply an empty value
6114       if test "x$CP" = x; then
6115         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6116 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6117         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6118 $as_echo_n "checking for CP... " >&6; }
6119         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6120 $as_echo "disabled" >&6; }
6121       else
6122         # Check if the provided tool contains a complete path.
6123         tool_specified="$CP"
6124         tool_basename="${tool_specified##*/}"
6125         if test "x$tool_basename" = "x$tool_specified"; then
6126           # A command without a complete path is provided, search $PATH.
6127           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6128 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6129           # Extract the first word of "$tool_basename", so it can be a program name with args.
6130 set dummy $tool_basename; ac_word=$2
6131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6132 $as_echo_n "checking for $ac_word... " >&6; }
6133 if ${ac_cv_path_CP+:} false; then :
6134   $as_echo_n "(cached) " >&6
6135 else
6136   case $CP in
6137   [\\/]* | ?:[\\/]*)
6138   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6139   ;;
6140   *)
6141   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6142 for as_dir in $PATH
6143 do
6144   IFS=$as_save_IFS
6145   test -z "$as_dir" && as_dir=.
6146     for ac_exec_ext in '' $ac_executable_extensions; do
6147   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6148     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6150     break 2
6151   fi
6152 done
6153   done
6154 IFS=$as_save_IFS
6155 
6156   ;;
6157 esac
6158 fi
6159 CP=$ac_cv_path_CP
6160 if test -n "$CP"; then
6161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6162 $as_echo "$CP" >&6; }
6163 else
6164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6165 $as_echo "no" >&6; }
6166 fi
6167 
6168 
6169           if test "x$CP" = x; then
6170             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6171           fi
6172         else
6173           # Otherwise we believe it is a complete path. Use it as it is.
6174           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6175 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6176           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6177 $as_echo_n "checking for CP... " >&6; }
6178           if test ! -x "$tool_specified"; then
6179             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6180 $as_echo "not found" >&6; }
6181             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6182           fi
6183           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6184 $as_echo "$tool_specified" >&6; }
6185         fi
6186       fi
6187     fi
6188 
6189   fi
6190 
6191 
6192 
6193   if test "x$CP" = x; then
6194     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6195   fi
6196 
6197 
6198 
6199 
6200 
6201   # Publish this variable in the help.
6202 
6203 
6204   if [ -z "${CUT+x}" ]; then
6205     # The variable is not set by user, try to locate tool using the code snippet
6206     for ac_prog in cut
6207 do
6208   # Extract the first word of "$ac_prog", so it can be a program name with args.
6209 set dummy $ac_prog; ac_word=$2
6210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6211 $as_echo_n "checking for $ac_word... " >&6; }
6212 if ${ac_cv_path_CUT+:} false; then :
6213   $as_echo_n "(cached) " >&6
6214 else
6215   case $CUT in
6216   [\\/]* | ?:[\\/]*)
6217   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6218   ;;
6219   *)
6220   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6221 for as_dir in $PATH
6222 do
6223   IFS=$as_save_IFS
6224   test -z "$as_dir" && as_dir=.
6225     for ac_exec_ext in '' $ac_executable_extensions; do
6226   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6227     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6228     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6229     break 2
6230   fi
6231 done
6232   done
6233 IFS=$as_save_IFS
6234 
6235   ;;
6236 esac
6237 fi
6238 CUT=$ac_cv_path_CUT
6239 if test -n "$CUT"; then
6240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6241 $as_echo "$CUT" >&6; }
6242 else
6243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6244 $as_echo "no" >&6; }
6245 fi
6246 
6247 
6248   test -n "$CUT" && break
6249 done
6250 
6251   else
6252     # The variable is set, but is it from the command line or the environment?
6253 
6254     # Try to remove the string !CUT! from our list.
6255     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6256     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6257       # If it failed, the variable was not from the command line. Ignore it,
6258       # but warn the user (except for BASH, which is always set by the calling BASH).
6259       if test "xCUT" != xBASH; then
6260         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6261 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6262       fi
6263       # Try to locate tool using the code snippet
6264       for ac_prog in cut
6265 do
6266   # Extract the first word of "$ac_prog", so it can be a program name with args.
6267 set dummy $ac_prog; ac_word=$2
6268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6269 $as_echo_n "checking for $ac_word... " >&6; }
6270 if ${ac_cv_path_CUT+:} false; then :
6271   $as_echo_n "(cached) " >&6
6272 else
6273   case $CUT in
6274   [\\/]* | ?:[\\/]*)
6275   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6276   ;;
6277   *)
6278   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6279 for as_dir in $PATH
6280 do
6281   IFS=$as_save_IFS
6282   test -z "$as_dir" && as_dir=.
6283     for ac_exec_ext in '' $ac_executable_extensions; do
6284   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6285     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6286     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6287     break 2
6288   fi
6289 done
6290   done
6291 IFS=$as_save_IFS
6292 
6293   ;;
6294 esac
6295 fi
6296 CUT=$ac_cv_path_CUT
6297 if test -n "$CUT"; then
6298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6299 $as_echo "$CUT" >&6; }
6300 else
6301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6302 $as_echo "no" >&6; }
6303 fi
6304 
6305 
6306   test -n "$CUT" && break
6307 done
6308 
6309     else
6310       # If it succeeded, then it was overridden by the user. We will use it
6311       # for the tool.
6312 
6313       # First remove it from the list of overridden variables, so we can test
6314       # for unknown variables in the end.
6315       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6316 
6317       # Check if we try to supply an empty value
6318       if test "x$CUT" = x; then
6319         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6320 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6321         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6322 $as_echo_n "checking for CUT... " >&6; }
6323         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6324 $as_echo "disabled" >&6; }
6325       else
6326         # Check if the provided tool contains a complete path.
6327         tool_specified="$CUT"
6328         tool_basename="${tool_specified##*/}"
6329         if test "x$tool_basename" = "x$tool_specified"; then
6330           # A command without a complete path is provided, search $PATH.
6331           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6332 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6333           # Extract the first word of "$tool_basename", so it can be a program name with args.
6334 set dummy $tool_basename; ac_word=$2
6335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6336 $as_echo_n "checking for $ac_word... " >&6; }
6337 if ${ac_cv_path_CUT+:} false; then :
6338   $as_echo_n "(cached) " >&6
6339 else
6340   case $CUT in
6341   [\\/]* | ?:[\\/]*)
6342   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6343   ;;
6344   *)
6345   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6346 for as_dir in $PATH
6347 do
6348   IFS=$as_save_IFS
6349   test -z "$as_dir" && as_dir=.
6350     for ac_exec_ext in '' $ac_executable_extensions; do
6351   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6352     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6353     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6354     break 2
6355   fi
6356 done
6357   done
6358 IFS=$as_save_IFS
6359 
6360   ;;
6361 esac
6362 fi
6363 CUT=$ac_cv_path_CUT
6364 if test -n "$CUT"; then
6365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6366 $as_echo "$CUT" >&6; }
6367 else
6368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6369 $as_echo "no" >&6; }
6370 fi
6371 
6372 
6373           if test "x$CUT" = x; then
6374             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6375           fi
6376         else
6377           # Otherwise we believe it is a complete path. Use it as it is.
6378           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6379 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6380           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6381 $as_echo_n "checking for CUT... " >&6; }
6382           if test ! -x "$tool_specified"; then
6383             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6384 $as_echo "not found" >&6; }
6385             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6386           fi
6387           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6388 $as_echo "$tool_specified" >&6; }
6389         fi
6390       fi
6391     fi
6392 
6393   fi
6394 
6395 
6396 
6397   if test "x$CUT" = x; then
6398     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6399   fi
6400 
6401 
6402 
6403 
6404 
6405   # Publish this variable in the help.
6406 
6407 
6408   if [ -z "${DATE+x}" ]; then
6409     # The variable is not set by user, try to locate tool using the code snippet
6410     for ac_prog in date
6411 do
6412   # Extract the first word of "$ac_prog", so it can be a program name with args.
6413 set dummy $ac_prog; ac_word=$2
6414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6415 $as_echo_n "checking for $ac_word... " >&6; }
6416 if ${ac_cv_path_DATE+:} false; then :
6417   $as_echo_n "(cached) " >&6
6418 else
6419   case $DATE in
6420   [\\/]* | ?:[\\/]*)
6421   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6422   ;;
6423   *)
6424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6425 for as_dir in $PATH
6426 do
6427   IFS=$as_save_IFS
6428   test -z "$as_dir" && as_dir=.
6429     for ac_exec_ext in '' $ac_executable_extensions; do
6430   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6431     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6433     break 2
6434   fi
6435 done
6436   done
6437 IFS=$as_save_IFS
6438 
6439   ;;
6440 esac
6441 fi
6442 DATE=$ac_cv_path_DATE
6443 if test -n "$DATE"; then
6444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6445 $as_echo "$DATE" >&6; }
6446 else
6447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6448 $as_echo "no" >&6; }
6449 fi
6450 
6451 
6452   test -n "$DATE" && break
6453 done
6454 
6455   else
6456     # The variable is set, but is it from the command line or the environment?
6457 
6458     # Try to remove the string !DATE! from our list.
6459     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6460     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6461       # If it failed, the variable was not from the command line. Ignore it,
6462       # but warn the user (except for BASH, which is always set by the calling BASH).
6463       if test "xDATE" != xBASH; then
6464         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6465 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6466       fi
6467       # Try to locate tool using the code snippet
6468       for ac_prog in date
6469 do
6470   # Extract the first word of "$ac_prog", so it can be a program name with args.
6471 set dummy $ac_prog; ac_word=$2
6472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6473 $as_echo_n "checking for $ac_word... " >&6; }
6474 if ${ac_cv_path_DATE+:} false; then :
6475   $as_echo_n "(cached) " >&6
6476 else
6477   case $DATE in
6478   [\\/]* | ?:[\\/]*)
6479   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6480   ;;
6481   *)
6482   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6483 for as_dir in $PATH
6484 do
6485   IFS=$as_save_IFS
6486   test -z "$as_dir" && as_dir=.
6487     for ac_exec_ext in '' $ac_executable_extensions; do
6488   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6489     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6490     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6491     break 2
6492   fi
6493 done
6494   done
6495 IFS=$as_save_IFS
6496 
6497   ;;
6498 esac
6499 fi
6500 DATE=$ac_cv_path_DATE
6501 if test -n "$DATE"; then
6502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6503 $as_echo "$DATE" >&6; }
6504 else
6505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6506 $as_echo "no" >&6; }
6507 fi
6508 
6509 
6510   test -n "$DATE" && break
6511 done
6512 
6513     else
6514       # If it succeeded, then it was overridden by the user. We will use it
6515       # for the tool.
6516 
6517       # First remove it from the list of overridden variables, so we can test
6518       # for unknown variables in the end.
6519       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6520 
6521       # Check if we try to supply an empty value
6522       if test "x$DATE" = x; then
6523         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6524 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6525         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6526 $as_echo_n "checking for DATE... " >&6; }
6527         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6528 $as_echo "disabled" >&6; }
6529       else
6530         # Check if the provided tool contains a complete path.
6531         tool_specified="$DATE"
6532         tool_basename="${tool_specified##*/}"
6533         if test "x$tool_basename" = "x$tool_specified"; then
6534           # A command without a complete path is provided, search $PATH.
6535           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6536 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6537           # Extract the first word of "$tool_basename", so it can be a program name with args.
6538 set dummy $tool_basename; ac_word=$2
6539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6540 $as_echo_n "checking for $ac_word... " >&6; }
6541 if ${ac_cv_path_DATE+:} false; then :
6542   $as_echo_n "(cached) " >&6
6543 else
6544   case $DATE in
6545   [\\/]* | ?:[\\/]*)
6546   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6547   ;;
6548   *)
6549   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6550 for as_dir in $PATH
6551 do
6552   IFS=$as_save_IFS
6553   test -z "$as_dir" && as_dir=.
6554     for ac_exec_ext in '' $ac_executable_extensions; do
6555   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6556     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6557     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6558     break 2
6559   fi
6560 done
6561   done
6562 IFS=$as_save_IFS
6563 
6564   ;;
6565 esac
6566 fi
6567 DATE=$ac_cv_path_DATE
6568 if test -n "$DATE"; then
6569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6570 $as_echo "$DATE" >&6; }
6571 else
6572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6573 $as_echo "no" >&6; }
6574 fi
6575 
6576 
6577           if test "x$DATE" = x; then
6578             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6579           fi
6580         else
6581           # Otherwise we believe it is a complete path. Use it as it is.
6582           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6583 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6584           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6585 $as_echo_n "checking for DATE... " >&6; }
6586           if test ! -x "$tool_specified"; then
6587             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6588 $as_echo "not found" >&6; }
6589             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6590           fi
6591           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6592 $as_echo "$tool_specified" >&6; }
6593         fi
6594       fi
6595     fi
6596 
6597   fi
6598 
6599 
6600 
6601   if test "x$DATE" = x; then
6602     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6603   fi
6604 
6605 
6606 
6607 
6608 
6609   # Publish this variable in the help.
6610 
6611 
6612   if [ -z "${DIFF+x}" ]; then
6613     # The variable is not set by user, try to locate tool using the code snippet
6614     for ac_prog in gdiff diff
6615 do
6616   # Extract the first word of "$ac_prog", so it can be a program name with args.
6617 set dummy $ac_prog; ac_word=$2
6618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6619 $as_echo_n "checking for $ac_word... " >&6; }
6620 if ${ac_cv_path_DIFF+:} false; then :
6621   $as_echo_n "(cached) " >&6
6622 else
6623   case $DIFF in
6624   [\\/]* | ?:[\\/]*)
6625   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6626   ;;
6627   *)
6628   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6629 for as_dir in $PATH
6630 do
6631   IFS=$as_save_IFS
6632   test -z "$as_dir" && as_dir=.
6633     for ac_exec_ext in '' $ac_executable_extensions; do
6634   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6635     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6636     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6637     break 2
6638   fi
6639 done
6640   done
6641 IFS=$as_save_IFS
6642 
6643   ;;
6644 esac
6645 fi
6646 DIFF=$ac_cv_path_DIFF
6647 if test -n "$DIFF"; then
6648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6649 $as_echo "$DIFF" >&6; }
6650 else
6651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6652 $as_echo "no" >&6; }
6653 fi
6654 
6655 
6656   test -n "$DIFF" && break
6657 done
6658 
6659   else
6660     # The variable is set, but is it from the command line or the environment?
6661 
6662     # Try to remove the string !DIFF! from our list.
6663     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6664     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6665       # If it failed, the variable was not from the command line. Ignore it,
6666       # but warn the user (except for BASH, which is always set by the calling BASH).
6667       if test "xDIFF" != xBASH; then
6668         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6669 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6670       fi
6671       # Try to locate tool using the code snippet
6672       for ac_prog in gdiff diff
6673 do
6674   # Extract the first word of "$ac_prog", so it can be a program name with args.
6675 set dummy $ac_prog; ac_word=$2
6676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6677 $as_echo_n "checking for $ac_word... " >&6; }
6678 if ${ac_cv_path_DIFF+:} false; then :
6679   $as_echo_n "(cached) " >&6
6680 else
6681   case $DIFF in
6682   [\\/]* | ?:[\\/]*)
6683   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6684   ;;
6685   *)
6686   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6687 for as_dir in $PATH
6688 do
6689   IFS=$as_save_IFS
6690   test -z "$as_dir" && as_dir=.
6691     for ac_exec_ext in '' $ac_executable_extensions; do
6692   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6693     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6694     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6695     break 2
6696   fi
6697 done
6698   done
6699 IFS=$as_save_IFS
6700 
6701   ;;
6702 esac
6703 fi
6704 DIFF=$ac_cv_path_DIFF
6705 if test -n "$DIFF"; then
6706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6707 $as_echo "$DIFF" >&6; }
6708 else
6709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6710 $as_echo "no" >&6; }
6711 fi
6712 
6713 
6714   test -n "$DIFF" && break
6715 done
6716 
6717     else
6718       # If it succeeded, then it was overridden by the user. We will use it
6719       # for the tool.
6720 
6721       # First remove it from the list of overridden variables, so we can test
6722       # for unknown variables in the end.
6723       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6724 
6725       # Check if we try to supply an empty value
6726       if test "x$DIFF" = x; then
6727         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6728 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6729         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6730 $as_echo_n "checking for DIFF... " >&6; }
6731         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6732 $as_echo "disabled" >&6; }
6733       else
6734         # Check if the provided tool contains a complete path.
6735         tool_specified="$DIFF"
6736         tool_basename="${tool_specified##*/}"
6737         if test "x$tool_basename" = "x$tool_specified"; then
6738           # A command without a complete path is provided, search $PATH.
6739           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6740 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6741           # Extract the first word of "$tool_basename", so it can be a program name with args.
6742 set dummy $tool_basename; ac_word=$2
6743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6744 $as_echo_n "checking for $ac_word... " >&6; }
6745 if ${ac_cv_path_DIFF+:} false; then :
6746   $as_echo_n "(cached) " >&6
6747 else
6748   case $DIFF in
6749   [\\/]* | ?:[\\/]*)
6750   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6751   ;;
6752   *)
6753   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6754 for as_dir in $PATH
6755 do
6756   IFS=$as_save_IFS
6757   test -z "$as_dir" && as_dir=.
6758     for ac_exec_ext in '' $ac_executable_extensions; do
6759   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6760     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6761     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6762     break 2
6763   fi
6764 done
6765   done
6766 IFS=$as_save_IFS
6767 
6768   ;;
6769 esac
6770 fi
6771 DIFF=$ac_cv_path_DIFF
6772 if test -n "$DIFF"; then
6773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6774 $as_echo "$DIFF" >&6; }
6775 else
6776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6777 $as_echo "no" >&6; }
6778 fi
6779 
6780 
6781           if test "x$DIFF" = x; then
6782             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6783           fi
6784         else
6785           # Otherwise we believe it is a complete path. Use it as it is.
6786           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6787 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6788           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6789 $as_echo_n "checking for DIFF... " >&6; }
6790           if test ! -x "$tool_specified"; then
6791             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6792 $as_echo "not found" >&6; }
6793             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6794           fi
6795           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6796 $as_echo "$tool_specified" >&6; }
6797         fi
6798       fi
6799     fi
6800 
6801   fi
6802 
6803 
6804 
6805   if test "x$DIFF" = x; then
6806     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6807   fi
6808 
6809 
6810 
6811 
6812 
6813   # Publish this variable in the help.
6814 
6815 
6816   if [ -z "${DIRNAME+x}" ]; then
6817     # The variable is not set by user, try to locate tool using the code snippet
6818     for ac_prog in dirname
6819 do
6820   # Extract the first word of "$ac_prog", so it can be a program name with args.
6821 set dummy $ac_prog; ac_word=$2
6822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6823 $as_echo_n "checking for $ac_word... " >&6; }
6824 if ${ac_cv_path_DIRNAME+:} false; then :
6825   $as_echo_n "(cached) " >&6
6826 else
6827   case $DIRNAME in
6828   [\\/]* | ?:[\\/]*)
6829   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6830   ;;
6831   *)
6832   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6833 for as_dir in $PATH
6834 do
6835   IFS=$as_save_IFS
6836   test -z "$as_dir" && as_dir=.
6837     for ac_exec_ext in '' $ac_executable_extensions; do
6838   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6839     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6840     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6841     break 2
6842   fi
6843 done
6844   done
6845 IFS=$as_save_IFS
6846 
6847   ;;
6848 esac
6849 fi
6850 DIRNAME=$ac_cv_path_DIRNAME
6851 if test -n "$DIRNAME"; then
6852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6853 $as_echo "$DIRNAME" >&6; }
6854 else
6855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6856 $as_echo "no" >&6; }
6857 fi
6858 
6859 
6860   test -n "$DIRNAME" && break
6861 done
6862 
6863   else
6864     # The variable is set, but is it from the command line or the environment?
6865 
6866     # Try to remove the string !DIRNAME! from our list.
6867     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6868     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6869       # If it failed, the variable was not from the command line. Ignore it,
6870       # but warn the user (except for BASH, which is always set by the calling BASH).
6871       if test "xDIRNAME" != xBASH; then
6872         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6873 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6874       fi
6875       # Try to locate tool using the code snippet
6876       for ac_prog in dirname
6877 do
6878   # Extract the first word of "$ac_prog", so it can be a program name with args.
6879 set dummy $ac_prog; ac_word=$2
6880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6881 $as_echo_n "checking for $ac_word... " >&6; }
6882 if ${ac_cv_path_DIRNAME+:} false; then :
6883   $as_echo_n "(cached) " >&6
6884 else
6885   case $DIRNAME in
6886   [\\/]* | ?:[\\/]*)
6887   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6888   ;;
6889   *)
6890   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6891 for as_dir in $PATH
6892 do
6893   IFS=$as_save_IFS
6894   test -z "$as_dir" && as_dir=.
6895     for ac_exec_ext in '' $ac_executable_extensions; do
6896   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6897     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6898     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6899     break 2
6900   fi
6901 done
6902   done
6903 IFS=$as_save_IFS
6904 
6905   ;;
6906 esac
6907 fi
6908 DIRNAME=$ac_cv_path_DIRNAME
6909 if test -n "$DIRNAME"; then
6910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6911 $as_echo "$DIRNAME" >&6; }
6912 else
6913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6914 $as_echo "no" >&6; }
6915 fi
6916 
6917 
6918   test -n "$DIRNAME" && break
6919 done
6920 
6921     else
6922       # If it succeeded, then it was overridden by the user. We will use it
6923       # for the tool.
6924 
6925       # First remove it from the list of overridden variables, so we can test
6926       # for unknown variables in the end.
6927       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6928 
6929       # Check if we try to supply an empty value
6930       if test "x$DIRNAME" = x; then
6931         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
6932 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
6933         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6934 $as_echo_n "checking for DIRNAME... " >&6; }
6935         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6936 $as_echo "disabled" >&6; }
6937       else
6938         # Check if the provided tool contains a complete path.
6939         tool_specified="$DIRNAME"
6940         tool_basename="${tool_specified##*/}"
6941         if test "x$tool_basename" = "x$tool_specified"; then
6942           # A command without a complete path is provided, search $PATH.
6943           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6944 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6945           # Extract the first word of "$tool_basename", so it can be a program name with args.
6946 set dummy $tool_basename; ac_word=$2
6947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6948 $as_echo_n "checking for $ac_word... " >&6; }
6949 if ${ac_cv_path_DIRNAME+:} false; then :
6950   $as_echo_n "(cached) " >&6
6951 else
6952   case $DIRNAME in
6953   [\\/]* | ?:[\\/]*)
6954   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6955   ;;
6956   *)
6957   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6958 for as_dir in $PATH
6959 do
6960   IFS=$as_save_IFS
6961   test -z "$as_dir" && as_dir=.
6962     for ac_exec_ext in '' $ac_executable_extensions; do
6963   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6964     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6965     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6966     break 2
6967   fi
6968 done
6969   done
6970 IFS=$as_save_IFS
6971 
6972   ;;
6973 esac
6974 fi
6975 DIRNAME=$ac_cv_path_DIRNAME
6976 if test -n "$DIRNAME"; then
6977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6978 $as_echo "$DIRNAME" >&6; }
6979 else
6980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6981 $as_echo "no" >&6; }
6982 fi
6983 
6984 
6985           if test "x$DIRNAME" = x; then
6986             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6987           fi
6988         else
6989           # Otherwise we believe it is a complete path. Use it as it is.
6990           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6991 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6992           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6993 $as_echo_n "checking for DIRNAME... " >&6; }
6994           if test ! -x "$tool_specified"; then
6995             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6996 $as_echo "not found" >&6; }
6997             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6998           fi
6999           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7000 $as_echo "$tool_specified" >&6; }
7001         fi
7002       fi
7003     fi
7004 
7005   fi
7006 
7007 
7008 
7009   if test "x$DIRNAME" = x; then
7010     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7011   fi
7012 
7013 
7014 
7015 
7016 
7017   # Publish this variable in the help.
7018 
7019 
7020   if [ -z "${ECHO+x}" ]; then
7021     # The variable is not set by user, try to locate tool using the code snippet
7022     for ac_prog in echo
7023 do
7024   # Extract the first word of "$ac_prog", so it can be a program name with args.
7025 set dummy $ac_prog; ac_word=$2
7026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7027 $as_echo_n "checking for $ac_word... " >&6; }
7028 if ${ac_cv_path_ECHO+:} false; then :
7029   $as_echo_n "(cached) " >&6
7030 else
7031   case $ECHO in
7032   [\\/]* | ?:[\\/]*)
7033   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7034   ;;
7035   *)
7036   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7037 for as_dir in $PATH
7038 do
7039   IFS=$as_save_IFS
7040   test -z "$as_dir" && as_dir=.
7041     for ac_exec_ext in '' $ac_executable_extensions; do
7042   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7043     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7045     break 2
7046   fi
7047 done
7048   done
7049 IFS=$as_save_IFS
7050 
7051   ;;
7052 esac
7053 fi
7054 ECHO=$ac_cv_path_ECHO
7055 if test -n "$ECHO"; then
7056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7057 $as_echo "$ECHO" >&6; }
7058 else
7059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7060 $as_echo "no" >&6; }
7061 fi
7062 
7063 
7064   test -n "$ECHO" && break
7065 done
7066 
7067   else
7068     # The variable is set, but is it from the command line or the environment?
7069 
7070     # Try to remove the string !ECHO! from our list.
7071     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7072     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7073       # If it failed, the variable was not from the command line. Ignore it,
7074       # but warn the user (except for BASH, which is always set by the calling BASH).
7075       if test "xECHO" != xBASH; then
7076         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7077 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7078       fi
7079       # Try to locate tool using the code snippet
7080       for ac_prog in echo
7081 do
7082   # Extract the first word of "$ac_prog", so it can be a program name with args.
7083 set dummy $ac_prog; ac_word=$2
7084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7085 $as_echo_n "checking for $ac_word... " >&6; }
7086 if ${ac_cv_path_ECHO+:} false; then :
7087   $as_echo_n "(cached) " >&6
7088 else
7089   case $ECHO in
7090   [\\/]* | ?:[\\/]*)
7091   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7092   ;;
7093   *)
7094   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7095 for as_dir in $PATH
7096 do
7097   IFS=$as_save_IFS
7098   test -z "$as_dir" && as_dir=.
7099     for ac_exec_ext in '' $ac_executable_extensions; do
7100   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7101     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7102     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7103     break 2
7104   fi
7105 done
7106   done
7107 IFS=$as_save_IFS
7108 
7109   ;;
7110 esac
7111 fi
7112 ECHO=$ac_cv_path_ECHO
7113 if test -n "$ECHO"; then
7114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7115 $as_echo "$ECHO" >&6; }
7116 else
7117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7118 $as_echo "no" >&6; }
7119 fi
7120 
7121 
7122   test -n "$ECHO" && break
7123 done
7124 
7125     else
7126       # If it succeeded, then it was overridden by the user. We will use it
7127       # for the tool.
7128 
7129       # First remove it from the list of overridden variables, so we can test
7130       # for unknown variables in the end.
7131       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7132 
7133       # Check if we try to supply an empty value
7134       if test "x$ECHO" = x; then
7135         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7136 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7137         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7138 $as_echo_n "checking for ECHO... " >&6; }
7139         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7140 $as_echo "disabled" >&6; }
7141       else
7142         # Check if the provided tool contains a complete path.
7143         tool_specified="$ECHO"
7144         tool_basename="${tool_specified##*/}"
7145         if test "x$tool_basename" = "x$tool_specified"; then
7146           # A command without a complete path is provided, search $PATH.
7147           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7148 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7149           # Extract the first word of "$tool_basename", so it can be a program name with args.
7150 set dummy $tool_basename; ac_word=$2
7151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7152 $as_echo_n "checking for $ac_word... " >&6; }
7153 if ${ac_cv_path_ECHO+:} false; then :
7154   $as_echo_n "(cached) " >&6
7155 else
7156   case $ECHO in
7157   [\\/]* | ?:[\\/]*)
7158   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7159   ;;
7160   *)
7161   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7162 for as_dir in $PATH
7163 do
7164   IFS=$as_save_IFS
7165   test -z "$as_dir" && as_dir=.
7166     for ac_exec_ext in '' $ac_executable_extensions; do
7167   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7168     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7169     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7170     break 2
7171   fi
7172 done
7173   done
7174 IFS=$as_save_IFS
7175 
7176   ;;
7177 esac
7178 fi
7179 ECHO=$ac_cv_path_ECHO
7180 if test -n "$ECHO"; then
7181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7182 $as_echo "$ECHO" >&6; }
7183 else
7184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7185 $as_echo "no" >&6; }
7186 fi
7187 
7188 
7189           if test "x$ECHO" = x; then
7190             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7191           fi
7192         else
7193           # Otherwise we believe it is a complete path. Use it as it is.
7194           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7195 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7196           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7197 $as_echo_n "checking for ECHO... " >&6; }
7198           if test ! -x "$tool_specified"; then
7199             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7200 $as_echo "not found" >&6; }
7201             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7202           fi
7203           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7204 $as_echo "$tool_specified" >&6; }
7205         fi
7206       fi
7207     fi
7208 
7209   fi
7210 
7211 
7212 
7213   if test "x$ECHO" = x; then
7214     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7215   fi
7216 
7217 
7218 
7219 
7220 
7221   # Publish this variable in the help.
7222 
7223 
7224   if [ -z "${EXPR+x}" ]; then
7225     # The variable is not set by user, try to locate tool using the code snippet
7226     for ac_prog in expr
7227 do
7228   # Extract the first word of "$ac_prog", so it can be a program name with args.
7229 set dummy $ac_prog; ac_word=$2
7230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7231 $as_echo_n "checking for $ac_word... " >&6; }
7232 if ${ac_cv_path_EXPR+:} false; then :
7233   $as_echo_n "(cached) " >&6
7234 else
7235   case $EXPR in
7236   [\\/]* | ?:[\\/]*)
7237   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7238   ;;
7239   *)
7240   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7241 for as_dir in $PATH
7242 do
7243   IFS=$as_save_IFS
7244   test -z "$as_dir" && as_dir=.
7245     for ac_exec_ext in '' $ac_executable_extensions; do
7246   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7247     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7248     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7249     break 2
7250   fi
7251 done
7252   done
7253 IFS=$as_save_IFS
7254 
7255   ;;
7256 esac
7257 fi
7258 EXPR=$ac_cv_path_EXPR
7259 if test -n "$EXPR"; then
7260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7261 $as_echo "$EXPR" >&6; }
7262 else
7263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7264 $as_echo "no" >&6; }
7265 fi
7266 
7267 
7268   test -n "$EXPR" && break
7269 done
7270 
7271   else
7272     # The variable is set, but is it from the command line or the environment?
7273 
7274     # Try to remove the string !EXPR! from our list.
7275     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7276     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7277       # If it failed, the variable was not from the command line. Ignore it,
7278       # but warn the user (except for BASH, which is always set by the calling BASH).
7279       if test "xEXPR" != xBASH; then
7280         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7281 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7282       fi
7283       # Try to locate tool using the code snippet
7284       for ac_prog in expr
7285 do
7286   # Extract the first word of "$ac_prog", so it can be a program name with args.
7287 set dummy $ac_prog; ac_word=$2
7288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7289 $as_echo_n "checking for $ac_word... " >&6; }
7290 if ${ac_cv_path_EXPR+:} false; then :
7291   $as_echo_n "(cached) " >&6
7292 else
7293   case $EXPR in
7294   [\\/]* | ?:[\\/]*)
7295   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7296   ;;
7297   *)
7298   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7299 for as_dir in $PATH
7300 do
7301   IFS=$as_save_IFS
7302   test -z "$as_dir" && as_dir=.
7303     for ac_exec_ext in '' $ac_executable_extensions; do
7304   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7305     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7306     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7307     break 2
7308   fi
7309 done
7310   done
7311 IFS=$as_save_IFS
7312 
7313   ;;
7314 esac
7315 fi
7316 EXPR=$ac_cv_path_EXPR
7317 if test -n "$EXPR"; then
7318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7319 $as_echo "$EXPR" >&6; }
7320 else
7321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7322 $as_echo "no" >&6; }
7323 fi
7324 
7325 
7326   test -n "$EXPR" && break
7327 done
7328 
7329     else
7330       # If it succeeded, then it was overridden by the user. We will use it
7331       # for the tool.
7332 
7333       # First remove it from the list of overridden variables, so we can test
7334       # for unknown variables in the end.
7335       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7336 
7337       # Check if we try to supply an empty value
7338       if test "x$EXPR" = x; then
7339         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7340 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7341         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7342 $as_echo_n "checking for EXPR... " >&6; }
7343         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7344 $as_echo "disabled" >&6; }
7345       else
7346         # Check if the provided tool contains a complete path.
7347         tool_specified="$EXPR"
7348         tool_basename="${tool_specified##*/}"
7349         if test "x$tool_basename" = "x$tool_specified"; then
7350           # A command without a complete path is provided, search $PATH.
7351           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7352 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7353           # Extract the first word of "$tool_basename", so it can be a program name with args.
7354 set dummy $tool_basename; ac_word=$2
7355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7356 $as_echo_n "checking for $ac_word... " >&6; }
7357 if ${ac_cv_path_EXPR+:} false; then :
7358   $as_echo_n "(cached) " >&6
7359 else
7360   case $EXPR in
7361   [\\/]* | ?:[\\/]*)
7362   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7363   ;;
7364   *)
7365   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7366 for as_dir in $PATH
7367 do
7368   IFS=$as_save_IFS
7369   test -z "$as_dir" && as_dir=.
7370     for ac_exec_ext in '' $ac_executable_extensions; do
7371   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7372     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7374     break 2
7375   fi
7376 done
7377   done
7378 IFS=$as_save_IFS
7379 
7380   ;;
7381 esac
7382 fi
7383 EXPR=$ac_cv_path_EXPR
7384 if test -n "$EXPR"; then
7385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7386 $as_echo "$EXPR" >&6; }
7387 else
7388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7389 $as_echo "no" >&6; }
7390 fi
7391 
7392 
7393           if test "x$EXPR" = x; then
7394             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7395           fi
7396         else
7397           # Otherwise we believe it is a complete path. Use it as it is.
7398           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7399 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7400           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7401 $as_echo_n "checking for EXPR... " >&6; }
7402           if test ! -x "$tool_specified"; then
7403             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7404 $as_echo "not found" >&6; }
7405             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7406           fi
7407           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7408 $as_echo "$tool_specified" >&6; }
7409         fi
7410       fi
7411     fi
7412 
7413   fi
7414 
7415 
7416 
7417   if test "x$EXPR" = x; then
7418     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7419   fi
7420 
7421 
7422 
7423 
7424 
7425   # Publish this variable in the help.
7426 
7427 
7428   if [ -z "${FILE+x}" ]; then
7429     # The variable is not set by user, try to locate tool using the code snippet
7430     for ac_prog in file
7431 do
7432   # Extract the first word of "$ac_prog", so it can be a program name with args.
7433 set dummy $ac_prog; ac_word=$2
7434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7435 $as_echo_n "checking for $ac_word... " >&6; }
7436 if ${ac_cv_path_FILE+:} false; then :
7437   $as_echo_n "(cached) " >&6
7438 else
7439   case $FILE in
7440   [\\/]* | ?:[\\/]*)
7441   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7442   ;;
7443   *)
7444   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7445 for as_dir in $PATH
7446 do
7447   IFS=$as_save_IFS
7448   test -z "$as_dir" && as_dir=.
7449     for ac_exec_ext in '' $ac_executable_extensions; do
7450   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7451     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7452     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7453     break 2
7454   fi
7455 done
7456   done
7457 IFS=$as_save_IFS
7458 
7459   ;;
7460 esac
7461 fi
7462 FILE=$ac_cv_path_FILE
7463 if test -n "$FILE"; then
7464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7465 $as_echo "$FILE" >&6; }
7466 else
7467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7468 $as_echo "no" >&6; }
7469 fi
7470 
7471 
7472   test -n "$FILE" && break
7473 done
7474 
7475   else
7476     # The variable is set, but is it from the command line or the environment?
7477 
7478     # Try to remove the string !FILE! from our list.
7479     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7480     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7481       # If it failed, the variable was not from the command line. Ignore it,
7482       # but warn the user (except for BASH, which is always set by the calling BASH).
7483       if test "xFILE" != xBASH; then
7484         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7485 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7486       fi
7487       # Try to locate tool using the code snippet
7488       for ac_prog in file
7489 do
7490   # Extract the first word of "$ac_prog", so it can be a program name with args.
7491 set dummy $ac_prog; ac_word=$2
7492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7493 $as_echo_n "checking for $ac_word... " >&6; }
7494 if ${ac_cv_path_FILE+:} false; then :
7495   $as_echo_n "(cached) " >&6
7496 else
7497   case $FILE in
7498   [\\/]* | ?:[\\/]*)
7499   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7500   ;;
7501   *)
7502   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7503 for as_dir in $PATH
7504 do
7505   IFS=$as_save_IFS
7506   test -z "$as_dir" && as_dir=.
7507     for ac_exec_ext in '' $ac_executable_extensions; do
7508   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7509     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7510     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7511     break 2
7512   fi
7513 done
7514   done
7515 IFS=$as_save_IFS
7516 
7517   ;;
7518 esac
7519 fi
7520 FILE=$ac_cv_path_FILE
7521 if test -n "$FILE"; then
7522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7523 $as_echo "$FILE" >&6; }
7524 else
7525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7526 $as_echo "no" >&6; }
7527 fi
7528 
7529 
7530   test -n "$FILE" && break
7531 done
7532 
7533     else
7534       # If it succeeded, then it was overridden by the user. We will use it
7535       # for the tool.
7536 
7537       # First remove it from the list of overridden variables, so we can test
7538       # for unknown variables in the end.
7539       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7540 
7541       # Check if we try to supply an empty value
7542       if test "x$FILE" = x; then
7543         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7544 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7545         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7546 $as_echo_n "checking for FILE... " >&6; }
7547         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7548 $as_echo "disabled" >&6; }
7549       else
7550         # Check if the provided tool contains a complete path.
7551         tool_specified="$FILE"
7552         tool_basename="${tool_specified##*/}"
7553         if test "x$tool_basename" = "x$tool_specified"; then
7554           # A command without a complete path is provided, search $PATH.
7555           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7556 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7557           # Extract the first word of "$tool_basename", so it can be a program name with args.
7558 set dummy $tool_basename; ac_word=$2
7559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7560 $as_echo_n "checking for $ac_word... " >&6; }
7561 if ${ac_cv_path_FILE+:} false; then :
7562   $as_echo_n "(cached) " >&6
7563 else
7564   case $FILE in
7565   [\\/]* | ?:[\\/]*)
7566   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7567   ;;
7568   *)
7569   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7570 for as_dir in $PATH
7571 do
7572   IFS=$as_save_IFS
7573   test -z "$as_dir" && as_dir=.
7574     for ac_exec_ext in '' $ac_executable_extensions; do
7575   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7576     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7577     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7578     break 2
7579   fi
7580 done
7581   done
7582 IFS=$as_save_IFS
7583 
7584   ;;
7585 esac
7586 fi
7587 FILE=$ac_cv_path_FILE
7588 if test -n "$FILE"; then
7589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7590 $as_echo "$FILE" >&6; }
7591 else
7592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7593 $as_echo "no" >&6; }
7594 fi
7595 
7596 
7597           if test "x$FILE" = x; then
7598             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7599           fi
7600         else
7601           # Otherwise we believe it is a complete path. Use it as it is.
7602           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7603 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7604           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7605 $as_echo_n "checking for FILE... " >&6; }
7606           if test ! -x "$tool_specified"; then
7607             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7608 $as_echo "not found" >&6; }
7609             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7610           fi
7611           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7612 $as_echo "$tool_specified" >&6; }
7613         fi
7614       fi
7615     fi
7616 
7617   fi
7618 
7619 
7620 
7621   if test "x$FILE" = x; then
7622     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7623   fi
7624 
7625 
7626 
7627 
7628 
7629   # Publish this variable in the help.
7630 
7631 
7632   if [ -z "${FIND+x}" ]; then
7633     # The variable is not set by user, try to locate tool using the code snippet
7634     for ac_prog in find
7635 do
7636   # Extract the first word of "$ac_prog", so it can be a program name with args.
7637 set dummy $ac_prog; ac_word=$2
7638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7639 $as_echo_n "checking for $ac_word... " >&6; }
7640 if ${ac_cv_path_FIND+:} false; then :
7641   $as_echo_n "(cached) " >&6
7642 else
7643   case $FIND in
7644   [\\/]* | ?:[\\/]*)
7645   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7646   ;;
7647   *)
7648   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7649 for as_dir in $PATH
7650 do
7651   IFS=$as_save_IFS
7652   test -z "$as_dir" && as_dir=.
7653     for ac_exec_ext in '' $ac_executable_extensions; do
7654   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7655     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7656     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7657     break 2
7658   fi
7659 done
7660   done
7661 IFS=$as_save_IFS
7662 
7663   ;;
7664 esac
7665 fi
7666 FIND=$ac_cv_path_FIND
7667 if test -n "$FIND"; then
7668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7669 $as_echo "$FIND" >&6; }
7670 else
7671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7672 $as_echo "no" >&6; }
7673 fi
7674 
7675 
7676   test -n "$FIND" && break
7677 done
7678 
7679   else
7680     # The variable is set, but is it from the command line or the environment?
7681 
7682     # Try to remove the string !FIND! from our list.
7683     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7684     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7685       # If it failed, the variable was not from the command line. Ignore it,
7686       # but warn the user (except for BASH, which is always set by the calling BASH).
7687       if test "xFIND" != xBASH; then
7688         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7689 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7690       fi
7691       # Try to locate tool using the code snippet
7692       for ac_prog in find
7693 do
7694   # Extract the first word of "$ac_prog", so it can be a program name with args.
7695 set dummy $ac_prog; ac_word=$2
7696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7697 $as_echo_n "checking for $ac_word... " >&6; }
7698 if ${ac_cv_path_FIND+:} false; then :
7699   $as_echo_n "(cached) " >&6
7700 else
7701   case $FIND in
7702   [\\/]* | ?:[\\/]*)
7703   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7704   ;;
7705   *)
7706   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7707 for as_dir in $PATH
7708 do
7709   IFS=$as_save_IFS
7710   test -z "$as_dir" && as_dir=.
7711     for ac_exec_ext in '' $ac_executable_extensions; do
7712   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7713     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7714     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7715     break 2
7716   fi
7717 done
7718   done
7719 IFS=$as_save_IFS
7720 
7721   ;;
7722 esac
7723 fi
7724 FIND=$ac_cv_path_FIND
7725 if test -n "$FIND"; then
7726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7727 $as_echo "$FIND" >&6; }
7728 else
7729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7730 $as_echo "no" >&6; }
7731 fi
7732 
7733 
7734   test -n "$FIND" && break
7735 done
7736 
7737     else
7738       # If it succeeded, then it was overridden by the user. We will use it
7739       # for the tool.
7740 
7741       # First remove it from the list of overridden variables, so we can test
7742       # for unknown variables in the end.
7743       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7744 
7745       # Check if we try to supply an empty value
7746       if test "x$FIND" = x; then
7747         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7748 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7749         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7750 $as_echo_n "checking for FIND... " >&6; }
7751         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7752 $as_echo "disabled" >&6; }
7753       else
7754         # Check if the provided tool contains a complete path.
7755         tool_specified="$FIND"
7756         tool_basename="${tool_specified##*/}"
7757         if test "x$tool_basename" = "x$tool_specified"; then
7758           # A command without a complete path is provided, search $PATH.
7759           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7760 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7761           # Extract the first word of "$tool_basename", so it can be a program name with args.
7762 set dummy $tool_basename; ac_word=$2
7763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7764 $as_echo_n "checking for $ac_word... " >&6; }
7765 if ${ac_cv_path_FIND+:} false; then :
7766   $as_echo_n "(cached) " >&6
7767 else
7768   case $FIND in
7769   [\\/]* | ?:[\\/]*)
7770   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7771   ;;
7772   *)
7773   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7774 for as_dir in $PATH
7775 do
7776   IFS=$as_save_IFS
7777   test -z "$as_dir" && as_dir=.
7778     for ac_exec_ext in '' $ac_executable_extensions; do
7779   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7780     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7781     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7782     break 2
7783   fi
7784 done
7785   done
7786 IFS=$as_save_IFS
7787 
7788   ;;
7789 esac
7790 fi
7791 FIND=$ac_cv_path_FIND
7792 if test -n "$FIND"; then
7793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7794 $as_echo "$FIND" >&6; }
7795 else
7796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7797 $as_echo "no" >&6; }
7798 fi
7799 
7800 
7801           if test "x$FIND" = x; then
7802             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7803           fi
7804         else
7805           # Otherwise we believe it is a complete path. Use it as it is.
7806           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7807 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7808           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7809 $as_echo_n "checking for FIND... " >&6; }
7810           if test ! -x "$tool_specified"; then
7811             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7812 $as_echo "not found" >&6; }
7813             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7814           fi
7815           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7816 $as_echo "$tool_specified" >&6; }
7817         fi
7818       fi
7819     fi
7820 
7821   fi
7822 
7823 
7824 
7825   if test "x$FIND" = x; then
7826     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7827   fi
7828 
7829 
7830 
7831 
7832 
7833   # Publish this variable in the help.
7834 
7835 
7836   if [ -z "${HEAD+x}" ]; then
7837     # The variable is not set by user, try to locate tool using the code snippet
7838     for ac_prog in head
7839 do
7840   # Extract the first word of "$ac_prog", so it can be a program name with args.
7841 set dummy $ac_prog; ac_word=$2
7842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7843 $as_echo_n "checking for $ac_word... " >&6; }
7844 if ${ac_cv_path_HEAD+:} false; then :
7845   $as_echo_n "(cached) " >&6
7846 else
7847   case $HEAD in
7848   [\\/]* | ?:[\\/]*)
7849   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7850   ;;
7851   *)
7852   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7853 for as_dir in $PATH
7854 do
7855   IFS=$as_save_IFS
7856   test -z "$as_dir" && as_dir=.
7857     for ac_exec_ext in '' $ac_executable_extensions; do
7858   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7859     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7860     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7861     break 2
7862   fi
7863 done
7864   done
7865 IFS=$as_save_IFS
7866 
7867   ;;
7868 esac
7869 fi
7870 HEAD=$ac_cv_path_HEAD
7871 if test -n "$HEAD"; then
7872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7873 $as_echo "$HEAD" >&6; }
7874 else
7875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7876 $as_echo "no" >&6; }
7877 fi
7878 
7879 
7880   test -n "$HEAD" && break
7881 done
7882 
7883   else
7884     # The variable is set, but is it from the command line or the environment?
7885 
7886     # Try to remove the string !HEAD! from our list.
7887     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7888     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7889       # If it failed, the variable was not from the command line. Ignore it,
7890       # but warn the user (except for BASH, which is always set by the calling BASH).
7891       if test "xHEAD" != xBASH; then
7892         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7893 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7894       fi
7895       # Try to locate tool using the code snippet
7896       for ac_prog in head
7897 do
7898   # Extract the first word of "$ac_prog", so it can be a program name with args.
7899 set dummy $ac_prog; ac_word=$2
7900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7901 $as_echo_n "checking for $ac_word... " >&6; }
7902 if ${ac_cv_path_HEAD+:} false; then :
7903   $as_echo_n "(cached) " >&6
7904 else
7905   case $HEAD in
7906   [\\/]* | ?:[\\/]*)
7907   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7908   ;;
7909   *)
7910   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7911 for as_dir in $PATH
7912 do
7913   IFS=$as_save_IFS
7914   test -z "$as_dir" && as_dir=.
7915     for ac_exec_ext in '' $ac_executable_extensions; do
7916   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7917     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7918     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7919     break 2
7920   fi
7921 done
7922   done
7923 IFS=$as_save_IFS
7924 
7925   ;;
7926 esac
7927 fi
7928 HEAD=$ac_cv_path_HEAD
7929 if test -n "$HEAD"; then
7930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7931 $as_echo "$HEAD" >&6; }
7932 else
7933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7934 $as_echo "no" >&6; }
7935 fi
7936 
7937 
7938   test -n "$HEAD" && break
7939 done
7940 
7941     else
7942       # If it succeeded, then it was overridden by the user. We will use it
7943       # for the tool.
7944 
7945       # First remove it from the list of overridden variables, so we can test
7946       # for unknown variables in the end.
7947       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7948 
7949       # Check if we try to supply an empty value
7950       if test "x$HEAD" = x; then
7951         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
7952 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
7953         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7954 $as_echo_n "checking for HEAD... " >&6; }
7955         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7956 $as_echo "disabled" >&6; }
7957       else
7958         # Check if the provided tool contains a complete path.
7959         tool_specified="$HEAD"
7960         tool_basename="${tool_specified##*/}"
7961         if test "x$tool_basename" = "x$tool_specified"; then
7962           # A command without a complete path is provided, search $PATH.
7963           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7964 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7965           # Extract the first word of "$tool_basename", so it can be a program name with args.
7966 set dummy $tool_basename; ac_word=$2
7967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7968 $as_echo_n "checking for $ac_word... " >&6; }
7969 if ${ac_cv_path_HEAD+:} false; then :
7970   $as_echo_n "(cached) " >&6
7971 else
7972   case $HEAD in
7973   [\\/]* | ?:[\\/]*)
7974   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7975   ;;
7976   *)
7977   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7978 for as_dir in $PATH
7979 do
7980   IFS=$as_save_IFS
7981   test -z "$as_dir" && as_dir=.
7982     for ac_exec_ext in '' $ac_executable_extensions; do
7983   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7984     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7985     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7986     break 2
7987   fi
7988 done
7989   done
7990 IFS=$as_save_IFS
7991 
7992   ;;
7993 esac
7994 fi
7995 HEAD=$ac_cv_path_HEAD
7996 if test -n "$HEAD"; then
7997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7998 $as_echo "$HEAD" >&6; }
7999 else
8000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8001 $as_echo "no" >&6; }
8002 fi
8003 
8004 
8005           if test "x$HEAD" = x; then
8006             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8007           fi
8008         else
8009           # Otherwise we believe it is a complete path. Use it as it is.
8010           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8011 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8012           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8013 $as_echo_n "checking for HEAD... " >&6; }
8014           if test ! -x "$tool_specified"; then
8015             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8016 $as_echo "not found" >&6; }
8017             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8018           fi
8019           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8020 $as_echo "$tool_specified" >&6; }
8021         fi
8022       fi
8023     fi
8024 
8025   fi
8026 
8027 
8028 
8029   if test "x$HEAD" = x; then
8030     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8031   fi
8032 
8033 
8034 
8035 
8036 
8037   # Publish this variable in the help.
8038 
8039 
8040   if [ -z "${LN+x}" ]; then
8041     # The variable is not set by user, try to locate tool using the code snippet
8042     for ac_prog in ln
8043 do
8044   # Extract the first word of "$ac_prog", so it can be a program name with args.
8045 set dummy $ac_prog; ac_word=$2
8046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8047 $as_echo_n "checking for $ac_word... " >&6; }
8048 if ${ac_cv_path_LN+:} false; then :
8049   $as_echo_n "(cached) " >&6
8050 else
8051   case $LN in
8052   [\\/]* | ?:[\\/]*)
8053   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8054   ;;
8055   *)
8056   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8057 for as_dir in $PATH
8058 do
8059   IFS=$as_save_IFS
8060   test -z "$as_dir" && as_dir=.
8061     for ac_exec_ext in '' $ac_executable_extensions; do
8062   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8063     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8064     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8065     break 2
8066   fi
8067 done
8068   done
8069 IFS=$as_save_IFS
8070 
8071   ;;
8072 esac
8073 fi
8074 LN=$ac_cv_path_LN
8075 if test -n "$LN"; then
8076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8077 $as_echo "$LN" >&6; }
8078 else
8079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8080 $as_echo "no" >&6; }
8081 fi
8082 
8083 
8084   test -n "$LN" && break
8085 done
8086 
8087   else
8088     # The variable is set, but is it from the command line or the environment?
8089 
8090     # Try to remove the string !LN! from our list.
8091     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8092     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8093       # If it failed, the variable was not from the command line. Ignore it,
8094       # but warn the user (except for BASH, which is always set by the calling BASH).
8095       if test "xLN" != xBASH; then
8096         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8097 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8098       fi
8099       # Try to locate tool using the code snippet
8100       for ac_prog in ln
8101 do
8102   # Extract the first word of "$ac_prog", so it can be a program name with args.
8103 set dummy $ac_prog; ac_word=$2
8104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8105 $as_echo_n "checking for $ac_word... " >&6; }
8106 if ${ac_cv_path_LN+:} false; then :
8107   $as_echo_n "(cached) " >&6
8108 else
8109   case $LN in
8110   [\\/]* | ?:[\\/]*)
8111   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8112   ;;
8113   *)
8114   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8115 for as_dir in $PATH
8116 do
8117   IFS=$as_save_IFS
8118   test -z "$as_dir" && as_dir=.
8119     for ac_exec_ext in '' $ac_executable_extensions; do
8120   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8121     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8122     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8123     break 2
8124   fi
8125 done
8126   done
8127 IFS=$as_save_IFS
8128 
8129   ;;
8130 esac
8131 fi
8132 LN=$ac_cv_path_LN
8133 if test -n "$LN"; then
8134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8135 $as_echo "$LN" >&6; }
8136 else
8137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8138 $as_echo "no" >&6; }
8139 fi
8140 
8141 
8142   test -n "$LN" && break
8143 done
8144 
8145     else
8146       # If it succeeded, then it was overridden by the user. We will use it
8147       # for the tool.
8148 
8149       # First remove it from the list of overridden variables, so we can test
8150       # for unknown variables in the end.
8151       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8152 
8153       # Check if we try to supply an empty value
8154       if test "x$LN" = x; then
8155         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8156 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8157         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8158 $as_echo_n "checking for LN... " >&6; }
8159         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8160 $as_echo "disabled" >&6; }
8161       else
8162         # Check if the provided tool contains a complete path.
8163         tool_specified="$LN"
8164         tool_basename="${tool_specified##*/}"
8165         if test "x$tool_basename" = "x$tool_specified"; then
8166           # A command without a complete path is provided, search $PATH.
8167           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8168 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8169           # Extract the first word of "$tool_basename", so it can be a program name with args.
8170 set dummy $tool_basename; ac_word=$2
8171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8172 $as_echo_n "checking for $ac_word... " >&6; }
8173 if ${ac_cv_path_LN+:} false; then :
8174   $as_echo_n "(cached) " >&6
8175 else
8176   case $LN in
8177   [\\/]* | ?:[\\/]*)
8178   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8179   ;;
8180   *)
8181   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8182 for as_dir in $PATH
8183 do
8184   IFS=$as_save_IFS
8185   test -z "$as_dir" && as_dir=.
8186     for ac_exec_ext in '' $ac_executable_extensions; do
8187   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8188     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8189     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8190     break 2
8191   fi
8192 done
8193   done
8194 IFS=$as_save_IFS
8195 
8196   ;;
8197 esac
8198 fi
8199 LN=$ac_cv_path_LN
8200 if test -n "$LN"; then
8201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8202 $as_echo "$LN" >&6; }
8203 else
8204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8205 $as_echo "no" >&6; }
8206 fi
8207 
8208 
8209           if test "x$LN" = x; then
8210             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8211           fi
8212         else
8213           # Otherwise we believe it is a complete path. Use it as it is.
8214           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8215 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8216           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8217 $as_echo_n "checking for LN... " >&6; }
8218           if test ! -x "$tool_specified"; then
8219             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8220 $as_echo "not found" >&6; }
8221             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8222           fi
8223           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8224 $as_echo "$tool_specified" >&6; }
8225         fi
8226       fi
8227     fi
8228 
8229   fi
8230 
8231 
8232 
8233   if test "x$LN" = x; then
8234     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8235   fi
8236 
8237 
8238 
8239 
8240 
8241   # Publish this variable in the help.
8242 
8243 
8244   if [ -z "${LS+x}" ]; then
8245     # The variable is not set by user, try to locate tool using the code snippet
8246     for ac_prog in ls
8247 do
8248   # Extract the first word of "$ac_prog", so it can be a program name with args.
8249 set dummy $ac_prog; ac_word=$2
8250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8251 $as_echo_n "checking for $ac_word... " >&6; }
8252 if ${ac_cv_path_LS+:} false; then :
8253   $as_echo_n "(cached) " >&6
8254 else
8255   case $LS in
8256   [\\/]* | ?:[\\/]*)
8257   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8258   ;;
8259   *)
8260   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8261 for as_dir in $PATH
8262 do
8263   IFS=$as_save_IFS
8264   test -z "$as_dir" && as_dir=.
8265     for ac_exec_ext in '' $ac_executable_extensions; do
8266   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8267     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8268     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8269     break 2
8270   fi
8271 done
8272   done
8273 IFS=$as_save_IFS
8274 
8275   ;;
8276 esac
8277 fi
8278 LS=$ac_cv_path_LS
8279 if test -n "$LS"; then
8280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8281 $as_echo "$LS" >&6; }
8282 else
8283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8284 $as_echo "no" >&6; }
8285 fi
8286 
8287 
8288   test -n "$LS" && break
8289 done
8290 
8291   else
8292     # The variable is set, but is it from the command line or the environment?
8293 
8294     # Try to remove the string !LS! from our list.
8295     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8296     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8297       # If it failed, the variable was not from the command line. Ignore it,
8298       # but warn the user (except for BASH, which is always set by the calling BASH).
8299       if test "xLS" != xBASH; then
8300         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8301 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8302       fi
8303       # Try to locate tool using the code snippet
8304       for ac_prog in ls
8305 do
8306   # Extract the first word of "$ac_prog", so it can be a program name with args.
8307 set dummy $ac_prog; ac_word=$2
8308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8309 $as_echo_n "checking for $ac_word... " >&6; }
8310 if ${ac_cv_path_LS+:} false; then :
8311   $as_echo_n "(cached) " >&6
8312 else
8313   case $LS in
8314   [\\/]* | ?:[\\/]*)
8315   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8316   ;;
8317   *)
8318   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8319 for as_dir in $PATH
8320 do
8321   IFS=$as_save_IFS
8322   test -z "$as_dir" && as_dir=.
8323     for ac_exec_ext in '' $ac_executable_extensions; do
8324   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8325     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8326     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8327     break 2
8328   fi
8329 done
8330   done
8331 IFS=$as_save_IFS
8332 
8333   ;;
8334 esac
8335 fi
8336 LS=$ac_cv_path_LS
8337 if test -n "$LS"; then
8338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8339 $as_echo "$LS" >&6; }
8340 else
8341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8342 $as_echo "no" >&6; }
8343 fi
8344 
8345 
8346   test -n "$LS" && break
8347 done
8348 
8349     else
8350       # If it succeeded, then it was overridden by the user. We will use it
8351       # for the tool.
8352 
8353       # First remove it from the list of overridden variables, so we can test
8354       # for unknown variables in the end.
8355       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8356 
8357       # Check if we try to supply an empty value
8358       if test "x$LS" = x; then
8359         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8360 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8361         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8362 $as_echo_n "checking for LS... " >&6; }
8363         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8364 $as_echo "disabled" >&6; }
8365       else
8366         # Check if the provided tool contains a complete path.
8367         tool_specified="$LS"
8368         tool_basename="${tool_specified##*/}"
8369         if test "x$tool_basename" = "x$tool_specified"; then
8370           # A command without a complete path is provided, search $PATH.
8371           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8372 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8373           # Extract the first word of "$tool_basename", so it can be a program name with args.
8374 set dummy $tool_basename; ac_word=$2
8375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8376 $as_echo_n "checking for $ac_word... " >&6; }
8377 if ${ac_cv_path_LS+:} false; then :
8378   $as_echo_n "(cached) " >&6
8379 else
8380   case $LS in
8381   [\\/]* | ?:[\\/]*)
8382   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8383   ;;
8384   *)
8385   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8386 for as_dir in $PATH
8387 do
8388   IFS=$as_save_IFS
8389   test -z "$as_dir" && as_dir=.
8390     for ac_exec_ext in '' $ac_executable_extensions; do
8391   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8392     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8393     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8394     break 2
8395   fi
8396 done
8397   done
8398 IFS=$as_save_IFS
8399 
8400   ;;
8401 esac
8402 fi
8403 LS=$ac_cv_path_LS
8404 if test -n "$LS"; then
8405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8406 $as_echo "$LS" >&6; }
8407 else
8408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8409 $as_echo "no" >&6; }
8410 fi
8411 
8412 
8413           if test "x$LS" = x; then
8414             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8415           fi
8416         else
8417           # Otherwise we believe it is a complete path. Use it as it is.
8418           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8419 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8420           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8421 $as_echo_n "checking for LS... " >&6; }
8422           if test ! -x "$tool_specified"; then
8423             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8424 $as_echo "not found" >&6; }
8425             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8426           fi
8427           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8428 $as_echo "$tool_specified" >&6; }
8429         fi
8430       fi
8431     fi
8432 
8433   fi
8434 
8435 
8436 
8437   if test "x$LS" = x; then
8438     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8439   fi
8440 
8441 
8442 
8443 
8444 
8445   # Publish this variable in the help.
8446 
8447 
8448   if [ -z "${MKDIR+x}" ]; then
8449     # The variable is not set by user, try to locate tool using the code snippet
8450     for ac_prog in mkdir
8451 do
8452   # Extract the first word of "$ac_prog", so it can be a program name with args.
8453 set dummy $ac_prog; ac_word=$2
8454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8455 $as_echo_n "checking for $ac_word... " >&6; }
8456 if ${ac_cv_path_MKDIR+:} false; then :
8457   $as_echo_n "(cached) " >&6
8458 else
8459   case $MKDIR in
8460   [\\/]* | ?:[\\/]*)
8461   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8462   ;;
8463   *)
8464   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8465 for as_dir in $PATH
8466 do
8467   IFS=$as_save_IFS
8468   test -z "$as_dir" && as_dir=.
8469     for ac_exec_ext in '' $ac_executable_extensions; do
8470   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8471     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8472     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8473     break 2
8474   fi
8475 done
8476   done
8477 IFS=$as_save_IFS
8478 
8479   ;;
8480 esac
8481 fi
8482 MKDIR=$ac_cv_path_MKDIR
8483 if test -n "$MKDIR"; then
8484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8485 $as_echo "$MKDIR" >&6; }
8486 else
8487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8488 $as_echo "no" >&6; }
8489 fi
8490 
8491 
8492   test -n "$MKDIR" && break
8493 done
8494 
8495   else
8496     # The variable is set, but is it from the command line or the environment?
8497 
8498     # Try to remove the string !MKDIR! from our list.
8499     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8500     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8501       # If it failed, the variable was not from the command line. Ignore it,
8502       # but warn the user (except for BASH, which is always set by the calling BASH).
8503       if test "xMKDIR" != xBASH; then
8504         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8505 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8506       fi
8507       # Try to locate tool using the code snippet
8508       for ac_prog in mkdir
8509 do
8510   # Extract the first word of "$ac_prog", so it can be a program name with args.
8511 set dummy $ac_prog; ac_word=$2
8512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8513 $as_echo_n "checking for $ac_word... " >&6; }
8514 if ${ac_cv_path_MKDIR+:} false; then :
8515   $as_echo_n "(cached) " >&6
8516 else
8517   case $MKDIR in
8518   [\\/]* | ?:[\\/]*)
8519   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8520   ;;
8521   *)
8522   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8523 for as_dir in $PATH
8524 do
8525   IFS=$as_save_IFS
8526   test -z "$as_dir" && as_dir=.
8527     for ac_exec_ext in '' $ac_executable_extensions; do
8528   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8529     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8530     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8531     break 2
8532   fi
8533 done
8534   done
8535 IFS=$as_save_IFS
8536 
8537   ;;
8538 esac
8539 fi
8540 MKDIR=$ac_cv_path_MKDIR
8541 if test -n "$MKDIR"; then
8542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8543 $as_echo "$MKDIR" >&6; }
8544 else
8545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8546 $as_echo "no" >&6; }
8547 fi
8548 
8549 
8550   test -n "$MKDIR" && break
8551 done
8552 
8553     else
8554       # If it succeeded, then it was overridden by the user. We will use it
8555       # for the tool.
8556 
8557       # First remove it from the list of overridden variables, so we can test
8558       # for unknown variables in the end.
8559       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8560 
8561       # Check if we try to supply an empty value
8562       if test "x$MKDIR" = x; then
8563         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8564 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8565         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8566 $as_echo_n "checking for MKDIR... " >&6; }
8567         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8568 $as_echo "disabled" >&6; }
8569       else
8570         # Check if the provided tool contains a complete path.
8571         tool_specified="$MKDIR"
8572         tool_basename="${tool_specified##*/}"
8573         if test "x$tool_basename" = "x$tool_specified"; then
8574           # A command without a complete path is provided, search $PATH.
8575           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8576 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8577           # Extract the first word of "$tool_basename", so it can be a program name with args.
8578 set dummy $tool_basename; ac_word=$2
8579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8580 $as_echo_n "checking for $ac_word... " >&6; }
8581 if ${ac_cv_path_MKDIR+:} false; then :
8582   $as_echo_n "(cached) " >&6
8583 else
8584   case $MKDIR in
8585   [\\/]* | ?:[\\/]*)
8586   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8587   ;;
8588   *)
8589   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8590 for as_dir in $PATH
8591 do
8592   IFS=$as_save_IFS
8593   test -z "$as_dir" && as_dir=.
8594     for ac_exec_ext in '' $ac_executable_extensions; do
8595   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8596     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8597     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8598     break 2
8599   fi
8600 done
8601   done
8602 IFS=$as_save_IFS
8603 
8604   ;;
8605 esac
8606 fi
8607 MKDIR=$ac_cv_path_MKDIR
8608 if test -n "$MKDIR"; then
8609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8610 $as_echo "$MKDIR" >&6; }
8611 else
8612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8613 $as_echo "no" >&6; }
8614 fi
8615 
8616 
8617           if test "x$MKDIR" = x; then
8618             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8619           fi
8620         else
8621           # Otherwise we believe it is a complete path. Use it as it is.
8622           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8623 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8624           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8625 $as_echo_n "checking for MKDIR... " >&6; }
8626           if test ! -x "$tool_specified"; then
8627             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8628 $as_echo "not found" >&6; }
8629             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8630           fi
8631           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8632 $as_echo "$tool_specified" >&6; }
8633         fi
8634       fi
8635     fi
8636 
8637   fi
8638 
8639 
8640 
8641   if test "x$MKDIR" = x; then
8642     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8643   fi
8644 
8645 
8646 
8647 
8648 
8649   # Publish this variable in the help.
8650 
8651 
8652   if [ -z "${MKTEMP+x}" ]; then
8653     # The variable is not set by user, try to locate tool using the code snippet
8654     for ac_prog in mktemp
8655 do
8656   # Extract the first word of "$ac_prog", so it can be a program name with args.
8657 set dummy $ac_prog; ac_word=$2
8658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8659 $as_echo_n "checking for $ac_word... " >&6; }
8660 if ${ac_cv_path_MKTEMP+:} false; then :
8661   $as_echo_n "(cached) " >&6
8662 else
8663   case $MKTEMP in
8664   [\\/]* | ?:[\\/]*)
8665   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8666   ;;
8667   *)
8668   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8669 for as_dir in $PATH
8670 do
8671   IFS=$as_save_IFS
8672   test -z "$as_dir" && as_dir=.
8673     for ac_exec_ext in '' $ac_executable_extensions; do
8674   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8675     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8676     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8677     break 2
8678   fi
8679 done
8680   done
8681 IFS=$as_save_IFS
8682 
8683   ;;
8684 esac
8685 fi
8686 MKTEMP=$ac_cv_path_MKTEMP
8687 if test -n "$MKTEMP"; then
8688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8689 $as_echo "$MKTEMP" >&6; }
8690 else
8691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8692 $as_echo "no" >&6; }
8693 fi
8694 
8695 
8696   test -n "$MKTEMP" && break
8697 done
8698 
8699   else
8700     # The variable is set, but is it from the command line or the environment?
8701 
8702     # Try to remove the string !MKTEMP! from our list.
8703     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8704     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8705       # If it failed, the variable was not from the command line. Ignore it,
8706       # but warn the user (except for BASH, which is always set by the calling BASH).
8707       if test "xMKTEMP" != xBASH; then
8708         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8709 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8710       fi
8711       # Try to locate tool using the code snippet
8712       for ac_prog in mktemp
8713 do
8714   # Extract the first word of "$ac_prog", so it can be a program name with args.
8715 set dummy $ac_prog; ac_word=$2
8716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8717 $as_echo_n "checking for $ac_word... " >&6; }
8718 if ${ac_cv_path_MKTEMP+:} false; then :
8719   $as_echo_n "(cached) " >&6
8720 else
8721   case $MKTEMP in
8722   [\\/]* | ?:[\\/]*)
8723   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8724   ;;
8725   *)
8726   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8727 for as_dir in $PATH
8728 do
8729   IFS=$as_save_IFS
8730   test -z "$as_dir" && as_dir=.
8731     for ac_exec_ext in '' $ac_executable_extensions; do
8732   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8733     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8734     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8735     break 2
8736   fi
8737 done
8738   done
8739 IFS=$as_save_IFS
8740 
8741   ;;
8742 esac
8743 fi
8744 MKTEMP=$ac_cv_path_MKTEMP
8745 if test -n "$MKTEMP"; then
8746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8747 $as_echo "$MKTEMP" >&6; }
8748 else
8749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8750 $as_echo "no" >&6; }
8751 fi
8752 
8753 
8754   test -n "$MKTEMP" && break
8755 done
8756 
8757     else
8758       # If it succeeded, then it was overridden by the user. We will use it
8759       # for the tool.
8760 
8761       # First remove it from the list of overridden variables, so we can test
8762       # for unknown variables in the end.
8763       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8764 
8765       # Check if we try to supply an empty value
8766       if test "x$MKTEMP" = x; then
8767         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8768 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8769         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8770 $as_echo_n "checking for MKTEMP... " >&6; }
8771         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8772 $as_echo "disabled" >&6; }
8773       else
8774         # Check if the provided tool contains a complete path.
8775         tool_specified="$MKTEMP"
8776         tool_basename="${tool_specified##*/}"
8777         if test "x$tool_basename" = "x$tool_specified"; then
8778           # A command without a complete path is provided, search $PATH.
8779           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8780 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8781           # Extract the first word of "$tool_basename", so it can be a program name with args.
8782 set dummy $tool_basename; ac_word=$2
8783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8784 $as_echo_n "checking for $ac_word... " >&6; }
8785 if ${ac_cv_path_MKTEMP+:} false; then :
8786   $as_echo_n "(cached) " >&6
8787 else
8788   case $MKTEMP in
8789   [\\/]* | ?:[\\/]*)
8790   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8791   ;;
8792   *)
8793   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8794 for as_dir in $PATH
8795 do
8796   IFS=$as_save_IFS
8797   test -z "$as_dir" && as_dir=.
8798     for ac_exec_ext in '' $ac_executable_extensions; do
8799   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8800     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8801     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8802     break 2
8803   fi
8804 done
8805   done
8806 IFS=$as_save_IFS
8807 
8808   ;;
8809 esac
8810 fi
8811 MKTEMP=$ac_cv_path_MKTEMP
8812 if test -n "$MKTEMP"; then
8813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8814 $as_echo "$MKTEMP" >&6; }
8815 else
8816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8817 $as_echo "no" >&6; }
8818 fi
8819 
8820 
8821           if test "x$MKTEMP" = x; then
8822             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8823           fi
8824         else
8825           # Otherwise we believe it is a complete path. Use it as it is.
8826           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8827 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8828           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8829 $as_echo_n "checking for MKTEMP... " >&6; }
8830           if test ! -x "$tool_specified"; then
8831             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8832 $as_echo "not found" >&6; }
8833             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8834           fi
8835           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8836 $as_echo "$tool_specified" >&6; }
8837         fi
8838       fi
8839     fi
8840 
8841   fi
8842 
8843 
8844 
8845   if test "x$MKTEMP" = x; then
8846     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8847   fi
8848 
8849 
8850 
8851 
8852 
8853   # Publish this variable in the help.
8854 
8855 
8856   if [ -z "${MV+x}" ]; then
8857     # The variable is not set by user, try to locate tool using the code snippet
8858     for ac_prog in mv
8859 do
8860   # Extract the first word of "$ac_prog", so it can be a program name with args.
8861 set dummy $ac_prog; ac_word=$2
8862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8863 $as_echo_n "checking for $ac_word... " >&6; }
8864 if ${ac_cv_path_MV+:} false; then :
8865   $as_echo_n "(cached) " >&6
8866 else
8867   case $MV in
8868   [\\/]* | ?:[\\/]*)
8869   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8870   ;;
8871   *)
8872   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8873 for as_dir in $PATH
8874 do
8875   IFS=$as_save_IFS
8876   test -z "$as_dir" && as_dir=.
8877     for ac_exec_ext in '' $ac_executable_extensions; do
8878   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8879     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8880     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8881     break 2
8882   fi
8883 done
8884   done
8885 IFS=$as_save_IFS
8886 
8887   ;;
8888 esac
8889 fi
8890 MV=$ac_cv_path_MV
8891 if test -n "$MV"; then
8892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8893 $as_echo "$MV" >&6; }
8894 else
8895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8896 $as_echo "no" >&6; }
8897 fi
8898 
8899 
8900   test -n "$MV" && break
8901 done
8902 
8903   else
8904     # The variable is set, but is it from the command line or the environment?
8905 
8906     # Try to remove the string !MV! from our list.
8907     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8908     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8909       # If it failed, the variable was not from the command line. Ignore it,
8910       # but warn the user (except for BASH, which is always set by the calling BASH).
8911       if test "xMV" != xBASH; then
8912         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8913 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8914       fi
8915       # Try to locate tool using the code snippet
8916       for ac_prog in mv
8917 do
8918   # Extract the first word of "$ac_prog", so it can be a program name with args.
8919 set dummy $ac_prog; ac_word=$2
8920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8921 $as_echo_n "checking for $ac_word... " >&6; }
8922 if ${ac_cv_path_MV+:} false; then :
8923   $as_echo_n "(cached) " >&6
8924 else
8925   case $MV in
8926   [\\/]* | ?:[\\/]*)
8927   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8928   ;;
8929   *)
8930   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8931 for as_dir in $PATH
8932 do
8933   IFS=$as_save_IFS
8934   test -z "$as_dir" && as_dir=.
8935     for ac_exec_ext in '' $ac_executable_extensions; do
8936   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8937     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8938     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8939     break 2
8940   fi
8941 done
8942   done
8943 IFS=$as_save_IFS
8944 
8945   ;;
8946 esac
8947 fi
8948 MV=$ac_cv_path_MV
8949 if test -n "$MV"; then
8950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8951 $as_echo "$MV" >&6; }
8952 else
8953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8954 $as_echo "no" >&6; }
8955 fi
8956 
8957 
8958   test -n "$MV" && break
8959 done
8960 
8961     else
8962       # If it succeeded, then it was overridden by the user. We will use it
8963       # for the tool.
8964 
8965       # First remove it from the list of overridden variables, so we can test
8966       # for unknown variables in the end.
8967       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8968 
8969       # Check if we try to supply an empty value
8970       if test "x$MV" = x; then
8971         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
8972 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
8973         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8974 $as_echo_n "checking for MV... " >&6; }
8975         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8976 $as_echo "disabled" >&6; }
8977       else
8978         # Check if the provided tool contains a complete path.
8979         tool_specified="$MV"
8980         tool_basename="${tool_specified##*/}"
8981         if test "x$tool_basename" = "x$tool_specified"; then
8982           # A command without a complete path is provided, search $PATH.
8983           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8984 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8985           # Extract the first word of "$tool_basename", so it can be a program name with args.
8986 set dummy $tool_basename; ac_word=$2
8987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8988 $as_echo_n "checking for $ac_word... " >&6; }
8989 if ${ac_cv_path_MV+:} false; then :
8990   $as_echo_n "(cached) " >&6
8991 else
8992   case $MV in
8993   [\\/]* | ?:[\\/]*)
8994   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8995   ;;
8996   *)
8997   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8998 for as_dir in $PATH
8999 do
9000   IFS=$as_save_IFS
9001   test -z "$as_dir" && as_dir=.
9002     for ac_exec_ext in '' $ac_executable_extensions; do
9003   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9004     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9005     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9006     break 2
9007   fi
9008 done
9009   done
9010 IFS=$as_save_IFS
9011 
9012   ;;
9013 esac
9014 fi
9015 MV=$ac_cv_path_MV
9016 if test -n "$MV"; then
9017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9018 $as_echo "$MV" >&6; }
9019 else
9020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9021 $as_echo "no" >&6; }
9022 fi
9023 
9024 
9025           if test "x$MV" = x; then
9026             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9027           fi
9028         else
9029           # Otherwise we believe it is a complete path. Use it as it is.
9030           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9031 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9032           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9033 $as_echo_n "checking for MV... " >&6; }
9034           if test ! -x "$tool_specified"; then
9035             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9036 $as_echo "not found" >&6; }
9037             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9038           fi
9039           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9040 $as_echo "$tool_specified" >&6; }
9041         fi
9042       fi
9043     fi
9044 
9045   fi
9046 
9047 
9048 
9049   if test "x$MV" = x; then
9050     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9051   fi
9052 
9053 
9054 
9055 
9056 
9057   # Publish this variable in the help.
9058 
9059 
9060   if [ -z "${NAWK+x}" ]; then
9061     # The variable is not set by user, try to locate tool using the code snippet
9062     for ac_prog in nawk gawk awk
9063 do
9064   # Extract the first word of "$ac_prog", so it can be a program name with args.
9065 set dummy $ac_prog; ac_word=$2
9066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9067 $as_echo_n "checking for $ac_word... " >&6; }
9068 if ${ac_cv_path_NAWK+:} false; then :
9069   $as_echo_n "(cached) " >&6
9070 else
9071   case $NAWK in
9072   [\\/]* | ?:[\\/]*)
9073   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9074   ;;
9075   *)
9076   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9077 for as_dir in $PATH
9078 do
9079   IFS=$as_save_IFS
9080   test -z "$as_dir" && as_dir=.
9081     for ac_exec_ext in '' $ac_executable_extensions; do
9082   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9083     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9085     break 2
9086   fi
9087 done
9088   done
9089 IFS=$as_save_IFS
9090 
9091   ;;
9092 esac
9093 fi
9094 NAWK=$ac_cv_path_NAWK
9095 if test -n "$NAWK"; then
9096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9097 $as_echo "$NAWK" >&6; }
9098 else
9099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9100 $as_echo "no" >&6; }
9101 fi
9102 
9103 
9104   test -n "$NAWK" && break
9105 done
9106 
9107   else
9108     # The variable is set, but is it from the command line or the environment?
9109 
9110     # Try to remove the string !NAWK! from our list.
9111     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9112     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9113       # If it failed, the variable was not from the command line. Ignore it,
9114       # but warn the user (except for BASH, which is always set by the calling BASH).
9115       if test "xNAWK" != xBASH; then
9116         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9117 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9118       fi
9119       # Try to locate tool using the code snippet
9120       for ac_prog in nawk gawk awk
9121 do
9122   # Extract the first word of "$ac_prog", so it can be a program name with args.
9123 set dummy $ac_prog; ac_word=$2
9124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9125 $as_echo_n "checking for $ac_word... " >&6; }
9126 if ${ac_cv_path_NAWK+:} false; then :
9127   $as_echo_n "(cached) " >&6
9128 else
9129   case $NAWK in
9130   [\\/]* | ?:[\\/]*)
9131   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9132   ;;
9133   *)
9134   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9135 for as_dir in $PATH
9136 do
9137   IFS=$as_save_IFS
9138   test -z "$as_dir" && as_dir=.
9139     for ac_exec_ext in '' $ac_executable_extensions; do
9140   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9141     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9142     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9143     break 2
9144   fi
9145 done
9146   done
9147 IFS=$as_save_IFS
9148 
9149   ;;
9150 esac
9151 fi
9152 NAWK=$ac_cv_path_NAWK
9153 if test -n "$NAWK"; then
9154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9155 $as_echo "$NAWK" >&6; }
9156 else
9157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9158 $as_echo "no" >&6; }
9159 fi
9160 
9161 
9162   test -n "$NAWK" && break
9163 done
9164 
9165     else
9166       # If it succeeded, then it was overridden by the user. We will use it
9167       # for the tool.
9168 
9169       # First remove it from the list of overridden variables, so we can test
9170       # for unknown variables in the end.
9171       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9172 
9173       # Check if we try to supply an empty value
9174       if test "x$NAWK" = x; then
9175         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9176 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9177         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9178 $as_echo_n "checking for NAWK... " >&6; }
9179         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9180 $as_echo "disabled" >&6; }
9181       else
9182         # Check if the provided tool contains a complete path.
9183         tool_specified="$NAWK"
9184         tool_basename="${tool_specified##*/}"
9185         if test "x$tool_basename" = "x$tool_specified"; then
9186           # A command without a complete path is provided, search $PATH.
9187           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9188 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9189           # Extract the first word of "$tool_basename", so it can be a program name with args.
9190 set dummy $tool_basename; ac_word=$2
9191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9192 $as_echo_n "checking for $ac_word... " >&6; }
9193 if ${ac_cv_path_NAWK+:} false; then :
9194   $as_echo_n "(cached) " >&6
9195 else
9196   case $NAWK in
9197   [\\/]* | ?:[\\/]*)
9198   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9199   ;;
9200   *)
9201   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9202 for as_dir in $PATH
9203 do
9204   IFS=$as_save_IFS
9205   test -z "$as_dir" && as_dir=.
9206     for ac_exec_ext in '' $ac_executable_extensions; do
9207   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9208     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9209     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9210     break 2
9211   fi
9212 done
9213   done
9214 IFS=$as_save_IFS
9215 
9216   ;;
9217 esac
9218 fi
9219 NAWK=$ac_cv_path_NAWK
9220 if test -n "$NAWK"; then
9221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9222 $as_echo "$NAWK" >&6; }
9223 else
9224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9225 $as_echo "no" >&6; }
9226 fi
9227 
9228 
9229           if test "x$NAWK" = x; then
9230             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9231           fi
9232         else
9233           # Otherwise we believe it is a complete path. Use it as it is.
9234           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9235 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9236           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9237 $as_echo_n "checking for NAWK... " >&6; }
9238           if test ! -x "$tool_specified"; then
9239             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9240 $as_echo "not found" >&6; }
9241             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9242           fi
9243           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9244 $as_echo "$tool_specified" >&6; }
9245         fi
9246       fi
9247     fi
9248 
9249   fi
9250 
9251 
9252 
9253   if test "x$NAWK" = x; then
9254     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9255   fi
9256 
9257 
9258 
9259 
9260 
9261   # Publish this variable in the help.
9262 
9263 
9264   if [ -z "${PRINTF+x}" ]; then
9265     # The variable is not set by user, try to locate tool using the code snippet
9266     for ac_prog in printf
9267 do
9268   # Extract the first word of "$ac_prog", so it can be a program name with args.
9269 set dummy $ac_prog; ac_word=$2
9270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9271 $as_echo_n "checking for $ac_word... " >&6; }
9272 if ${ac_cv_path_PRINTF+:} false; then :
9273   $as_echo_n "(cached) " >&6
9274 else
9275   case $PRINTF in
9276   [\\/]* | ?:[\\/]*)
9277   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9278   ;;
9279   *)
9280   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9281 for as_dir in $PATH
9282 do
9283   IFS=$as_save_IFS
9284   test -z "$as_dir" && as_dir=.
9285     for ac_exec_ext in '' $ac_executable_extensions; do
9286   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9287     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9288     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9289     break 2
9290   fi
9291 done
9292   done
9293 IFS=$as_save_IFS
9294 
9295   ;;
9296 esac
9297 fi
9298 PRINTF=$ac_cv_path_PRINTF
9299 if test -n "$PRINTF"; then
9300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9301 $as_echo "$PRINTF" >&6; }
9302 else
9303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9304 $as_echo "no" >&6; }
9305 fi
9306 
9307 
9308   test -n "$PRINTF" && break
9309 done
9310 
9311   else
9312     # The variable is set, but is it from the command line or the environment?
9313 
9314     # Try to remove the string !PRINTF! from our list.
9315     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9316     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9317       # If it failed, the variable was not from the command line. Ignore it,
9318       # but warn the user (except for BASH, which is always set by the calling BASH).
9319       if test "xPRINTF" != xBASH; then
9320         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9321 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9322       fi
9323       # Try to locate tool using the code snippet
9324       for ac_prog in printf
9325 do
9326   # Extract the first word of "$ac_prog", so it can be a program name with args.
9327 set dummy $ac_prog; ac_word=$2
9328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9329 $as_echo_n "checking for $ac_word... " >&6; }
9330 if ${ac_cv_path_PRINTF+:} false; then :
9331   $as_echo_n "(cached) " >&6
9332 else
9333   case $PRINTF in
9334   [\\/]* | ?:[\\/]*)
9335   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9336   ;;
9337   *)
9338   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9339 for as_dir in $PATH
9340 do
9341   IFS=$as_save_IFS
9342   test -z "$as_dir" && as_dir=.
9343     for ac_exec_ext in '' $ac_executable_extensions; do
9344   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9345     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9346     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9347     break 2
9348   fi
9349 done
9350   done
9351 IFS=$as_save_IFS
9352 
9353   ;;
9354 esac
9355 fi
9356 PRINTF=$ac_cv_path_PRINTF
9357 if test -n "$PRINTF"; then
9358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9359 $as_echo "$PRINTF" >&6; }
9360 else
9361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9362 $as_echo "no" >&6; }
9363 fi
9364 
9365 
9366   test -n "$PRINTF" && break
9367 done
9368 
9369     else
9370       # If it succeeded, then it was overridden by the user. We will use it
9371       # for the tool.
9372 
9373       # First remove it from the list of overridden variables, so we can test
9374       # for unknown variables in the end.
9375       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9376 
9377       # Check if we try to supply an empty value
9378       if test "x$PRINTF" = x; then
9379         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9380 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9381         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9382 $as_echo_n "checking for PRINTF... " >&6; }
9383         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9384 $as_echo "disabled" >&6; }
9385       else
9386         # Check if the provided tool contains a complete path.
9387         tool_specified="$PRINTF"
9388         tool_basename="${tool_specified##*/}"
9389         if test "x$tool_basename" = "x$tool_specified"; then
9390           # A command without a complete path is provided, search $PATH.
9391           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9392 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9393           # Extract the first word of "$tool_basename", so it can be a program name with args.
9394 set dummy $tool_basename; ac_word=$2
9395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9396 $as_echo_n "checking for $ac_word... " >&6; }
9397 if ${ac_cv_path_PRINTF+:} false; then :
9398   $as_echo_n "(cached) " >&6
9399 else
9400   case $PRINTF in
9401   [\\/]* | ?:[\\/]*)
9402   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9403   ;;
9404   *)
9405   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9406 for as_dir in $PATH
9407 do
9408   IFS=$as_save_IFS
9409   test -z "$as_dir" && as_dir=.
9410     for ac_exec_ext in '' $ac_executable_extensions; do
9411   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9412     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9413     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9414     break 2
9415   fi
9416 done
9417   done
9418 IFS=$as_save_IFS
9419 
9420   ;;
9421 esac
9422 fi
9423 PRINTF=$ac_cv_path_PRINTF
9424 if test -n "$PRINTF"; then
9425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9426 $as_echo "$PRINTF" >&6; }
9427 else
9428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9429 $as_echo "no" >&6; }
9430 fi
9431 
9432 
9433           if test "x$PRINTF" = x; then
9434             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9435           fi
9436         else
9437           # Otherwise we believe it is a complete path. Use it as it is.
9438           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9439 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9440           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9441 $as_echo_n "checking for PRINTF... " >&6; }
9442           if test ! -x "$tool_specified"; then
9443             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9444 $as_echo "not found" >&6; }
9445             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9446           fi
9447           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9448 $as_echo "$tool_specified" >&6; }
9449         fi
9450       fi
9451     fi
9452 
9453   fi
9454 
9455 
9456 
9457   if test "x$PRINTF" = x; then
9458     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9459   fi
9460 
9461 
9462 
9463 
9464 
9465   # Publish this variable in the help.
9466 
9467 
9468   if [ -z "${RM+x}" ]; then
9469     # The variable is not set by user, try to locate tool using the code snippet
9470     for ac_prog in rm
9471 do
9472   # Extract the first word of "$ac_prog", so it can be a program name with args.
9473 set dummy $ac_prog; ac_word=$2
9474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9475 $as_echo_n "checking for $ac_word... " >&6; }
9476 if ${ac_cv_path_RM+:} false; then :
9477   $as_echo_n "(cached) " >&6
9478 else
9479   case $RM in
9480   [\\/]* | ?:[\\/]*)
9481   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9482   ;;
9483   *)
9484   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9485 for as_dir in $PATH
9486 do
9487   IFS=$as_save_IFS
9488   test -z "$as_dir" && as_dir=.
9489     for ac_exec_ext in '' $ac_executable_extensions; do
9490   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9491     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9492     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9493     break 2
9494   fi
9495 done
9496   done
9497 IFS=$as_save_IFS
9498 
9499   ;;
9500 esac
9501 fi
9502 RM=$ac_cv_path_RM
9503 if test -n "$RM"; then
9504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9505 $as_echo "$RM" >&6; }
9506 else
9507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9508 $as_echo "no" >&6; }
9509 fi
9510 
9511 
9512   test -n "$RM" && break
9513 done
9514 
9515   else
9516     # The variable is set, but is it from the command line or the environment?
9517 
9518     # Try to remove the string !RM! from our list.
9519     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9520     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9521       # If it failed, the variable was not from the command line. Ignore it,
9522       # but warn the user (except for BASH, which is always set by the calling BASH).
9523       if test "xRM" != xBASH; then
9524         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9525 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9526       fi
9527       # Try to locate tool using the code snippet
9528       for ac_prog in rm
9529 do
9530   # Extract the first word of "$ac_prog", so it can be a program name with args.
9531 set dummy $ac_prog; ac_word=$2
9532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9533 $as_echo_n "checking for $ac_word... " >&6; }
9534 if ${ac_cv_path_RM+:} false; then :
9535   $as_echo_n "(cached) " >&6
9536 else
9537   case $RM in
9538   [\\/]* | ?:[\\/]*)
9539   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9540   ;;
9541   *)
9542   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9543 for as_dir in $PATH
9544 do
9545   IFS=$as_save_IFS
9546   test -z "$as_dir" && as_dir=.
9547     for ac_exec_ext in '' $ac_executable_extensions; do
9548   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9549     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9550     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9551     break 2
9552   fi
9553 done
9554   done
9555 IFS=$as_save_IFS
9556 
9557   ;;
9558 esac
9559 fi
9560 RM=$ac_cv_path_RM
9561 if test -n "$RM"; then
9562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9563 $as_echo "$RM" >&6; }
9564 else
9565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9566 $as_echo "no" >&6; }
9567 fi
9568 
9569 
9570   test -n "$RM" && break
9571 done
9572 
9573     else
9574       # If it succeeded, then it was overridden by the user. We will use it
9575       # for the tool.
9576 
9577       # First remove it from the list of overridden variables, so we can test
9578       # for unknown variables in the end.
9579       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9580 
9581       # Check if we try to supply an empty value
9582       if test "x$RM" = x; then
9583         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9584 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9585         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9586 $as_echo_n "checking for RM... " >&6; }
9587         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9588 $as_echo "disabled" >&6; }
9589       else
9590         # Check if the provided tool contains a complete path.
9591         tool_specified="$RM"
9592         tool_basename="${tool_specified##*/}"
9593         if test "x$tool_basename" = "x$tool_specified"; then
9594           # A command without a complete path is provided, search $PATH.
9595           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9596 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9597           # Extract the first word of "$tool_basename", so it can be a program name with args.
9598 set dummy $tool_basename; ac_word=$2
9599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9600 $as_echo_n "checking for $ac_word... " >&6; }
9601 if ${ac_cv_path_RM+:} false; then :
9602   $as_echo_n "(cached) " >&6
9603 else
9604   case $RM in
9605   [\\/]* | ?:[\\/]*)
9606   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9607   ;;
9608   *)
9609   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9610 for as_dir in $PATH
9611 do
9612   IFS=$as_save_IFS
9613   test -z "$as_dir" && as_dir=.
9614     for ac_exec_ext in '' $ac_executable_extensions; do
9615   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9616     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9617     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9618     break 2
9619   fi
9620 done
9621   done
9622 IFS=$as_save_IFS
9623 
9624   ;;
9625 esac
9626 fi
9627 RM=$ac_cv_path_RM
9628 if test -n "$RM"; then
9629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9630 $as_echo "$RM" >&6; }
9631 else
9632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9633 $as_echo "no" >&6; }
9634 fi
9635 
9636 
9637           if test "x$RM" = x; then
9638             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9639           fi
9640         else
9641           # Otherwise we believe it is a complete path. Use it as it is.
9642           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9643 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9644           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9645 $as_echo_n "checking for RM... " >&6; }
9646           if test ! -x "$tool_specified"; then
9647             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9648 $as_echo "not found" >&6; }
9649             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9650           fi
9651           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9652 $as_echo "$tool_specified" >&6; }
9653         fi
9654       fi
9655     fi
9656 
9657   fi
9658 
9659 
9660 
9661   if test "x$RM" = x; then
9662     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9663   fi
9664 
9665 
9666 
9667 
9668 
9669   # Publish this variable in the help.
9670 
9671 
9672   if [ -z "${RMDIR+x}" ]; then
9673     # The variable is not set by user, try to locate tool using the code snippet
9674     for ac_prog in rmdir
9675 do
9676   # Extract the first word of "$ac_prog", so it can be a program name with args.
9677 set dummy $ac_prog; ac_word=$2
9678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9679 $as_echo_n "checking for $ac_word... " >&6; }
9680 if ${ac_cv_path_RMDIR+:} false; then :
9681   $as_echo_n "(cached) " >&6
9682 else
9683   case $RMDIR in
9684   [\\/]* | ?:[\\/]*)
9685   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9686   ;;
9687   *)
9688   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9689 for as_dir in $PATH
9690 do
9691   IFS=$as_save_IFS
9692   test -z "$as_dir" && as_dir=.
9693     for ac_exec_ext in '' $ac_executable_extensions; do
9694   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9695     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9696     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9697     break 2
9698   fi
9699 done
9700   done
9701 IFS=$as_save_IFS
9702 
9703   ;;
9704 esac
9705 fi
9706 RMDIR=$ac_cv_path_RMDIR
9707 if test -n "$RMDIR"; then
9708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9709 $as_echo "$RMDIR" >&6; }
9710 else
9711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9712 $as_echo "no" >&6; }
9713 fi
9714 
9715 
9716   test -n "$RMDIR" && break
9717 done
9718 
9719   else
9720     # The variable is set, but is it from the command line or the environment?
9721 
9722     # Try to remove the string !RMDIR! from our list.
9723     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9724     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9725       # If it failed, the variable was not from the command line. Ignore it,
9726       # but warn the user (except for BASH, which is always set by the calling BASH).
9727       if test "xRMDIR" != xBASH; then
9728         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9729 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9730       fi
9731       # Try to locate tool using the code snippet
9732       for ac_prog in rmdir
9733 do
9734   # Extract the first word of "$ac_prog", so it can be a program name with args.
9735 set dummy $ac_prog; ac_word=$2
9736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9737 $as_echo_n "checking for $ac_word... " >&6; }
9738 if ${ac_cv_path_RMDIR+:} false; then :
9739   $as_echo_n "(cached) " >&6
9740 else
9741   case $RMDIR in
9742   [\\/]* | ?:[\\/]*)
9743   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9744   ;;
9745   *)
9746   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9747 for as_dir in $PATH
9748 do
9749   IFS=$as_save_IFS
9750   test -z "$as_dir" && as_dir=.
9751     for ac_exec_ext in '' $ac_executable_extensions; do
9752   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9753     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9754     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9755     break 2
9756   fi
9757 done
9758   done
9759 IFS=$as_save_IFS
9760 
9761   ;;
9762 esac
9763 fi
9764 RMDIR=$ac_cv_path_RMDIR
9765 if test -n "$RMDIR"; then
9766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9767 $as_echo "$RMDIR" >&6; }
9768 else
9769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9770 $as_echo "no" >&6; }
9771 fi
9772 
9773 
9774   test -n "$RMDIR" && break
9775 done
9776 
9777     else
9778       # If it succeeded, then it was overridden by the user. We will use it
9779       # for the tool.
9780 
9781       # First remove it from the list of overridden variables, so we can test
9782       # for unknown variables in the end.
9783       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9784 
9785       # Check if we try to supply an empty value
9786       if test "x$RMDIR" = x; then
9787         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9788 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9789         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9790 $as_echo_n "checking for RMDIR... " >&6; }
9791         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9792 $as_echo "disabled" >&6; }
9793       else
9794         # Check if the provided tool contains a complete path.
9795         tool_specified="$RMDIR"
9796         tool_basename="${tool_specified##*/}"
9797         if test "x$tool_basename" = "x$tool_specified"; then
9798           # A command without a complete path is provided, search $PATH.
9799           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9800 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9801           # Extract the first word of "$tool_basename", so it can be a program name with args.
9802 set dummy $tool_basename; ac_word=$2
9803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9804 $as_echo_n "checking for $ac_word... " >&6; }
9805 if ${ac_cv_path_RMDIR+:} false; then :
9806   $as_echo_n "(cached) " >&6
9807 else
9808   case $RMDIR in
9809   [\\/]* | ?:[\\/]*)
9810   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9811   ;;
9812   *)
9813   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9814 for as_dir in $PATH
9815 do
9816   IFS=$as_save_IFS
9817   test -z "$as_dir" && as_dir=.
9818     for ac_exec_ext in '' $ac_executable_extensions; do
9819   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9820     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9821     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9822     break 2
9823   fi
9824 done
9825   done
9826 IFS=$as_save_IFS
9827 
9828   ;;
9829 esac
9830 fi
9831 RMDIR=$ac_cv_path_RMDIR
9832 if test -n "$RMDIR"; then
9833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9834 $as_echo "$RMDIR" >&6; }
9835 else
9836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9837 $as_echo "no" >&6; }
9838 fi
9839 
9840 
9841           if test "x$RMDIR" = x; then
9842             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9843           fi
9844         else
9845           # Otherwise we believe it is a complete path. Use it as it is.
9846           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9847 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9848           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9849 $as_echo_n "checking for RMDIR... " >&6; }
9850           if test ! -x "$tool_specified"; then
9851             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9852 $as_echo "not found" >&6; }
9853             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9854           fi
9855           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9856 $as_echo "$tool_specified" >&6; }
9857         fi
9858       fi
9859     fi
9860 
9861   fi
9862 
9863 
9864 
9865   if test "x$RMDIR" = x; then
9866     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9867   fi
9868 
9869 
9870 
9871 
9872 
9873   # Publish this variable in the help.
9874 
9875 
9876   if [ -z "${SH+x}" ]; then
9877     # The variable is not set by user, try to locate tool using the code snippet
9878     for ac_prog in sh
9879 do
9880   # Extract the first word of "$ac_prog", so it can be a program name with args.
9881 set dummy $ac_prog; ac_word=$2
9882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9883 $as_echo_n "checking for $ac_word... " >&6; }
9884 if ${ac_cv_path_SH+:} false; then :
9885   $as_echo_n "(cached) " >&6
9886 else
9887   case $SH in
9888   [\\/]* | ?:[\\/]*)
9889   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9890   ;;
9891   *)
9892   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9893 for as_dir in $PATH
9894 do
9895   IFS=$as_save_IFS
9896   test -z "$as_dir" && as_dir=.
9897     for ac_exec_ext in '' $ac_executable_extensions; do
9898   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9899     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9900     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9901     break 2
9902   fi
9903 done
9904   done
9905 IFS=$as_save_IFS
9906 
9907   ;;
9908 esac
9909 fi
9910 SH=$ac_cv_path_SH
9911 if test -n "$SH"; then
9912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9913 $as_echo "$SH" >&6; }
9914 else
9915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9916 $as_echo "no" >&6; }
9917 fi
9918 
9919 
9920   test -n "$SH" && break
9921 done
9922 
9923   else
9924     # The variable is set, but is it from the command line or the environment?
9925 
9926     # Try to remove the string !SH! from our list.
9927     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9928     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9929       # If it failed, the variable was not from the command line. Ignore it,
9930       # but warn the user (except for BASH, which is always set by the calling BASH).
9931       if test "xSH" != xBASH; then
9932         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9933 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9934       fi
9935       # Try to locate tool using the code snippet
9936       for ac_prog in sh
9937 do
9938   # Extract the first word of "$ac_prog", so it can be a program name with args.
9939 set dummy $ac_prog; ac_word=$2
9940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9941 $as_echo_n "checking for $ac_word... " >&6; }
9942 if ${ac_cv_path_SH+:} false; then :
9943   $as_echo_n "(cached) " >&6
9944 else
9945   case $SH in
9946   [\\/]* | ?:[\\/]*)
9947   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9948   ;;
9949   *)
9950   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9951 for as_dir in $PATH
9952 do
9953   IFS=$as_save_IFS
9954   test -z "$as_dir" && as_dir=.
9955     for ac_exec_ext in '' $ac_executable_extensions; do
9956   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9957     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9958     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9959     break 2
9960   fi
9961 done
9962   done
9963 IFS=$as_save_IFS
9964 
9965   ;;
9966 esac
9967 fi
9968 SH=$ac_cv_path_SH
9969 if test -n "$SH"; then
9970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9971 $as_echo "$SH" >&6; }
9972 else
9973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9974 $as_echo "no" >&6; }
9975 fi
9976 
9977 
9978   test -n "$SH" && break
9979 done
9980 
9981     else
9982       # If it succeeded, then it was overridden by the user. We will use it
9983       # for the tool.
9984 
9985       # First remove it from the list of overridden variables, so we can test
9986       # for unknown variables in the end.
9987       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9988 
9989       # Check if we try to supply an empty value
9990       if test "x$SH" = x; then
9991         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
9992 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
9993         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9994 $as_echo_n "checking for SH... " >&6; }
9995         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9996 $as_echo "disabled" >&6; }
9997       else
9998         # Check if the provided tool contains a complete path.
9999         tool_specified="$SH"
10000         tool_basename="${tool_specified##*/}"
10001         if test "x$tool_basename" = "x$tool_specified"; then
10002           # A command without a complete path is provided, search $PATH.
10003           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10004 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10005           # Extract the first word of "$tool_basename", so it can be a program name with args.
10006 set dummy $tool_basename; ac_word=$2
10007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10008 $as_echo_n "checking for $ac_word... " >&6; }
10009 if ${ac_cv_path_SH+:} false; then :
10010   $as_echo_n "(cached) " >&6
10011 else
10012   case $SH in
10013   [\\/]* | ?:[\\/]*)
10014   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10015   ;;
10016   *)
10017   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10018 for as_dir in $PATH
10019 do
10020   IFS=$as_save_IFS
10021   test -z "$as_dir" && as_dir=.
10022     for ac_exec_ext in '' $ac_executable_extensions; do
10023   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10024     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10025     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10026     break 2
10027   fi
10028 done
10029   done
10030 IFS=$as_save_IFS
10031 
10032   ;;
10033 esac
10034 fi
10035 SH=$ac_cv_path_SH
10036 if test -n "$SH"; then
10037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10038 $as_echo "$SH" >&6; }
10039 else
10040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10041 $as_echo "no" >&6; }
10042 fi
10043 
10044 
10045           if test "x$SH" = x; then
10046             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10047           fi
10048         else
10049           # Otherwise we believe it is a complete path. Use it as it is.
10050           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10051 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10052           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10053 $as_echo_n "checking for SH... " >&6; }
10054           if test ! -x "$tool_specified"; then
10055             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10056 $as_echo "not found" >&6; }
10057             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10058           fi
10059           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10060 $as_echo "$tool_specified" >&6; }
10061         fi
10062       fi
10063     fi
10064 
10065   fi
10066 
10067 
10068 
10069   if test "x$SH" = x; then
10070     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10071   fi
10072 
10073 
10074 
10075 
10076 
10077   # Publish this variable in the help.
10078 
10079 
10080   if [ -z "${SORT+x}" ]; then
10081     # The variable is not set by user, try to locate tool using the code snippet
10082     for ac_prog in sort
10083 do
10084   # Extract the first word of "$ac_prog", so it can be a program name with args.
10085 set dummy $ac_prog; ac_word=$2
10086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10087 $as_echo_n "checking for $ac_word... " >&6; }
10088 if ${ac_cv_path_SORT+:} false; then :
10089   $as_echo_n "(cached) " >&6
10090 else
10091   case $SORT in
10092   [\\/]* | ?:[\\/]*)
10093   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10094   ;;
10095   *)
10096   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10097 for as_dir in $PATH
10098 do
10099   IFS=$as_save_IFS
10100   test -z "$as_dir" && as_dir=.
10101     for ac_exec_ext in '' $ac_executable_extensions; do
10102   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10103     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10104     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10105     break 2
10106   fi
10107 done
10108   done
10109 IFS=$as_save_IFS
10110 
10111   ;;
10112 esac
10113 fi
10114 SORT=$ac_cv_path_SORT
10115 if test -n "$SORT"; then
10116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10117 $as_echo "$SORT" >&6; }
10118 else
10119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10120 $as_echo "no" >&6; }
10121 fi
10122 
10123 
10124   test -n "$SORT" && break
10125 done
10126 
10127   else
10128     # The variable is set, but is it from the command line or the environment?
10129 
10130     # Try to remove the string !SORT! from our list.
10131     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10132     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10133       # If it failed, the variable was not from the command line. Ignore it,
10134       # but warn the user (except for BASH, which is always set by the calling BASH).
10135       if test "xSORT" != xBASH; then
10136         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10137 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10138       fi
10139       # Try to locate tool using the code snippet
10140       for ac_prog in sort
10141 do
10142   # Extract the first word of "$ac_prog", so it can be a program name with args.
10143 set dummy $ac_prog; ac_word=$2
10144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10145 $as_echo_n "checking for $ac_word... " >&6; }
10146 if ${ac_cv_path_SORT+:} false; then :
10147   $as_echo_n "(cached) " >&6
10148 else
10149   case $SORT in
10150   [\\/]* | ?:[\\/]*)
10151   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10152   ;;
10153   *)
10154   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10155 for as_dir in $PATH
10156 do
10157   IFS=$as_save_IFS
10158   test -z "$as_dir" && as_dir=.
10159     for ac_exec_ext in '' $ac_executable_extensions; do
10160   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10161     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10162     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10163     break 2
10164   fi
10165 done
10166   done
10167 IFS=$as_save_IFS
10168 
10169   ;;
10170 esac
10171 fi
10172 SORT=$ac_cv_path_SORT
10173 if test -n "$SORT"; then
10174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10175 $as_echo "$SORT" >&6; }
10176 else
10177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10178 $as_echo "no" >&6; }
10179 fi
10180 
10181 
10182   test -n "$SORT" && break
10183 done
10184 
10185     else
10186       # If it succeeded, then it was overridden by the user. We will use it
10187       # for the tool.
10188 
10189       # First remove it from the list of overridden variables, so we can test
10190       # for unknown variables in the end.
10191       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10192 
10193       # Check if we try to supply an empty value
10194       if test "x$SORT" = x; then
10195         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10196 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10197         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10198 $as_echo_n "checking for SORT... " >&6; }
10199         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10200 $as_echo "disabled" >&6; }
10201       else
10202         # Check if the provided tool contains a complete path.
10203         tool_specified="$SORT"
10204         tool_basename="${tool_specified##*/}"
10205         if test "x$tool_basename" = "x$tool_specified"; then
10206           # A command without a complete path is provided, search $PATH.
10207           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10208 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10209           # Extract the first word of "$tool_basename", so it can be a program name with args.
10210 set dummy $tool_basename; ac_word=$2
10211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10212 $as_echo_n "checking for $ac_word... " >&6; }
10213 if ${ac_cv_path_SORT+:} false; then :
10214   $as_echo_n "(cached) " >&6
10215 else
10216   case $SORT in
10217   [\\/]* | ?:[\\/]*)
10218   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10219   ;;
10220   *)
10221   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10222 for as_dir in $PATH
10223 do
10224   IFS=$as_save_IFS
10225   test -z "$as_dir" && as_dir=.
10226     for ac_exec_ext in '' $ac_executable_extensions; do
10227   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10228     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10229     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10230     break 2
10231   fi
10232 done
10233   done
10234 IFS=$as_save_IFS
10235 
10236   ;;
10237 esac
10238 fi
10239 SORT=$ac_cv_path_SORT
10240 if test -n "$SORT"; then
10241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10242 $as_echo "$SORT" >&6; }
10243 else
10244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10245 $as_echo "no" >&6; }
10246 fi
10247 
10248 
10249           if test "x$SORT" = x; then
10250             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10251           fi
10252         else
10253           # Otherwise we believe it is a complete path. Use it as it is.
10254           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10255 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10256           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10257 $as_echo_n "checking for SORT... " >&6; }
10258           if test ! -x "$tool_specified"; then
10259             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10260 $as_echo "not found" >&6; }
10261             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10262           fi
10263           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10264 $as_echo "$tool_specified" >&6; }
10265         fi
10266       fi
10267     fi
10268 
10269   fi
10270 
10271 
10272 
10273   if test "x$SORT" = x; then
10274     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10275   fi
10276 
10277 
10278 
10279 
10280 
10281   # Publish this variable in the help.
10282 
10283 
10284   if [ -z "${TAIL+x}" ]; then
10285     # The variable is not set by user, try to locate tool using the code snippet
10286     for ac_prog in tail
10287 do
10288   # Extract the first word of "$ac_prog", so it can be a program name with args.
10289 set dummy $ac_prog; ac_word=$2
10290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10291 $as_echo_n "checking for $ac_word... " >&6; }
10292 if ${ac_cv_path_TAIL+:} false; then :
10293   $as_echo_n "(cached) " >&6
10294 else
10295   case $TAIL in
10296   [\\/]* | ?:[\\/]*)
10297   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10298   ;;
10299   *)
10300   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10301 for as_dir in $PATH
10302 do
10303   IFS=$as_save_IFS
10304   test -z "$as_dir" && as_dir=.
10305     for ac_exec_ext in '' $ac_executable_extensions; do
10306   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10307     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10309     break 2
10310   fi
10311 done
10312   done
10313 IFS=$as_save_IFS
10314 
10315   ;;
10316 esac
10317 fi
10318 TAIL=$ac_cv_path_TAIL
10319 if test -n "$TAIL"; then
10320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10321 $as_echo "$TAIL" >&6; }
10322 else
10323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10324 $as_echo "no" >&6; }
10325 fi
10326 
10327 
10328   test -n "$TAIL" && break
10329 done
10330 
10331   else
10332     # The variable is set, but is it from the command line or the environment?
10333 
10334     # Try to remove the string !TAIL! from our list.
10335     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10336     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10337       # If it failed, the variable was not from the command line. Ignore it,
10338       # but warn the user (except for BASH, which is always set by the calling BASH).
10339       if test "xTAIL" != xBASH; then
10340         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10341 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10342       fi
10343       # Try to locate tool using the code snippet
10344       for ac_prog in tail
10345 do
10346   # Extract the first word of "$ac_prog", so it can be a program name with args.
10347 set dummy $ac_prog; ac_word=$2
10348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10349 $as_echo_n "checking for $ac_word... " >&6; }
10350 if ${ac_cv_path_TAIL+:} false; then :
10351   $as_echo_n "(cached) " >&6
10352 else
10353   case $TAIL in
10354   [\\/]* | ?:[\\/]*)
10355   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10356   ;;
10357   *)
10358   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10359 for as_dir in $PATH
10360 do
10361   IFS=$as_save_IFS
10362   test -z "$as_dir" && as_dir=.
10363     for ac_exec_ext in '' $ac_executable_extensions; do
10364   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10365     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10366     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10367     break 2
10368   fi
10369 done
10370   done
10371 IFS=$as_save_IFS
10372 
10373   ;;
10374 esac
10375 fi
10376 TAIL=$ac_cv_path_TAIL
10377 if test -n "$TAIL"; then
10378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10379 $as_echo "$TAIL" >&6; }
10380 else
10381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10382 $as_echo "no" >&6; }
10383 fi
10384 
10385 
10386   test -n "$TAIL" && break
10387 done
10388 
10389     else
10390       # If it succeeded, then it was overridden by the user. We will use it
10391       # for the tool.
10392 
10393       # First remove it from the list of overridden variables, so we can test
10394       # for unknown variables in the end.
10395       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10396 
10397       # Check if we try to supply an empty value
10398       if test "x$TAIL" = x; then
10399         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10400 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10401         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10402 $as_echo_n "checking for TAIL... " >&6; }
10403         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10404 $as_echo "disabled" >&6; }
10405       else
10406         # Check if the provided tool contains a complete path.
10407         tool_specified="$TAIL"
10408         tool_basename="${tool_specified##*/}"
10409         if test "x$tool_basename" = "x$tool_specified"; then
10410           # A command without a complete path is provided, search $PATH.
10411           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10412 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10413           # Extract the first word of "$tool_basename", so it can be a program name with args.
10414 set dummy $tool_basename; ac_word=$2
10415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10416 $as_echo_n "checking for $ac_word... " >&6; }
10417 if ${ac_cv_path_TAIL+:} false; then :
10418   $as_echo_n "(cached) " >&6
10419 else
10420   case $TAIL in
10421   [\\/]* | ?:[\\/]*)
10422   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10423   ;;
10424   *)
10425   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10426 for as_dir in $PATH
10427 do
10428   IFS=$as_save_IFS
10429   test -z "$as_dir" && as_dir=.
10430     for ac_exec_ext in '' $ac_executable_extensions; do
10431   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10432     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10433     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10434     break 2
10435   fi
10436 done
10437   done
10438 IFS=$as_save_IFS
10439 
10440   ;;
10441 esac
10442 fi
10443 TAIL=$ac_cv_path_TAIL
10444 if test -n "$TAIL"; then
10445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10446 $as_echo "$TAIL" >&6; }
10447 else
10448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10449 $as_echo "no" >&6; }
10450 fi
10451 
10452 
10453           if test "x$TAIL" = x; then
10454             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10455           fi
10456         else
10457           # Otherwise we believe it is a complete path. Use it as it is.
10458           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10459 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10460           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10461 $as_echo_n "checking for TAIL... " >&6; }
10462           if test ! -x "$tool_specified"; then
10463             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10464 $as_echo "not found" >&6; }
10465             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10466           fi
10467           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10468 $as_echo "$tool_specified" >&6; }
10469         fi
10470       fi
10471     fi
10472 
10473   fi
10474 
10475 
10476 
10477   if test "x$TAIL" = x; then
10478     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10479   fi
10480 
10481 
10482 
10483 
10484 
10485   # Publish this variable in the help.
10486 
10487 
10488   if [ -z "${TAR+x}" ]; then
10489     # The variable is not set by user, try to locate tool using the code snippet
10490     for ac_prog in tar
10491 do
10492   # Extract the first word of "$ac_prog", so it can be a program name with args.
10493 set dummy $ac_prog; ac_word=$2
10494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10495 $as_echo_n "checking for $ac_word... " >&6; }
10496 if ${ac_cv_path_TAR+:} false; then :
10497   $as_echo_n "(cached) " >&6
10498 else
10499   case $TAR in
10500   [\\/]* | ?:[\\/]*)
10501   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10502   ;;
10503   *)
10504   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10505 for as_dir in $PATH
10506 do
10507   IFS=$as_save_IFS
10508   test -z "$as_dir" && as_dir=.
10509     for ac_exec_ext in '' $ac_executable_extensions; do
10510   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10511     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10513     break 2
10514   fi
10515 done
10516   done
10517 IFS=$as_save_IFS
10518 
10519   ;;
10520 esac
10521 fi
10522 TAR=$ac_cv_path_TAR
10523 if test -n "$TAR"; then
10524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10525 $as_echo "$TAR" >&6; }
10526 else
10527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10528 $as_echo "no" >&6; }
10529 fi
10530 
10531 
10532   test -n "$TAR" && break
10533 done
10534 
10535   else
10536     # The variable is set, but is it from the command line or the environment?
10537 
10538     # Try to remove the string !TAR! from our list.
10539     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10540     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10541       # If it failed, the variable was not from the command line. Ignore it,
10542       # but warn the user (except for BASH, which is always set by the calling BASH).
10543       if test "xTAR" != xBASH; then
10544         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10545 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10546       fi
10547       # Try to locate tool using the code snippet
10548       for ac_prog in tar
10549 do
10550   # Extract the first word of "$ac_prog", so it can be a program name with args.
10551 set dummy $ac_prog; ac_word=$2
10552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10553 $as_echo_n "checking for $ac_word... " >&6; }
10554 if ${ac_cv_path_TAR+:} false; then :
10555   $as_echo_n "(cached) " >&6
10556 else
10557   case $TAR in
10558   [\\/]* | ?:[\\/]*)
10559   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10560   ;;
10561   *)
10562   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10563 for as_dir in $PATH
10564 do
10565   IFS=$as_save_IFS
10566   test -z "$as_dir" && as_dir=.
10567     for ac_exec_ext in '' $ac_executable_extensions; do
10568   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10569     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10570     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10571     break 2
10572   fi
10573 done
10574   done
10575 IFS=$as_save_IFS
10576 
10577   ;;
10578 esac
10579 fi
10580 TAR=$ac_cv_path_TAR
10581 if test -n "$TAR"; then
10582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10583 $as_echo "$TAR" >&6; }
10584 else
10585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10586 $as_echo "no" >&6; }
10587 fi
10588 
10589 
10590   test -n "$TAR" && break
10591 done
10592 
10593     else
10594       # If it succeeded, then it was overridden by the user. We will use it
10595       # for the tool.
10596 
10597       # First remove it from the list of overridden variables, so we can test
10598       # for unknown variables in the end.
10599       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10600 
10601       # Check if we try to supply an empty value
10602       if test "x$TAR" = x; then
10603         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10604 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10605         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10606 $as_echo_n "checking for TAR... " >&6; }
10607         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10608 $as_echo "disabled" >&6; }
10609       else
10610         # Check if the provided tool contains a complete path.
10611         tool_specified="$TAR"
10612         tool_basename="${tool_specified##*/}"
10613         if test "x$tool_basename" = "x$tool_specified"; then
10614           # A command without a complete path is provided, search $PATH.
10615           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10616 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10617           # Extract the first word of "$tool_basename", so it can be a program name with args.
10618 set dummy $tool_basename; ac_word=$2
10619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10620 $as_echo_n "checking for $ac_word... " >&6; }
10621 if ${ac_cv_path_TAR+:} false; then :
10622   $as_echo_n "(cached) " >&6
10623 else
10624   case $TAR in
10625   [\\/]* | ?:[\\/]*)
10626   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10627   ;;
10628   *)
10629   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10630 for as_dir in $PATH
10631 do
10632   IFS=$as_save_IFS
10633   test -z "$as_dir" && as_dir=.
10634     for ac_exec_ext in '' $ac_executable_extensions; do
10635   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10636     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10637     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10638     break 2
10639   fi
10640 done
10641   done
10642 IFS=$as_save_IFS
10643 
10644   ;;
10645 esac
10646 fi
10647 TAR=$ac_cv_path_TAR
10648 if test -n "$TAR"; then
10649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10650 $as_echo "$TAR" >&6; }
10651 else
10652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10653 $as_echo "no" >&6; }
10654 fi
10655 
10656 
10657           if test "x$TAR" = x; then
10658             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10659           fi
10660         else
10661           # Otherwise we believe it is a complete path. Use it as it is.
10662           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10663 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10664           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10665 $as_echo_n "checking for TAR... " >&6; }
10666           if test ! -x "$tool_specified"; then
10667             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10668 $as_echo "not found" >&6; }
10669             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10670           fi
10671           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10672 $as_echo "$tool_specified" >&6; }
10673         fi
10674       fi
10675     fi
10676 
10677   fi
10678 
10679 
10680 
10681   if test "x$TAR" = x; then
10682     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10683   fi
10684 
10685 
10686 
10687 
10688 
10689   # Publish this variable in the help.
10690 
10691 
10692   if [ -z "${TEE+x}" ]; then
10693     # The variable is not set by user, try to locate tool using the code snippet
10694     for ac_prog in tee
10695 do
10696   # Extract the first word of "$ac_prog", so it can be a program name with args.
10697 set dummy $ac_prog; ac_word=$2
10698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10699 $as_echo_n "checking for $ac_word... " >&6; }
10700 if ${ac_cv_path_TEE+:} false; then :
10701   $as_echo_n "(cached) " >&6
10702 else
10703   case $TEE in
10704   [\\/]* | ?:[\\/]*)
10705   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10706   ;;
10707   *)
10708   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10709 for as_dir in $PATH
10710 do
10711   IFS=$as_save_IFS
10712   test -z "$as_dir" && as_dir=.
10713     for ac_exec_ext in '' $ac_executable_extensions; do
10714   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10715     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10716     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10717     break 2
10718   fi
10719 done
10720   done
10721 IFS=$as_save_IFS
10722 
10723   ;;
10724 esac
10725 fi
10726 TEE=$ac_cv_path_TEE
10727 if test -n "$TEE"; then
10728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10729 $as_echo "$TEE" >&6; }
10730 else
10731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10732 $as_echo "no" >&6; }
10733 fi
10734 
10735 
10736   test -n "$TEE" && break
10737 done
10738 
10739   else
10740     # The variable is set, but is it from the command line or the environment?
10741 
10742     # Try to remove the string !TEE! from our list.
10743     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10744     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10745       # If it failed, the variable was not from the command line. Ignore it,
10746       # but warn the user (except for BASH, which is always set by the calling BASH).
10747       if test "xTEE" != xBASH; then
10748         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10749 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10750       fi
10751       # Try to locate tool using the code snippet
10752       for ac_prog in tee
10753 do
10754   # Extract the first word of "$ac_prog", so it can be a program name with args.
10755 set dummy $ac_prog; ac_word=$2
10756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10757 $as_echo_n "checking for $ac_word... " >&6; }
10758 if ${ac_cv_path_TEE+:} false; then :
10759   $as_echo_n "(cached) " >&6
10760 else
10761   case $TEE in
10762   [\\/]* | ?:[\\/]*)
10763   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10764   ;;
10765   *)
10766   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10767 for as_dir in $PATH
10768 do
10769   IFS=$as_save_IFS
10770   test -z "$as_dir" && as_dir=.
10771     for ac_exec_ext in '' $ac_executable_extensions; do
10772   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10773     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10774     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10775     break 2
10776   fi
10777 done
10778   done
10779 IFS=$as_save_IFS
10780 
10781   ;;
10782 esac
10783 fi
10784 TEE=$ac_cv_path_TEE
10785 if test -n "$TEE"; then
10786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10787 $as_echo "$TEE" >&6; }
10788 else
10789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10790 $as_echo "no" >&6; }
10791 fi
10792 
10793 
10794   test -n "$TEE" && break
10795 done
10796 
10797     else
10798       # If it succeeded, then it was overridden by the user. We will use it
10799       # for the tool.
10800 
10801       # First remove it from the list of overridden variables, so we can test
10802       # for unknown variables in the end.
10803       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10804 
10805       # Check if we try to supply an empty value
10806       if test "x$TEE" = x; then
10807         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10808 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10809         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10810 $as_echo_n "checking for TEE... " >&6; }
10811         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10812 $as_echo "disabled" >&6; }
10813       else
10814         # Check if the provided tool contains a complete path.
10815         tool_specified="$TEE"
10816         tool_basename="${tool_specified##*/}"
10817         if test "x$tool_basename" = "x$tool_specified"; then
10818           # A command without a complete path is provided, search $PATH.
10819           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10820 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10821           # Extract the first word of "$tool_basename", so it can be a program name with args.
10822 set dummy $tool_basename; ac_word=$2
10823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10824 $as_echo_n "checking for $ac_word... " >&6; }
10825 if ${ac_cv_path_TEE+:} false; then :
10826   $as_echo_n "(cached) " >&6
10827 else
10828   case $TEE in
10829   [\\/]* | ?:[\\/]*)
10830   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10831   ;;
10832   *)
10833   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10834 for as_dir in $PATH
10835 do
10836   IFS=$as_save_IFS
10837   test -z "$as_dir" && as_dir=.
10838     for ac_exec_ext in '' $ac_executable_extensions; do
10839   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10840     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10841     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10842     break 2
10843   fi
10844 done
10845   done
10846 IFS=$as_save_IFS
10847 
10848   ;;
10849 esac
10850 fi
10851 TEE=$ac_cv_path_TEE
10852 if test -n "$TEE"; then
10853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10854 $as_echo "$TEE" >&6; }
10855 else
10856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10857 $as_echo "no" >&6; }
10858 fi
10859 
10860 
10861           if test "x$TEE" = x; then
10862             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10863           fi
10864         else
10865           # Otherwise we believe it is a complete path. Use it as it is.
10866           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10867 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10868           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10869 $as_echo_n "checking for TEE... " >&6; }
10870           if test ! -x "$tool_specified"; then
10871             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10872 $as_echo "not found" >&6; }
10873             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10874           fi
10875           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10876 $as_echo "$tool_specified" >&6; }
10877         fi
10878       fi
10879     fi
10880 
10881   fi
10882 
10883 
10884 
10885   if test "x$TEE" = x; then
10886     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10887   fi
10888 
10889 
10890 
10891 
10892 
10893   # Publish this variable in the help.
10894 
10895 
10896   if [ -z "${TOUCH+x}" ]; then
10897     # The variable is not set by user, try to locate tool using the code snippet
10898     for ac_prog in touch
10899 do
10900   # Extract the first word of "$ac_prog", so it can be a program name with args.
10901 set dummy $ac_prog; ac_word=$2
10902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10903 $as_echo_n "checking for $ac_word... " >&6; }
10904 if ${ac_cv_path_TOUCH+:} false; then :
10905   $as_echo_n "(cached) " >&6
10906 else
10907   case $TOUCH in
10908   [\\/]* | ?:[\\/]*)
10909   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10910   ;;
10911   *)
10912   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10913 for as_dir in $PATH
10914 do
10915   IFS=$as_save_IFS
10916   test -z "$as_dir" && as_dir=.
10917     for ac_exec_ext in '' $ac_executable_extensions; do
10918   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10919     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10920     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10921     break 2
10922   fi
10923 done
10924   done
10925 IFS=$as_save_IFS
10926 
10927   ;;
10928 esac
10929 fi
10930 TOUCH=$ac_cv_path_TOUCH
10931 if test -n "$TOUCH"; then
10932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10933 $as_echo "$TOUCH" >&6; }
10934 else
10935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10936 $as_echo "no" >&6; }
10937 fi
10938 
10939 
10940   test -n "$TOUCH" && break
10941 done
10942 
10943   else
10944     # The variable is set, but is it from the command line or the environment?
10945 
10946     # Try to remove the string !TOUCH! from our list.
10947     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10948     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10949       # If it failed, the variable was not from the command line. Ignore it,
10950       # but warn the user (except for BASH, which is always set by the calling BASH).
10951       if test "xTOUCH" != xBASH; then
10952         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10953 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10954       fi
10955       # Try to locate tool using the code snippet
10956       for ac_prog in touch
10957 do
10958   # Extract the first word of "$ac_prog", so it can be a program name with args.
10959 set dummy $ac_prog; ac_word=$2
10960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10961 $as_echo_n "checking for $ac_word... " >&6; }
10962 if ${ac_cv_path_TOUCH+:} false; then :
10963   $as_echo_n "(cached) " >&6
10964 else
10965   case $TOUCH in
10966   [\\/]* | ?:[\\/]*)
10967   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10968   ;;
10969   *)
10970   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10971 for as_dir in $PATH
10972 do
10973   IFS=$as_save_IFS
10974   test -z "$as_dir" && as_dir=.
10975     for ac_exec_ext in '' $ac_executable_extensions; do
10976   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10977     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10978     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10979     break 2
10980   fi
10981 done
10982   done
10983 IFS=$as_save_IFS
10984 
10985   ;;
10986 esac
10987 fi
10988 TOUCH=$ac_cv_path_TOUCH
10989 if test -n "$TOUCH"; then
10990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10991 $as_echo "$TOUCH" >&6; }
10992 else
10993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10994 $as_echo "no" >&6; }
10995 fi
10996 
10997 
10998   test -n "$TOUCH" && break
10999 done
11000 
11001     else
11002       # If it succeeded, then it was overridden by the user. We will use it
11003       # for the tool.
11004 
11005       # First remove it from the list of overridden variables, so we can test
11006       # for unknown variables in the end.
11007       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11008 
11009       # Check if we try to supply an empty value
11010       if test "x$TOUCH" = x; then
11011         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11012 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11013         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11014 $as_echo_n "checking for TOUCH... " >&6; }
11015         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11016 $as_echo "disabled" >&6; }
11017       else
11018         # Check if the provided tool contains a complete path.
11019         tool_specified="$TOUCH"
11020         tool_basename="${tool_specified##*/}"
11021         if test "x$tool_basename" = "x$tool_specified"; then
11022           # A command without a complete path is provided, search $PATH.
11023           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11024 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11025           # Extract the first word of "$tool_basename", so it can be a program name with args.
11026 set dummy $tool_basename; ac_word=$2
11027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11028 $as_echo_n "checking for $ac_word... " >&6; }
11029 if ${ac_cv_path_TOUCH+:} false; then :
11030   $as_echo_n "(cached) " >&6
11031 else
11032   case $TOUCH in
11033   [\\/]* | ?:[\\/]*)
11034   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11035   ;;
11036   *)
11037   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11038 for as_dir in $PATH
11039 do
11040   IFS=$as_save_IFS
11041   test -z "$as_dir" && as_dir=.
11042     for ac_exec_ext in '' $ac_executable_extensions; do
11043   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11044     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11045     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11046     break 2
11047   fi
11048 done
11049   done
11050 IFS=$as_save_IFS
11051 
11052   ;;
11053 esac
11054 fi
11055 TOUCH=$ac_cv_path_TOUCH
11056 if test -n "$TOUCH"; then
11057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11058 $as_echo "$TOUCH" >&6; }
11059 else
11060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11061 $as_echo "no" >&6; }
11062 fi
11063 
11064 
11065           if test "x$TOUCH" = x; then
11066             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11067           fi
11068         else
11069           # Otherwise we believe it is a complete path. Use it as it is.
11070           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11071 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11072           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11073 $as_echo_n "checking for TOUCH... " >&6; }
11074           if test ! -x "$tool_specified"; then
11075             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11076 $as_echo "not found" >&6; }
11077             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11078           fi
11079           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11080 $as_echo "$tool_specified" >&6; }
11081         fi
11082       fi
11083     fi
11084 
11085   fi
11086 
11087 
11088 
11089   if test "x$TOUCH" = x; then
11090     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11091   fi
11092 
11093 
11094 
11095 
11096 
11097   # Publish this variable in the help.
11098 
11099 
11100   if [ -z "${TR+x}" ]; then
11101     # The variable is not set by user, try to locate tool using the code snippet
11102     for ac_prog in tr
11103 do
11104   # Extract the first word of "$ac_prog", so it can be a program name with args.
11105 set dummy $ac_prog; ac_word=$2
11106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11107 $as_echo_n "checking for $ac_word... " >&6; }
11108 if ${ac_cv_path_TR+:} false; then :
11109   $as_echo_n "(cached) " >&6
11110 else
11111   case $TR in
11112   [\\/]* | ?:[\\/]*)
11113   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11114   ;;
11115   *)
11116   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11117 for as_dir in $PATH
11118 do
11119   IFS=$as_save_IFS
11120   test -z "$as_dir" && as_dir=.
11121     for ac_exec_ext in '' $ac_executable_extensions; do
11122   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11123     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11124     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11125     break 2
11126   fi
11127 done
11128   done
11129 IFS=$as_save_IFS
11130 
11131   ;;
11132 esac
11133 fi
11134 TR=$ac_cv_path_TR
11135 if test -n "$TR"; then
11136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11137 $as_echo "$TR" >&6; }
11138 else
11139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11140 $as_echo "no" >&6; }
11141 fi
11142 
11143 
11144   test -n "$TR" && break
11145 done
11146 
11147   else
11148     # The variable is set, but is it from the command line or the environment?
11149 
11150     # Try to remove the string !TR! from our list.
11151     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11152     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11153       # If it failed, the variable was not from the command line. Ignore it,
11154       # but warn the user (except for BASH, which is always set by the calling BASH).
11155       if test "xTR" != xBASH; then
11156         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11157 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11158       fi
11159       # Try to locate tool using the code snippet
11160       for ac_prog in tr
11161 do
11162   # Extract the first word of "$ac_prog", so it can be a program name with args.
11163 set dummy $ac_prog; ac_word=$2
11164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11165 $as_echo_n "checking for $ac_word... " >&6; }
11166 if ${ac_cv_path_TR+:} false; then :
11167   $as_echo_n "(cached) " >&6
11168 else
11169   case $TR in
11170   [\\/]* | ?:[\\/]*)
11171   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11172   ;;
11173   *)
11174   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11175 for as_dir in $PATH
11176 do
11177   IFS=$as_save_IFS
11178   test -z "$as_dir" && as_dir=.
11179     for ac_exec_ext in '' $ac_executable_extensions; do
11180   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11181     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11182     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11183     break 2
11184   fi
11185 done
11186   done
11187 IFS=$as_save_IFS
11188 
11189   ;;
11190 esac
11191 fi
11192 TR=$ac_cv_path_TR
11193 if test -n "$TR"; then
11194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11195 $as_echo "$TR" >&6; }
11196 else
11197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11198 $as_echo "no" >&6; }
11199 fi
11200 
11201 
11202   test -n "$TR" && break
11203 done
11204 
11205     else
11206       # If it succeeded, then it was overridden by the user. We will use it
11207       # for the tool.
11208 
11209       # First remove it from the list of overridden variables, so we can test
11210       # for unknown variables in the end.
11211       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11212 
11213       # Check if we try to supply an empty value
11214       if test "x$TR" = x; then
11215         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11216 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11217         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11218 $as_echo_n "checking for TR... " >&6; }
11219         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11220 $as_echo "disabled" >&6; }
11221       else
11222         # Check if the provided tool contains a complete path.
11223         tool_specified="$TR"
11224         tool_basename="${tool_specified##*/}"
11225         if test "x$tool_basename" = "x$tool_specified"; then
11226           # A command without a complete path is provided, search $PATH.
11227           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11228 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11229           # Extract the first word of "$tool_basename", so it can be a program name with args.
11230 set dummy $tool_basename; ac_word=$2
11231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11232 $as_echo_n "checking for $ac_word... " >&6; }
11233 if ${ac_cv_path_TR+:} false; then :
11234   $as_echo_n "(cached) " >&6
11235 else
11236   case $TR in
11237   [\\/]* | ?:[\\/]*)
11238   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11239   ;;
11240   *)
11241   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11242 for as_dir in $PATH
11243 do
11244   IFS=$as_save_IFS
11245   test -z "$as_dir" && as_dir=.
11246     for ac_exec_ext in '' $ac_executable_extensions; do
11247   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11248     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11249     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11250     break 2
11251   fi
11252 done
11253   done
11254 IFS=$as_save_IFS
11255 
11256   ;;
11257 esac
11258 fi
11259 TR=$ac_cv_path_TR
11260 if test -n "$TR"; then
11261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11262 $as_echo "$TR" >&6; }
11263 else
11264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11265 $as_echo "no" >&6; }
11266 fi
11267 
11268 
11269           if test "x$TR" = x; then
11270             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11271           fi
11272         else
11273           # Otherwise we believe it is a complete path. Use it as it is.
11274           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11275 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11276           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11277 $as_echo_n "checking for TR... " >&6; }
11278           if test ! -x "$tool_specified"; then
11279             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11280 $as_echo "not found" >&6; }
11281             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11282           fi
11283           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11284 $as_echo "$tool_specified" >&6; }
11285         fi
11286       fi
11287     fi
11288 
11289   fi
11290 
11291 
11292 
11293   if test "x$TR" = x; then
11294     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11295   fi
11296 
11297 
11298 
11299 
11300 
11301   # Publish this variable in the help.
11302 
11303 
11304   if [ -z "${UNAME+x}" ]; then
11305     # The variable is not set by user, try to locate tool using the code snippet
11306     for ac_prog in uname
11307 do
11308   # Extract the first word of "$ac_prog", so it can be a program name with args.
11309 set dummy $ac_prog; ac_word=$2
11310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11311 $as_echo_n "checking for $ac_word... " >&6; }
11312 if ${ac_cv_path_UNAME+:} false; then :
11313   $as_echo_n "(cached) " >&6
11314 else
11315   case $UNAME in
11316   [\\/]* | ?:[\\/]*)
11317   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11318   ;;
11319   *)
11320   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11321 for as_dir in $PATH
11322 do
11323   IFS=$as_save_IFS
11324   test -z "$as_dir" && as_dir=.
11325     for ac_exec_ext in '' $ac_executable_extensions; do
11326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11327     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11329     break 2
11330   fi
11331 done
11332   done
11333 IFS=$as_save_IFS
11334 
11335   ;;
11336 esac
11337 fi
11338 UNAME=$ac_cv_path_UNAME
11339 if test -n "$UNAME"; then
11340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11341 $as_echo "$UNAME" >&6; }
11342 else
11343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11344 $as_echo "no" >&6; }
11345 fi
11346 
11347 
11348   test -n "$UNAME" && break
11349 done
11350 
11351   else
11352     # The variable is set, but is it from the command line or the environment?
11353 
11354     # Try to remove the string !UNAME! from our list.
11355     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11356     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11357       # If it failed, the variable was not from the command line. Ignore it,
11358       # but warn the user (except for BASH, which is always set by the calling BASH).
11359       if test "xUNAME" != xBASH; then
11360         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11361 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11362       fi
11363       # Try to locate tool using the code snippet
11364       for ac_prog in uname
11365 do
11366   # Extract the first word of "$ac_prog", so it can be a program name with args.
11367 set dummy $ac_prog; ac_word=$2
11368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11369 $as_echo_n "checking for $ac_word... " >&6; }
11370 if ${ac_cv_path_UNAME+:} false; then :
11371   $as_echo_n "(cached) " >&6
11372 else
11373   case $UNAME in
11374   [\\/]* | ?:[\\/]*)
11375   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11376   ;;
11377   *)
11378   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11379 for as_dir in $PATH
11380 do
11381   IFS=$as_save_IFS
11382   test -z "$as_dir" && as_dir=.
11383     for ac_exec_ext in '' $ac_executable_extensions; do
11384   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11385     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11386     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11387     break 2
11388   fi
11389 done
11390   done
11391 IFS=$as_save_IFS
11392 
11393   ;;
11394 esac
11395 fi
11396 UNAME=$ac_cv_path_UNAME
11397 if test -n "$UNAME"; then
11398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11399 $as_echo "$UNAME" >&6; }
11400 else
11401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11402 $as_echo "no" >&6; }
11403 fi
11404 
11405 
11406   test -n "$UNAME" && break
11407 done
11408 
11409     else
11410       # If it succeeded, then it was overridden by the user. We will use it
11411       # for the tool.
11412 
11413       # First remove it from the list of overridden variables, so we can test
11414       # for unknown variables in the end.
11415       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11416 
11417       # Check if we try to supply an empty value
11418       if test "x$UNAME" = x; then
11419         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11420 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11421         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11422 $as_echo_n "checking for UNAME... " >&6; }
11423         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11424 $as_echo "disabled" >&6; }
11425       else
11426         # Check if the provided tool contains a complete path.
11427         tool_specified="$UNAME"
11428         tool_basename="${tool_specified##*/}"
11429         if test "x$tool_basename" = "x$tool_specified"; then
11430           # A command without a complete path is provided, search $PATH.
11431           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11432 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11433           # Extract the first word of "$tool_basename", so it can be a program name with args.
11434 set dummy $tool_basename; ac_word=$2
11435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11436 $as_echo_n "checking for $ac_word... " >&6; }
11437 if ${ac_cv_path_UNAME+:} false; then :
11438   $as_echo_n "(cached) " >&6
11439 else
11440   case $UNAME in
11441   [\\/]* | ?:[\\/]*)
11442   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11443   ;;
11444   *)
11445   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11446 for as_dir in $PATH
11447 do
11448   IFS=$as_save_IFS
11449   test -z "$as_dir" && as_dir=.
11450     for ac_exec_ext in '' $ac_executable_extensions; do
11451   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11452     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11454     break 2
11455   fi
11456 done
11457   done
11458 IFS=$as_save_IFS
11459 
11460   ;;
11461 esac
11462 fi
11463 UNAME=$ac_cv_path_UNAME
11464 if test -n "$UNAME"; then
11465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11466 $as_echo "$UNAME" >&6; }
11467 else
11468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11469 $as_echo "no" >&6; }
11470 fi
11471 
11472 
11473           if test "x$UNAME" = x; then
11474             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11475           fi
11476         else
11477           # Otherwise we believe it is a complete path. Use it as it is.
11478           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11479 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11480           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11481 $as_echo_n "checking for UNAME... " >&6; }
11482           if test ! -x "$tool_specified"; then
11483             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11484 $as_echo "not found" >&6; }
11485             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11486           fi
11487           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11488 $as_echo "$tool_specified" >&6; }
11489         fi
11490       fi
11491     fi
11492 
11493   fi
11494 
11495 
11496 
11497   if test "x$UNAME" = x; then
11498     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11499   fi
11500 
11501 
11502 
11503 
11504 
11505   # Publish this variable in the help.
11506 
11507 
11508   if [ -z "${UNIQ+x}" ]; then
11509     # The variable is not set by user, try to locate tool using the code snippet
11510     for ac_prog in uniq
11511 do
11512   # Extract the first word of "$ac_prog", so it can be a program name with args.
11513 set dummy $ac_prog; ac_word=$2
11514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11515 $as_echo_n "checking for $ac_word... " >&6; }
11516 if ${ac_cv_path_UNIQ+:} false; then :
11517   $as_echo_n "(cached) " >&6
11518 else
11519   case $UNIQ in
11520   [\\/]* | ?:[\\/]*)
11521   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11522   ;;
11523   *)
11524   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11525 for as_dir in $PATH
11526 do
11527   IFS=$as_save_IFS
11528   test -z "$as_dir" && as_dir=.
11529     for ac_exec_ext in '' $ac_executable_extensions; do
11530   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11531     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11533     break 2
11534   fi
11535 done
11536   done
11537 IFS=$as_save_IFS
11538 
11539   ;;
11540 esac
11541 fi
11542 UNIQ=$ac_cv_path_UNIQ
11543 if test -n "$UNIQ"; then
11544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11545 $as_echo "$UNIQ" >&6; }
11546 else
11547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11548 $as_echo "no" >&6; }
11549 fi
11550 
11551 
11552   test -n "$UNIQ" && break
11553 done
11554 
11555   else
11556     # The variable is set, but is it from the command line or the environment?
11557 
11558     # Try to remove the string !UNIQ! from our list.
11559     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11560     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11561       # If it failed, the variable was not from the command line. Ignore it,
11562       # but warn the user (except for BASH, which is always set by the calling BASH).
11563       if test "xUNIQ" != xBASH; then
11564         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11565 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11566       fi
11567       # Try to locate tool using the code snippet
11568       for ac_prog in uniq
11569 do
11570   # Extract the first word of "$ac_prog", so it can be a program name with args.
11571 set dummy $ac_prog; ac_word=$2
11572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11573 $as_echo_n "checking for $ac_word... " >&6; }
11574 if ${ac_cv_path_UNIQ+:} false; then :
11575   $as_echo_n "(cached) " >&6
11576 else
11577   case $UNIQ in
11578   [\\/]* | ?:[\\/]*)
11579   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11580   ;;
11581   *)
11582   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11583 for as_dir in $PATH
11584 do
11585   IFS=$as_save_IFS
11586   test -z "$as_dir" && as_dir=.
11587     for ac_exec_ext in '' $ac_executable_extensions; do
11588   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11589     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11590     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11591     break 2
11592   fi
11593 done
11594   done
11595 IFS=$as_save_IFS
11596 
11597   ;;
11598 esac
11599 fi
11600 UNIQ=$ac_cv_path_UNIQ
11601 if test -n "$UNIQ"; then
11602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11603 $as_echo "$UNIQ" >&6; }
11604 else
11605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11606 $as_echo "no" >&6; }
11607 fi
11608 
11609 
11610   test -n "$UNIQ" && break
11611 done
11612 
11613     else
11614       # If it succeeded, then it was overridden by the user. We will use it
11615       # for the tool.
11616 
11617       # First remove it from the list of overridden variables, so we can test
11618       # for unknown variables in the end.
11619       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11620 
11621       # Check if we try to supply an empty value
11622       if test "x$UNIQ" = x; then
11623         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11624 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11625         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11626 $as_echo_n "checking for UNIQ... " >&6; }
11627         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11628 $as_echo "disabled" >&6; }
11629       else
11630         # Check if the provided tool contains a complete path.
11631         tool_specified="$UNIQ"
11632         tool_basename="${tool_specified##*/}"
11633         if test "x$tool_basename" = "x$tool_specified"; then
11634           # A command without a complete path is provided, search $PATH.
11635           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11636 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11637           # Extract the first word of "$tool_basename", so it can be a program name with args.
11638 set dummy $tool_basename; ac_word=$2
11639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11640 $as_echo_n "checking for $ac_word... " >&6; }
11641 if ${ac_cv_path_UNIQ+:} false; then :
11642   $as_echo_n "(cached) " >&6
11643 else
11644   case $UNIQ in
11645   [\\/]* | ?:[\\/]*)
11646   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11647   ;;
11648   *)
11649   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11650 for as_dir in $PATH
11651 do
11652   IFS=$as_save_IFS
11653   test -z "$as_dir" && as_dir=.
11654     for ac_exec_ext in '' $ac_executable_extensions; do
11655   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11656     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11657     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11658     break 2
11659   fi
11660 done
11661   done
11662 IFS=$as_save_IFS
11663 
11664   ;;
11665 esac
11666 fi
11667 UNIQ=$ac_cv_path_UNIQ
11668 if test -n "$UNIQ"; then
11669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11670 $as_echo "$UNIQ" >&6; }
11671 else
11672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11673 $as_echo "no" >&6; }
11674 fi
11675 
11676 
11677           if test "x$UNIQ" = x; then
11678             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11679           fi
11680         else
11681           # Otherwise we believe it is a complete path. Use it as it is.
11682           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11683 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11684           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11685 $as_echo_n "checking for UNIQ... " >&6; }
11686           if test ! -x "$tool_specified"; then
11687             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11688 $as_echo "not found" >&6; }
11689             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11690           fi
11691           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11692 $as_echo "$tool_specified" >&6; }
11693         fi
11694       fi
11695     fi
11696 
11697   fi
11698 
11699 
11700 
11701   if test "x$UNIQ" = x; then
11702     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11703   fi
11704 
11705 
11706 
11707 
11708 
11709   # Publish this variable in the help.
11710 
11711 
11712   if [ -z "${WC+x}" ]; then
11713     # The variable is not set by user, try to locate tool using the code snippet
11714     for ac_prog in wc
11715 do
11716   # Extract the first word of "$ac_prog", so it can be a program name with args.
11717 set dummy $ac_prog; ac_word=$2
11718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11719 $as_echo_n "checking for $ac_word... " >&6; }
11720 if ${ac_cv_path_WC+:} false; then :
11721   $as_echo_n "(cached) " >&6
11722 else
11723   case $WC in
11724   [\\/]* | ?:[\\/]*)
11725   ac_cv_path_WC="$WC" # Let the user override the test with a path.
11726   ;;
11727   *)
11728   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11729 for as_dir in $PATH
11730 do
11731   IFS=$as_save_IFS
11732   test -z "$as_dir" && as_dir=.
11733     for ac_exec_ext in '' $ac_executable_extensions; do
11734   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11735     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11736     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11737     break 2
11738   fi
11739 done
11740   done
11741 IFS=$as_save_IFS
11742 
11743   ;;
11744 esac
11745 fi
11746 WC=$ac_cv_path_WC
11747 if test -n "$WC"; then
11748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11749 $as_echo "$WC" >&6; }
11750 else
11751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11752 $as_echo "no" >&6; }
11753 fi
11754 
11755 
11756   test -n "$WC" && break
11757 done
11758 
11759   else
11760     # The variable is set, but is it from the command line or the environment?
11761 
11762     # Try to remove the string !WC! from our list.
11763     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11764     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11765       # If it failed, the variable was not from the command line. Ignore it,
11766       # but warn the user (except for BASH, which is always set by the calling BASH).
11767       if test "xWC" != xBASH; then
11768         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11769 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11770       fi
11771       # Try to locate tool using the code snippet
11772       for ac_prog in wc
11773 do
11774   # Extract the first word of "$ac_prog", so it can be a program name with args.
11775 set dummy $ac_prog; ac_word=$2
11776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11777 $as_echo_n "checking for $ac_word... " >&6; }
11778 if ${ac_cv_path_WC+:} false; then :
11779   $as_echo_n "(cached) " >&6
11780 else
11781   case $WC in
11782   [\\/]* | ?:[\\/]*)
11783   ac_cv_path_WC="$WC" # Let the user override the test with a path.
11784   ;;
11785   *)
11786   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11787 for as_dir in $PATH
11788 do
11789   IFS=$as_save_IFS
11790   test -z "$as_dir" && as_dir=.
11791     for ac_exec_ext in '' $ac_executable_extensions; do
11792   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11793     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11794     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11795     break 2
11796   fi
11797 done
11798   done
11799 IFS=$as_save_IFS
11800 
11801   ;;
11802 esac
11803 fi
11804 WC=$ac_cv_path_WC
11805 if test -n "$WC"; then
11806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11807 $as_echo "$WC" >&6; }
11808 else
11809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11810 $as_echo "no" >&6; }
11811 fi
11812 
11813 
11814   test -n "$WC" && break
11815 done
11816 
11817     else
11818       # If it succeeded, then it was overridden by the user. We will use it
11819       # for the tool.
11820 
11821       # First remove it from the list of overridden variables, so we can test
11822       # for unknown variables in the end.
11823       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11824 
11825       # Check if we try to supply an empty value
11826       if test "x$WC" = x; then
11827         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11828 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11829         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11830 $as_echo_n "checking for WC... " >&6; }
11831         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11832 $as_echo "disabled" >&6; }
11833       else
11834         # Check if the provided tool contains a complete path.
11835         tool_specified="$WC"
11836         tool_basename="${tool_specified##*/}"
11837         if test "x$tool_basename" = "x$tool_specified"; then
11838           # A command without a complete path is provided, search $PATH.
11839           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11840 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11841           # Extract the first word of "$tool_basename", so it can be a program name with args.
11842 set dummy $tool_basename; ac_word=$2
11843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11844 $as_echo_n "checking for $ac_word... " >&6; }
11845 if ${ac_cv_path_WC+:} false; then :
11846   $as_echo_n "(cached) " >&6
11847 else
11848   case $WC in
11849   [\\/]* | ?:[\\/]*)
11850   ac_cv_path_WC="$WC" # Let the user override the test with a path.
11851   ;;
11852   *)
11853   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11854 for as_dir in $PATH
11855 do
11856   IFS=$as_save_IFS
11857   test -z "$as_dir" && as_dir=.
11858     for ac_exec_ext in '' $ac_executable_extensions; do
11859   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11860     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11861     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11862     break 2
11863   fi
11864 done
11865   done
11866 IFS=$as_save_IFS
11867 
11868   ;;
11869 esac
11870 fi
11871 WC=$ac_cv_path_WC
11872 if test -n "$WC"; then
11873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11874 $as_echo "$WC" >&6; }
11875 else
11876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11877 $as_echo "no" >&6; }
11878 fi
11879 
11880 
11881           if test "x$WC" = x; then
11882             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11883           fi
11884         else
11885           # Otherwise we believe it is a complete path. Use it as it is.
11886           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11887 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11888           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11889 $as_echo_n "checking for WC... " >&6; }
11890           if test ! -x "$tool_specified"; then
11891             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11892 $as_echo "not found" >&6; }
11893             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11894           fi
11895           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11896 $as_echo "$tool_specified" >&6; }
11897         fi
11898       fi
11899     fi
11900 
11901   fi
11902 
11903 
11904 
11905   if test "x$WC" = x; then
11906     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11907   fi
11908 
11909 
11910 
11911 
11912 
11913   # Publish this variable in the help.
11914 
11915 
11916   if [ -z "${WHICH+x}" ]; then
11917     # The variable is not set by user, try to locate tool using the code snippet
11918     for ac_prog in which
11919 do
11920   # Extract the first word of "$ac_prog", so it can be a program name with args.
11921 set dummy $ac_prog; ac_word=$2
11922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11923 $as_echo_n "checking for $ac_word... " >&6; }
11924 if ${ac_cv_path_WHICH+:} false; then :
11925   $as_echo_n "(cached) " >&6
11926 else
11927   case $WHICH in
11928   [\\/]* | ?:[\\/]*)
11929   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11930   ;;
11931   *)
11932   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11933 for as_dir in $PATH
11934 do
11935   IFS=$as_save_IFS
11936   test -z "$as_dir" && as_dir=.
11937     for ac_exec_ext in '' $ac_executable_extensions; do
11938   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11939     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11940     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11941     break 2
11942   fi
11943 done
11944   done
11945 IFS=$as_save_IFS
11946 
11947   ;;
11948 esac
11949 fi
11950 WHICH=$ac_cv_path_WHICH
11951 if test -n "$WHICH"; then
11952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11953 $as_echo "$WHICH" >&6; }
11954 else
11955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11956 $as_echo "no" >&6; }
11957 fi
11958 
11959 
11960   test -n "$WHICH" && break
11961 done
11962 
11963   else
11964     # The variable is set, but is it from the command line or the environment?
11965 
11966     # Try to remove the string !WHICH! from our list.
11967     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11968     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11969       # If it failed, the variable was not from the command line. Ignore it,
11970       # but warn the user (except for BASH, which is always set by the calling BASH).
11971       if test "xWHICH" != xBASH; then
11972         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11973 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11974       fi
11975       # Try to locate tool using the code snippet
11976       for ac_prog in which
11977 do
11978   # Extract the first word of "$ac_prog", so it can be a program name with args.
11979 set dummy $ac_prog; ac_word=$2
11980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11981 $as_echo_n "checking for $ac_word... " >&6; }
11982 if ${ac_cv_path_WHICH+:} false; then :
11983   $as_echo_n "(cached) " >&6
11984 else
11985   case $WHICH in
11986   [\\/]* | ?:[\\/]*)
11987   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11988   ;;
11989   *)
11990   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11991 for as_dir in $PATH
11992 do
11993   IFS=$as_save_IFS
11994   test -z "$as_dir" && as_dir=.
11995     for ac_exec_ext in '' $ac_executable_extensions; do
11996   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11997     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11998     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11999     break 2
12000   fi
12001 done
12002   done
12003 IFS=$as_save_IFS
12004 
12005   ;;
12006 esac
12007 fi
12008 WHICH=$ac_cv_path_WHICH
12009 if test -n "$WHICH"; then
12010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12011 $as_echo "$WHICH" >&6; }
12012 else
12013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12014 $as_echo "no" >&6; }
12015 fi
12016 
12017 
12018   test -n "$WHICH" && break
12019 done
12020 
12021     else
12022       # If it succeeded, then it was overridden by the user. We will use it
12023       # for the tool.
12024 
12025       # First remove it from the list of overridden variables, so we can test
12026       # for unknown variables in the end.
12027       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12028 
12029       # Check if we try to supply an empty value
12030       if test "x$WHICH" = x; then
12031         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12032 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12033         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12034 $as_echo_n "checking for WHICH... " >&6; }
12035         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12036 $as_echo "disabled" >&6; }
12037       else
12038         # Check if the provided tool contains a complete path.
12039         tool_specified="$WHICH"
12040         tool_basename="${tool_specified##*/}"
12041         if test "x$tool_basename" = "x$tool_specified"; then
12042           # A command without a complete path is provided, search $PATH.
12043           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12044 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12045           # Extract the first word of "$tool_basename", so it can be a program name with args.
12046 set dummy $tool_basename; ac_word=$2
12047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12048 $as_echo_n "checking for $ac_word... " >&6; }
12049 if ${ac_cv_path_WHICH+:} false; then :
12050   $as_echo_n "(cached) " >&6
12051 else
12052   case $WHICH in
12053   [\\/]* | ?:[\\/]*)
12054   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12055   ;;
12056   *)
12057   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12058 for as_dir in $PATH
12059 do
12060   IFS=$as_save_IFS
12061   test -z "$as_dir" && as_dir=.
12062     for ac_exec_ext in '' $ac_executable_extensions; do
12063   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12064     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12065     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12066     break 2
12067   fi
12068 done
12069   done
12070 IFS=$as_save_IFS
12071 
12072   ;;
12073 esac
12074 fi
12075 WHICH=$ac_cv_path_WHICH
12076 if test -n "$WHICH"; then
12077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12078 $as_echo "$WHICH" >&6; }
12079 else
12080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12081 $as_echo "no" >&6; }
12082 fi
12083 
12084 
12085           if test "x$WHICH" = x; then
12086             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12087           fi
12088         else
12089           # Otherwise we believe it is a complete path. Use it as it is.
12090           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12091 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12092           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12093 $as_echo_n "checking for WHICH... " >&6; }
12094           if test ! -x "$tool_specified"; then
12095             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12096 $as_echo "not found" >&6; }
12097             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12098           fi
12099           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12100 $as_echo "$tool_specified" >&6; }
12101         fi
12102       fi
12103     fi
12104 
12105   fi
12106 
12107 
12108 
12109   if test "x$WHICH" = x; then
12110     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12111   fi
12112 
12113 
12114 
12115 
12116 
12117   # Publish this variable in the help.
12118 
12119 
12120   if [ -z "${XARGS+x}" ]; then
12121     # The variable is not set by user, try to locate tool using the code snippet
12122     for ac_prog in xargs
12123 do
12124   # Extract the first word of "$ac_prog", so it can be a program name with args.
12125 set dummy $ac_prog; ac_word=$2
12126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12127 $as_echo_n "checking for $ac_word... " >&6; }
12128 if ${ac_cv_path_XARGS+:} false; then :
12129   $as_echo_n "(cached) " >&6
12130 else
12131   case $XARGS in
12132   [\\/]* | ?:[\\/]*)
12133   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12134   ;;
12135   *)
12136   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12137 for as_dir in $PATH
12138 do
12139   IFS=$as_save_IFS
12140   test -z "$as_dir" && as_dir=.
12141     for ac_exec_ext in '' $ac_executable_extensions; do
12142   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12143     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12144     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12145     break 2
12146   fi
12147 done
12148   done
12149 IFS=$as_save_IFS
12150 
12151   ;;
12152 esac
12153 fi
12154 XARGS=$ac_cv_path_XARGS
12155 if test -n "$XARGS"; then
12156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12157 $as_echo "$XARGS" >&6; }
12158 else
12159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12160 $as_echo "no" >&6; }
12161 fi
12162 
12163 
12164   test -n "$XARGS" && break
12165 done
12166 
12167   else
12168     # The variable is set, but is it from the command line or the environment?
12169 
12170     # Try to remove the string !XARGS! from our list.
12171     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12172     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12173       # If it failed, the variable was not from the command line. Ignore it,
12174       # but warn the user (except for BASH, which is always set by the calling BASH).
12175       if test "xXARGS" != xBASH; then
12176         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12177 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12178       fi
12179       # Try to locate tool using the code snippet
12180       for ac_prog in xargs
12181 do
12182   # Extract the first word of "$ac_prog", so it can be a program name with args.
12183 set dummy $ac_prog; ac_word=$2
12184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12185 $as_echo_n "checking for $ac_word... " >&6; }
12186 if ${ac_cv_path_XARGS+:} false; then :
12187   $as_echo_n "(cached) " >&6
12188 else
12189   case $XARGS in
12190   [\\/]* | ?:[\\/]*)
12191   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12192   ;;
12193   *)
12194   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12195 for as_dir in $PATH
12196 do
12197   IFS=$as_save_IFS
12198   test -z "$as_dir" && as_dir=.
12199     for ac_exec_ext in '' $ac_executable_extensions; do
12200   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12201     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12202     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12203     break 2
12204   fi
12205 done
12206   done
12207 IFS=$as_save_IFS
12208 
12209   ;;
12210 esac
12211 fi
12212 XARGS=$ac_cv_path_XARGS
12213 if test -n "$XARGS"; then
12214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12215 $as_echo "$XARGS" >&6; }
12216 else
12217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12218 $as_echo "no" >&6; }
12219 fi
12220 
12221 
12222   test -n "$XARGS" && break
12223 done
12224 
12225     else
12226       # If it succeeded, then it was overridden by the user. We will use it
12227       # for the tool.
12228 
12229       # First remove it from the list of overridden variables, so we can test
12230       # for unknown variables in the end.
12231       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12232 
12233       # Check if we try to supply an empty value
12234       if test "x$XARGS" = x; then
12235         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12236 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12237         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12238 $as_echo_n "checking for XARGS... " >&6; }
12239         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12240 $as_echo "disabled" >&6; }
12241       else
12242         # Check if the provided tool contains a complete path.
12243         tool_specified="$XARGS"
12244         tool_basename="${tool_specified##*/}"
12245         if test "x$tool_basename" = "x$tool_specified"; then
12246           # A command without a complete path is provided, search $PATH.
12247           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12248 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12249           # Extract the first word of "$tool_basename", so it can be a program name with args.
12250 set dummy $tool_basename; ac_word=$2
12251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12252 $as_echo_n "checking for $ac_word... " >&6; }
12253 if ${ac_cv_path_XARGS+:} false; then :
12254   $as_echo_n "(cached) " >&6
12255 else
12256   case $XARGS in
12257   [\\/]* | ?:[\\/]*)
12258   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12259   ;;
12260   *)
12261   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12262 for as_dir in $PATH
12263 do
12264   IFS=$as_save_IFS
12265   test -z "$as_dir" && as_dir=.
12266     for ac_exec_ext in '' $ac_executable_extensions; do
12267   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12268     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12269     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12270     break 2
12271   fi
12272 done
12273   done
12274 IFS=$as_save_IFS
12275 
12276   ;;
12277 esac
12278 fi
12279 XARGS=$ac_cv_path_XARGS
12280 if test -n "$XARGS"; then
12281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12282 $as_echo "$XARGS" >&6; }
12283 else
12284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12285 $as_echo "no" >&6; }
12286 fi
12287 
12288 
12289           if test "x$XARGS" = x; then
12290             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12291           fi
12292         else
12293           # Otherwise we believe it is a complete path. Use it as it is.
12294           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12295 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12296           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12297 $as_echo_n "checking for XARGS... " >&6; }
12298           if test ! -x "$tool_specified"; then
12299             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12300 $as_echo "not found" >&6; }
12301             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12302           fi
12303           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12304 $as_echo "$tool_specified" >&6; }
12305         fi
12306       fi
12307     fi
12308 
12309   fi
12310 
12311 
12312 
12313   if test "x$XARGS" = x; then
12314     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12315   fi
12316 
12317 
12318 
12319   # Then required tools that require some special treatment.
12320 
12321 
12322   # Publish this variable in the help.
12323 
12324 
12325   if [ -z "${AWK+x}" ]; then
12326     # The variable is not set by user, try to locate tool using the code snippet
12327     for ac_prog in gawk mawk nawk awk
12328 do
12329   # Extract the first word of "$ac_prog", so it can be a program name with args.
12330 set dummy $ac_prog; ac_word=$2
12331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12332 $as_echo_n "checking for $ac_word... " >&6; }
12333 if ${ac_cv_prog_AWK+:} false; then :
12334   $as_echo_n "(cached) " >&6
12335 else
12336   if test -n "$AWK"; then
12337   ac_cv_prog_AWK="$AWK" # Let the user override the test.
12338 else
12339 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12340 for as_dir in $PATH
12341 do
12342   IFS=$as_save_IFS
12343   test -z "$as_dir" && as_dir=.
12344     for ac_exec_ext in '' $ac_executable_extensions; do
12345   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12346     ac_cv_prog_AWK="$ac_prog"
12347     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12348     break 2
12349   fi
12350 done
12351   done
12352 IFS=$as_save_IFS
12353 
12354 fi
12355 fi
12356 AWK=$ac_cv_prog_AWK
12357 if test -n "$AWK"; then
12358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12359 $as_echo "$AWK" >&6; }
12360 else
12361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12362 $as_echo "no" >&6; }
12363 fi
12364 
12365 
12366   test -n "$AWK" && break
12367 done
12368 
12369   else
12370     # The variable is set, but is it from the command line or the environment?
12371 
12372     # Try to remove the string !AWK! from our list.
12373     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12374     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12375       # If it failed, the variable was not from the command line. Ignore it,
12376       # but warn the user (except for BASH, which is always set by the calling BASH).
12377       if test "xAWK" != xBASH; then
12378         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12379 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12380       fi
12381       # Try to locate tool using the code snippet
12382       for ac_prog in gawk mawk nawk awk
12383 do
12384   # Extract the first word of "$ac_prog", so it can be a program name with args.
12385 set dummy $ac_prog; ac_word=$2
12386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12387 $as_echo_n "checking for $ac_word... " >&6; }
12388 if ${ac_cv_prog_AWK+:} false; then :
12389   $as_echo_n "(cached) " >&6
12390 else
12391   if test -n "$AWK"; then
12392   ac_cv_prog_AWK="$AWK" # Let the user override the test.
12393 else
12394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12395 for as_dir in $PATH
12396 do
12397   IFS=$as_save_IFS
12398   test -z "$as_dir" && as_dir=.
12399     for ac_exec_ext in '' $ac_executable_extensions; do
12400   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12401     ac_cv_prog_AWK="$ac_prog"
12402     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12403     break 2
12404   fi
12405 done
12406   done
12407 IFS=$as_save_IFS
12408 
12409 fi
12410 fi
12411 AWK=$ac_cv_prog_AWK
12412 if test -n "$AWK"; then
12413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12414 $as_echo "$AWK" >&6; }
12415 else
12416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12417 $as_echo "no" >&6; }
12418 fi
12419 
12420 
12421   test -n "$AWK" && break
12422 done
12423 
12424     else
12425       # If it succeeded, then it was overridden by the user. We will use it
12426       # for the tool.
12427 
12428       # First remove it from the list of overridden variables, so we can test
12429       # for unknown variables in the end.
12430       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12431 
12432       # Check if we try to supply an empty value
12433       if test "x$AWK" = x; then
12434         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12435 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12436         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12437 $as_echo_n "checking for AWK... " >&6; }
12438         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12439 $as_echo "disabled" >&6; }
12440       else
12441         # Check if the provided tool contains a complete path.
12442         tool_specified="$AWK"
12443         tool_basename="${tool_specified##*/}"
12444         if test "x$tool_basename" = "x$tool_specified"; then
12445           # A command without a complete path is provided, search $PATH.
12446           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12447 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12448           # Extract the first word of "$tool_basename", so it can be a program name with args.
12449 set dummy $tool_basename; ac_word=$2
12450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12451 $as_echo_n "checking for $ac_word... " >&6; }
12452 if ${ac_cv_path_AWK+:} false; then :
12453   $as_echo_n "(cached) " >&6
12454 else
12455   case $AWK in
12456   [\\/]* | ?:[\\/]*)
12457   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12458   ;;
12459   *)
12460   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12461 for as_dir in $PATH
12462 do
12463   IFS=$as_save_IFS
12464   test -z "$as_dir" && as_dir=.
12465     for ac_exec_ext in '' $ac_executable_extensions; do
12466   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12467     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12468     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12469     break 2
12470   fi
12471 done
12472   done
12473 IFS=$as_save_IFS
12474 
12475   ;;
12476 esac
12477 fi
12478 AWK=$ac_cv_path_AWK
12479 if test -n "$AWK"; then
12480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12481 $as_echo "$AWK" >&6; }
12482 else
12483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12484 $as_echo "no" >&6; }
12485 fi
12486 
12487 
12488           if test "x$AWK" = x; then
12489             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12490           fi
12491         else
12492           # Otherwise we believe it is a complete path. Use it as it is.
12493           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12494 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12495           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12496 $as_echo_n "checking for AWK... " >&6; }
12497           if test ! -x "$tool_specified"; then
12498             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12499 $as_echo "not found" >&6; }
12500             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12501           fi
12502           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12503 $as_echo "$tool_specified" >&6; }
12504         fi
12505       fi
12506     fi
12507 
12508   fi
12509 
12510 
12511   if test "x$AWK" = x; then
12512     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12513   fi
12514 
12515 
12516 
12517 
12518   # Publish this variable in the help.
12519 
12520 
12521   if [ -z "${GREP+x}" ]; then
12522     # The variable is not set by user, try to locate tool using the code snippet
12523     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12524 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12525 if ${ac_cv_path_GREP+:} false; then :
12526   $as_echo_n "(cached) " >&6
12527 else
12528   if test -z "$GREP"; then
12529   ac_path_GREP_found=false
12530   # Loop through the user's path and test for each of PROGNAME-LIST
12531   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12532 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12533 do
12534   IFS=$as_save_IFS
12535   test -z "$as_dir" && as_dir=.
12536     for ac_prog in grep ggrep; do
12537     for ac_exec_ext in '' $ac_executable_extensions; do
12538       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12539       as_fn_executable_p "$ac_path_GREP" || continue
12540 # Check for GNU ac_path_GREP and select it if it is found.
12541   # Check for GNU $ac_path_GREP
12542 case `"$ac_path_GREP" --version 2>&1` in
12543 *GNU*)
12544   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12545 *)
12546   ac_count=0
12547   $as_echo_n 0123456789 >"conftest.in"
12548   while :
12549   do
12550     cat "conftest.in" "conftest.in" >"conftest.tmp"
12551     mv "conftest.tmp" "conftest.in"
12552     cp "conftest.in" "conftest.nl"
12553     $as_echo 'GREP' >> "conftest.nl"
12554     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12555     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12556     as_fn_arith $ac_count + 1 && ac_count=$as_val
12557     if test $ac_count -gt ${ac_path_GREP_max-0}; then
12558       # Best one so far, save it but keep looking for a better one
12559       ac_cv_path_GREP="$ac_path_GREP"
12560       ac_path_GREP_max=$ac_count
12561     fi
12562     # 10*(2^10) chars as input seems more than enough
12563     test $ac_count -gt 10 && break
12564   done
12565   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12566 esac
12567 
12568       $ac_path_GREP_found && break 3
12569     done
12570   done
12571   done
12572 IFS=$as_save_IFS
12573   if test -z "$ac_cv_path_GREP"; then
12574     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12575   fi
12576 else
12577   ac_cv_path_GREP=$GREP
12578 fi
12579 
12580 fi
12581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12582 $as_echo "$ac_cv_path_GREP" >&6; }
12583  GREP="$ac_cv_path_GREP"
12584 
12585 
12586   else
12587     # The variable is set, but is it from the command line or the environment?
12588 
12589     # Try to remove the string !GREP! from our list.
12590     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12591     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12592       # If it failed, the variable was not from the command line. Ignore it,
12593       # but warn the user (except for BASH, which is always set by the calling BASH).
12594       if test "xGREP" != xBASH; then
12595         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12596 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12597       fi
12598       # Try to locate tool using the code snippet
12599       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12600 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12601 if ${ac_cv_path_GREP+:} false; then :
12602   $as_echo_n "(cached) " >&6
12603 else
12604   if test -z "$GREP"; then
12605   ac_path_GREP_found=false
12606   # Loop through the user's path and test for each of PROGNAME-LIST
12607   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12608 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12609 do
12610   IFS=$as_save_IFS
12611   test -z "$as_dir" && as_dir=.
12612     for ac_prog in grep ggrep; do
12613     for ac_exec_ext in '' $ac_executable_extensions; do
12614       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12615       as_fn_executable_p "$ac_path_GREP" || continue
12616 # Check for GNU ac_path_GREP and select it if it is found.
12617   # Check for GNU $ac_path_GREP
12618 case `"$ac_path_GREP" --version 2>&1` in
12619 *GNU*)
12620   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12621 *)
12622   ac_count=0
12623   $as_echo_n 0123456789 >"conftest.in"
12624   while :
12625   do
12626     cat "conftest.in" "conftest.in" >"conftest.tmp"
12627     mv "conftest.tmp" "conftest.in"
12628     cp "conftest.in" "conftest.nl"
12629     $as_echo 'GREP' >> "conftest.nl"
12630     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12631     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12632     as_fn_arith $ac_count + 1 && ac_count=$as_val
12633     if test $ac_count -gt ${ac_path_GREP_max-0}; then
12634       # Best one so far, save it but keep looking for a better one
12635       ac_cv_path_GREP="$ac_path_GREP"
12636       ac_path_GREP_max=$ac_count
12637     fi
12638     # 10*(2^10) chars as input seems more than enough
12639     test $ac_count -gt 10 && break
12640   done
12641   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12642 esac
12643 
12644       $ac_path_GREP_found && break 3
12645     done
12646   done
12647   done
12648 IFS=$as_save_IFS
12649   if test -z "$ac_cv_path_GREP"; then
12650     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12651   fi
12652 else
12653   ac_cv_path_GREP=$GREP
12654 fi
12655 
12656 fi
12657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12658 $as_echo "$ac_cv_path_GREP" >&6; }
12659  GREP="$ac_cv_path_GREP"
12660 
12661 
12662     else
12663       # If it succeeded, then it was overridden by the user. We will use it
12664       # for the tool.
12665 
12666       # First remove it from the list of overridden variables, so we can test
12667       # for unknown variables in the end.
12668       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12669 
12670       # Check if we try to supply an empty value
12671       if test "x$GREP" = x; then
12672         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12673 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12674         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12675 $as_echo_n "checking for GREP... " >&6; }
12676         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12677 $as_echo "disabled" >&6; }
12678       else
12679         # Check if the provided tool contains a complete path.
12680         tool_specified="$GREP"
12681         tool_basename="${tool_specified##*/}"
12682         if test "x$tool_basename" = "x$tool_specified"; then
12683           # A command without a complete path is provided, search $PATH.
12684           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12685 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12686           # Extract the first word of "$tool_basename", so it can be a program name with args.
12687 set dummy $tool_basename; ac_word=$2
12688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12689 $as_echo_n "checking for $ac_word... " >&6; }
12690 if ${ac_cv_path_GREP+:} false; then :
12691   $as_echo_n "(cached) " >&6
12692 else
12693   case $GREP in
12694   [\\/]* | ?:[\\/]*)
12695   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12696   ;;
12697   *)
12698   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12699 for as_dir in $PATH
12700 do
12701   IFS=$as_save_IFS
12702   test -z "$as_dir" && as_dir=.
12703     for ac_exec_ext in '' $ac_executable_extensions; do
12704   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12705     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12706     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12707     break 2
12708   fi
12709 done
12710   done
12711 IFS=$as_save_IFS
12712 
12713   ;;
12714 esac
12715 fi
12716 GREP=$ac_cv_path_GREP
12717 if test -n "$GREP"; then
12718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12719 $as_echo "$GREP" >&6; }
12720 else
12721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12722 $as_echo "no" >&6; }
12723 fi
12724 
12725 
12726           if test "x$GREP" = x; then
12727             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12728           fi
12729         else
12730           # Otherwise we believe it is a complete path. Use it as it is.
12731           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12732 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12733           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12734 $as_echo_n "checking for GREP... " >&6; }
12735           if test ! -x "$tool_specified"; then
12736             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12737 $as_echo "not found" >&6; }
12738             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12739           fi
12740           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12741 $as_echo "$tool_specified" >&6; }
12742         fi
12743       fi
12744     fi
12745 
12746   fi
12747 
12748 
12749   if test "x$GREP" = x; then
12750     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12751   fi
12752 
12753 
12754 
12755 
12756   # Publish this variable in the help.
12757 
12758 
12759   if [ -z "${EGREP+x}" ]; then
12760     # The variable is not set by user, try to locate tool using the code snippet
12761     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12762 $as_echo_n "checking for egrep... " >&6; }
12763 if ${ac_cv_path_EGREP+:} false; then :
12764   $as_echo_n "(cached) " >&6
12765 else
12766   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12767    then ac_cv_path_EGREP="$GREP -E"
12768    else
12769      if test -z "$EGREP"; then
12770   ac_path_EGREP_found=false
12771   # Loop through the user's path and test for each of PROGNAME-LIST
12772   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12773 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12774 do
12775   IFS=$as_save_IFS
12776   test -z "$as_dir" && as_dir=.
12777     for ac_prog in egrep; do
12778     for ac_exec_ext in '' $ac_executable_extensions; do
12779       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12780       as_fn_executable_p "$ac_path_EGREP" || continue
12781 # Check for GNU ac_path_EGREP and select it if it is found.
12782   # Check for GNU $ac_path_EGREP
12783 case `"$ac_path_EGREP" --version 2>&1` in
12784 *GNU*)
12785   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12786 *)
12787   ac_count=0
12788   $as_echo_n 0123456789 >"conftest.in"
12789   while :
12790   do
12791     cat "conftest.in" "conftest.in" >"conftest.tmp"
12792     mv "conftest.tmp" "conftest.in"
12793     cp "conftest.in" "conftest.nl"
12794     $as_echo 'EGREP' >> "conftest.nl"
12795     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12796     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12797     as_fn_arith $ac_count + 1 && ac_count=$as_val
12798     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12799       # Best one so far, save it but keep looking for a better one
12800       ac_cv_path_EGREP="$ac_path_EGREP"
12801       ac_path_EGREP_max=$ac_count
12802     fi
12803     # 10*(2^10) chars as input seems more than enough
12804     test $ac_count -gt 10 && break
12805   done
12806   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12807 esac
12808 
12809       $ac_path_EGREP_found && break 3
12810     done
12811   done
12812   done
12813 IFS=$as_save_IFS
12814   if test -z "$ac_cv_path_EGREP"; then
12815     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12816   fi
12817 else
12818   ac_cv_path_EGREP=$EGREP
12819 fi
12820 
12821    fi
12822 fi
12823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12824 $as_echo "$ac_cv_path_EGREP" >&6; }
12825  EGREP="$ac_cv_path_EGREP"
12826 
12827 
12828   else
12829     # The variable is set, but is it from the command line or the environment?
12830 
12831     # Try to remove the string !EGREP! from our list.
12832     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12833     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12834       # If it failed, the variable was not from the command line. Ignore it,
12835       # but warn the user (except for BASH, which is always set by the calling BASH).
12836       if test "xEGREP" != xBASH; then
12837         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12838 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12839       fi
12840       # Try to locate tool using the code snippet
12841       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12842 $as_echo_n "checking for egrep... " >&6; }
12843 if ${ac_cv_path_EGREP+:} false; then :
12844   $as_echo_n "(cached) " >&6
12845 else
12846   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12847    then ac_cv_path_EGREP="$GREP -E"
12848    else
12849      if test -z "$EGREP"; then
12850   ac_path_EGREP_found=false
12851   # Loop through the user's path and test for each of PROGNAME-LIST
12852   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12853 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12854 do
12855   IFS=$as_save_IFS
12856   test -z "$as_dir" && as_dir=.
12857     for ac_prog in egrep; do
12858     for ac_exec_ext in '' $ac_executable_extensions; do
12859       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12860       as_fn_executable_p "$ac_path_EGREP" || continue
12861 # Check for GNU ac_path_EGREP and select it if it is found.
12862   # Check for GNU $ac_path_EGREP
12863 case `"$ac_path_EGREP" --version 2>&1` in
12864 *GNU*)
12865   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12866 *)
12867   ac_count=0
12868   $as_echo_n 0123456789 >"conftest.in"
12869   while :
12870   do
12871     cat "conftest.in" "conftest.in" >"conftest.tmp"
12872     mv "conftest.tmp" "conftest.in"
12873     cp "conftest.in" "conftest.nl"
12874     $as_echo 'EGREP' >> "conftest.nl"
12875     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12876     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12877     as_fn_arith $ac_count + 1 && ac_count=$as_val
12878     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12879       # Best one so far, save it but keep looking for a better one
12880       ac_cv_path_EGREP="$ac_path_EGREP"
12881       ac_path_EGREP_max=$ac_count
12882     fi
12883     # 10*(2^10) chars as input seems more than enough
12884     test $ac_count -gt 10 && break
12885   done
12886   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12887 esac
12888 
12889       $ac_path_EGREP_found && break 3
12890     done
12891   done
12892   done
12893 IFS=$as_save_IFS
12894   if test -z "$ac_cv_path_EGREP"; then
12895     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12896   fi
12897 else
12898   ac_cv_path_EGREP=$EGREP
12899 fi
12900 
12901    fi
12902 fi
12903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12904 $as_echo "$ac_cv_path_EGREP" >&6; }
12905  EGREP="$ac_cv_path_EGREP"
12906 
12907 
12908     else
12909       # If it succeeded, then it was overridden by the user. We will use it
12910       # for the tool.
12911 
12912       # First remove it from the list of overridden variables, so we can test
12913       # for unknown variables in the end.
12914       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12915 
12916       # Check if we try to supply an empty value
12917       if test "x$EGREP" = x; then
12918         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
12919 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
12920         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12921 $as_echo_n "checking for EGREP... " >&6; }
12922         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12923 $as_echo "disabled" >&6; }
12924       else
12925         # Check if the provided tool contains a complete path.
12926         tool_specified="$EGREP"
12927         tool_basename="${tool_specified##*/}"
12928         if test "x$tool_basename" = "x$tool_specified"; then
12929           # A command without a complete path is provided, search $PATH.
12930           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12931 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12932           # Extract the first word of "$tool_basename", so it can be a program name with args.
12933 set dummy $tool_basename; ac_word=$2
12934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12935 $as_echo_n "checking for $ac_word... " >&6; }
12936 if ${ac_cv_path_EGREP+:} false; then :
12937   $as_echo_n "(cached) " >&6
12938 else
12939   case $EGREP in
12940   [\\/]* | ?:[\\/]*)
12941   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12942   ;;
12943   *)
12944   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12945 for as_dir in $PATH
12946 do
12947   IFS=$as_save_IFS
12948   test -z "$as_dir" && as_dir=.
12949     for ac_exec_ext in '' $ac_executable_extensions; do
12950   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12951     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12952     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12953     break 2
12954   fi
12955 done
12956   done
12957 IFS=$as_save_IFS
12958 
12959   ;;
12960 esac
12961 fi
12962 EGREP=$ac_cv_path_EGREP
12963 if test -n "$EGREP"; then
12964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12965 $as_echo "$EGREP" >&6; }
12966 else
12967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12968 $as_echo "no" >&6; }
12969 fi
12970 
12971 
12972           if test "x$EGREP" = x; then
12973             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12974           fi
12975         else
12976           # Otherwise we believe it is a complete path. Use it as it is.
12977           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12978 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12979           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12980 $as_echo_n "checking for EGREP... " >&6; }
12981           if test ! -x "$tool_specified"; then
12982             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12983 $as_echo "not found" >&6; }
12984             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12985           fi
12986           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12987 $as_echo "$tool_specified" >&6; }
12988         fi
12989       fi
12990     fi
12991 
12992   fi
12993 
12994 
12995   if test "x$EGREP" = x; then
12996     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12997   fi
12998 
12999 
13000 
13001 
13002   # Publish this variable in the help.
13003 
13004 
13005   if [ -z "${FGREP+x}" ]; then
13006     # The variable is not set by user, try to locate tool using the code snippet
13007     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13008 $as_echo_n "checking for fgrep... " >&6; }
13009 if ${ac_cv_path_FGREP+:} false; then :
13010   $as_echo_n "(cached) " >&6
13011 else
13012   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13013    then ac_cv_path_FGREP="$GREP -F"
13014    else
13015      if test -z "$FGREP"; then
13016   ac_path_FGREP_found=false
13017   # Loop through the user's path and test for each of PROGNAME-LIST
13018   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13019 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13020 do
13021   IFS=$as_save_IFS
13022   test -z "$as_dir" && as_dir=.
13023     for ac_prog in fgrep; do
13024     for ac_exec_ext in '' $ac_executable_extensions; do
13025       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13026       as_fn_executable_p "$ac_path_FGREP" || continue
13027 # Check for GNU ac_path_FGREP and select it if it is found.
13028   # Check for GNU $ac_path_FGREP
13029 case `"$ac_path_FGREP" --version 2>&1` in
13030 *GNU*)
13031   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13032 *)
13033   ac_count=0
13034   $as_echo_n 0123456789 >"conftest.in"
13035   while :
13036   do
13037     cat "conftest.in" "conftest.in" >"conftest.tmp"
13038     mv "conftest.tmp" "conftest.in"
13039     cp "conftest.in" "conftest.nl"
13040     $as_echo 'FGREP' >> "conftest.nl"
13041     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13042     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13043     as_fn_arith $ac_count + 1 && ac_count=$as_val
13044     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13045       # Best one so far, save it but keep looking for a better one
13046       ac_cv_path_FGREP="$ac_path_FGREP"
13047       ac_path_FGREP_max=$ac_count
13048     fi
13049     # 10*(2^10) chars as input seems more than enough
13050     test $ac_count -gt 10 && break
13051   done
13052   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13053 esac
13054 
13055       $ac_path_FGREP_found && break 3
13056     done
13057   done
13058   done
13059 IFS=$as_save_IFS
13060   if test -z "$ac_cv_path_FGREP"; then
13061     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13062   fi
13063 else
13064   ac_cv_path_FGREP=$FGREP
13065 fi
13066 
13067    fi
13068 fi
13069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13070 $as_echo "$ac_cv_path_FGREP" >&6; }
13071  FGREP="$ac_cv_path_FGREP"
13072 
13073 
13074   else
13075     # The variable is set, but is it from the command line or the environment?
13076 
13077     # Try to remove the string !FGREP! from our list.
13078     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13079     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13080       # If it failed, the variable was not from the command line. Ignore it,
13081       # but warn the user (except for BASH, which is always set by the calling BASH).
13082       if test "xFGREP" != xBASH; then
13083         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13084 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13085       fi
13086       # Try to locate tool using the code snippet
13087       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13088 $as_echo_n "checking for fgrep... " >&6; }
13089 if ${ac_cv_path_FGREP+:} false; then :
13090   $as_echo_n "(cached) " >&6
13091 else
13092   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13093    then ac_cv_path_FGREP="$GREP -F"
13094    else
13095      if test -z "$FGREP"; then
13096   ac_path_FGREP_found=false
13097   # Loop through the user's path and test for each of PROGNAME-LIST
13098   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13099 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13100 do
13101   IFS=$as_save_IFS
13102   test -z "$as_dir" && as_dir=.
13103     for ac_prog in fgrep; do
13104     for ac_exec_ext in '' $ac_executable_extensions; do
13105       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13106       as_fn_executable_p "$ac_path_FGREP" || continue
13107 # Check for GNU ac_path_FGREP and select it if it is found.
13108   # Check for GNU $ac_path_FGREP
13109 case `"$ac_path_FGREP" --version 2>&1` in
13110 *GNU*)
13111   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13112 *)
13113   ac_count=0
13114   $as_echo_n 0123456789 >"conftest.in"
13115   while :
13116   do
13117     cat "conftest.in" "conftest.in" >"conftest.tmp"
13118     mv "conftest.tmp" "conftest.in"
13119     cp "conftest.in" "conftest.nl"
13120     $as_echo 'FGREP' >> "conftest.nl"
13121     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13122     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13123     as_fn_arith $ac_count + 1 && ac_count=$as_val
13124     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13125       # Best one so far, save it but keep looking for a better one
13126       ac_cv_path_FGREP="$ac_path_FGREP"
13127       ac_path_FGREP_max=$ac_count
13128     fi
13129     # 10*(2^10) chars as input seems more than enough
13130     test $ac_count -gt 10 && break
13131   done
13132   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13133 esac
13134 
13135       $ac_path_FGREP_found && break 3
13136     done
13137   done
13138   done
13139 IFS=$as_save_IFS
13140   if test -z "$ac_cv_path_FGREP"; then
13141     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13142   fi
13143 else
13144   ac_cv_path_FGREP=$FGREP
13145 fi
13146 
13147    fi
13148 fi
13149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13150 $as_echo "$ac_cv_path_FGREP" >&6; }
13151  FGREP="$ac_cv_path_FGREP"
13152 
13153 
13154     else
13155       # If it succeeded, then it was overridden by the user. We will use it
13156       # for the tool.
13157 
13158       # First remove it from the list of overridden variables, so we can test
13159       # for unknown variables in the end.
13160       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13161 
13162       # Check if we try to supply an empty value
13163       if test "x$FGREP" = x; then
13164         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13165 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13166         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13167 $as_echo_n "checking for FGREP... " >&6; }
13168         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13169 $as_echo "disabled" >&6; }
13170       else
13171         # Check if the provided tool contains a complete path.
13172         tool_specified="$FGREP"
13173         tool_basename="${tool_specified##*/}"
13174         if test "x$tool_basename" = "x$tool_specified"; then
13175           # A command without a complete path is provided, search $PATH.
13176           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13177 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13178           # Extract the first word of "$tool_basename", so it can be a program name with args.
13179 set dummy $tool_basename; ac_word=$2
13180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13181 $as_echo_n "checking for $ac_word... " >&6; }
13182 if ${ac_cv_path_FGREP+:} false; then :
13183   $as_echo_n "(cached) " >&6
13184 else
13185   case $FGREP in
13186   [\\/]* | ?:[\\/]*)
13187   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13188   ;;
13189   *)
13190   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13191 for as_dir in $PATH
13192 do
13193   IFS=$as_save_IFS
13194   test -z "$as_dir" && as_dir=.
13195     for ac_exec_ext in '' $ac_executable_extensions; do
13196   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13197     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13198     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13199     break 2
13200   fi
13201 done
13202   done
13203 IFS=$as_save_IFS
13204 
13205   ;;
13206 esac
13207 fi
13208 FGREP=$ac_cv_path_FGREP
13209 if test -n "$FGREP"; then
13210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13211 $as_echo "$FGREP" >&6; }
13212 else
13213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13214 $as_echo "no" >&6; }
13215 fi
13216 
13217 
13218           if test "x$FGREP" = x; then
13219             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13220           fi
13221         else
13222           # Otherwise we believe it is a complete path. Use it as it is.
13223           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13224 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13225           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13226 $as_echo_n "checking for FGREP... " >&6; }
13227           if test ! -x "$tool_specified"; then
13228             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13229 $as_echo "not found" >&6; }
13230             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13231           fi
13232           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13233 $as_echo "$tool_specified" >&6; }
13234         fi
13235       fi
13236     fi
13237 
13238   fi
13239 
13240 
13241   if test "x$FGREP" = x; then
13242     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13243   fi
13244 
13245 
13246 
13247 
13248   # Publish this variable in the help.
13249 
13250 
13251   if [ -z "${SED+x}" ]; then
13252     # The variable is not set by user, try to locate tool using the code snippet
13253     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13254 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13255 if ${ac_cv_path_SED+:} false; then :
13256   $as_echo_n "(cached) " >&6
13257 else
13258             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13259      for ac_i in 1 2 3 4 5 6 7; do
13260        ac_script="$ac_script$as_nl$ac_script"
13261      done
13262      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13263      { ac_script=; unset ac_script;}
13264      if test -z "$SED"; then
13265   ac_path_SED_found=false
13266   # Loop through the user's path and test for each of PROGNAME-LIST
13267   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13268 for as_dir in $PATH
13269 do
13270   IFS=$as_save_IFS
13271   test -z "$as_dir" && as_dir=.
13272     for ac_prog in sed gsed; do
13273     for ac_exec_ext in '' $ac_executable_extensions; do
13274       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13275       as_fn_executable_p "$ac_path_SED" || continue
13276 # Check for GNU ac_path_SED and select it if it is found.
13277   # Check for GNU $ac_path_SED
13278 case `"$ac_path_SED" --version 2>&1` in
13279 *GNU*)
13280   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13281 *)
13282   ac_count=0
13283   $as_echo_n 0123456789 >"conftest.in"
13284   while :
13285   do
13286     cat "conftest.in" "conftest.in" >"conftest.tmp"
13287     mv "conftest.tmp" "conftest.in"
13288     cp "conftest.in" "conftest.nl"
13289     $as_echo '' >> "conftest.nl"
13290     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13291     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13292     as_fn_arith $ac_count + 1 && ac_count=$as_val
13293     if test $ac_count -gt ${ac_path_SED_max-0}; then
13294       # Best one so far, save it but keep looking for a better one
13295       ac_cv_path_SED="$ac_path_SED"
13296       ac_path_SED_max=$ac_count
13297     fi
13298     # 10*(2^10) chars as input seems more than enough
13299     test $ac_count -gt 10 && break
13300   done
13301   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13302 esac
13303 
13304       $ac_path_SED_found && break 3
13305     done
13306   done
13307   done
13308 IFS=$as_save_IFS
13309   if test -z "$ac_cv_path_SED"; then
13310     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13311   fi
13312 else
13313   ac_cv_path_SED=$SED
13314 fi
13315 
13316 fi
13317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13318 $as_echo "$ac_cv_path_SED" >&6; }
13319  SED="$ac_cv_path_SED"
13320   rm -f conftest.sed
13321 
13322   else
13323     # The variable is set, but is it from the command line or the environment?
13324 
13325     # Try to remove the string !SED! from our list.
13326     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13327     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13328       # If it failed, the variable was not from the command line. Ignore it,
13329       # but warn the user (except for BASH, which is always set by the calling BASH).
13330       if test "xSED" != xBASH; then
13331         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13332 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13333       fi
13334       # Try to locate tool using the code snippet
13335       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13336 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13337 if ${ac_cv_path_SED+:} false; then :
13338   $as_echo_n "(cached) " >&6
13339 else
13340             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13341      for ac_i in 1 2 3 4 5 6 7; do
13342        ac_script="$ac_script$as_nl$ac_script"
13343      done
13344      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13345      { ac_script=; unset ac_script;}
13346      if test -z "$SED"; then
13347   ac_path_SED_found=false
13348   # Loop through the user's path and test for each of PROGNAME-LIST
13349   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13350 for as_dir in $PATH
13351 do
13352   IFS=$as_save_IFS
13353   test -z "$as_dir" && as_dir=.
13354     for ac_prog in sed gsed; do
13355     for ac_exec_ext in '' $ac_executable_extensions; do
13356       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13357       as_fn_executable_p "$ac_path_SED" || continue
13358 # Check for GNU ac_path_SED and select it if it is found.
13359   # Check for GNU $ac_path_SED
13360 case `"$ac_path_SED" --version 2>&1` in
13361 *GNU*)
13362   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13363 *)
13364   ac_count=0
13365   $as_echo_n 0123456789 >"conftest.in"
13366   while :
13367   do
13368     cat "conftest.in" "conftest.in" >"conftest.tmp"
13369     mv "conftest.tmp" "conftest.in"
13370     cp "conftest.in" "conftest.nl"
13371     $as_echo '' >> "conftest.nl"
13372     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13373     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13374     as_fn_arith $ac_count + 1 && ac_count=$as_val
13375     if test $ac_count -gt ${ac_path_SED_max-0}; then
13376       # Best one so far, save it but keep looking for a better one
13377       ac_cv_path_SED="$ac_path_SED"
13378       ac_path_SED_max=$ac_count
13379     fi
13380     # 10*(2^10) chars as input seems more than enough
13381     test $ac_count -gt 10 && break
13382   done
13383   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13384 esac
13385 
13386       $ac_path_SED_found && break 3
13387     done
13388   done
13389   done
13390 IFS=$as_save_IFS
13391   if test -z "$ac_cv_path_SED"; then
13392     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13393   fi
13394 else
13395   ac_cv_path_SED=$SED
13396 fi
13397 
13398 fi
13399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13400 $as_echo "$ac_cv_path_SED" >&6; }
13401  SED="$ac_cv_path_SED"
13402   rm -f conftest.sed
13403 
13404     else
13405       # If it succeeded, then it was overridden by the user. We will use it
13406       # for the tool.
13407 
13408       # First remove it from the list of overridden variables, so we can test
13409       # for unknown variables in the end.
13410       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13411 
13412       # Check if we try to supply an empty value
13413       if test "x$SED" = x; then
13414         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13415 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13416         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13417 $as_echo_n "checking for SED... " >&6; }
13418         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13419 $as_echo "disabled" >&6; }
13420       else
13421         # Check if the provided tool contains a complete path.
13422         tool_specified="$SED"
13423         tool_basename="${tool_specified##*/}"
13424         if test "x$tool_basename" = "x$tool_specified"; then
13425           # A command without a complete path is provided, search $PATH.
13426           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13427 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13428           # Extract the first word of "$tool_basename", so it can be a program name with args.
13429 set dummy $tool_basename; ac_word=$2
13430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13431 $as_echo_n "checking for $ac_word... " >&6; }
13432 if ${ac_cv_path_SED+:} false; then :
13433   $as_echo_n "(cached) " >&6
13434 else
13435   case $SED in
13436   [\\/]* | ?:[\\/]*)
13437   ac_cv_path_SED="$SED" # Let the user override the test with a path.
13438   ;;
13439   *)
13440   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13441 for as_dir in $PATH
13442 do
13443   IFS=$as_save_IFS
13444   test -z "$as_dir" && as_dir=.
13445     for ac_exec_ext in '' $ac_executable_extensions; do
13446   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13447     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13448     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13449     break 2
13450   fi
13451 done
13452   done
13453 IFS=$as_save_IFS
13454 
13455   ;;
13456 esac
13457 fi
13458 SED=$ac_cv_path_SED
13459 if test -n "$SED"; then
13460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13461 $as_echo "$SED" >&6; }
13462 else
13463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13464 $as_echo "no" >&6; }
13465 fi
13466 
13467 
13468           if test "x$SED" = x; then
13469             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13470           fi
13471         else
13472           # Otherwise we believe it is a complete path. Use it as it is.
13473           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13474 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13475           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13476 $as_echo_n "checking for SED... " >&6; }
13477           if test ! -x "$tool_specified"; then
13478             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13479 $as_echo "not found" >&6; }
13480             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13481           fi
13482           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13483 $as_echo "$tool_specified" >&6; }
13484         fi
13485       fi
13486     fi
13487 
13488   fi
13489 
13490 
13491   if test "x$SED" = x; then
13492     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13493   fi
13494 
13495 
13496 
13497   # Always force rm.
13498   RM="$RM -f"
13499 
13500   # pwd behaves differently on various platforms and some don't support the -L flag.
13501   # Always use the bash builtin pwd to get uniform behavior.
13502   THEPWDCMD=pwd
13503 
13504   # These are not required on all platforms
13505 
13506 
13507   # Publish this variable in the help.
13508 
13509 
13510   if [ -z "${CYGPATH+x}" ]; then
13511     # The variable is not set by user, try to locate tool using the code snippet
13512     for ac_prog in cygpath
13513 do
13514   # Extract the first word of "$ac_prog", so it can be a program name with args.
13515 set dummy $ac_prog; ac_word=$2
13516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13517 $as_echo_n "checking for $ac_word... " >&6; }
13518 if ${ac_cv_path_CYGPATH+:} false; then :
13519   $as_echo_n "(cached) " >&6
13520 else
13521   case $CYGPATH in
13522   [\\/]* | ?:[\\/]*)
13523   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13524   ;;
13525   *)
13526   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13527 for as_dir in $PATH
13528 do
13529   IFS=$as_save_IFS
13530   test -z "$as_dir" && as_dir=.
13531     for ac_exec_ext in '' $ac_executable_extensions; do
13532   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13533     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13534     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13535     break 2
13536   fi
13537 done
13538   done
13539 IFS=$as_save_IFS
13540 
13541   ;;
13542 esac
13543 fi
13544 CYGPATH=$ac_cv_path_CYGPATH
13545 if test -n "$CYGPATH"; then
13546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13547 $as_echo "$CYGPATH" >&6; }
13548 else
13549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13550 $as_echo "no" >&6; }
13551 fi
13552 
13553 
13554   test -n "$CYGPATH" && break
13555 done
13556 
13557   else
13558     # The variable is set, but is it from the command line or the environment?
13559 
13560     # Try to remove the string !CYGPATH! from our list.
13561     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13562     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13563       # If it failed, the variable was not from the command line. Ignore it,
13564       # but warn the user (except for BASH, which is always set by the calling BASH).
13565       if test "xCYGPATH" != xBASH; then
13566         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13567 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13568       fi
13569       # Try to locate tool using the code snippet
13570       for ac_prog in cygpath
13571 do
13572   # Extract the first word of "$ac_prog", so it can be a program name with args.
13573 set dummy $ac_prog; ac_word=$2
13574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13575 $as_echo_n "checking for $ac_word... " >&6; }
13576 if ${ac_cv_path_CYGPATH+:} false; then :
13577   $as_echo_n "(cached) " >&6
13578 else
13579   case $CYGPATH in
13580   [\\/]* | ?:[\\/]*)
13581   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13582   ;;
13583   *)
13584   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13585 for as_dir in $PATH
13586 do
13587   IFS=$as_save_IFS
13588   test -z "$as_dir" && as_dir=.
13589     for ac_exec_ext in '' $ac_executable_extensions; do
13590   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13591     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13592     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13593     break 2
13594   fi
13595 done
13596   done
13597 IFS=$as_save_IFS
13598 
13599   ;;
13600 esac
13601 fi
13602 CYGPATH=$ac_cv_path_CYGPATH
13603 if test -n "$CYGPATH"; then
13604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13605 $as_echo "$CYGPATH" >&6; }
13606 else
13607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13608 $as_echo "no" >&6; }
13609 fi
13610 
13611 
13612   test -n "$CYGPATH" && break
13613 done
13614 
13615     else
13616       # If it succeeded, then it was overridden by the user. We will use it
13617       # for the tool.
13618 
13619       # First remove it from the list of overridden variables, so we can test
13620       # for unknown variables in the end.
13621       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13622 
13623       # Check if we try to supply an empty value
13624       if test "x$CYGPATH" = x; then
13625         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13626 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13627         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13628 $as_echo_n "checking for CYGPATH... " >&6; }
13629         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13630 $as_echo "disabled" >&6; }
13631       else
13632         # Check if the provided tool contains a complete path.
13633         tool_specified="$CYGPATH"
13634         tool_basename="${tool_specified##*/}"
13635         if test "x$tool_basename" = "x$tool_specified"; then
13636           # A command without a complete path is provided, search $PATH.
13637           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13638 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13639           # Extract the first word of "$tool_basename", so it can be a program name with args.
13640 set dummy $tool_basename; ac_word=$2
13641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13642 $as_echo_n "checking for $ac_word... " >&6; }
13643 if ${ac_cv_path_CYGPATH+:} false; then :
13644   $as_echo_n "(cached) " >&6
13645 else
13646   case $CYGPATH in
13647   [\\/]* | ?:[\\/]*)
13648   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13649   ;;
13650   *)
13651   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13652 for as_dir in $PATH
13653 do
13654   IFS=$as_save_IFS
13655   test -z "$as_dir" && as_dir=.
13656     for ac_exec_ext in '' $ac_executable_extensions; do
13657   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13658     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13659     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13660     break 2
13661   fi
13662 done
13663   done
13664 IFS=$as_save_IFS
13665 
13666   ;;
13667 esac
13668 fi
13669 CYGPATH=$ac_cv_path_CYGPATH
13670 if test -n "$CYGPATH"; then
13671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13672 $as_echo "$CYGPATH" >&6; }
13673 else
13674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13675 $as_echo "no" >&6; }
13676 fi
13677 
13678 
13679           if test "x$CYGPATH" = x; then
13680             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13681           fi
13682         else
13683           # Otherwise we believe it is a complete path. Use it as it is.
13684           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13685 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13686           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13687 $as_echo_n "checking for CYGPATH... " >&6; }
13688           if test ! -x "$tool_specified"; then
13689             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13690 $as_echo "not found" >&6; }
13691             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13692           fi
13693           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13694 $as_echo "$tool_specified" >&6; }
13695         fi
13696       fi
13697     fi
13698 
13699   fi
13700 
13701 
13702 
13703 
13704   # Publish this variable in the help.
13705 
13706 
13707   if [ -z "${READLINK+x}" ]; then
13708     # The variable is not set by user, try to locate tool using the code snippet
13709     for ac_prog in greadlink readlink
13710 do
13711   # Extract the first word of "$ac_prog", so it can be a program name with args.
13712 set dummy $ac_prog; ac_word=$2
13713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13714 $as_echo_n "checking for $ac_word... " >&6; }
13715 if ${ac_cv_path_READLINK+:} false; then :
13716   $as_echo_n "(cached) " >&6
13717 else
13718   case $READLINK in
13719   [\\/]* | ?:[\\/]*)
13720   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13721   ;;
13722   *)
13723   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13724 for as_dir in $PATH
13725 do
13726   IFS=$as_save_IFS
13727   test -z "$as_dir" && as_dir=.
13728     for ac_exec_ext in '' $ac_executable_extensions; do
13729   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13730     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13731     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13732     break 2
13733   fi
13734 done
13735   done
13736 IFS=$as_save_IFS
13737 
13738   ;;
13739 esac
13740 fi
13741 READLINK=$ac_cv_path_READLINK
13742 if test -n "$READLINK"; then
13743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13744 $as_echo "$READLINK" >&6; }
13745 else
13746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13747 $as_echo "no" >&6; }
13748 fi
13749 
13750 
13751   test -n "$READLINK" && break
13752 done
13753 
13754   else
13755     # The variable is set, but is it from the command line or the environment?
13756 
13757     # Try to remove the string !READLINK! from our list.
13758     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13759     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13760       # If it failed, the variable was not from the command line. Ignore it,
13761       # but warn the user (except for BASH, which is always set by the calling BASH).
13762       if test "xREADLINK" != xBASH; then
13763         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13764 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13765       fi
13766       # Try to locate tool using the code snippet
13767       for ac_prog in greadlink readlink
13768 do
13769   # Extract the first word of "$ac_prog", so it can be a program name with args.
13770 set dummy $ac_prog; ac_word=$2
13771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13772 $as_echo_n "checking for $ac_word... " >&6; }
13773 if ${ac_cv_path_READLINK+:} false; then :
13774   $as_echo_n "(cached) " >&6
13775 else
13776   case $READLINK in
13777   [\\/]* | ?:[\\/]*)
13778   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13779   ;;
13780   *)
13781   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13782 for as_dir in $PATH
13783 do
13784   IFS=$as_save_IFS
13785   test -z "$as_dir" && as_dir=.
13786     for ac_exec_ext in '' $ac_executable_extensions; do
13787   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13788     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13789     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13790     break 2
13791   fi
13792 done
13793   done
13794 IFS=$as_save_IFS
13795 
13796   ;;
13797 esac
13798 fi
13799 READLINK=$ac_cv_path_READLINK
13800 if test -n "$READLINK"; then
13801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13802 $as_echo "$READLINK" >&6; }
13803 else
13804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13805 $as_echo "no" >&6; }
13806 fi
13807 
13808 
13809   test -n "$READLINK" && break
13810 done
13811 
13812     else
13813       # If it succeeded, then it was overridden by the user. We will use it
13814       # for the tool.
13815 
13816       # First remove it from the list of overridden variables, so we can test
13817       # for unknown variables in the end.
13818       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13819 
13820       # Check if we try to supply an empty value
13821       if test "x$READLINK" = x; then
13822         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13823 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13824         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13825 $as_echo_n "checking for READLINK... " >&6; }
13826         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13827 $as_echo "disabled" >&6; }
13828       else
13829         # Check if the provided tool contains a complete path.
13830         tool_specified="$READLINK"
13831         tool_basename="${tool_specified##*/}"
13832         if test "x$tool_basename" = "x$tool_specified"; then
13833           # A command without a complete path is provided, search $PATH.
13834           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13835 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13836           # Extract the first word of "$tool_basename", so it can be a program name with args.
13837 set dummy $tool_basename; ac_word=$2
13838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13839 $as_echo_n "checking for $ac_word... " >&6; }
13840 if ${ac_cv_path_READLINK+:} false; then :
13841   $as_echo_n "(cached) " >&6
13842 else
13843   case $READLINK in
13844   [\\/]* | ?:[\\/]*)
13845   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13846   ;;
13847   *)
13848   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13849 for as_dir in $PATH
13850 do
13851   IFS=$as_save_IFS
13852   test -z "$as_dir" && as_dir=.
13853     for ac_exec_ext in '' $ac_executable_extensions; do
13854   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13855     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13856     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13857     break 2
13858   fi
13859 done
13860   done
13861 IFS=$as_save_IFS
13862 
13863   ;;
13864 esac
13865 fi
13866 READLINK=$ac_cv_path_READLINK
13867 if test -n "$READLINK"; then
13868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13869 $as_echo "$READLINK" >&6; }
13870 else
13871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13872 $as_echo "no" >&6; }
13873 fi
13874 
13875 
13876           if test "x$READLINK" = x; then
13877             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13878           fi
13879         else
13880           # Otherwise we believe it is a complete path. Use it as it is.
13881           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13882 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13883           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13884 $as_echo_n "checking for READLINK... " >&6; }
13885           if test ! -x "$tool_specified"; then
13886             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13887 $as_echo "not found" >&6; }
13888             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13889           fi
13890           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13891 $as_echo "$tool_specified" >&6; }
13892         fi
13893       fi
13894     fi
13895 
13896   fi
13897 
13898 
13899 
13900 
13901   # Publish this variable in the help.
13902 
13903 
13904   if [ -z "${DF+x}" ]; then
13905     # The variable is not set by user, try to locate tool using the code snippet
13906     for ac_prog in df
13907 do
13908   # Extract the first word of "$ac_prog", so it can be a program name with args.
13909 set dummy $ac_prog; ac_word=$2
13910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13911 $as_echo_n "checking for $ac_word... " >&6; }
13912 if ${ac_cv_path_DF+:} false; then :
13913   $as_echo_n "(cached) " >&6
13914 else
13915   case $DF in
13916   [\\/]* | ?:[\\/]*)
13917   ac_cv_path_DF="$DF" # Let the user override the test with a path.
13918   ;;
13919   *)
13920   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13921 for as_dir in $PATH
13922 do
13923   IFS=$as_save_IFS
13924   test -z "$as_dir" && as_dir=.
13925     for ac_exec_ext in '' $ac_executable_extensions; do
13926   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13927     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13928     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13929     break 2
13930   fi
13931 done
13932   done
13933 IFS=$as_save_IFS
13934 
13935   ;;
13936 esac
13937 fi
13938 DF=$ac_cv_path_DF
13939 if test -n "$DF"; then
13940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13941 $as_echo "$DF" >&6; }
13942 else
13943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13944 $as_echo "no" >&6; }
13945 fi
13946 
13947 
13948   test -n "$DF" && break
13949 done
13950 
13951   else
13952     # The variable is set, but is it from the command line or the environment?
13953 
13954     # Try to remove the string !DF! from our list.
13955     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13956     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13957       # If it failed, the variable was not from the command line. Ignore it,
13958       # but warn the user (except for BASH, which is always set by the calling BASH).
13959       if test "xDF" != xBASH; then
13960         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13961 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13962       fi
13963       # Try to locate tool using the code snippet
13964       for ac_prog in df
13965 do
13966   # Extract the first word of "$ac_prog", so it can be a program name with args.
13967 set dummy $ac_prog; ac_word=$2
13968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13969 $as_echo_n "checking for $ac_word... " >&6; }
13970 if ${ac_cv_path_DF+:} false; then :
13971   $as_echo_n "(cached) " >&6
13972 else
13973   case $DF in
13974   [\\/]* | ?:[\\/]*)
13975   ac_cv_path_DF="$DF" # Let the user override the test with a path.
13976   ;;
13977   *)
13978   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13979 for as_dir in $PATH
13980 do
13981   IFS=$as_save_IFS
13982   test -z "$as_dir" && as_dir=.
13983     for ac_exec_ext in '' $ac_executable_extensions; do
13984   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13985     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13986     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13987     break 2
13988   fi
13989 done
13990   done
13991 IFS=$as_save_IFS
13992 
13993   ;;
13994 esac
13995 fi
13996 DF=$ac_cv_path_DF
13997 if test -n "$DF"; then
13998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13999 $as_echo "$DF" >&6; }
14000 else
14001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14002 $as_echo "no" >&6; }
14003 fi
14004 
14005 
14006   test -n "$DF" && break
14007 done
14008 
14009     else
14010       # If it succeeded, then it was overridden by the user. We will use it
14011       # for the tool.
14012 
14013       # First remove it from the list of overridden variables, so we can test
14014       # for unknown variables in the end.
14015       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14016 
14017       # Check if we try to supply an empty value
14018       if test "x$DF" = x; then
14019         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14020 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14021         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14022 $as_echo_n "checking for DF... " >&6; }
14023         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14024 $as_echo "disabled" >&6; }
14025       else
14026         # Check if the provided tool contains a complete path.
14027         tool_specified="$DF"
14028         tool_basename="${tool_specified##*/}"
14029         if test "x$tool_basename" = "x$tool_specified"; then
14030           # A command without a complete path is provided, search $PATH.
14031           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14032 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14033           # Extract the first word of "$tool_basename", so it can be a program name with args.
14034 set dummy $tool_basename; ac_word=$2
14035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14036 $as_echo_n "checking for $ac_word... " >&6; }
14037 if ${ac_cv_path_DF+:} false; then :
14038   $as_echo_n "(cached) " >&6
14039 else
14040   case $DF in
14041   [\\/]* | ?:[\\/]*)
14042   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14043   ;;
14044   *)
14045   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14046 for as_dir in $PATH
14047 do
14048   IFS=$as_save_IFS
14049   test -z "$as_dir" && as_dir=.
14050     for ac_exec_ext in '' $ac_executable_extensions; do
14051   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14052     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14053     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14054     break 2
14055   fi
14056 done
14057   done
14058 IFS=$as_save_IFS
14059 
14060   ;;
14061 esac
14062 fi
14063 DF=$ac_cv_path_DF
14064 if test -n "$DF"; then
14065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14066 $as_echo "$DF" >&6; }
14067 else
14068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14069 $as_echo "no" >&6; }
14070 fi
14071 
14072 
14073           if test "x$DF" = x; then
14074             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14075           fi
14076         else
14077           # Otherwise we believe it is a complete path. Use it as it is.
14078           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14079 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14080           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14081 $as_echo_n "checking for DF... " >&6; }
14082           if test ! -x "$tool_specified"; then
14083             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14084 $as_echo "not found" >&6; }
14085             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14086           fi
14087           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14088 $as_echo "$tool_specified" >&6; }
14089         fi
14090       fi
14091     fi
14092 
14093   fi
14094 
14095 
14096 
14097 
14098   # Publish this variable in the help.
14099 
14100 
14101   if [ -z "${CPIO+x}" ]; then
14102     # The variable is not set by user, try to locate tool using the code snippet
14103     for ac_prog in cpio bsdcpio
14104 do
14105   # Extract the first word of "$ac_prog", so it can be a program name with args.
14106 set dummy $ac_prog; ac_word=$2
14107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14108 $as_echo_n "checking for $ac_word... " >&6; }
14109 if ${ac_cv_path_CPIO+:} false; then :
14110   $as_echo_n "(cached) " >&6
14111 else
14112   case $CPIO in
14113   [\\/]* | ?:[\\/]*)
14114   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14115   ;;
14116   *)
14117   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14118 for as_dir in $PATH
14119 do
14120   IFS=$as_save_IFS
14121   test -z "$as_dir" && as_dir=.
14122     for ac_exec_ext in '' $ac_executable_extensions; do
14123   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14124     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14125     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14126     break 2
14127   fi
14128 done
14129   done
14130 IFS=$as_save_IFS
14131 
14132   ;;
14133 esac
14134 fi
14135 CPIO=$ac_cv_path_CPIO
14136 if test -n "$CPIO"; then
14137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14138 $as_echo "$CPIO" >&6; }
14139 else
14140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14141 $as_echo "no" >&6; }
14142 fi
14143 
14144 
14145   test -n "$CPIO" && break
14146 done
14147 
14148   else
14149     # The variable is set, but is it from the command line or the environment?
14150 
14151     # Try to remove the string !CPIO! from our list.
14152     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14153     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14154       # If it failed, the variable was not from the command line. Ignore it,
14155       # but warn the user (except for BASH, which is always set by the calling BASH).
14156       if test "xCPIO" != xBASH; then
14157         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14158 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14159       fi
14160       # Try to locate tool using the code snippet
14161       for ac_prog in cpio bsdcpio
14162 do
14163   # Extract the first word of "$ac_prog", so it can be a program name with args.
14164 set dummy $ac_prog; ac_word=$2
14165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14166 $as_echo_n "checking for $ac_word... " >&6; }
14167 if ${ac_cv_path_CPIO+:} false; then :
14168   $as_echo_n "(cached) " >&6
14169 else
14170   case $CPIO in
14171   [\\/]* | ?:[\\/]*)
14172   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14173   ;;
14174   *)
14175   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14176 for as_dir in $PATH
14177 do
14178   IFS=$as_save_IFS
14179   test -z "$as_dir" && as_dir=.
14180     for ac_exec_ext in '' $ac_executable_extensions; do
14181   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14182     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14183     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14184     break 2
14185   fi
14186 done
14187   done
14188 IFS=$as_save_IFS
14189 
14190   ;;
14191 esac
14192 fi
14193 CPIO=$ac_cv_path_CPIO
14194 if test -n "$CPIO"; then
14195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14196 $as_echo "$CPIO" >&6; }
14197 else
14198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14199 $as_echo "no" >&6; }
14200 fi
14201 
14202 
14203   test -n "$CPIO" && break
14204 done
14205 
14206     else
14207       # If it succeeded, then it was overridden by the user. We will use it
14208       # for the tool.
14209 
14210       # First remove it from the list of overridden variables, so we can test
14211       # for unknown variables in the end.
14212       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14213 
14214       # Check if we try to supply an empty value
14215       if test "x$CPIO" = x; then
14216         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14217 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14218         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14219 $as_echo_n "checking for CPIO... " >&6; }
14220         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14221 $as_echo "disabled" >&6; }
14222       else
14223         # Check if the provided tool contains a complete path.
14224         tool_specified="$CPIO"
14225         tool_basename="${tool_specified##*/}"
14226         if test "x$tool_basename" = "x$tool_specified"; then
14227           # A command without a complete path is provided, search $PATH.
14228           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14229 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14230           # Extract the first word of "$tool_basename", so it can be a program name with args.
14231 set dummy $tool_basename; ac_word=$2
14232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14233 $as_echo_n "checking for $ac_word... " >&6; }
14234 if ${ac_cv_path_CPIO+:} false; then :
14235   $as_echo_n "(cached) " >&6
14236 else
14237   case $CPIO in
14238   [\\/]* | ?:[\\/]*)
14239   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14240   ;;
14241   *)
14242   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14243 for as_dir in $PATH
14244 do
14245   IFS=$as_save_IFS
14246   test -z "$as_dir" && as_dir=.
14247     for ac_exec_ext in '' $ac_executable_extensions; do
14248   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14249     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14250     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14251     break 2
14252   fi
14253 done
14254   done
14255 IFS=$as_save_IFS
14256 
14257   ;;
14258 esac
14259 fi
14260 CPIO=$ac_cv_path_CPIO
14261 if test -n "$CPIO"; then
14262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14263 $as_echo "$CPIO" >&6; }
14264 else
14265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14266 $as_echo "no" >&6; }
14267 fi
14268 
14269 
14270           if test "x$CPIO" = x; then
14271             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14272           fi
14273         else
14274           # Otherwise we believe it is a complete path. Use it as it is.
14275           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14276 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14277           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14278 $as_echo_n "checking for CPIO... " >&6; }
14279           if test ! -x "$tool_specified"; then
14280             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14281 $as_echo "not found" >&6; }
14282             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14283           fi
14284           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14285 $as_echo "$tool_specified" >&6; }
14286         fi
14287       fi
14288     fi
14289 
14290   fi
14291 
14292 
14293 
14294 
14295   # Publish this variable in the help.
14296 
14297 
14298   if [ -z "${NICE+x}" ]; then
14299     # The variable is not set by user, try to locate tool using the code snippet
14300     for ac_prog in nice
14301 do
14302   # Extract the first word of "$ac_prog", so it can be a program name with args.
14303 set dummy $ac_prog; ac_word=$2
14304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14305 $as_echo_n "checking for $ac_word... " >&6; }
14306 if ${ac_cv_path_NICE+:} false; then :
14307   $as_echo_n "(cached) " >&6
14308 else
14309   case $NICE in
14310   [\\/]* | ?:[\\/]*)
14311   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14312   ;;
14313   *)
14314   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14315 for as_dir in $PATH
14316 do
14317   IFS=$as_save_IFS
14318   test -z "$as_dir" && as_dir=.
14319     for ac_exec_ext in '' $ac_executable_extensions; do
14320   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14321     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14322     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14323     break 2
14324   fi
14325 done
14326   done
14327 IFS=$as_save_IFS
14328 
14329   ;;
14330 esac
14331 fi
14332 NICE=$ac_cv_path_NICE
14333 if test -n "$NICE"; then
14334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14335 $as_echo "$NICE" >&6; }
14336 else
14337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14338 $as_echo "no" >&6; }
14339 fi
14340 
14341 
14342   test -n "$NICE" && break
14343 done
14344 
14345   else
14346     # The variable is set, but is it from the command line or the environment?
14347 
14348     # Try to remove the string !NICE! from our list.
14349     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14350     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14351       # If it failed, the variable was not from the command line. Ignore it,
14352       # but warn the user (except for BASH, which is always set by the calling BASH).
14353       if test "xNICE" != xBASH; then
14354         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14355 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14356       fi
14357       # Try to locate tool using the code snippet
14358       for ac_prog in nice
14359 do
14360   # Extract the first word of "$ac_prog", so it can be a program name with args.
14361 set dummy $ac_prog; ac_word=$2
14362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14363 $as_echo_n "checking for $ac_word... " >&6; }
14364 if ${ac_cv_path_NICE+:} false; then :
14365   $as_echo_n "(cached) " >&6
14366 else
14367   case $NICE in
14368   [\\/]* | ?:[\\/]*)
14369   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14370   ;;
14371   *)
14372   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14373 for as_dir in $PATH
14374 do
14375   IFS=$as_save_IFS
14376   test -z "$as_dir" && as_dir=.
14377     for ac_exec_ext in '' $ac_executable_extensions; do
14378   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14379     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14380     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14381     break 2
14382   fi
14383 done
14384   done
14385 IFS=$as_save_IFS
14386 
14387   ;;
14388 esac
14389 fi
14390 NICE=$ac_cv_path_NICE
14391 if test -n "$NICE"; then
14392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14393 $as_echo "$NICE" >&6; }
14394 else
14395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14396 $as_echo "no" >&6; }
14397 fi
14398 
14399 
14400   test -n "$NICE" && break
14401 done
14402 
14403     else
14404       # If it succeeded, then it was overridden by the user. We will use it
14405       # for the tool.
14406 
14407       # First remove it from the list of overridden variables, so we can test
14408       # for unknown variables in the end.
14409       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14410 
14411       # Check if we try to supply an empty value
14412       if test "x$NICE" = x; then
14413         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14414 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14415         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14416 $as_echo_n "checking for NICE... " >&6; }
14417         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14418 $as_echo "disabled" >&6; }
14419       else
14420         # Check if the provided tool contains a complete path.
14421         tool_specified="$NICE"
14422         tool_basename="${tool_specified##*/}"
14423         if test "x$tool_basename" = "x$tool_specified"; then
14424           # A command without a complete path is provided, search $PATH.
14425           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14426 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14427           # Extract the first word of "$tool_basename", so it can be a program name with args.
14428 set dummy $tool_basename; ac_word=$2
14429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14430 $as_echo_n "checking for $ac_word... " >&6; }
14431 if ${ac_cv_path_NICE+:} false; then :
14432   $as_echo_n "(cached) " >&6
14433 else
14434   case $NICE in
14435   [\\/]* | ?:[\\/]*)
14436   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14437   ;;
14438   *)
14439   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14440 for as_dir in $PATH
14441 do
14442   IFS=$as_save_IFS
14443   test -z "$as_dir" && as_dir=.
14444     for ac_exec_ext in '' $ac_executable_extensions; do
14445   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14446     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14447     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14448     break 2
14449   fi
14450 done
14451   done
14452 IFS=$as_save_IFS
14453 
14454   ;;
14455 esac
14456 fi
14457 NICE=$ac_cv_path_NICE
14458 if test -n "$NICE"; then
14459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14460 $as_echo "$NICE" >&6; }
14461 else
14462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14463 $as_echo "no" >&6; }
14464 fi
14465 
14466 
14467           if test "x$NICE" = x; then
14468             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14469           fi
14470         else
14471           # Otherwise we believe it is a complete path. Use it as it is.
14472           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14473 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14474           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14475 $as_echo_n "checking for NICE... " >&6; }
14476           if test ! -x "$tool_specified"; then
14477             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14478 $as_echo "not found" >&6; }
14479             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14480           fi
14481           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14482 $as_echo "$tool_specified" >&6; }
14483         fi
14484       fi
14485     fi
14486 
14487   fi
14488 
14489 
14490 
14491 
14492 # Now we can determine OpenJDK build and target platforms. This is required to
14493 # have early on.
14494 # Make sure we can run config.sub.
14495 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14496   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14497 
14498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14499 $as_echo_n "checking build system type... " >&6; }
14500 if ${ac_cv_build+:} false; then :
14501   $as_echo_n "(cached) " >&6
14502 else
14503   ac_build_alias=$build_alias
14504 test "x$ac_build_alias" = x &&
14505   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14506 test "x$ac_build_alias" = x &&
14507   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14508 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14509   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14510 
14511 fi
14512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14513 $as_echo "$ac_cv_build" >&6; }
14514 case $ac_cv_build in
14515 *-*-*) ;;
14516 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14517 esac
14518 build=$ac_cv_build
14519 ac_save_IFS=$IFS; IFS='-'
14520 set x $ac_cv_build
14521 shift
14522 build_cpu=$1
14523 build_vendor=$2
14524 shift; shift
14525 # Remember, the first character of IFS is used to create $*,
14526 # except with old shells:
14527 build_os=$*
14528 IFS=$ac_save_IFS
14529 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14530 
14531 
14532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14533 $as_echo_n "checking host system type... " >&6; }
14534 if ${ac_cv_host+:} false; then :
14535   $as_echo_n "(cached) " >&6
14536 else
14537   if test "x$host_alias" = x; then
14538   ac_cv_host=$ac_cv_build
14539 else
14540   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14541     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14542 fi
14543 
14544 fi
14545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14546 $as_echo "$ac_cv_host" >&6; }
14547 case $ac_cv_host in
14548 *-*-*) ;;
14549 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14550 esac
14551 host=$ac_cv_host
14552 ac_save_IFS=$IFS; IFS='-'
14553 set x $ac_cv_host
14554 shift
14555 host_cpu=$1
14556 host_vendor=$2
14557 shift; shift
14558 # Remember, the first character of IFS is used to create $*,
14559 # except with old shells:
14560 host_os=$*
14561 IFS=$ac_save_IFS
14562 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14563 
14564 
14565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14566 $as_echo_n "checking target system type... " >&6; }
14567 if ${ac_cv_target+:} false; then :
14568   $as_echo_n "(cached) " >&6
14569 else
14570   if test "x$target_alias" = x; then
14571   ac_cv_target=$ac_cv_host
14572 else
14573   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14574     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14575 fi
14576 
14577 fi
14578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14579 $as_echo "$ac_cv_target" >&6; }
14580 case $ac_cv_target in
14581 *-*-*) ;;
14582 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14583 esac
14584 target=$ac_cv_target
14585 ac_save_IFS=$IFS; IFS='-'
14586 set x $ac_cv_target
14587 shift
14588 target_cpu=$1
14589 target_vendor=$2
14590 shift; shift
14591 # Remember, the first character of IFS is used to create $*,
14592 # except with old shells:
14593 target_os=$*
14594 IFS=$ac_save_IFS
14595 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14596 
14597 
14598 # The aliases save the names the user supplied, while $host etc.
14599 # will get canonicalized.
14600 test -n "$target_alias" &&
14601   test "$program_prefix$program_suffix$program_transform_name" = \
14602     NONENONEs,x,x, &&
14603   program_prefix=${target_alias}-
14604 
14605   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14606   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14607   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14608   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14609   # to use the configure naming style.
14610 
14611 
14612 
14613 
14614 
14615   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14616   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14617   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14618   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14619   OPENJDK_TARGET_AUTOCONF_NAME="$host"
14620   OPENJDK_BUILD_AUTOCONF_NAME="$build"
14621 
14622 
14623 
14624   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14625 
14626   case "$build_os" in
14627     *linux*)
14628       VAR_OS=linux
14629       VAR_OS_TYPE=unix
14630       ;;
14631     *solaris*)
14632       VAR_OS=solaris
14633       VAR_OS_TYPE=unix
14634       ;;
14635     *darwin*)
14636       VAR_OS=macosx
14637       VAR_OS_TYPE=unix
14638       ;;
14639     *bsd*)
14640       VAR_OS=bsd
14641       VAR_OS_TYPE=unix
14642       ;;
14643     *cygwin*)
14644       VAR_OS=windows
14645       VAR_OS_ENV=windows.cygwin
14646       ;;
14647     *mingw*)
14648       VAR_OS=windows
14649       VAR_OS_ENV=windows.msys
14650       ;;
14651     *aix*)
14652       VAR_OS=aix
14653       VAR_OS_TYPE=unix
14654       ;;
14655     *)
14656       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14657       ;;
14658   esac
14659 
14660 
14661   # First argument is the cpu name from the trip/quad
14662   case "$build_cpu" in
14663     x86_64)
14664       VAR_CPU=x86_64
14665       VAR_CPU_ARCH=x86
14666       VAR_CPU_BITS=64
14667       VAR_CPU_ENDIAN=little
14668       ;;
14669     i?86)
14670       VAR_CPU=x86
14671       VAR_CPU_ARCH=x86
14672       VAR_CPU_BITS=32
14673       VAR_CPU_ENDIAN=little
14674       ;;
14675     arm*)
14676       VAR_CPU=arm
14677       VAR_CPU_ARCH=arm
14678       VAR_CPU_BITS=32
14679       VAR_CPU_ENDIAN=little
14680       ;;
14681     aarch64)
14682       VAR_CPU=aarch64
14683       VAR_CPU_ARCH=aarch64
14684       VAR_CPU_BITS=64
14685       VAR_CPU_ENDIAN=little
14686       ;;
14687     powerpc)
14688       VAR_CPU=ppc
14689       VAR_CPU_ARCH=ppc
14690       VAR_CPU_BITS=32
14691       VAR_CPU_ENDIAN=big
14692       ;;
14693     powerpc64)
14694       VAR_CPU=ppc64
14695       VAR_CPU_ARCH=ppc
14696       VAR_CPU_BITS=64
14697       VAR_CPU_ENDIAN=big
14698       ;;
14699     powerpc64le)
14700       VAR_CPU=ppc64
14701       VAR_CPU_ARCH=ppc
14702       VAR_CPU_BITS=64
14703       VAR_CPU_ENDIAN=little
14704       ;;
14705     s390)
14706       VAR_CPU=s390
14707       VAR_CPU_ARCH=s390
14708       VAR_CPU_BITS=32
14709       VAR_CPU_ENDIAN=big
14710       ;;
14711     s390x)
14712       VAR_CPU=s390x
14713       VAR_CPU_ARCH=s390
14714       VAR_CPU_BITS=64
14715       VAR_CPU_ENDIAN=big
14716       ;;
14717     sparc)
14718       VAR_CPU=sparc
14719       VAR_CPU_ARCH=sparc
14720       VAR_CPU_BITS=32
14721       VAR_CPU_ENDIAN=big
14722       ;;
14723     sparcv9|sparc64)
14724       VAR_CPU=sparcv9
14725       VAR_CPU_ARCH=sparc
14726       VAR_CPU_BITS=64
14727       VAR_CPU_ENDIAN=big
14728       ;;
14729     *)
14730       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14731       ;;
14732   esac
14733 
14734   # ..and setup our own variables. (Do this explicitely to facilitate searching)
14735   OPENJDK_BUILD_OS="$VAR_OS"
14736   if test "x$VAR_OS_TYPE" != x; then
14737     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14738   else
14739     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14740   fi
14741   if test "x$VAR_OS_ENV" != x; then
14742     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14743   else
14744     OPENJDK_BUILD_OS_ENV="$VAR_OS"
14745   fi
14746   OPENJDK_BUILD_CPU="$VAR_CPU"
14747   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14748   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14749   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14750 
14751 
14752 
14753 
14754 
14755 
14756 
14757 
14758   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14759 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
14760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14761 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14762 
14763   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14764 
14765   case "$host_os" in
14766     *linux*)
14767       VAR_OS=linux
14768       VAR_OS_TYPE=unix
14769       ;;
14770     *solaris*)
14771       VAR_OS=solaris
14772       VAR_OS_TYPE=unix
14773       ;;
14774     *darwin*)
14775       VAR_OS=macosx
14776       VAR_OS_TYPE=unix
14777       ;;
14778     *bsd*)
14779       VAR_OS=bsd
14780       VAR_OS_TYPE=unix
14781       ;;
14782     *cygwin*)
14783       VAR_OS=windows
14784       VAR_OS_ENV=windows.cygwin
14785       ;;
14786     *mingw*)
14787       VAR_OS=windows
14788       VAR_OS_ENV=windows.msys
14789       ;;
14790     *aix*)
14791       VAR_OS=aix
14792       VAR_OS_TYPE=unix
14793       ;;
14794     *)
14795       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14796       ;;
14797   esac
14798 
14799 
14800   # First argument is the cpu name from the trip/quad
14801   case "$host_cpu" in
14802     x86_64)
14803       VAR_CPU=x86_64
14804       VAR_CPU_ARCH=x86
14805       VAR_CPU_BITS=64
14806       VAR_CPU_ENDIAN=little
14807       ;;
14808     i?86)
14809       VAR_CPU=x86
14810       VAR_CPU_ARCH=x86
14811       VAR_CPU_BITS=32
14812       VAR_CPU_ENDIAN=little
14813       ;;
14814     arm*)
14815       VAR_CPU=arm
14816       VAR_CPU_ARCH=arm
14817       VAR_CPU_BITS=32
14818       VAR_CPU_ENDIAN=little
14819       ;;
14820     aarch64)
14821       VAR_CPU=aarch64
14822       VAR_CPU_ARCH=aarch64
14823       VAR_CPU_BITS=64
14824       VAR_CPU_ENDIAN=little
14825       ;;
14826     powerpc)
14827       VAR_CPU=ppc
14828       VAR_CPU_ARCH=ppc
14829       VAR_CPU_BITS=32
14830       VAR_CPU_ENDIAN=big
14831       ;;
14832     powerpc64)
14833       VAR_CPU=ppc64
14834       VAR_CPU_ARCH=ppc
14835       VAR_CPU_BITS=64
14836       VAR_CPU_ENDIAN=big
14837       ;;
14838     powerpc64le)
14839       VAR_CPU=ppc64
14840       VAR_CPU_ARCH=ppc
14841       VAR_CPU_BITS=64
14842       VAR_CPU_ENDIAN=little
14843       ;;
14844     s390)
14845       VAR_CPU=s390
14846       VAR_CPU_ARCH=s390
14847       VAR_CPU_BITS=32
14848       VAR_CPU_ENDIAN=big
14849       ;;
14850     s390x)
14851       VAR_CPU=s390x
14852       VAR_CPU_ARCH=s390
14853       VAR_CPU_BITS=64
14854       VAR_CPU_ENDIAN=big
14855       ;;
14856     sparc)
14857       VAR_CPU=sparc
14858       VAR_CPU_ARCH=sparc
14859       VAR_CPU_BITS=32
14860       VAR_CPU_ENDIAN=big
14861       ;;
14862     sparcv9|sparc64)
14863       VAR_CPU=sparcv9
14864       VAR_CPU_ARCH=sparc
14865       VAR_CPU_BITS=64
14866       VAR_CPU_ENDIAN=big
14867       ;;
14868     *)
14869       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14870       ;;
14871   esac
14872 
14873   # ... and setup our own variables. (Do this explicitely to facilitate searching)
14874   OPENJDK_TARGET_OS="$VAR_OS"
14875   if test "x$VAR_OS_TYPE" != x; then
14876     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14877   else
14878     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14879   fi
14880   if test "x$VAR_OS_ENV" != x; then
14881     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14882   else
14883     OPENJDK_TARGET_OS_ENV="$VAR_OS"
14884   fi
14885   OPENJDK_TARGET_CPU="$VAR_CPU"
14886   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14887   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14888   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14889 
14890 
14891 
14892 
14893 
14894 
14895 
14896 
14897   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14898 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
14899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14900 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14901 
14902 
14903 
14904 # Check whether --with-target-bits was given.
14905 if test "${with_target_bits+set}" = set; then :
14906   withval=$with_target_bits;
14907 fi
14908 
14909 
14910   # We have three types of compiles:
14911   # native  == normal compilation, target system == build system
14912   # cross   == traditional cross compilation, target system != build system; special toolchain needed
14913   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14914   #
14915   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14916     # We're doing a proper cross-compilation
14917     COMPILE_TYPE="cross"
14918   else
14919     COMPILE_TYPE="native"
14920   fi
14921 
14922   if test "x$with_target_bits" != x; then
14923     if test "x$COMPILE_TYPE" = "xcross"; then
14924       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
14925     fi
14926 
14927     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14928       # A reduced build is requested
14929       COMPILE_TYPE="reduced"
14930       OPENJDK_TARGET_CPU_BITS=32
14931       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
14932         OPENJDK_TARGET_CPU=x86
14933       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
14934         OPENJDK_TARGET_CPU=sparc
14935       else
14936         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
14937       fi
14938     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
14939       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
14940     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
14941       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
14942 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
14943     else
14944       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
14945     fi
14946   fi
14947 
14948 
14949   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
14950 $as_echo_n "checking compilation type... " >&6; }
14951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
14952 $as_echo "$COMPILE_TYPE" >&6; }
14953 
14954 
14955   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
14956     REQUIRED_OS_NAME=SunOS
14957     REQUIRED_OS_VERSION=5.10
14958   fi
14959   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
14960     REQUIRED_OS_NAME=Linux
14961     REQUIRED_OS_VERSION=2.6
14962   fi
14963   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14964     REQUIRED_OS_NAME=Windows
14965     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
14966       REQUIRED_OS_VERSION=5.2
14967     else
14968       REQUIRED_OS_VERSION=5.1
14969     fi
14970   fi
14971   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14972     REQUIRED_OS_NAME=Darwin
14973     REQUIRED_OS_VERSION=11.2
14974   fi
14975 
14976 
14977 
14978 
14979 
14980   # Also store the legacy naming of the cpu.
14981   # Ie i586 and amd64 instead of x86 and x86_64
14982   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
14983   if test "x$OPENJDK_TARGET_CPU" = xx86; then
14984     OPENJDK_TARGET_CPU_LEGACY="i586"
14985   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14986     # On all platforms except MacOSX replace x86_64 with amd64.
14987     OPENJDK_TARGET_CPU_LEGACY="amd64"
14988   fi
14989 
14990 
14991   # And the second legacy naming of the cpu.
14992   # Ie i386 and amd64 instead of x86 and x86_64.
14993   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14994   if test "x$OPENJDK_TARGET_CPU" = xx86; then
14995     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14996   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14997     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14998   fi
14999 
15000 
15001   # This is the name of the cpu (but using i386 and amd64 instead of
15002   # x86 and x86_64, respectively), preceeded by a /, to be used when
15003   # locating libraries. On macosx, it's empty, though.
15004   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15005   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15006     OPENJDK_TARGET_CPU_LIBDIR=""
15007   fi
15008 
15009 
15010   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15011   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15012   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15013   OPENJDK_TARGET_CPU_ISADIR=""
15014   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15015     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15016       OPENJDK_TARGET_CPU_ISADIR="/amd64"
15017     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15018       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15019     fi
15020   fi
15021 
15022 
15023   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15024   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15025   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15026     # On linux only, we replace x86 with i386.
15027     OPENJDK_TARGET_CPU_OSARCH="i386"
15028   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15029     # On all platforms except macosx, we replace x86_64 with amd64.
15030     OPENJDK_TARGET_CPU_OSARCH="amd64"
15031   fi
15032 
15033 
15034   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15035   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15036     OPENJDK_TARGET_CPU_JLI="i386"
15037   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15038     # On all platforms except macosx, we replace x86_64 with amd64.
15039     OPENJDK_TARGET_CPU_JLI="amd64"
15040   fi
15041   # Now setup the -D flags for building libjli.
15042   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15043   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15044     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15045       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15046     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15047       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15048     fi
15049   fi
15050 
15051 
15052   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15053       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15054   else
15055       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15056   fi
15057 
15058 
15059   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15060     A_LP64="LP64:="
15061     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15062     # unpack200.exe
15063     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15064       ADD_LP64="-D_LP64=1"
15065     fi
15066   fi
15067   LP64=$A_LP64
15068 
15069 
15070   if test "x$COMPILE_TYPE" = "xcross"; then
15071     # FIXME: ... or should this include reduced builds..?
15072     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15073   else
15074     DEFINE_CROSS_COMPILE_ARCH=""
15075   fi
15076 
15077 
15078   # ZERO_ARCHDEF is used to enable architecture-specific code
15079   case "${OPENJDK_TARGET_CPU}" in
15080     ppc)     ZERO_ARCHDEF=PPC32 ;;
15081     ppc64)   ZERO_ARCHDEF=PPC64 ;;
15082     s390*)   ZERO_ARCHDEF=S390  ;;
15083     sparc*)  ZERO_ARCHDEF=SPARC ;;
15084     x86_64*) ZERO_ARCHDEF=AMD64 ;;
15085     x86)     ZERO_ARCHDEF=IA32  ;;
15086     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15087   esac
15088 
15089 
15090 
15091 
15092 # Continue setting up basic stuff. Most remaining code require fundamental tools.
15093 
15094   # Save the current directory this script was started from
15095   CURDIR="$PWD"
15096 
15097   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15098   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15099   # was not available at that time.
15100   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15101   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15102     ORIGINAL_PATH="$REWRITTEN_PATH"
15103     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15104 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15105   fi
15106 
15107   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15108     PATH_SEP=";"
15109 
15110   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15111   if test $SRC_ROOT_LENGTH -gt 100; then
15112     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15113   fi
15114 
15115   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15116     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15117 $as_echo_n "checking cygwin release... " >&6; }
15118     CYGWIN_VERSION=`$UNAME -r`
15119     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15120 $as_echo "$CYGWIN_VERSION" >&6; }
15121     WINDOWS_ENV_VENDOR='cygwin'
15122     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15123 
15124     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15125     if test "x$CYGWIN_VERSION_OLD" != x; then
15126       { $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
15127 $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;}
15128       as_fn_error $? "Cannot continue" "$LINENO" 5
15129     fi
15130     if test "x$CYGPATH" = x; then
15131       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15132     fi
15133     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15134 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15135     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15136     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15137     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15138     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15139     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15140 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
15141     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15142     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15143     if test "x$test_cygdrive_prefix" = x; then
15144       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15145     fi
15146   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15147     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15148 $as_echo_n "checking msys release... " >&6; }
15149     MSYS_VERSION=`$UNAME -r`
15150     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15151 $as_echo "$MSYS_VERSION" >&6; }
15152 
15153     WINDOWS_ENV_VENDOR='msys'
15154     WINDOWS_ENV_VERSION="$MSYS_VERSION"
15155 
15156     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15157 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
15158     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15159     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15160 
15161   windows_path="$MSYS_ROOT_PATH"
15162   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15163     unix_path=`$CYGPATH -u "$windows_path"`
15164     MSYS_ROOT_PATH="$unix_path"
15165   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15166     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15167     MSYS_ROOT_PATH="$unix_path"
15168   fi
15169 
15170     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15171 $as_echo "$MSYS_ROOT_PATH" >&6; }
15172     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15173   else
15174     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15175   fi
15176 
15177   # Test if windows or unix (cygwin/msys) find is first in path.
15178   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15179 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15180   FIND_BINARY_OUTPUT=`find --version 2>&1`
15181   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15182     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15183 $as_echo "unix style" >&6; }
15184   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15185     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15186 $as_echo "Windows" >&6; }
15187     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15188 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15189     { $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
15190 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15191     as_fn_error $? "Cannot continue" "$LINENO" 5
15192   else
15193     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15194 $as_echo "unknown" >&6; }
15195     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15196 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15197   fi
15198 
15199   else
15200     PATH_SEP=":"
15201   fi
15202 
15203 
15204   # We get the top-level directory from the supporting wrappers.
15205   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15206 $as_echo_n "checking for top-level directory... " >&6; }
15207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15208 $as_echo "$TOPDIR" >&6; }
15209 
15210 
15211   # Save the original version of TOPDIR for string comparisons
15212   ORIGINAL_TOPDIR="$TOPDIR"
15213 
15214 
15215   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15216 
15217   # Only process if variable expands to non-empty
15218 
15219   if test "x$CURDIR" != x; then
15220     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15221 
15222   # Input might be given as Windows format, start by converting to
15223   # unix format.
15224   path="$CURDIR"
15225   new_path=`$CYGPATH -u "$path"`
15226 
15227   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15228   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15229   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15230   # "foo.exe" is OK but "foo" is an error.
15231   #
15232   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15233   # It is also a way to make sure we got the proper file name for the real test later on.
15234   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15235   if test "x$test_shortpath" = x; then
15236     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15237 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15238     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15239   fi
15240 
15241   # Call helper function which possibly converts this using DOS-style short mode.
15242   # If so, the updated path is stored in $new_path.
15243 
15244   input_path="$new_path"
15245   # Check if we need to convert this using DOS-style short mode. If the path
15246   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15247   # take no chances and rewrite it.
15248   # Note: m4 eats our [], so we need to use [ and ] instead.
15249   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15250   if test "x$has_forbidden_chars" != x; then
15251     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15252     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15253     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15254     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15255       # Going to short mode and back again did indeed matter. Since short mode is
15256       # case insensitive, let's make it lowercase to improve readability.
15257       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15258       # Now convert it back to Unix-style (cygpath)
15259       input_path=`$CYGPATH -u "$shortmode_path"`
15260       new_path="$input_path"
15261     fi
15262   fi
15263 
15264   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15265   if test "x$test_cygdrive_prefix" = x; then
15266     # As a simple fix, exclude /usr/bin since it's not a real path.
15267     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15268       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15269       # a path prefixed by /cygdrive for fixpath to work.
15270       new_path="$CYGWIN_ROOT_PATH$input_path"
15271     fi
15272   fi
15273 
15274 
15275   if test "x$path" != "x$new_path"; then
15276     CURDIR="$new_path"
15277     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15278 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15279   fi
15280 
15281     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15282 
15283   path="$CURDIR"
15284   has_colon=`$ECHO $path | $GREP ^.:`
15285   new_path="$path"
15286   if test "x$has_colon" = x; then
15287     # Not in mixed or Windows style, start by that.
15288     new_path=`cmd //c echo $path`
15289   fi
15290 
15291 
15292   input_path="$new_path"
15293   # Check if we need to convert this using DOS-style short mode. If the path
15294   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15295   # take no chances and rewrite it.
15296   # Note: m4 eats our [], so we need to use [ and ] instead.
15297   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15298   if test "x$has_forbidden_chars" != x; then
15299     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15300     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15301   fi
15302 
15303 
15304   windows_path="$new_path"
15305   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15306     unix_path=`$CYGPATH -u "$windows_path"`
15307     new_path="$unix_path"
15308   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15309     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15310     new_path="$unix_path"
15311   fi
15312 
15313   if test "x$path" != "x$new_path"; then
15314     CURDIR="$new_path"
15315     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15316 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15317   fi
15318 
15319   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15320   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15321 
15322     else
15323       # We're on a unix platform. Hooray! :)
15324       path="$CURDIR"
15325       has_space=`$ECHO "$path" | $GREP " "`
15326       if test "x$has_space" != x; then
15327         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15328 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15329         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15330       fi
15331 
15332       # Use eval to expand a potential ~
15333       eval path="$path"
15334       if test ! -f "$path" && test ! -d "$path"; then
15335         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15336       fi
15337 
15338       CURDIR="`cd "$path"; $THEPWDCMD -L`"
15339     fi
15340   fi
15341 
15342 
15343   # Only process if variable expands to non-empty
15344 
15345   if test "x$TOPDIR" != x; then
15346     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15347 
15348   # Input might be given as Windows format, start by converting to
15349   # unix format.
15350   path="$TOPDIR"
15351   new_path=`$CYGPATH -u "$path"`
15352 
15353   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15354   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15355   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15356   # "foo.exe" is OK but "foo" is an error.
15357   #
15358   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15359   # It is also a way to make sure we got the proper file name for the real test later on.
15360   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15361   if test "x$test_shortpath" = x; then
15362     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15363 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15364     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15365   fi
15366 
15367   # Call helper function which possibly converts this using DOS-style short mode.
15368   # If so, the updated path is stored in $new_path.
15369 
15370   input_path="$new_path"
15371   # Check if we need to convert this using DOS-style short mode. If the path
15372   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15373   # take no chances and rewrite it.
15374   # Note: m4 eats our [], so we need to use [ and ] instead.
15375   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15376   if test "x$has_forbidden_chars" != x; then
15377     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15378     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15379     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15380     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15381       # Going to short mode and back again did indeed matter. Since short mode is
15382       # case insensitive, let's make it lowercase to improve readability.
15383       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15384       # Now convert it back to Unix-style (cygpath)
15385       input_path=`$CYGPATH -u "$shortmode_path"`
15386       new_path="$input_path"
15387     fi
15388   fi
15389 
15390   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15391   if test "x$test_cygdrive_prefix" = x; then
15392     # As a simple fix, exclude /usr/bin since it's not a real path.
15393     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15394       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15395       # a path prefixed by /cygdrive for fixpath to work.
15396       new_path="$CYGWIN_ROOT_PATH$input_path"
15397     fi
15398   fi
15399 
15400 
15401   if test "x$path" != "x$new_path"; then
15402     TOPDIR="$new_path"
15403     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15404 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15405   fi
15406 
15407     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15408 
15409   path="$TOPDIR"
15410   has_colon=`$ECHO $path | $GREP ^.:`
15411   new_path="$path"
15412   if test "x$has_colon" = x; then
15413     # Not in mixed or Windows style, start by that.
15414     new_path=`cmd //c echo $path`
15415   fi
15416 
15417 
15418   input_path="$new_path"
15419   # Check if we need to convert this using DOS-style short mode. If the path
15420   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15421   # take no chances and rewrite it.
15422   # Note: m4 eats our [], so we need to use [ and ] instead.
15423   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15424   if test "x$has_forbidden_chars" != x; then
15425     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15426     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15427   fi
15428 
15429 
15430   windows_path="$new_path"
15431   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15432     unix_path=`$CYGPATH -u "$windows_path"`
15433     new_path="$unix_path"
15434   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15435     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15436     new_path="$unix_path"
15437   fi
15438 
15439   if test "x$path" != "x$new_path"; then
15440     TOPDIR="$new_path"
15441     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15442 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15443   fi
15444 
15445   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15446   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15447 
15448     else
15449       # We're on a unix platform. Hooray! :)
15450       path="$TOPDIR"
15451       has_space=`$ECHO "$path" | $GREP " "`
15452       if test "x$has_space" != x; then
15453         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15454 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15455         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15456       fi
15457 
15458       # Use eval to expand a potential ~
15459       eval path="$path"
15460       if test ! -f "$path" && test ! -d "$path"; then
15461         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15462       fi
15463 
15464       TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15465     fi
15466   fi
15467 
15468   # SRC_ROOT is a traditional alias for TOPDIR.
15469   SRC_ROOT=$TOPDIR
15470 
15471   # Calculate a canonical version of TOPDIR for string comparisons
15472   CANONICAL_TOPDIR=$TOPDIR
15473 
15474   if test "x$OPENJDK_BUILD_OS" != xwindows; then
15475     # Follow a chain of symbolic links. Use readlink
15476     # where it exists, else fall back to horribly
15477     # complicated shell code.
15478     if test "x$READLINK_TESTED" != yes; then
15479       # On MacOSX there is a readlink tool with a different
15480       # purpose than the GNU readlink tool. Check the found readlink.
15481       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15482       if test "x$ISGNU" = x; then
15483         # A readlink that we do not know how to use.
15484         # Are there other non-GNU readlinks out there?
15485         READLINK_TESTED=yes
15486         READLINK=
15487       fi
15488     fi
15489 
15490     if test "x$READLINK" != x; then
15491       CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15492     else
15493       # Save the current directory for restoring afterwards
15494       STARTDIR=$PWD
15495       COUNTER=0
15496       sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15497       sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15498       cd $sym_link_dir
15499       # Use -P flag to resolve symlinks in directories.
15500       cd `$THEPWDCMD -P`
15501       sym_link_dir=`$THEPWDCMD -P`
15502       # Resolve file symlinks
15503       while test $COUNTER -lt 20; do
15504         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15505         if test "x$ISLINK" == x; then
15506           # This is not a symbolic link! We are done!
15507           break
15508         fi
15509         # Again resolve directory symlinks since the target of the just found
15510         # link could be in a different directory
15511         cd `$DIRNAME $ISLINK`
15512         sym_link_dir=`$THEPWDCMD -P`
15513         sym_link_file=`$BASENAME $ISLINK`
15514         let COUNTER=COUNTER+1
15515       done
15516       cd $STARTDIR
15517       CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15518     fi
15519   fi
15520 
15521 
15522 
15523   # Locate the directory of this script.
15524   AUTOCONF_DIR=$TOPDIR/common/autoconf
15525 
15526 
15527 # Check if it's a pure open build or if custom sources are to be used.
15528 
15529   # Check whether --enable-openjdk-only was given.
15530 if test "${enable_openjdk_only+set}" = set; then :
15531   enableval=$enable_openjdk_only;
15532 else
15533   enable_openjdk_only="no"
15534 fi
15535 
15536 
15537   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15538 $as_echo_n "checking for presence of closed sources... " >&6; }
15539   if test -d "$SRC_ROOT/jdk/src/closed"; then
15540     CLOSED_SOURCE_PRESENT=yes
15541   else
15542     CLOSED_SOURCE_PRESENT=no
15543   fi
15544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15545 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15546 
15547   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15548 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15549   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15551 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15552 
15553   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15554     OPENJDK=true
15555     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15556       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15557 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15558     fi
15559   else
15560     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15561       OPENJDK=true
15562     else
15563       OPENJDK=false
15564     fi
15565   fi
15566 
15567   if test "x$OPENJDK" = "xtrue"; then
15568     SET_OPENJDK="OPENJDK=true"
15569   fi
15570 
15571 
15572 
15573   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15574   # the IncludeCustomExtension macro.
15575 
15576 
15577 # Check whether --with-custom-make-dir was given.
15578 if test "${with_custom_make_dir+set}" = set; then :
15579   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
15580 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15581 fi
15582 
15583 
15584 
15585 
15586 # These are needed to be able to create a configuration name (and thus the output directory)
15587 
15588   ###############################################################################
15589   #
15590   # Check which variant of the JDK that we want to build.
15591   # Currently we have:
15592   #    normal:   standard edition
15593   # but the custom make system may add other variants
15594   #
15595   # Effectively the JDK variant gives a name to a specific set of
15596   # modules to compile into the JDK. In the future, these modules
15597   # might even be Jigsaw modules.
15598   #
15599   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15600 $as_echo_n "checking which variant of the JDK to build... " >&6; }
15601 
15602 # Check whether --with-jdk-variant was given.
15603 if test "${with_jdk_variant+set}" = set; then :
15604   withval=$with_jdk_variant;
15605 fi
15606 
15607 
15608   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15609     JDK_VARIANT="normal"
15610   else
15611     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15612   fi
15613 
15614 
15615 
15616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15617 $as_echo "$JDK_VARIANT" >&6; }
15618 
15619 
15620 ###############################################################################
15621 #
15622 # Check which interpreter of the JVM we want to build.
15623 # Currently we have:
15624 #    template: Template interpreter (the default)
15625 #    cpp     : C++ interpreter
15626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15627 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15628 
15629 # Check whether --with-jvm-interpreter was given.
15630 if test "${with_jvm_interpreter+set}" = set; then :
15631   withval=$with_jvm_interpreter;
15632 fi
15633 
15634 
15635 if test "x$with_jvm_interpreter" = x; then
15636      with_jvm_interpreter="template"
15637 fi
15638 
15639 JVM_INTERPRETER="$with_jvm_interpreter"
15640 
15641 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15642    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15643 fi
15644 
15645 
15646 
15647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
15648 $as_echo "$with_jvm_interpreter" >&6; }
15649 
15650 
15651 
15652   ###############################################################################
15653   #
15654   # Check which variants of the JVM that we want to build.
15655   # Currently we have:
15656   #    server: normal interpreter and a tiered C1/C2 compiler
15657   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
15658   #    minimal1: reduced form of client with optional VM services and features stripped out
15659   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
15660   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
15661   #    zero: no machine code interpreter, no compiler
15662   #    zeroshark: zero interpreter and shark/llvm compiler backend
15663 #    core: interpreter only, no compiler (only works on some platforms)
15664   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15665 $as_echo_n "checking which variants of the JVM to build... " >&6; }
15666 
15667 # Check whether --with-jvm-variants was given.
15668 if test "${with_jvm_variants+set}" = set; then :
15669   withval=$with_jvm_variants;
15670 fi
15671 
15672 
15673   if test "x$with_jvm_variants" = x; then
15674     with_jvm_variants="server"
15675   fi
15676 
15677   JVM_VARIANTS=",$with_jvm_variants,"
15678   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,//'`
15679 
15680   if test "x$TEST_VARIANTS" != "x,"; then
15681      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
15682   fi
15683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15684 $as_echo "$with_jvm_variants" >&6; }
15685 
15686   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15687   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15688   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15689   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
15690   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15691   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15692   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15693 
15694   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15695     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15696       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15697     fi
15698   fi
15699   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15700     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15701       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
15702     fi
15703   fi
15704   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15705     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15706       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15707     fi
15708   fi
15709 
15710   # Replace the commas with AND for use in the build directory name.
15711   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15712   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/'`
15713   if test "x$COUNT_VARIANTS" != "x,1"; then
15714     BUILDING_MULTIPLE_JVM_VARIANTS=yes
15715   else
15716     BUILDING_MULTIPLE_JVM_VARIANTS=no
15717   fi
15718 
15719 
15720 
15721 
15722 
15723 
15724 
15725 
15726 
15727 
15728   INCLUDE_SA=true
15729   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15730     INCLUDE_SA=false
15731   fi
15732   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15733     INCLUDE_SA=false
15734   fi
15735   if test "x$OPENJDK_TARGET_OS" = xaix ; then
15736     INCLUDE_SA=false
15737   fi
15738   if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15739     INCLUDE_SA=false
15740   fi
15741 
15742 
15743   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15744     MACOSX_UNIVERSAL="true"
15745   fi
15746 
15747 
15748 
15749 
15750   ###############################################################################
15751   #
15752   # Set the debug level
15753   #    release: no debug information, all optimizations, no asserts.
15754   #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
15755   #    fastdebug: debug information (-g), all optimizations, all asserts
15756   #    slowdebug: debug information (-g), no optimizations, all asserts
15757   #
15758   DEBUG_LEVEL="release"
15759   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15760 $as_echo_n "checking which debug level to use... " >&6; }
15761   # Check whether --enable-debug was given.
15762 if test "${enable_debug+set}" = set; then :
15763   enableval=$enable_debug;
15764         ENABLE_DEBUG="${enableval}"
15765         DEBUG_LEVEL="fastdebug"
15766 
15767 else
15768   ENABLE_DEBUG="no"
15769 fi
15770 
15771 
15772 
15773 # Check whether --with-debug-level was given.
15774 if test "${with_debug_level+set}" = set; then :
15775   withval=$with_debug_level;
15776         DEBUG_LEVEL="${withval}"
15777         if test "x$ENABLE_DEBUG" = xyes; then
15778           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15779         fi
15780 
15781 fi
15782 
15783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15784 $as_echo "$DEBUG_LEVEL" >&6; }
15785 
15786   if test "x$DEBUG_LEVEL" != xrelease && \
15787       test "x$DEBUG_LEVEL" != xoptimized && \
15788       test "x$DEBUG_LEVEL" != xfastdebug && \
15789       test "x$DEBUG_LEVEL" != xslowdebug; then
15790     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15791   fi
15792 
15793 
15794   ###############################################################################
15795   #
15796   # Setup legacy vars/targets and new vars to deal with different debug levels.
15797   #
15798 
15799   case $DEBUG_LEVEL in
15800     release )
15801       VARIANT="OPT"
15802       FASTDEBUG="false"
15803       DEBUG_CLASSFILES="false"
15804       BUILD_VARIANT_RELEASE=""
15805       HOTSPOT_DEBUG_LEVEL="product"
15806       HOTSPOT_EXPORT="product"
15807       ;;
15808     fastdebug )
15809       VARIANT="DBG"
15810       FASTDEBUG="true"
15811       DEBUG_CLASSFILES="true"
15812       BUILD_VARIANT_RELEASE="-fastdebug"
15813       HOTSPOT_DEBUG_LEVEL="fastdebug"
15814       HOTSPOT_EXPORT="fastdebug"
15815       ;;
15816     slowdebug )
15817       VARIANT="DBG"
15818       FASTDEBUG="false"
15819       DEBUG_CLASSFILES="true"
15820       BUILD_VARIANT_RELEASE="-debug"
15821       HOTSPOT_DEBUG_LEVEL="debug"
15822       HOTSPOT_EXPORT="debug"
15823       ;;
15824     optimized )
15825       VARIANT="OPT"
15826       FASTDEBUG="false"
15827       DEBUG_CLASSFILES="false"
15828       BUILD_VARIANT_RELEASE="-optimized"
15829       HOTSPOT_DEBUG_LEVEL="optimized"
15830       HOTSPOT_EXPORT="optimized"
15831       ;;
15832   esac
15833 
15834   # The debug level 'optimized' is a little special because it is currently only
15835   # applicable to the HotSpot build where it means to build a completely
15836   # optimized version of the VM without any debugging code (like for the
15837   # 'release' debug level which is called 'product' in the HotSpot build) but
15838   # with the exception that it can contain additional code which is otherwise
15839   # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15840   # test new and/or experimental features which are not intended for customer
15841   # shipment. Because these new features need to be tested and benchmarked in
15842   # real world scenarios, we want to build the containing JDK at the 'release'
15843   # debug level.
15844   if test "x$DEBUG_LEVEL" = xoptimized; then
15845     DEBUG_LEVEL="release"
15846   fi
15847 
15848   #####
15849   # Generate the legacy makefile targets for hotspot.
15850   # The hotspot api for selecting the build artifacts, really, needs to be improved.
15851   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15852   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15853   # But until then ...
15854   HOTSPOT_TARGET=""
15855 
15856   if test "x$JVM_VARIANT_SERVER" = xtrue; then
15857     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15858   fi
15859 
15860   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15861     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15862   fi
15863 
15864   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15865     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15866   fi
15867 
15868   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15869     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
15870   fi
15871 
15872   if test "x$JVM_VARIANT_ZERO" = xtrue; then
15873     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15874   fi
15875 
15876   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15877     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15878   fi
15879 
15880   if test "x$JVM_VARIANT_CORE" = xtrue; then
15881     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15882   fi
15883 
15884   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15885 
15886   # On Macosx universal binaries are produced, but they only contain
15887   # 64 bit intel. This invalidates control of which jvms are built
15888   # from configure, but only server is valid anyway. Fix this
15889   # when hotspot makefiles are rewritten.
15890   if test "x$MACOSX_UNIVERSAL" = xtrue; then
15891     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15892   fi
15893 
15894   #####
15895 
15896 
15897 
15898 
15899 
15900 
15901 
15902 
15903 # With basic setup done, call the custom early hook.
15904 
15905 
15906 # Check if we have devkits, extra paths or sysroot set.
15907 
15908 
15909 # Check whether --with-devkit was given.
15910 if test "${with_devkit+set}" = set; then :
15911   withval=$with_devkit;
15912 
15913   # Only process if variable expands to non-empty
15914 
15915   if test "x$with_devkit" != x; then
15916     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15917 
15918   # Input might be given as Windows format, start by converting to
15919   # unix format.
15920   path="$with_devkit"
15921   new_path=`$CYGPATH -u "$path"`
15922 
15923   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15924   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15925   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15926   # "foo.exe" is OK but "foo" is an error.
15927   #
15928   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15929   # It is also a way to make sure we got the proper file name for the real test later on.
15930   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15931   if test "x$test_shortpath" = x; then
15932     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15933 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15934     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15935   fi
15936 
15937   # Call helper function which possibly converts this using DOS-style short mode.
15938   # If so, the updated path is stored in $new_path.
15939 
15940   input_path="$new_path"
15941   # Check if we need to convert this using DOS-style short mode. If the path
15942   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15943   # take no chances and rewrite it.
15944   # Note: m4 eats our [], so we need to use [ and ] instead.
15945   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15946   if test "x$has_forbidden_chars" != x; then
15947     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15948     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15949     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15950     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15951       # Going to short mode and back again did indeed matter. Since short mode is
15952       # case insensitive, let's make it lowercase to improve readability.
15953       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15954       # Now convert it back to Unix-style (cygpath)
15955       input_path=`$CYGPATH -u "$shortmode_path"`
15956       new_path="$input_path"
15957     fi
15958   fi
15959 
15960   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15961   if test "x$test_cygdrive_prefix" = x; then
15962     # As a simple fix, exclude /usr/bin since it's not a real path.
15963     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15964       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15965       # a path prefixed by /cygdrive for fixpath to work.
15966       new_path="$CYGWIN_ROOT_PATH$input_path"
15967     fi
15968   fi
15969 
15970 
15971   if test "x$path" != "x$new_path"; then
15972     with_devkit="$new_path"
15973     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15974 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15975   fi
15976 
15977     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15978 
15979   path="$with_devkit"
15980   has_colon=`$ECHO $path | $GREP ^.:`
15981   new_path="$path"
15982   if test "x$has_colon" = x; then
15983     # Not in mixed or Windows style, start by that.
15984     new_path=`cmd //c echo $path`
15985   fi
15986 
15987 
15988   input_path="$new_path"
15989   # Check if we need to convert this using DOS-style short mode. If the path
15990   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15991   # take no chances and rewrite it.
15992   # Note: m4 eats our [], so we need to use [ and ] instead.
15993   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15994   if test "x$has_forbidden_chars" != x; then
15995     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15996     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15997   fi
15998 
15999 
16000   windows_path="$new_path"
16001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16002     unix_path=`$CYGPATH -u "$windows_path"`
16003     new_path="$unix_path"
16004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16005     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16006     new_path="$unix_path"
16007   fi
16008 
16009   if test "x$path" != "x$new_path"; then
16010     with_devkit="$new_path"
16011     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16012 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16013   fi
16014 
16015   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16016   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16017 
16018     else
16019       # We're on a unix platform. Hooray! :)
16020       path="$with_devkit"
16021       has_space=`$ECHO "$path" | $GREP " "`
16022       if test "x$has_space" != x; then
16023         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16024 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16025         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16026       fi
16027 
16028       # Use eval to expand a potential ~
16029       eval path="$path"
16030       if test ! -f "$path" && test ! -d "$path"; then
16031         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16032       fi
16033 
16034       with_devkit="`cd "$path"; $THEPWDCMD -L`"
16035     fi
16036   fi
16037 
16038         DEVKIT_ROOT="$with_devkit"
16039         # Check for a meta data info file in the root of the devkit
16040         if test -f "$DEVKIT_ROOT/devkit.info"; then
16041           . $DEVKIT_ROOT/devkit.info
16042           # This potentially sets the following:
16043           # A descriptive name of the devkit
16044 
16045   if test "x$DEVKIT_NAME" = x; then
16046     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16047   fi
16048 
16049           # Corresponds to --with-extra-path
16050 
16051   if test "x$DEVKIT_EXTRA_PATH" = x; then
16052     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16053   fi
16054 
16055           # Corresponds to --with-toolchain-path
16056 
16057   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16058     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16059   fi
16060 
16061           # Corresponds to --with-sysroot
16062 
16063   if test "x$DEVKIT_SYSROOT" = x; then
16064     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16065   fi
16066 
16067 
16068           # Identifies the Visual Studio version in the devkit
16069 
16070   if test "x$DEVKIT_VS_VERSION" = x; then
16071     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16072   fi
16073 
16074           # The Visual Studio include environment variable
16075 
16076   if test "x$DEVKIT_VS_INCLUDE" = x; then
16077     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16078   fi
16079 
16080           # The Visual Studio lib environment variable
16081 
16082   if test "x$DEVKIT_VS_LIB" = x; then
16083     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16084   fi
16085 
16086           # Corresponds to --with-msvcr-dll
16087 
16088   if test "x$DEVKIT_MSVCR_DLL" = x; then
16089     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16090   fi
16091 
16092           # Corresponds to --with-msvcp-dll
16093 
16094   if test "x$DEVKIT_MSVCP_DLL" = x; then
16095     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16096   fi
16097 
16098         fi
16099 
16100         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16101 $as_echo_n "checking for devkit... " >&6; }
16102         if test "x$DEVKIT_NAME" != x; then
16103           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16104 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16105         else
16106           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16107 $as_echo "$DEVKIT_ROOT" >&6; }
16108         fi
16109 
16110 
16111   if test "x$DEVKIT_EXTRA_PATH" != x; then
16112     if test "x$EXTRA_PATH" = x; then
16113       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16114     else
16115       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16116     fi
16117   fi
16118 
16119 
16120         # Fallback default of just /bin if DEVKIT_PATH is not defined
16121         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16122           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16123         fi
16124 
16125   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16126     if test "x$TOOLCHAIN_PATH" = x; then
16127       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16128     else
16129       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16130     fi
16131   fi
16132 
16133 
16134         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16135         # places for backwards compatiblity.
16136         if test "x$DEVKIT_SYSROOT" != x; then
16137           SYSROOT="$DEVKIT_SYSROOT"
16138         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16139           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16140         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16141           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16142         fi
16143 
16144 
16145 fi
16146 
16147 
16148   # You can force the sysroot if the sysroot encoded into the compiler tools
16149   # is not correct.
16150 
16151 # Check whether --with-sys-root was given.
16152 if test "${with_sys_root+set}" = set; then :
16153   withval=$with_sys_root; SYSROOT=$with_sys_root
16154 
16155 fi
16156 
16157 
16158 
16159 # Check whether --with-sysroot was given.
16160 if test "${with_sysroot+set}" = set; then :
16161   withval=$with_sysroot; SYSROOT=$with_sysroot
16162 
16163 fi
16164 
16165 
16166 
16167 # Check whether --with-tools-dir was given.
16168 if test "${with_tools_dir+set}" = set; then :
16169   withval=$with_tools_dir;
16170   if test "x$with_tools_dir" != x; then
16171     if test "x$TOOLCHAIN_PATH" = x; then
16172       TOOLCHAIN_PATH="$with_tools_dir"
16173     else
16174       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16175     fi
16176   fi
16177 
16178 
16179 fi
16180 
16181 
16182 
16183 # Check whether --with-toolchain-path was given.
16184 if test "${with_toolchain_path+set}" = set; then :
16185   withval=$with_toolchain_path;
16186   if test "x$with_toolchain_path" != x; then
16187     if test "x$TOOLCHAIN_PATH" = x; then
16188       TOOLCHAIN_PATH="$with_toolchain_path"
16189     else
16190       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16191     fi
16192   fi
16193 
16194 
16195 fi
16196 
16197 
16198 
16199 # Check whether --with-extra-path was given.
16200 if test "${with_extra_path+set}" = set; then :
16201   withval=$with_extra_path;
16202   if test "x$with_extra_path" != x; then
16203     if test "x$EXTRA_PATH" = x; then
16204       EXTRA_PATH="$with_extra_path"
16205     else
16206       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16207     fi
16208   fi
16209 
16210 
16211 fi
16212 
16213 
16214   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16215     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16216     # If not, detect if Xcode is installed by running xcodebuild -version
16217     # if no Xcode installed, xcodebuild exits with 1
16218     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16219     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16220       # We need to use xcodebuild in the toolchain dir provided by the user, this will
16221       # fall back on the stub binary in /usr/bin/xcodebuild
16222       # Extract the first word of "xcodebuild", so it can be a program name with args.
16223 set dummy xcodebuild; ac_word=$2
16224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16225 $as_echo_n "checking for $ac_word... " >&6; }
16226 if ${ac_cv_path_XCODEBUILD+:} false; then :
16227   $as_echo_n "(cached) " >&6
16228 else
16229   case $XCODEBUILD in
16230   [\\/]* | ?:[\\/]*)
16231   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16232   ;;
16233   *)
16234   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16235 for as_dir in $TOOLCHAIN_PATH
16236 do
16237   IFS=$as_save_IFS
16238   test -z "$as_dir" && as_dir=.
16239     for ac_exec_ext in '' $ac_executable_extensions; do
16240   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16241     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16242     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16243     break 2
16244   fi
16245 done
16246   done
16247 IFS=$as_save_IFS
16248 
16249   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16250   ;;
16251 esac
16252 fi
16253 XCODEBUILD=$ac_cv_path_XCODEBUILD
16254 if test -n "$XCODEBUILD"; then
16255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16256 $as_echo "$XCODEBUILD" >&6; }
16257 else
16258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16259 $as_echo "no" >&6; }
16260 fi
16261 
16262 
16263     else
16264       # this should result in SYSROOT being empty, unless --with-sysroot is provided
16265       # when only the command line tools are installed there are no SDKs, so headers
16266       # are copied into the system frameworks
16267       XCODEBUILD=
16268 
16269     fi
16270 
16271     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16272 $as_echo_n "checking for sdk name... " >&6; }
16273 
16274 # Check whether --with-sdk-name was given.
16275 if test "${with_sdk_name+set}" = set; then :
16276   withval=$with_sdk_name; SDKNAME=$with_sdk_name
16277 
16278 fi
16279 
16280     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16281 $as_echo "$SDKNAME" >&6; }
16282 
16283     # if toolchain path is specified then don't rely on system headers, they may not compile
16284     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16285     test -z "$TOOLCHAIN_PATH" && \
16286       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16287 
16288     if test -z "$SYSROOT"; then
16289       if test -n "$XCODEBUILD"; then
16290         # if we don't have system headers, use default SDK name (last resort)
16291         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16292           SDKNAME=${SDKNAME:-macosx}
16293         fi
16294 
16295         if test -n "$SDKNAME"; then
16296           # Call xcodebuild to determine SYSROOT
16297           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16298         fi
16299       else
16300         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16301           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
16302         fi
16303       fi
16304     else
16305       # warn user if --with-sdk-name was also set
16306       if test -n "$with_sdk_name"; then
16307         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16308 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16309       fi
16310     fi
16311 
16312     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16313       # If no system framework headers, then SYSROOT must be set, or we won't build
16314       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
16315     fi
16316 
16317     # Perform a basic sanity test
16318     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16319       if test -z "$SYSROOT"; then
16320         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
16321       else
16322         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16323       fi
16324     fi
16325 
16326     # set SDKROOT too, Xcode tools will pick it up
16327     SDKROOT=$SYSROOT
16328 
16329   fi
16330 
16331   # Prepend the extra path to the global path
16332 
16333   if test "x$EXTRA_PATH" != x; then
16334     if test "x$PATH" = x; then
16335       PATH="$EXTRA_PATH"
16336     else
16337       PATH="$EXTRA_PATH:$PATH"
16338     fi
16339   fi
16340 
16341 
16342   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16343     # Add extra search paths on solaris for utilities like ar and as etc...
16344     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16345   fi
16346 
16347   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16348 $as_echo_n "checking for sysroot... " >&6; }
16349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16350 $as_echo "$SYSROOT" >&6; }
16351   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16352 $as_echo_n "checking for toolchain path... " >&6; }
16353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16354 $as_echo "$TOOLCHAIN_PATH" >&6; }
16355   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16356 $as_echo_n "checking for extra path... " >&6; }
16357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16358 $as_echo "$EXTRA_PATH" >&6; }
16359 
16360 
16361 # To properly create a configuration name, we need to have the OpenJDK target
16362 # and options (variants and debug level) parsed.
16363 
16364 
16365 
16366 # Check whether --with-conf-name was given.
16367 if test "${with_conf_name+set}" = set; then :
16368   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16369 fi
16370 
16371 
16372   # Test from where we are running configure, in or outside of src root.
16373   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16374 $as_echo_n "checking where to store configuration... " >&6; }
16375   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16376       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16377       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16378     # We are running configure from the src root.
16379     # Create a default ./build/target-variant-debuglevel output root.
16380     if test "x${CONF_NAME}" = x; then
16381       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16382 $as_echo "in default location" >&6; }
16383       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16384     else
16385       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16386 $as_echo "in build directory with custom name" >&6; }
16387     fi
16388     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16389     $MKDIR -p "$OUTPUT_ROOT"
16390     if test ! -d "$OUTPUT_ROOT"; then
16391       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16392     fi
16393   else
16394     # We are running configure from outside of the src dir.
16395     # Then use the current directory as output dir!
16396     # If configuration is situated in normal build directory, just use the build
16397     # directory name as configuration name, otherwise use the complete path.
16398     if test "x${CONF_NAME}" = x; then
16399       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16400     fi
16401     OUTPUT_ROOT="$CURDIR"
16402     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16403 $as_echo "in current directory" >&6; }
16404 
16405     # WARNING: This might be a bad thing to do. You need to be sure you want to
16406     # have a configuration in this directory. Do some sanity checks!
16407 
16408     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16409       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16410       # other files
16411       files_present=`$LS $OUTPUT_ROOT`
16412       # Configure has already touched config.log and confdefs.h in the current dir when this check
16413       # is performed.
16414       filtered_files=`$ECHO "$files_present" \
16415           | $SED -e 's/config.log//g' \
16416               -e 's/configure.log//g' \
16417               -e 's/confdefs.h//g' \
16418               -e 's/ //g' \
16419           | $TR -d '\n'`
16420       if test "x$filtered_files" != x; then
16421         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16422 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
16423         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16424 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16425         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16426 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16427         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16428 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16429         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16430 $as_echo "$as_me: seriously mess up just about everything." >&6;}
16431         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16432 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16433         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16434 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16435         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16436       fi
16437     fi
16438   fi
16439   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16440 $as_echo_n "checking what configuration name to use... " >&6; }
16441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16442 $as_echo "$CONF_NAME" >&6; }
16443 
16444 
16445   # Only process if variable expands to non-empty
16446 
16447   if test "x$OUTPUT_ROOT" != x; then
16448     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16449 
16450   # Input might be given as Windows format, start by converting to
16451   # unix format.
16452   path="$OUTPUT_ROOT"
16453   new_path=`$CYGPATH -u "$path"`
16454 
16455   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16456   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16457   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16458   # "foo.exe" is OK but "foo" is an error.
16459   #
16460   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16461   # It is also a way to make sure we got the proper file name for the real test later on.
16462   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16463   if test "x$test_shortpath" = x; then
16464     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16465 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16466     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16467   fi
16468 
16469   # Call helper function which possibly converts this using DOS-style short mode.
16470   # If so, the updated path is stored in $new_path.
16471 
16472   input_path="$new_path"
16473   # Check if we need to convert this using DOS-style short mode. If the path
16474   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16475   # take no chances and rewrite it.
16476   # Note: m4 eats our [], so we need to use [ and ] instead.
16477   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16478   if test "x$has_forbidden_chars" != x; then
16479     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16480     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16481     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16482     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16483       # Going to short mode and back again did indeed matter. Since short mode is
16484       # case insensitive, let's make it lowercase to improve readability.
16485       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16486       # Now convert it back to Unix-style (cygpath)
16487       input_path=`$CYGPATH -u "$shortmode_path"`
16488       new_path="$input_path"
16489     fi
16490   fi
16491 
16492   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16493   if test "x$test_cygdrive_prefix" = x; then
16494     # As a simple fix, exclude /usr/bin since it's not a real path.
16495     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16496       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16497       # a path prefixed by /cygdrive for fixpath to work.
16498       new_path="$CYGWIN_ROOT_PATH$input_path"
16499     fi
16500   fi
16501 
16502 
16503   if test "x$path" != "x$new_path"; then
16504     OUTPUT_ROOT="$new_path"
16505     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16506 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16507   fi
16508 
16509     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16510 
16511   path="$OUTPUT_ROOT"
16512   has_colon=`$ECHO $path | $GREP ^.:`
16513   new_path="$path"
16514   if test "x$has_colon" = x; then
16515     # Not in mixed or Windows style, start by that.
16516     new_path=`cmd //c echo $path`
16517   fi
16518 
16519 
16520   input_path="$new_path"
16521   # Check if we need to convert this using DOS-style short mode. If the path
16522   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16523   # take no chances and rewrite it.
16524   # Note: m4 eats our [], so we need to use [ and ] instead.
16525   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16526   if test "x$has_forbidden_chars" != x; then
16527     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16528     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16529   fi
16530 
16531 
16532   windows_path="$new_path"
16533   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16534     unix_path=`$CYGPATH -u "$windows_path"`
16535     new_path="$unix_path"
16536   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16537     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16538     new_path="$unix_path"
16539   fi
16540 
16541   if test "x$path" != "x$new_path"; then
16542     OUTPUT_ROOT="$new_path"
16543     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16544 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16545   fi
16546 
16547   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16548   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16549 
16550     else
16551       # We're on a unix platform. Hooray! :)
16552       path="$OUTPUT_ROOT"
16553       has_space=`$ECHO "$path" | $GREP " "`
16554       if test "x$has_space" != x; then
16555         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16556 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16557         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16558       fi
16559 
16560       # Use eval to expand a potential ~
16561       eval path="$path"
16562       if test ! -f "$path" && test ! -d "$path"; then
16563         as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16564       fi
16565 
16566       OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16567     fi
16568   fi
16569 
16570 
16571   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16572   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16573 
16574   SPEC=$OUTPUT_ROOT/spec.gmk
16575 
16576   CONF_NAME=$CONF_NAME
16577 
16578   OUTPUT_ROOT=$OUTPUT_ROOT
16579 
16580 
16581 
16582   # The spec.gmk file contains all variables for the make system.
16583   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16584 
16585   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16586   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16587 
16588   # The bootcycle-spec.gmk file contains support for boot cycle builds.
16589   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16590 
16591   # The compare.sh is used to compare the build output to other builds.
16592   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16593 
16594   # The generated Makefile knows where the spec.gmk is and where the source is.
16595   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16596   # which will look for generated configurations
16597   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16598 
16599 
16600 
16601 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16602 
16603   for ac_prog in apt-get yum port pkgutil pkgadd
16604 do
16605   # Extract the first word of "$ac_prog", so it can be a program name with args.
16606 set dummy $ac_prog; ac_word=$2
16607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16608 $as_echo_n "checking for $ac_word... " >&6; }
16609 if ${ac_cv_prog_PKGHANDLER+:} false; then :
16610   $as_echo_n "(cached) " >&6
16611 else
16612   if test -n "$PKGHANDLER"; then
16613   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16614 else
16615 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16616 for as_dir in $PATH
16617 do
16618   IFS=$as_save_IFS
16619   test -z "$as_dir" && as_dir=.
16620     for ac_exec_ext in '' $ac_executable_extensions; do
16621   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16622     ac_cv_prog_PKGHANDLER="$ac_prog"
16623     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16624     break 2
16625   fi
16626 done
16627   done
16628 IFS=$as_save_IFS
16629 
16630 fi
16631 fi
16632 PKGHANDLER=$ac_cv_prog_PKGHANDLER
16633 if test -n "$PKGHANDLER"; then
16634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16635 $as_echo "$PKGHANDLER" >&6; }
16636 else
16637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16638 $as_echo "no" >&6; }
16639 fi
16640 
16641 
16642   test -n "$PKGHANDLER" && break
16643 done
16644 
16645 
16646 
16647 # Setup tools that requires more complex handling, or that is not needed by the configure script.
16648 
16649 
16650 
16651   # Publish this variable in the help.
16652 
16653 
16654   if [ -z "${MAKE+x}" ]; then
16655     # The variable is not set by user, try to locate tool using the code snippet
16656 
16657     # Try our hardest to locate a correct version of GNU make
16658     for ac_prog in gmake
16659 do
16660   # Extract the first word of "$ac_prog", so it can be a program name with args.
16661 set dummy $ac_prog; ac_word=$2
16662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16663 $as_echo_n "checking for $ac_word... " >&6; }
16664 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16665   $as_echo_n "(cached) " >&6
16666 else
16667   case $CHECK_GMAKE in
16668   [\\/]* | ?:[\\/]*)
16669   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16670   ;;
16671   *)
16672   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16673 for as_dir in $PATH
16674 do
16675   IFS=$as_save_IFS
16676   test -z "$as_dir" && as_dir=.
16677     for ac_exec_ext in '' $ac_executable_extensions; do
16678   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16679     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16680     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16681     break 2
16682   fi
16683 done
16684   done
16685 IFS=$as_save_IFS
16686 
16687   ;;
16688 esac
16689 fi
16690 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16691 if test -n "$CHECK_GMAKE"; then
16692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16693 $as_echo "$CHECK_GMAKE" >&6; }
16694 else
16695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16696 $as_echo "no" >&6; }
16697 fi
16698 
16699 
16700   test -n "$CHECK_GMAKE" && break
16701 done
16702 
16703 
16704   MAKE_CANDIDATE=""$CHECK_GMAKE""
16705   DESCRIPTION="gmake in PATH"
16706 
16707   # On Cygwin, we require a newer version of make than on other platforms
16708   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16709     MAKE_VERSION_EXPR="-e 4\."
16710     MAKE_REQUIRED_VERSION="4.0"
16711    else
16712     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16713     MAKE_REQUIRED_VERSION="3.81"
16714   fi
16715 
16716   if test "x$MAKE_CANDIDATE" != x; then
16717     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16718 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16719     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16720     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16721     if test "x$IS_GNU_MAKE" = x; then
16722       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16723 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16724     else
16725       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16726       if test "x$IS_MODERN_MAKE" = x; then
16727         { $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
16728 $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;}
16729       else
16730         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16731           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16732             MAKE_EXPECTED_ENV='cygwin'
16733           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16734             MAKE_EXPECTED_ENV='msys'
16735           else
16736             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16737           fi
16738           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16739           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16740         else
16741           # Not relevant for non-Windows
16742           IS_MAKE_CORRECT_ENV=true
16743         fi
16744         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16745           { $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
16746 $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;}
16747         else
16748           FOUND_MAKE=$MAKE_CANDIDATE
16749 
16750   # Only process if variable expands to non-empty
16751 
16752   if test "x$FOUND_MAKE" != x; then
16753     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16754 
16755   # First separate the path from the arguments. This will split at the first
16756   # space.
16757   complete="$FOUND_MAKE"
16758   path="${complete%% *}"
16759   tmp="$complete EOL"
16760   arguments="${tmp#* }"
16761 
16762   # Input might be given as Windows format, start by converting to
16763   # unix format.
16764   new_path=`$CYGPATH -u "$path"`
16765 
16766   # Now try to locate executable using which
16767   new_path=`$WHICH "$new_path" 2> /dev/null`
16768   # bat and cmd files are not always considered executable in cygwin causing which
16769   # to not find them
16770   if test "x$new_path" = x \
16771       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16772       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16773     new_path=`$CYGPATH -u "$path"`
16774   fi
16775   if test "x$new_path" = x; then
16776     # Oops. Which didn't find the executable.
16777     # The splitting of arguments from the executable at a space might have been incorrect,
16778     # since paths with space are more likely in Windows. Give it another try with the whole
16779     # argument.
16780     path="$complete"
16781     arguments="EOL"
16782     new_path=`$CYGPATH -u "$path"`
16783     new_path=`$WHICH "$new_path" 2> /dev/null`
16784     # bat and cmd files are not always considered executable in cygwin causing which
16785     # to not find them
16786     if test "x$new_path" = x \
16787         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16788         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16789       new_path=`$CYGPATH -u "$path"`
16790     fi
16791     if test "x$new_path" = x; then
16792       # It's still not found. Now this is an unrecoverable error.
16793       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16794 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16795       has_space=`$ECHO "$complete" | $GREP " "`
16796       if test "x$has_space" != x; then
16797         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16798 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16799       fi
16800       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16801     fi
16802   fi
16803 
16804   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16805   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16806   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16807   # "foo.exe" is OK but "foo" is an error.
16808   #
16809   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16810   # It is also a way to make sure we got the proper file name for the real test later on.
16811   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16812   if test "x$test_shortpath" = x; then
16813     # Short path failed, file does not exist as specified.
16814     # Try adding .exe or .cmd
16815     if test -f "${new_path}.exe"; then
16816       input_to_shortpath="${new_path}.exe"
16817     elif test -f "${new_path}.cmd"; then
16818       input_to_shortpath="${new_path}.cmd"
16819     else
16820       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16821 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16822       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16823 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16824       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16825     fi
16826   else
16827     input_to_shortpath="$new_path"
16828   fi
16829 
16830   # Call helper function which possibly converts this using DOS-style short mode.
16831   # If so, the updated path is stored in $new_path.
16832   new_path="$input_to_shortpath"
16833 
16834   input_path="$input_to_shortpath"
16835   # Check if we need to convert this using DOS-style short mode. If the path
16836   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16837   # take no chances and rewrite it.
16838   # Note: m4 eats our [], so we need to use [ and ] instead.
16839   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16840   if test "x$has_forbidden_chars" != x; then
16841     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16842     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16843     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16844     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16845       # Going to short mode and back again did indeed matter. Since short mode is
16846       # case insensitive, let's make it lowercase to improve readability.
16847       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16848       # Now convert it back to Unix-style (cygpath)
16849       input_path=`$CYGPATH -u "$shortmode_path"`
16850       new_path="$input_path"
16851     fi
16852   fi
16853 
16854   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16855   if test "x$test_cygdrive_prefix" = x; then
16856     # As a simple fix, exclude /usr/bin since it's not a real path.
16857     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16858       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16859       # a path prefixed by /cygdrive for fixpath to work.
16860       new_path="$CYGWIN_ROOT_PATH$input_path"
16861     fi
16862   fi
16863 
16864   # remove trailing .exe if any
16865   new_path="${new_path/%.exe/}"
16866 
16867     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16868 
16869   # First separate the path from the arguments. This will split at the first
16870   # space.
16871   complete="$FOUND_MAKE"
16872   path="${complete%% *}"
16873   tmp="$complete EOL"
16874   arguments="${tmp#* }"
16875 
16876   # Input might be given as Windows format, start by converting to
16877   # unix format.
16878   new_path="$path"
16879 
16880   windows_path="$new_path"
16881   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16882     unix_path=`$CYGPATH -u "$windows_path"`
16883     new_path="$unix_path"
16884   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16885     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16886     new_path="$unix_path"
16887   fi
16888 
16889 
16890   # Now try to locate executable using which
16891   new_path=`$WHICH "$new_path" 2> /dev/null`
16892 
16893   if test "x$new_path" = x; then
16894     # Oops. Which didn't find the executable.
16895     # The splitting of arguments from the executable at a space might have been incorrect,
16896     # since paths with space are more likely in Windows. Give it another try with the whole
16897     # argument.
16898     path="$complete"
16899     arguments="EOL"
16900     new_path="$path"
16901 
16902   windows_path="$new_path"
16903   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16904     unix_path=`$CYGPATH -u "$windows_path"`
16905     new_path="$unix_path"
16906   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16907     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16908     new_path="$unix_path"
16909   fi
16910 
16911 
16912     new_path=`$WHICH "$new_path" 2> /dev/null`
16913     # bat and cmd files are not always considered executable in MSYS causing which
16914     # to not find them
16915     if test "x$new_path" = x \
16916         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16917         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16918       new_path="$path"
16919 
16920   windows_path="$new_path"
16921   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16922     unix_path=`$CYGPATH -u "$windows_path"`
16923     new_path="$unix_path"
16924   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16925     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16926     new_path="$unix_path"
16927   fi
16928 
16929     fi
16930 
16931     if test "x$new_path" = x; then
16932       # It's still not found. Now this is an unrecoverable error.
16933       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16934 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16935       has_space=`$ECHO "$complete" | $GREP " "`
16936       if test "x$has_space" != x; then
16937         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16938 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16939       fi
16940       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16941     fi
16942   fi
16943 
16944   # Now new_path has a complete unix path to the binary
16945   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16946     # Keep paths in /bin as-is, but remove trailing .exe if any
16947     new_path="${new_path/%.exe/}"
16948     # Do not save /bin paths to all_fixpath_prefixes!
16949   else
16950     # Not in mixed or Windows style, start by that.
16951     new_path=`cmd //c echo $new_path`
16952 
16953   input_path="$new_path"
16954   # Check if we need to convert this using DOS-style short mode. If the path
16955   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16956   # take no chances and rewrite it.
16957   # Note: m4 eats our [], so we need to use [ and ] instead.
16958   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16959   if test "x$has_forbidden_chars" != x; then
16960     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16961     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16962   fi
16963 
16964     # Output is in $new_path
16965 
16966   windows_path="$new_path"
16967   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16968     unix_path=`$CYGPATH -u "$windows_path"`
16969     new_path="$unix_path"
16970   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16971     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16972     new_path="$unix_path"
16973   fi
16974 
16975     # remove trailing .exe if any
16976     new_path="${new_path/%.exe/}"
16977 
16978     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16979     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16980   fi
16981 
16982     else
16983       # We're on a unix platform. Hooray! :)
16984       # First separate the path from the arguments. This will split at the first
16985       # space.
16986       complete="$FOUND_MAKE"
16987       path="${complete%% *}"
16988       tmp="$complete EOL"
16989       arguments="${tmp#* }"
16990 
16991       # Cannot rely on the command "which" here since it doesn't always work.
16992       is_absolute_path=`$ECHO "$path" | $GREP ^/`
16993       if test -z "$is_absolute_path"; then
16994         # Path to executable is not absolute. Find it.
16995         IFS_save="$IFS"
16996         IFS=:
16997         for p in $PATH; do
16998           if test -f "$p/$path" && test -x "$p/$path"; then
16999             new_path="$p/$path"
17000             break
17001           fi
17002         done
17003         IFS="$IFS_save"
17004       else
17005         # This is an absolute path, we can use it without further modifications.
17006         new_path="$path"
17007       fi
17008 
17009       if test "x$new_path" = x; then
17010         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17011 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17012         has_space=`$ECHO "$complete" | $GREP " "`
17013         if test "x$has_space" != x; then
17014           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17015 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17016         fi
17017         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17018       fi
17019     fi
17020 
17021     # Now join together the path and the arguments once again
17022     if test "x$arguments" != xEOL; then
17023       new_complete="$new_path ${arguments% *}"
17024     else
17025       new_complete="$new_path"
17026     fi
17027 
17028     if test "x$complete" != "x$new_complete"; then
17029       FOUND_MAKE="$new_complete"
17030       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17031 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17032     fi
17033   fi
17034 
17035         fi
17036       fi
17037     fi
17038   fi
17039 
17040 
17041     if test "x$FOUND_MAKE" = x; then
17042       for ac_prog in make
17043 do
17044   # Extract the first word of "$ac_prog", so it can be a program name with args.
17045 set dummy $ac_prog; ac_word=$2
17046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17047 $as_echo_n "checking for $ac_word... " >&6; }
17048 if ${ac_cv_path_CHECK_MAKE+:} false; then :
17049   $as_echo_n "(cached) " >&6
17050 else
17051   case $CHECK_MAKE in
17052   [\\/]* | ?:[\\/]*)
17053   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17054   ;;
17055   *)
17056   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17057 for as_dir in $PATH
17058 do
17059   IFS=$as_save_IFS
17060   test -z "$as_dir" && as_dir=.
17061     for ac_exec_ext in '' $ac_executable_extensions; do
17062   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17063     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17064     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17065     break 2
17066   fi
17067 done
17068   done
17069 IFS=$as_save_IFS
17070 
17071   ;;
17072 esac
17073 fi
17074 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17075 if test -n "$CHECK_MAKE"; then
17076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17077 $as_echo "$CHECK_MAKE" >&6; }
17078 else
17079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17080 $as_echo "no" >&6; }
17081 fi
17082 
17083 
17084   test -n "$CHECK_MAKE" && break
17085 done
17086 
17087 
17088   MAKE_CANDIDATE=""$CHECK_MAKE""
17089   DESCRIPTION="make in PATH"
17090 
17091   # On Cygwin, we require a newer version of make than on other platforms
17092   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17093     MAKE_VERSION_EXPR="-e 4\."
17094     MAKE_REQUIRED_VERSION="4.0"
17095    else
17096     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17097     MAKE_REQUIRED_VERSION="3.81"
17098   fi
17099 
17100   if test "x$MAKE_CANDIDATE" != x; then
17101     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17102 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17103     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17104     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17105     if test "x$IS_GNU_MAKE" = x; then
17106       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17107 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17108     else
17109       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17110       if test "x$IS_MODERN_MAKE" = x; then
17111         { $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
17112 $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;}
17113       else
17114         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17115           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17116             MAKE_EXPECTED_ENV='cygwin'
17117           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17118             MAKE_EXPECTED_ENV='msys'
17119           else
17120             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17121           fi
17122           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17123           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17124         else
17125           # Not relevant for non-Windows
17126           IS_MAKE_CORRECT_ENV=true
17127         fi
17128         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17129           { $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
17130 $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;}
17131         else
17132           FOUND_MAKE=$MAKE_CANDIDATE
17133 
17134   # Only process if variable expands to non-empty
17135 
17136   if test "x$FOUND_MAKE" != x; then
17137     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17138 
17139   # First separate the path from the arguments. This will split at the first
17140   # space.
17141   complete="$FOUND_MAKE"
17142   path="${complete%% *}"
17143   tmp="$complete EOL"
17144   arguments="${tmp#* }"
17145 
17146   # Input might be given as Windows format, start by converting to
17147   # unix format.
17148   new_path=`$CYGPATH -u "$path"`
17149 
17150   # Now try to locate executable using which
17151   new_path=`$WHICH "$new_path" 2> /dev/null`
17152   # bat and cmd files are not always considered executable in cygwin causing which
17153   # to not find them
17154   if test "x$new_path" = x \
17155       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17156       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17157     new_path=`$CYGPATH -u "$path"`
17158   fi
17159   if test "x$new_path" = x; then
17160     # Oops. Which didn't find the executable.
17161     # The splitting of arguments from the executable at a space might have been incorrect,
17162     # since paths with space are more likely in Windows. Give it another try with the whole
17163     # argument.
17164     path="$complete"
17165     arguments="EOL"
17166     new_path=`$CYGPATH -u "$path"`
17167     new_path=`$WHICH "$new_path" 2> /dev/null`
17168     # bat and cmd files are not always considered executable in cygwin causing which
17169     # to not find them
17170     if test "x$new_path" = x \
17171         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17172         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17173       new_path=`$CYGPATH -u "$path"`
17174     fi
17175     if test "x$new_path" = x; then
17176       # It's still not found. Now this is an unrecoverable error.
17177       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17178 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17179       has_space=`$ECHO "$complete" | $GREP " "`
17180       if test "x$has_space" != x; then
17181         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17182 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17183       fi
17184       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17185     fi
17186   fi
17187 
17188   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17189   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17190   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17191   # "foo.exe" is OK but "foo" is an error.
17192   #
17193   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17194   # It is also a way to make sure we got the proper file name for the real test later on.
17195   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17196   if test "x$test_shortpath" = x; then
17197     # Short path failed, file does not exist as specified.
17198     # Try adding .exe or .cmd
17199     if test -f "${new_path}.exe"; then
17200       input_to_shortpath="${new_path}.exe"
17201     elif test -f "${new_path}.cmd"; then
17202       input_to_shortpath="${new_path}.cmd"
17203     else
17204       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17205 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17206       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17207 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17208       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17209     fi
17210   else
17211     input_to_shortpath="$new_path"
17212   fi
17213 
17214   # Call helper function which possibly converts this using DOS-style short mode.
17215   # If so, the updated path is stored in $new_path.
17216   new_path="$input_to_shortpath"
17217 
17218   input_path="$input_to_shortpath"
17219   # Check if we need to convert this using DOS-style short mode. If the path
17220   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17221   # take no chances and rewrite it.
17222   # Note: m4 eats our [], so we need to use [ and ] instead.
17223   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17224   if test "x$has_forbidden_chars" != x; then
17225     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17226     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17227     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17228     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17229       # Going to short mode and back again did indeed matter. Since short mode is
17230       # case insensitive, let's make it lowercase to improve readability.
17231       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17232       # Now convert it back to Unix-style (cygpath)
17233       input_path=`$CYGPATH -u "$shortmode_path"`
17234       new_path="$input_path"
17235     fi
17236   fi
17237 
17238   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17239   if test "x$test_cygdrive_prefix" = x; then
17240     # As a simple fix, exclude /usr/bin since it's not a real path.
17241     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17242       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17243       # a path prefixed by /cygdrive for fixpath to work.
17244       new_path="$CYGWIN_ROOT_PATH$input_path"
17245     fi
17246   fi
17247 
17248   # remove trailing .exe if any
17249   new_path="${new_path/%.exe/}"
17250 
17251     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17252 
17253   # First separate the path from the arguments. This will split at the first
17254   # space.
17255   complete="$FOUND_MAKE"
17256   path="${complete%% *}"
17257   tmp="$complete EOL"
17258   arguments="${tmp#* }"
17259 
17260   # Input might be given as Windows format, start by converting to
17261   # unix format.
17262   new_path="$path"
17263 
17264   windows_path="$new_path"
17265   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17266     unix_path=`$CYGPATH -u "$windows_path"`
17267     new_path="$unix_path"
17268   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17269     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17270     new_path="$unix_path"
17271   fi
17272 
17273 
17274   # Now try to locate executable using which
17275   new_path=`$WHICH "$new_path" 2> /dev/null`
17276 
17277   if test "x$new_path" = x; then
17278     # Oops. Which didn't find the executable.
17279     # The splitting of arguments from the executable at a space might have been incorrect,
17280     # since paths with space are more likely in Windows. Give it another try with the whole
17281     # argument.
17282     path="$complete"
17283     arguments="EOL"
17284     new_path="$path"
17285 
17286   windows_path="$new_path"
17287   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17288     unix_path=`$CYGPATH -u "$windows_path"`
17289     new_path="$unix_path"
17290   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17291     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17292     new_path="$unix_path"
17293   fi
17294 
17295 
17296     new_path=`$WHICH "$new_path" 2> /dev/null`
17297     # bat and cmd files are not always considered executable in MSYS causing which
17298     # to not find them
17299     if test "x$new_path" = x \
17300         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17301         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17302       new_path="$path"
17303 
17304   windows_path="$new_path"
17305   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17306     unix_path=`$CYGPATH -u "$windows_path"`
17307     new_path="$unix_path"
17308   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17309     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17310     new_path="$unix_path"
17311   fi
17312 
17313     fi
17314 
17315     if test "x$new_path" = x; then
17316       # It's still not found. Now this is an unrecoverable error.
17317       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17318 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17319       has_space=`$ECHO "$complete" | $GREP " "`
17320       if test "x$has_space" != x; then
17321         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17322 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17323       fi
17324       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17325     fi
17326   fi
17327 
17328   # Now new_path has a complete unix path to the binary
17329   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17330     # Keep paths in /bin as-is, but remove trailing .exe if any
17331     new_path="${new_path/%.exe/}"
17332     # Do not save /bin paths to all_fixpath_prefixes!
17333   else
17334     # Not in mixed or Windows style, start by that.
17335     new_path=`cmd //c echo $new_path`
17336 
17337   input_path="$new_path"
17338   # Check if we need to convert this using DOS-style short mode. If the path
17339   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17340   # take no chances and rewrite it.
17341   # Note: m4 eats our [], so we need to use [ and ] instead.
17342   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17343   if test "x$has_forbidden_chars" != x; then
17344     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17345     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17346   fi
17347 
17348     # Output is in $new_path
17349 
17350   windows_path="$new_path"
17351   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17352     unix_path=`$CYGPATH -u "$windows_path"`
17353     new_path="$unix_path"
17354   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17355     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17356     new_path="$unix_path"
17357   fi
17358 
17359     # remove trailing .exe if any
17360     new_path="${new_path/%.exe/}"
17361 
17362     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17363     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17364   fi
17365 
17366     else
17367       # We're on a unix platform. Hooray! :)
17368       # First separate the path from the arguments. This will split at the first
17369       # space.
17370       complete="$FOUND_MAKE"
17371       path="${complete%% *}"
17372       tmp="$complete EOL"
17373       arguments="${tmp#* }"
17374 
17375       # Cannot rely on the command "which" here since it doesn't always work.
17376       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17377       if test -z "$is_absolute_path"; then
17378         # Path to executable is not absolute. Find it.
17379         IFS_save="$IFS"
17380         IFS=:
17381         for p in $PATH; do
17382           if test -f "$p/$path" && test -x "$p/$path"; then
17383             new_path="$p/$path"
17384             break
17385           fi
17386         done
17387         IFS="$IFS_save"
17388       else
17389         # This is an absolute path, we can use it without further modifications.
17390         new_path="$path"
17391       fi
17392 
17393       if test "x$new_path" = x; then
17394         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17395 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17396         has_space=`$ECHO "$complete" | $GREP " "`
17397         if test "x$has_space" != x; then
17398           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17399 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17400         fi
17401         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17402       fi
17403     fi
17404 
17405     # Now join together the path and the arguments once again
17406     if test "x$arguments" != xEOL; then
17407       new_complete="$new_path ${arguments% *}"
17408     else
17409       new_complete="$new_path"
17410     fi
17411 
17412     if test "x$complete" != "x$new_complete"; then
17413       FOUND_MAKE="$new_complete"
17414       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17415 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17416     fi
17417   fi
17418 
17419         fi
17420       fi
17421     fi
17422   fi
17423 
17424     fi
17425 
17426     if test "x$FOUND_MAKE" = x; then
17427       if test "x$TOOLCHAIN_PATH" != x; then
17428         # We have a toolchain path, check that as well before giving up.
17429         OLD_PATH=$PATH
17430         PATH=$TOOLCHAIN_PATH:$PATH
17431         for ac_prog in gmake
17432 do
17433   # Extract the first word of "$ac_prog", so it can be a program name with args.
17434 set dummy $ac_prog; ac_word=$2
17435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17436 $as_echo_n "checking for $ac_word... " >&6; }
17437 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17438   $as_echo_n "(cached) " >&6
17439 else
17440   case $CHECK_TOOLSDIR_GMAKE in
17441   [\\/]* | ?:[\\/]*)
17442   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17443   ;;
17444   *)
17445   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17446 for as_dir in $PATH
17447 do
17448   IFS=$as_save_IFS
17449   test -z "$as_dir" && as_dir=.
17450     for ac_exec_ext in '' $ac_executable_extensions; do
17451   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17452     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17454     break 2
17455   fi
17456 done
17457   done
17458 IFS=$as_save_IFS
17459 
17460   ;;
17461 esac
17462 fi
17463 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17464 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17466 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17467 else
17468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17469 $as_echo "no" >&6; }
17470 fi
17471 
17472 
17473   test -n "$CHECK_TOOLSDIR_GMAKE" && break
17474 done
17475 
17476 
17477   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17478   DESCRIPTION="gmake in tools-dir"
17479 
17480   # On Cygwin, we require a newer version of make than on other platforms
17481   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17482     MAKE_VERSION_EXPR="-e 4\."
17483     MAKE_REQUIRED_VERSION="4.0"
17484    else
17485     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17486     MAKE_REQUIRED_VERSION="3.81"
17487   fi
17488 
17489   if test "x$MAKE_CANDIDATE" != x; then
17490     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17491 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17492     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17493     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17494     if test "x$IS_GNU_MAKE" = x; then
17495       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17496 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17497     else
17498       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17499       if test "x$IS_MODERN_MAKE" = x; then
17500         { $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
17501 $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;}
17502       else
17503         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17504           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17505             MAKE_EXPECTED_ENV='cygwin'
17506           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17507             MAKE_EXPECTED_ENV='msys'
17508           else
17509             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17510           fi
17511           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17512           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17513         else
17514           # Not relevant for non-Windows
17515           IS_MAKE_CORRECT_ENV=true
17516         fi
17517         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17518           { $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
17519 $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;}
17520         else
17521           FOUND_MAKE=$MAKE_CANDIDATE
17522 
17523   # Only process if variable expands to non-empty
17524 
17525   if test "x$FOUND_MAKE" != x; then
17526     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17527 
17528   # First separate the path from the arguments. This will split at the first
17529   # space.
17530   complete="$FOUND_MAKE"
17531   path="${complete%% *}"
17532   tmp="$complete EOL"
17533   arguments="${tmp#* }"
17534 
17535   # Input might be given as Windows format, start by converting to
17536   # unix format.
17537   new_path=`$CYGPATH -u "$path"`
17538 
17539   # Now try to locate executable using which
17540   new_path=`$WHICH "$new_path" 2> /dev/null`
17541   # bat and cmd files are not always considered executable in cygwin causing which
17542   # to not find them
17543   if test "x$new_path" = x \
17544       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17545       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17546     new_path=`$CYGPATH -u "$path"`
17547   fi
17548   if test "x$new_path" = x; then
17549     # Oops. Which didn't find the executable.
17550     # The splitting of arguments from the executable at a space might have been incorrect,
17551     # since paths with space are more likely in Windows. Give it another try with the whole
17552     # argument.
17553     path="$complete"
17554     arguments="EOL"
17555     new_path=`$CYGPATH -u "$path"`
17556     new_path=`$WHICH "$new_path" 2> /dev/null`
17557     # bat and cmd files are not always considered executable in cygwin causing which
17558     # to not find them
17559     if test "x$new_path" = x \
17560         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17561         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17562       new_path=`$CYGPATH -u "$path"`
17563     fi
17564     if test "x$new_path" = x; then
17565       # It's still not found. Now this is an unrecoverable error.
17566       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17567 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17568       has_space=`$ECHO "$complete" | $GREP " "`
17569       if test "x$has_space" != x; then
17570         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17571 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17572       fi
17573       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17574     fi
17575   fi
17576 
17577   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17578   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17579   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17580   # "foo.exe" is OK but "foo" is an error.
17581   #
17582   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17583   # It is also a way to make sure we got the proper file name for the real test later on.
17584   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17585   if test "x$test_shortpath" = x; then
17586     # Short path failed, file does not exist as specified.
17587     # Try adding .exe or .cmd
17588     if test -f "${new_path}.exe"; then
17589       input_to_shortpath="${new_path}.exe"
17590     elif test -f "${new_path}.cmd"; then
17591       input_to_shortpath="${new_path}.cmd"
17592     else
17593       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17594 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17595       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17596 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17597       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17598     fi
17599   else
17600     input_to_shortpath="$new_path"
17601   fi
17602 
17603   # Call helper function which possibly converts this using DOS-style short mode.
17604   # If so, the updated path is stored in $new_path.
17605   new_path="$input_to_shortpath"
17606 
17607   input_path="$input_to_shortpath"
17608   # Check if we need to convert this using DOS-style short mode. If the path
17609   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17610   # take no chances and rewrite it.
17611   # Note: m4 eats our [], so we need to use [ and ] instead.
17612   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17613   if test "x$has_forbidden_chars" != x; then
17614     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17615     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17616     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17617     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17618       # Going to short mode and back again did indeed matter. Since short mode is
17619       # case insensitive, let's make it lowercase to improve readability.
17620       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17621       # Now convert it back to Unix-style (cygpath)
17622       input_path=`$CYGPATH -u "$shortmode_path"`
17623       new_path="$input_path"
17624     fi
17625   fi
17626 
17627   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17628   if test "x$test_cygdrive_prefix" = x; then
17629     # As a simple fix, exclude /usr/bin since it's not a real path.
17630     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17631       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17632       # a path prefixed by /cygdrive for fixpath to work.
17633       new_path="$CYGWIN_ROOT_PATH$input_path"
17634     fi
17635   fi
17636 
17637   # remove trailing .exe if any
17638   new_path="${new_path/%.exe/}"
17639 
17640     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17641 
17642   # First separate the path from the arguments. This will split at the first
17643   # space.
17644   complete="$FOUND_MAKE"
17645   path="${complete%% *}"
17646   tmp="$complete EOL"
17647   arguments="${tmp#* }"
17648 
17649   # Input might be given as Windows format, start by converting to
17650   # unix format.
17651   new_path="$path"
17652 
17653   windows_path="$new_path"
17654   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17655     unix_path=`$CYGPATH -u "$windows_path"`
17656     new_path="$unix_path"
17657   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17658     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17659     new_path="$unix_path"
17660   fi
17661 
17662 
17663   # Now try to locate executable using which
17664   new_path=`$WHICH "$new_path" 2> /dev/null`
17665 
17666   if test "x$new_path" = x; then
17667     # Oops. Which didn't find the executable.
17668     # The splitting of arguments from the executable at a space might have been incorrect,
17669     # since paths with space are more likely in Windows. Give it another try with the whole
17670     # argument.
17671     path="$complete"
17672     arguments="EOL"
17673     new_path="$path"
17674 
17675   windows_path="$new_path"
17676   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17677     unix_path=`$CYGPATH -u "$windows_path"`
17678     new_path="$unix_path"
17679   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17680     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17681     new_path="$unix_path"
17682   fi
17683 
17684 
17685     new_path=`$WHICH "$new_path" 2> /dev/null`
17686     # bat and cmd files are not always considered executable in MSYS causing which
17687     # to not find them
17688     if test "x$new_path" = x \
17689         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17690         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17691       new_path="$path"
17692 
17693   windows_path="$new_path"
17694   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17695     unix_path=`$CYGPATH -u "$windows_path"`
17696     new_path="$unix_path"
17697   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17698     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17699     new_path="$unix_path"
17700   fi
17701 
17702     fi
17703 
17704     if test "x$new_path" = x; then
17705       # It's still not found. Now this is an unrecoverable error.
17706       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17707 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17708       has_space=`$ECHO "$complete" | $GREP " "`
17709       if test "x$has_space" != x; then
17710         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17711 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17712       fi
17713       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17714     fi
17715   fi
17716 
17717   # Now new_path has a complete unix path to the binary
17718   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17719     # Keep paths in /bin as-is, but remove trailing .exe if any
17720     new_path="${new_path/%.exe/}"
17721     # Do not save /bin paths to all_fixpath_prefixes!
17722   else
17723     # Not in mixed or Windows style, start by that.
17724     new_path=`cmd //c echo $new_path`
17725 
17726   input_path="$new_path"
17727   # Check if we need to convert this using DOS-style short mode. If the path
17728   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17729   # take no chances and rewrite it.
17730   # Note: m4 eats our [], so we need to use [ and ] instead.
17731   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17732   if test "x$has_forbidden_chars" != x; then
17733     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17734     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17735   fi
17736 
17737     # Output is in $new_path
17738 
17739   windows_path="$new_path"
17740   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17741     unix_path=`$CYGPATH -u "$windows_path"`
17742     new_path="$unix_path"
17743   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17744     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17745     new_path="$unix_path"
17746   fi
17747 
17748     # remove trailing .exe if any
17749     new_path="${new_path/%.exe/}"
17750 
17751     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17752     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17753   fi
17754 
17755     else
17756       # We're on a unix platform. Hooray! :)
17757       # First separate the path from the arguments. This will split at the first
17758       # space.
17759       complete="$FOUND_MAKE"
17760       path="${complete%% *}"
17761       tmp="$complete EOL"
17762       arguments="${tmp#* }"
17763 
17764       # Cannot rely on the command "which" here since it doesn't always work.
17765       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17766       if test -z "$is_absolute_path"; then
17767         # Path to executable is not absolute. Find it.
17768         IFS_save="$IFS"
17769         IFS=:
17770         for p in $PATH; do
17771           if test -f "$p/$path" && test -x "$p/$path"; then
17772             new_path="$p/$path"
17773             break
17774           fi
17775         done
17776         IFS="$IFS_save"
17777       else
17778         # This is an absolute path, we can use it without further modifications.
17779         new_path="$path"
17780       fi
17781 
17782       if test "x$new_path" = x; then
17783         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17784 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17785         has_space=`$ECHO "$complete" | $GREP " "`
17786         if test "x$has_space" != x; then
17787           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17788 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17789         fi
17790         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17791       fi
17792     fi
17793 
17794     # Now join together the path and the arguments once again
17795     if test "x$arguments" != xEOL; then
17796       new_complete="$new_path ${arguments% *}"
17797     else
17798       new_complete="$new_path"
17799     fi
17800 
17801     if test "x$complete" != "x$new_complete"; then
17802       FOUND_MAKE="$new_complete"
17803       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17804 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17805     fi
17806   fi
17807 
17808         fi
17809       fi
17810     fi
17811   fi
17812 
17813         if test "x$FOUND_MAKE" = x; then
17814           for ac_prog in make
17815 do
17816   # Extract the first word of "$ac_prog", so it can be a program name with args.
17817 set dummy $ac_prog; ac_word=$2
17818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17819 $as_echo_n "checking for $ac_word... " >&6; }
17820 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17821   $as_echo_n "(cached) " >&6
17822 else
17823   case $CHECK_TOOLSDIR_MAKE in
17824   [\\/]* | ?:[\\/]*)
17825   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17826   ;;
17827   *)
17828   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17829 for as_dir in $PATH
17830 do
17831   IFS=$as_save_IFS
17832   test -z "$as_dir" && as_dir=.
17833     for ac_exec_ext in '' $ac_executable_extensions; do
17834   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17835     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17836     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17837     break 2
17838   fi
17839 done
17840   done
17841 IFS=$as_save_IFS
17842 
17843   ;;
17844 esac
17845 fi
17846 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17847 if test -n "$CHECK_TOOLSDIR_MAKE"; then
17848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17849 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17850 else
17851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17852 $as_echo "no" >&6; }
17853 fi
17854 
17855 
17856   test -n "$CHECK_TOOLSDIR_MAKE" && break
17857 done
17858 
17859 
17860   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17861   DESCRIPTION="make in tools-dir"
17862 
17863   # On Cygwin, we require a newer version of make than on other platforms
17864   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17865     MAKE_VERSION_EXPR="-e 4\."
17866     MAKE_REQUIRED_VERSION="4.0"
17867    else
17868     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17869     MAKE_REQUIRED_VERSION="3.81"
17870   fi
17871 
17872   if test "x$MAKE_CANDIDATE" != x; then
17873     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17874 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17875     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17876     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17877     if test "x$IS_GNU_MAKE" = x; then
17878       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17879 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17880     else
17881       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17882       if test "x$IS_MODERN_MAKE" = x; then
17883         { $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
17884 $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;}
17885       else
17886         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17887           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17888             MAKE_EXPECTED_ENV='cygwin'
17889           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17890             MAKE_EXPECTED_ENV='msys'
17891           else
17892             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17893           fi
17894           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17895           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17896         else
17897           # Not relevant for non-Windows
17898           IS_MAKE_CORRECT_ENV=true
17899         fi
17900         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17901           { $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
17902 $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;}
17903         else
17904           FOUND_MAKE=$MAKE_CANDIDATE
17905 
17906   # Only process if variable expands to non-empty
17907 
17908   if test "x$FOUND_MAKE" != x; then
17909     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17910 
17911   # First separate the path from the arguments. This will split at the first
17912   # space.
17913   complete="$FOUND_MAKE"
17914   path="${complete%% *}"
17915   tmp="$complete EOL"
17916   arguments="${tmp#* }"
17917 
17918   # Input might be given as Windows format, start by converting to
17919   # unix format.
17920   new_path=`$CYGPATH -u "$path"`
17921 
17922   # Now try to locate executable using which
17923   new_path=`$WHICH "$new_path" 2> /dev/null`
17924   # bat and cmd files are not always considered executable in cygwin causing which
17925   # to not find them
17926   if test "x$new_path" = x \
17927       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17928       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17929     new_path=`$CYGPATH -u "$path"`
17930   fi
17931   if test "x$new_path" = x; then
17932     # Oops. Which didn't find the executable.
17933     # The splitting of arguments from the executable at a space might have been incorrect,
17934     # since paths with space are more likely in Windows. Give it another try with the whole
17935     # argument.
17936     path="$complete"
17937     arguments="EOL"
17938     new_path=`$CYGPATH -u "$path"`
17939     new_path=`$WHICH "$new_path" 2> /dev/null`
17940     # bat and cmd files are not always considered executable in cygwin causing which
17941     # to not find them
17942     if test "x$new_path" = x \
17943         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17944         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17945       new_path=`$CYGPATH -u "$path"`
17946     fi
17947     if test "x$new_path" = x; then
17948       # It's still not found. Now this is an unrecoverable error.
17949       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17950 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17951       has_space=`$ECHO "$complete" | $GREP " "`
17952       if test "x$has_space" != x; then
17953         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17954 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17955       fi
17956       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17957     fi
17958   fi
17959 
17960   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17961   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17962   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17963   # "foo.exe" is OK but "foo" is an error.
17964   #
17965   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17966   # It is also a way to make sure we got the proper file name for the real test later on.
17967   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17968   if test "x$test_shortpath" = x; then
17969     # Short path failed, file does not exist as specified.
17970     # Try adding .exe or .cmd
17971     if test -f "${new_path}.exe"; then
17972       input_to_shortpath="${new_path}.exe"
17973     elif test -f "${new_path}.cmd"; then
17974       input_to_shortpath="${new_path}.cmd"
17975     else
17976       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17977 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17978       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17979 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17980       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17981     fi
17982   else
17983     input_to_shortpath="$new_path"
17984   fi
17985 
17986   # Call helper function which possibly converts this using DOS-style short mode.
17987   # If so, the updated path is stored in $new_path.
17988   new_path="$input_to_shortpath"
17989 
17990   input_path="$input_to_shortpath"
17991   # Check if we need to convert this using DOS-style short mode. If the path
17992   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17993   # take no chances and rewrite it.
17994   # Note: m4 eats our [], so we need to use [ and ] instead.
17995   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17996   if test "x$has_forbidden_chars" != x; then
17997     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17998     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17999     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18000     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18001       # Going to short mode and back again did indeed matter. Since short mode is
18002       # case insensitive, let's make it lowercase to improve readability.
18003       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18004       # Now convert it back to Unix-style (cygpath)
18005       input_path=`$CYGPATH -u "$shortmode_path"`
18006       new_path="$input_path"
18007     fi
18008   fi
18009 
18010   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18011   if test "x$test_cygdrive_prefix" = x; then
18012     # As a simple fix, exclude /usr/bin since it's not a real path.
18013     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18014       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18015       # a path prefixed by /cygdrive for fixpath to work.
18016       new_path="$CYGWIN_ROOT_PATH$input_path"
18017     fi
18018   fi
18019 
18020   # remove trailing .exe if any
18021   new_path="${new_path/%.exe/}"
18022 
18023     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18024 
18025   # First separate the path from the arguments. This will split at the first
18026   # space.
18027   complete="$FOUND_MAKE"
18028   path="${complete%% *}"
18029   tmp="$complete EOL"
18030   arguments="${tmp#* }"
18031 
18032   # Input might be given as Windows format, start by converting to
18033   # unix format.
18034   new_path="$path"
18035 
18036   windows_path="$new_path"
18037   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18038     unix_path=`$CYGPATH -u "$windows_path"`
18039     new_path="$unix_path"
18040   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18041     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18042     new_path="$unix_path"
18043   fi
18044 
18045 
18046   # Now try to locate executable using which
18047   new_path=`$WHICH "$new_path" 2> /dev/null`
18048 
18049   if test "x$new_path" = x; then
18050     # Oops. Which didn't find the executable.
18051     # The splitting of arguments from the executable at a space might have been incorrect,
18052     # since paths with space are more likely in Windows. Give it another try with the whole
18053     # argument.
18054     path="$complete"
18055     arguments="EOL"
18056     new_path="$path"
18057 
18058   windows_path="$new_path"
18059   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18060     unix_path=`$CYGPATH -u "$windows_path"`
18061     new_path="$unix_path"
18062   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18063     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18064     new_path="$unix_path"
18065   fi
18066 
18067 
18068     new_path=`$WHICH "$new_path" 2> /dev/null`
18069     # bat and cmd files are not always considered executable in MSYS causing which
18070     # to not find them
18071     if test "x$new_path" = x \
18072         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18073         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18074       new_path="$path"
18075 
18076   windows_path="$new_path"
18077   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18078     unix_path=`$CYGPATH -u "$windows_path"`
18079     new_path="$unix_path"
18080   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18081     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18082     new_path="$unix_path"
18083   fi
18084 
18085     fi
18086 
18087     if test "x$new_path" = x; then
18088       # It's still not found. Now this is an unrecoverable error.
18089       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18090 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18091       has_space=`$ECHO "$complete" | $GREP " "`
18092       if test "x$has_space" != x; then
18093         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18094 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18095       fi
18096       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18097     fi
18098   fi
18099 
18100   # Now new_path has a complete unix path to the binary
18101   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18102     # Keep paths in /bin as-is, but remove trailing .exe if any
18103     new_path="${new_path/%.exe/}"
18104     # Do not save /bin paths to all_fixpath_prefixes!
18105   else
18106     # Not in mixed or Windows style, start by that.
18107     new_path=`cmd //c echo $new_path`
18108 
18109   input_path="$new_path"
18110   # Check if we need to convert this using DOS-style short mode. If the path
18111   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18112   # take no chances and rewrite it.
18113   # Note: m4 eats our [], so we need to use [ and ] instead.
18114   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18115   if test "x$has_forbidden_chars" != x; then
18116     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18117     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18118   fi
18119 
18120     # Output is in $new_path
18121 
18122   windows_path="$new_path"
18123   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18124     unix_path=`$CYGPATH -u "$windows_path"`
18125     new_path="$unix_path"
18126   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18127     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18128     new_path="$unix_path"
18129   fi
18130 
18131     # remove trailing .exe if any
18132     new_path="${new_path/%.exe/}"
18133 
18134     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18135     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18136   fi
18137 
18138     else
18139       # We're on a unix platform. Hooray! :)
18140       # First separate the path from the arguments. This will split at the first
18141       # space.
18142       complete="$FOUND_MAKE"
18143       path="${complete%% *}"
18144       tmp="$complete EOL"
18145       arguments="${tmp#* }"
18146 
18147       # Cannot rely on the command "which" here since it doesn't always work.
18148       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18149       if test -z "$is_absolute_path"; then
18150         # Path to executable is not absolute. Find it.
18151         IFS_save="$IFS"
18152         IFS=:
18153         for p in $PATH; do
18154           if test -f "$p/$path" && test -x "$p/$path"; then
18155             new_path="$p/$path"
18156             break
18157           fi
18158         done
18159         IFS="$IFS_save"
18160       else
18161         # This is an absolute path, we can use it without further modifications.
18162         new_path="$path"
18163       fi
18164 
18165       if test "x$new_path" = x; then
18166         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18167 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18168         has_space=`$ECHO "$complete" | $GREP " "`
18169         if test "x$has_space" != x; then
18170           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18171 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18172         fi
18173         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18174       fi
18175     fi
18176 
18177     # Now join together the path and the arguments once again
18178     if test "x$arguments" != xEOL; then
18179       new_complete="$new_path ${arguments% *}"
18180     else
18181       new_complete="$new_path"
18182     fi
18183 
18184     if test "x$complete" != "x$new_complete"; then
18185       FOUND_MAKE="$new_complete"
18186       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18187 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18188     fi
18189   fi
18190 
18191         fi
18192       fi
18193     fi
18194   fi
18195 
18196         fi
18197         PATH=$OLD_PATH
18198       fi
18199     fi
18200 
18201     if test "x$FOUND_MAKE" = x; then
18202       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
18203     fi
18204 
18205   else
18206     # The variable is set, but is it from the command line or the environment?
18207 
18208     # Try to remove the string !MAKE! from our list.
18209     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18210     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18211       # If it failed, the variable was not from the command line. Ignore it,
18212       # but warn the user (except for BASH, which is always set by the calling BASH).
18213       if test "xMAKE" != xBASH; then
18214         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18215 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18216       fi
18217       # Try to locate tool using the code snippet
18218 
18219     # Try our hardest to locate a correct version of GNU make
18220     for ac_prog in gmake
18221 do
18222   # Extract the first word of "$ac_prog", so it can be a program name with args.
18223 set dummy $ac_prog; ac_word=$2
18224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18225 $as_echo_n "checking for $ac_word... " >&6; }
18226 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18227   $as_echo_n "(cached) " >&6
18228 else
18229   case $CHECK_GMAKE in
18230   [\\/]* | ?:[\\/]*)
18231   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18232   ;;
18233   *)
18234   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18235 for as_dir in $PATH
18236 do
18237   IFS=$as_save_IFS
18238   test -z "$as_dir" && as_dir=.
18239     for ac_exec_ext in '' $ac_executable_extensions; do
18240   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18241     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18242     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18243     break 2
18244   fi
18245 done
18246   done
18247 IFS=$as_save_IFS
18248 
18249   ;;
18250 esac
18251 fi
18252 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18253 if test -n "$CHECK_GMAKE"; then
18254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18255 $as_echo "$CHECK_GMAKE" >&6; }
18256 else
18257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18258 $as_echo "no" >&6; }
18259 fi
18260 
18261 
18262   test -n "$CHECK_GMAKE" && break
18263 done
18264 
18265 
18266   MAKE_CANDIDATE=""$CHECK_GMAKE""
18267   DESCRIPTION="gmake in PATH"
18268 
18269   # On Cygwin, we require a newer version of make than on other platforms
18270   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18271     MAKE_VERSION_EXPR="-e 4\."
18272     MAKE_REQUIRED_VERSION="4.0"
18273    else
18274     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18275     MAKE_REQUIRED_VERSION="3.81"
18276   fi
18277 
18278   if test "x$MAKE_CANDIDATE" != x; then
18279     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18280 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18281     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18282     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18283     if test "x$IS_GNU_MAKE" = x; then
18284       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18285 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18286     else
18287       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18288       if test "x$IS_MODERN_MAKE" = x; then
18289         { $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
18290 $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;}
18291       else
18292         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18293           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18294             MAKE_EXPECTED_ENV='cygwin'
18295           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18296             MAKE_EXPECTED_ENV='msys'
18297           else
18298             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18299           fi
18300           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18301           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18302         else
18303           # Not relevant for non-Windows
18304           IS_MAKE_CORRECT_ENV=true
18305         fi
18306         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18307           { $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
18308 $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;}
18309         else
18310           FOUND_MAKE=$MAKE_CANDIDATE
18311 
18312   # Only process if variable expands to non-empty
18313 
18314   if test "x$FOUND_MAKE" != x; then
18315     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18316 
18317   # First separate the path from the arguments. This will split at the first
18318   # space.
18319   complete="$FOUND_MAKE"
18320   path="${complete%% *}"
18321   tmp="$complete EOL"
18322   arguments="${tmp#* }"
18323 
18324   # Input might be given as Windows format, start by converting to
18325   # unix format.
18326   new_path=`$CYGPATH -u "$path"`
18327 
18328   # Now try to locate executable using which
18329   new_path=`$WHICH "$new_path" 2> /dev/null`
18330   # bat and cmd files are not always considered executable in cygwin causing which
18331   # to not find them
18332   if test "x$new_path" = x \
18333       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18334       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18335     new_path=`$CYGPATH -u "$path"`
18336   fi
18337   if test "x$new_path" = x; then
18338     # Oops. Which didn't find the executable.
18339     # The splitting of arguments from the executable at a space might have been incorrect,
18340     # since paths with space are more likely in Windows. Give it another try with the whole
18341     # argument.
18342     path="$complete"
18343     arguments="EOL"
18344     new_path=`$CYGPATH -u "$path"`
18345     new_path=`$WHICH "$new_path" 2> /dev/null`
18346     # bat and cmd files are not always considered executable in cygwin causing which
18347     # to not find them
18348     if test "x$new_path" = x \
18349         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18350         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18351       new_path=`$CYGPATH -u "$path"`
18352     fi
18353     if test "x$new_path" = x; then
18354       # It's still not found. Now this is an unrecoverable error.
18355       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18356 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18357       has_space=`$ECHO "$complete" | $GREP " "`
18358       if test "x$has_space" != x; then
18359         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18360 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18361       fi
18362       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18363     fi
18364   fi
18365 
18366   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18367   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18368   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18369   # "foo.exe" is OK but "foo" is an error.
18370   #
18371   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18372   # It is also a way to make sure we got the proper file name for the real test later on.
18373   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18374   if test "x$test_shortpath" = x; then
18375     # Short path failed, file does not exist as specified.
18376     # Try adding .exe or .cmd
18377     if test -f "${new_path}.exe"; then
18378       input_to_shortpath="${new_path}.exe"
18379     elif test -f "${new_path}.cmd"; then
18380       input_to_shortpath="${new_path}.cmd"
18381     else
18382       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18383 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18384       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18385 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18386       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18387     fi
18388   else
18389     input_to_shortpath="$new_path"
18390   fi
18391 
18392   # Call helper function which possibly converts this using DOS-style short mode.
18393   # If so, the updated path is stored in $new_path.
18394   new_path="$input_to_shortpath"
18395 
18396   input_path="$input_to_shortpath"
18397   # Check if we need to convert this using DOS-style short mode. If the path
18398   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18399   # take no chances and rewrite it.
18400   # Note: m4 eats our [], so we need to use [ and ] instead.
18401   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18402   if test "x$has_forbidden_chars" != x; then
18403     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18404     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18405     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18406     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18407       # Going to short mode and back again did indeed matter. Since short mode is
18408       # case insensitive, let's make it lowercase to improve readability.
18409       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18410       # Now convert it back to Unix-style (cygpath)
18411       input_path=`$CYGPATH -u "$shortmode_path"`
18412       new_path="$input_path"
18413     fi
18414   fi
18415 
18416   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18417   if test "x$test_cygdrive_prefix" = x; then
18418     # As a simple fix, exclude /usr/bin since it's not a real path.
18419     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18420       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18421       # a path prefixed by /cygdrive for fixpath to work.
18422       new_path="$CYGWIN_ROOT_PATH$input_path"
18423     fi
18424   fi
18425 
18426   # remove trailing .exe if any
18427   new_path="${new_path/%.exe/}"
18428 
18429     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18430 
18431   # First separate the path from the arguments. This will split at the first
18432   # space.
18433   complete="$FOUND_MAKE"
18434   path="${complete%% *}"
18435   tmp="$complete EOL"
18436   arguments="${tmp#* }"
18437 
18438   # Input might be given as Windows format, start by converting to
18439   # unix format.
18440   new_path="$path"
18441 
18442   windows_path="$new_path"
18443   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18444     unix_path=`$CYGPATH -u "$windows_path"`
18445     new_path="$unix_path"
18446   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18447     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18448     new_path="$unix_path"
18449   fi
18450 
18451 
18452   # Now try to locate executable using which
18453   new_path=`$WHICH "$new_path" 2> /dev/null`
18454 
18455   if test "x$new_path" = x; then
18456     # Oops. Which didn't find the executable.
18457     # The splitting of arguments from the executable at a space might have been incorrect,
18458     # since paths with space are more likely in Windows. Give it another try with the whole
18459     # argument.
18460     path="$complete"
18461     arguments="EOL"
18462     new_path="$path"
18463 
18464   windows_path="$new_path"
18465   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18466     unix_path=`$CYGPATH -u "$windows_path"`
18467     new_path="$unix_path"
18468   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18469     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18470     new_path="$unix_path"
18471   fi
18472 
18473 
18474     new_path=`$WHICH "$new_path" 2> /dev/null`
18475     # bat and cmd files are not always considered executable in MSYS causing which
18476     # to not find them
18477     if test "x$new_path" = x \
18478         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18479         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18480       new_path="$path"
18481 
18482   windows_path="$new_path"
18483   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18484     unix_path=`$CYGPATH -u "$windows_path"`
18485     new_path="$unix_path"
18486   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18487     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18488     new_path="$unix_path"
18489   fi
18490 
18491     fi
18492 
18493     if test "x$new_path" = x; then
18494       # It's still not found. Now this is an unrecoverable error.
18495       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18496 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18497       has_space=`$ECHO "$complete" | $GREP " "`
18498       if test "x$has_space" != x; then
18499         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18500 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18501       fi
18502       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18503     fi
18504   fi
18505 
18506   # Now new_path has a complete unix path to the binary
18507   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18508     # Keep paths in /bin as-is, but remove trailing .exe if any
18509     new_path="${new_path/%.exe/}"
18510     # Do not save /bin paths to all_fixpath_prefixes!
18511   else
18512     # Not in mixed or Windows style, start by that.
18513     new_path=`cmd //c echo $new_path`
18514 
18515   input_path="$new_path"
18516   # Check if we need to convert this using DOS-style short mode. If the path
18517   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18518   # take no chances and rewrite it.
18519   # Note: m4 eats our [], so we need to use [ and ] instead.
18520   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18521   if test "x$has_forbidden_chars" != x; then
18522     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18523     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18524   fi
18525 
18526     # Output is in $new_path
18527 
18528   windows_path="$new_path"
18529   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18530     unix_path=`$CYGPATH -u "$windows_path"`
18531     new_path="$unix_path"
18532   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18533     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18534     new_path="$unix_path"
18535   fi
18536 
18537     # remove trailing .exe if any
18538     new_path="${new_path/%.exe/}"
18539 
18540     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18541     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18542   fi
18543 
18544     else
18545       # We're on a unix platform. Hooray! :)
18546       # First separate the path from the arguments. This will split at the first
18547       # space.
18548       complete="$FOUND_MAKE"
18549       path="${complete%% *}"
18550       tmp="$complete EOL"
18551       arguments="${tmp#* }"
18552 
18553       # Cannot rely on the command "which" here since it doesn't always work.
18554       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18555       if test -z "$is_absolute_path"; then
18556         # Path to executable is not absolute. Find it.
18557         IFS_save="$IFS"
18558         IFS=:
18559         for p in $PATH; do
18560           if test -f "$p/$path" && test -x "$p/$path"; then
18561             new_path="$p/$path"
18562             break
18563           fi
18564         done
18565         IFS="$IFS_save"
18566       else
18567         # This is an absolute path, we can use it without further modifications.
18568         new_path="$path"
18569       fi
18570 
18571       if test "x$new_path" = x; then
18572         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18573 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18574         has_space=`$ECHO "$complete" | $GREP " "`
18575         if test "x$has_space" != x; then
18576           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18577 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18578         fi
18579         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18580       fi
18581     fi
18582 
18583     # Now join together the path and the arguments once again
18584     if test "x$arguments" != xEOL; then
18585       new_complete="$new_path ${arguments% *}"
18586     else
18587       new_complete="$new_path"
18588     fi
18589 
18590     if test "x$complete" != "x$new_complete"; then
18591       FOUND_MAKE="$new_complete"
18592       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18593 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18594     fi
18595   fi
18596 
18597         fi
18598       fi
18599     fi
18600   fi
18601 
18602 
18603     if test "x$FOUND_MAKE" = x; then
18604       for ac_prog in make
18605 do
18606   # Extract the first word of "$ac_prog", so it can be a program name with args.
18607 set dummy $ac_prog; ac_word=$2
18608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18609 $as_echo_n "checking for $ac_word... " >&6; }
18610 if ${ac_cv_path_CHECK_MAKE+:} false; then :
18611   $as_echo_n "(cached) " >&6
18612 else
18613   case $CHECK_MAKE in
18614   [\\/]* | ?:[\\/]*)
18615   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18616   ;;
18617   *)
18618   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18619 for as_dir in $PATH
18620 do
18621   IFS=$as_save_IFS
18622   test -z "$as_dir" && as_dir=.
18623     for ac_exec_ext in '' $ac_executable_extensions; do
18624   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18625     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18626     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18627     break 2
18628   fi
18629 done
18630   done
18631 IFS=$as_save_IFS
18632 
18633   ;;
18634 esac
18635 fi
18636 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18637 if test -n "$CHECK_MAKE"; then
18638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18639 $as_echo "$CHECK_MAKE" >&6; }
18640 else
18641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18642 $as_echo "no" >&6; }
18643 fi
18644 
18645 
18646   test -n "$CHECK_MAKE" && break
18647 done
18648 
18649 
18650   MAKE_CANDIDATE=""$CHECK_MAKE""
18651   DESCRIPTION="make in PATH"
18652 
18653   # On Cygwin, we require a newer version of make than on other platforms
18654   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18655     MAKE_VERSION_EXPR="-e 4\."
18656     MAKE_REQUIRED_VERSION="4.0"
18657    else
18658     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18659     MAKE_REQUIRED_VERSION="3.81"
18660   fi
18661 
18662   if test "x$MAKE_CANDIDATE" != x; then
18663     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18664 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18665     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18666     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18667     if test "x$IS_GNU_MAKE" = x; then
18668       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18669 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18670     else
18671       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18672       if test "x$IS_MODERN_MAKE" = x; then
18673         { $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
18674 $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;}
18675       else
18676         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18677           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18678             MAKE_EXPECTED_ENV='cygwin'
18679           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18680             MAKE_EXPECTED_ENV='msys'
18681           else
18682             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18683           fi
18684           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18685           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18686         else
18687           # Not relevant for non-Windows
18688           IS_MAKE_CORRECT_ENV=true
18689         fi
18690         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18691           { $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
18692 $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;}
18693         else
18694           FOUND_MAKE=$MAKE_CANDIDATE
18695 
18696   # Only process if variable expands to non-empty
18697 
18698   if test "x$FOUND_MAKE" != x; then
18699     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18700 
18701   # First separate the path from the arguments. This will split at the first
18702   # space.
18703   complete="$FOUND_MAKE"
18704   path="${complete%% *}"
18705   tmp="$complete EOL"
18706   arguments="${tmp#* }"
18707 
18708   # Input might be given as Windows format, start by converting to
18709   # unix format.
18710   new_path=`$CYGPATH -u "$path"`
18711 
18712   # Now try to locate executable using which
18713   new_path=`$WHICH "$new_path" 2> /dev/null`
18714   # bat and cmd files are not always considered executable in cygwin causing which
18715   # to not find them
18716   if test "x$new_path" = x \
18717       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18718       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18719     new_path=`$CYGPATH -u "$path"`
18720   fi
18721   if test "x$new_path" = x; then
18722     # Oops. Which didn't find the executable.
18723     # The splitting of arguments from the executable at a space might have been incorrect,
18724     # since paths with space are more likely in Windows. Give it another try with the whole
18725     # argument.
18726     path="$complete"
18727     arguments="EOL"
18728     new_path=`$CYGPATH -u "$path"`
18729     new_path=`$WHICH "$new_path" 2> /dev/null`
18730     # bat and cmd files are not always considered executable in cygwin causing which
18731     # to not find them
18732     if test "x$new_path" = x \
18733         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18734         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18735       new_path=`$CYGPATH -u "$path"`
18736     fi
18737     if test "x$new_path" = x; then
18738       # It's still not found. Now this is an unrecoverable error.
18739       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18740 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18741       has_space=`$ECHO "$complete" | $GREP " "`
18742       if test "x$has_space" != x; then
18743         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18744 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18745       fi
18746       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18747     fi
18748   fi
18749 
18750   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18751   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18752   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18753   # "foo.exe" is OK but "foo" is an error.
18754   #
18755   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18756   # It is also a way to make sure we got the proper file name for the real test later on.
18757   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18758   if test "x$test_shortpath" = x; then
18759     # Short path failed, file does not exist as specified.
18760     # Try adding .exe or .cmd
18761     if test -f "${new_path}.exe"; then
18762       input_to_shortpath="${new_path}.exe"
18763     elif test -f "${new_path}.cmd"; then
18764       input_to_shortpath="${new_path}.cmd"
18765     else
18766       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18767 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18768       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18769 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18770       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18771     fi
18772   else
18773     input_to_shortpath="$new_path"
18774   fi
18775 
18776   # Call helper function which possibly converts this using DOS-style short mode.
18777   # If so, the updated path is stored in $new_path.
18778   new_path="$input_to_shortpath"
18779 
18780   input_path="$input_to_shortpath"
18781   # Check if we need to convert this using DOS-style short mode. If the path
18782   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18783   # take no chances and rewrite it.
18784   # Note: m4 eats our [], so we need to use [ and ] instead.
18785   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18786   if test "x$has_forbidden_chars" != x; then
18787     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18788     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18789     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18790     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18791       # Going to short mode and back again did indeed matter. Since short mode is
18792       # case insensitive, let's make it lowercase to improve readability.
18793       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18794       # Now convert it back to Unix-style (cygpath)
18795       input_path=`$CYGPATH -u "$shortmode_path"`
18796       new_path="$input_path"
18797     fi
18798   fi
18799 
18800   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18801   if test "x$test_cygdrive_prefix" = x; then
18802     # As a simple fix, exclude /usr/bin since it's not a real path.
18803     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18804       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18805       # a path prefixed by /cygdrive for fixpath to work.
18806       new_path="$CYGWIN_ROOT_PATH$input_path"
18807     fi
18808   fi
18809 
18810   # remove trailing .exe if any
18811   new_path="${new_path/%.exe/}"
18812 
18813     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18814 
18815   # First separate the path from the arguments. This will split at the first
18816   # space.
18817   complete="$FOUND_MAKE"
18818   path="${complete%% *}"
18819   tmp="$complete EOL"
18820   arguments="${tmp#* }"
18821 
18822   # Input might be given as Windows format, start by converting to
18823   # unix format.
18824   new_path="$path"
18825 
18826   windows_path="$new_path"
18827   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18828     unix_path=`$CYGPATH -u "$windows_path"`
18829     new_path="$unix_path"
18830   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18831     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18832     new_path="$unix_path"
18833   fi
18834 
18835 
18836   # Now try to locate executable using which
18837   new_path=`$WHICH "$new_path" 2> /dev/null`
18838 
18839   if test "x$new_path" = x; then
18840     # Oops. Which didn't find the executable.
18841     # The splitting of arguments from the executable at a space might have been incorrect,
18842     # since paths with space are more likely in Windows. Give it another try with the whole
18843     # argument.
18844     path="$complete"
18845     arguments="EOL"
18846     new_path="$path"
18847 
18848   windows_path="$new_path"
18849   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18850     unix_path=`$CYGPATH -u "$windows_path"`
18851     new_path="$unix_path"
18852   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18853     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18854     new_path="$unix_path"
18855   fi
18856 
18857 
18858     new_path=`$WHICH "$new_path" 2> /dev/null`
18859     # bat and cmd files are not always considered executable in MSYS causing which
18860     # to not find them
18861     if test "x$new_path" = x \
18862         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18863         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18864       new_path="$path"
18865 
18866   windows_path="$new_path"
18867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18868     unix_path=`$CYGPATH -u "$windows_path"`
18869     new_path="$unix_path"
18870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18871     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18872     new_path="$unix_path"
18873   fi
18874 
18875     fi
18876 
18877     if test "x$new_path" = x; then
18878       # It's still not found. Now this is an unrecoverable error.
18879       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18880 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18881       has_space=`$ECHO "$complete" | $GREP " "`
18882       if test "x$has_space" != x; then
18883         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18884 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18885       fi
18886       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18887     fi
18888   fi
18889 
18890   # Now new_path has a complete unix path to the binary
18891   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18892     # Keep paths in /bin as-is, but remove trailing .exe if any
18893     new_path="${new_path/%.exe/}"
18894     # Do not save /bin paths to all_fixpath_prefixes!
18895   else
18896     # Not in mixed or Windows style, start by that.
18897     new_path=`cmd //c echo $new_path`
18898 
18899   input_path="$new_path"
18900   # Check if we need to convert this using DOS-style short mode. If the path
18901   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18902   # take no chances and rewrite it.
18903   # Note: m4 eats our [], so we need to use [ and ] instead.
18904   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18905   if test "x$has_forbidden_chars" != x; then
18906     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18907     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18908   fi
18909 
18910     # Output is in $new_path
18911 
18912   windows_path="$new_path"
18913   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18914     unix_path=`$CYGPATH -u "$windows_path"`
18915     new_path="$unix_path"
18916   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18917     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18918     new_path="$unix_path"
18919   fi
18920 
18921     # remove trailing .exe if any
18922     new_path="${new_path/%.exe/}"
18923 
18924     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18925     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18926   fi
18927 
18928     else
18929       # We're on a unix platform. Hooray! :)
18930       # First separate the path from the arguments. This will split at the first
18931       # space.
18932       complete="$FOUND_MAKE"
18933       path="${complete%% *}"
18934       tmp="$complete EOL"
18935       arguments="${tmp#* }"
18936 
18937       # Cannot rely on the command "which" here since it doesn't always work.
18938       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18939       if test -z "$is_absolute_path"; then
18940         # Path to executable is not absolute. Find it.
18941         IFS_save="$IFS"
18942         IFS=:
18943         for p in $PATH; do
18944           if test -f "$p/$path" && test -x "$p/$path"; then
18945             new_path="$p/$path"
18946             break
18947           fi
18948         done
18949         IFS="$IFS_save"
18950       else
18951         # This is an absolute path, we can use it without further modifications.
18952         new_path="$path"
18953       fi
18954 
18955       if test "x$new_path" = x; then
18956         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18957 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18958         has_space=`$ECHO "$complete" | $GREP " "`
18959         if test "x$has_space" != x; then
18960           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18961 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18962         fi
18963         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18964       fi
18965     fi
18966 
18967     # Now join together the path and the arguments once again
18968     if test "x$arguments" != xEOL; then
18969       new_complete="$new_path ${arguments% *}"
18970     else
18971       new_complete="$new_path"
18972     fi
18973 
18974     if test "x$complete" != "x$new_complete"; then
18975       FOUND_MAKE="$new_complete"
18976       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18977 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18978     fi
18979   fi
18980 
18981         fi
18982       fi
18983     fi
18984   fi
18985 
18986     fi
18987 
18988     if test "x$FOUND_MAKE" = x; then
18989       if test "x$TOOLCHAIN_PATH" != x; then
18990         # We have a toolchain path, check that as well before giving up.
18991         OLD_PATH=$PATH
18992         PATH=$TOOLCHAIN_PATH:$PATH
18993         for ac_prog in gmake
18994 do
18995   # Extract the first word of "$ac_prog", so it can be a program name with args.
18996 set dummy $ac_prog; ac_word=$2
18997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18998 $as_echo_n "checking for $ac_word... " >&6; }
18999 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19000   $as_echo_n "(cached) " >&6
19001 else
19002   case $CHECK_TOOLSDIR_GMAKE in
19003   [\\/]* | ?:[\\/]*)
19004   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19005   ;;
19006   *)
19007   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19008 for as_dir in $PATH
19009 do
19010   IFS=$as_save_IFS
19011   test -z "$as_dir" && as_dir=.
19012     for ac_exec_ext in '' $ac_executable_extensions; do
19013   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19014     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19015     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19016     break 2
19017   fi
19018 done
19019   done
19020 IFS=$as_save_IFS
19021 
19022   ;;
19023 esac
19024 fi
19025 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19026 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19028 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19029 else
19030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19031 $as_echo "no" >&6; }
19032 fi
19033 
19034 
19035   test -n "$CHECK_TOOLSDIR_GMAKE" && break
19036 done
19037 
19038 
19039   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19040   DESCRIPTION="gmake in tools-dir"
19041 
19042   # On Cygwin, we require a newer version of make than on other platforms
19043   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19044     MAKE_VERSION_EXPR="-e 4\."
19045     MAKE_REQUIRED_VERSION="4.0"
19046    else
19047     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19048     MAKE_REQUIRED_VERSION="3.81"
19049   fi
19050 
19051   if test "x$MAKE_CANDIDATE" != x; then
19052     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19053 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19054     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19055     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19056     if test "x$IS_GNU_MAKE" = x; then
19057       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19058 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19059     else
19060       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19061       if test "x$IS_MODERN_MAKE" = x; then
19062         { $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
19063 $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;}
19064       else
19065         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19066           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19067             MAKE_EXPECTED_ENV='cygwin'
19068           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19069             MAKE_EXPECTED_ENV='msys'
19070           else
19071             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19072           fi
19073           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19074           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19075         else
19076           # Not relevant for non-Windows
19077           IS_MAKE_CORRECT_ENV=true
19078         fi
19079         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19080           { $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
19081 $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;}
19082         else
19083           FOUND_MAKE=$MAKE_CANDIDATE
19084 
19085   # Only process if variable expands to non-empty
19086 
19087   if test "x$FOUND_MAKE" != x; then
19088     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19089 
19090   # First separate the path from the arguments. This will split at the first
19091   # space.
19092   complete="$FOUND_MAKE"
19093   path="${complete%% *}"
19094   tmp="$complete EOL"
19095   arguments="${tmp#* }"
19096 
19097   # Input might be given as Windows format, start by converting to
19098   # unix format.
19099   new_path=`$CYGPATH -u "$path"`
19100 
19101   # Now try to locate executable using which
19102   new_path=`$WHICH "$new_path" 2> /dev/null`
19103   # bat and cmd files are not always considered executable in cygwin causing which
19104   # to not find them
19105   if test "x$new_path" = x \
19106       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19107       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19108     new_path=`$CYGPATH -u "$path"`
19109   fi
19110   if test "x$new_path" = x; then
19111     # Oops. Which didn't find the executable.
19112     # The splitting of arguments from the executable at a space might have been incorrect,
19113     # since paths with space are more likely in Windows. Give it another try with the whole
19114     # argument.
19115     path="$complete"
19116     arguments="EOL"
19117     new_path=`$CYGPATH -u "$path"`
19118     new_path=`$WHICH "$new_path" 2> /dev/null`
19119     # bat and cmd files are not always considered executable in cygwin causing which
19120     # to not find them
19121     if test "x$new_path" = x \
19122         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19123         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19124       new_path=`$CYGPATH -u "$path"`
19125     fi
19126     if test "x$new_path" = x; then
19127       # It's still not found. Now this is an unrecoverable error.
19128       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19129 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19130       has_space=`$ECHO "$complete" | $GREP " "`
19131       if test "x$has_space" != x; then
19132         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19133 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19134       fi
19135       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19136     fi
19137   fi
19138 
19139   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19140   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19141   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19142   # "foo.exe" is OK but "foo" is an error.
19143   #
19144   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19145   # It is also a way to make sure we got the proper file name for the real test later on.
19146   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19147   if test "x$test_shortpath" = x; then
19148     # Short path failed, file does not exist as specified.
19149     # Try adding .exe or .cmd
19150     if test -f "${new_path}.exe"; then
19151       input_to_shortpath="${new_path}.exe"
19152     elif test -f "${new_path}.cmd"; then
19153       input_to_shortpath="${new_path}.cmd"
19154     else
19155       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19156 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19157       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19158 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19159       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19160     fi
19161   else
19162     input_to_shortpath="$new_path"
19163   fi
19164 
19165   # Call helper function which possibly converts this using DOS-style short mode.
19166   # If so, the updated path is stored in $new_path.
19167   new_path="$input_to_shortpath"
19168 
19169   input_path="$input_to_shortpath"
19170   # Check if we need to convert this using DOS-style short mode. If the path
19171   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19172   # take no chances and rewrite it.
19173   # Note: m4 eats our [], so we need to use [ and ] instead.
19174   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19175   if test "x$has_forbidden_chars" != x; then
19176     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19177     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19178     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19179     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19180       # Going to short mode and back again did indeed matter. Since short mode is
19181       # case insensitive, let's make it lowercase to improve readability.
19182       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19183       # Now convert it back to Unix-style (cygpath)
19184       input_path=`$CYGPATH -u "$shortmode_path"`
19185       new_path="$input_path"
19186     fi
19187   fi
19188 
19189   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19190   if test "x$test_cygdrive_prefix" = x; then
19191     # As a simple fix, exclude /usr/bin since it's not a real path.
19192     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19193       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19194       # a path prefixed by /cygdrive for fixpath to work.
19195       new_path="$CYGWIN_ROOT_PATH$input_path"
19196     fi
19197   fi
19198 
19199   # remove trailing .exe if any
19200   new_path="${new_path/%.exe/}"
19201 
19202     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19203 
19204   # First separate the path from the arguments. This will split at the first
19205   # space.
19206   complete="$FOUND_MAKE"
19207   path="${complete%% *}"
19208   tmp="$complete EOL"
19209   arguments="${tmp#* }"
19210 
19211   # Input might be given as Windows format, start by converting to
19212   # unix format.
19213   new_path="$path"
19214 
19215   windows_path="$new_path"
19216   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19217     unix_path=`$CYGPATH -u "$windows_path"`
19218     new_path="$unix_path"
19219   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19220     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19221     new_path="$unix_path"
19222   fi
19223 
19224 
19225   # Now try to locate executable using which
19226   new_path=`$WHICH "$new_path" 2> /dev/null`
19227 
19228   if test "x$new_path" = x; then
19229     # Oops. Which didn't find the executable.
19230     # The splitting of arguments from the executable at a space might have been incorrect,
19231     # since paths with space are more likely in Windows. Give it another try with the whole
19232     # argument.
19233     path="$complete"
19234     arguments="EOL"
19235     new_path="$path"
19236 
19237   windows_path="$new_path"
19238   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19239     unix_path=`$CYGPATH -u "$windows_path"`
19240     new_path="$unix_path"
19241   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19242     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19243     new_path="$unix_path"
19244   fi
19245 
19246 
19247     new_path=`$WHICH "$new_path" 2> /dev/null`
19248     # bat and cmd files are not always considered executable in MSYS causing which
19249     # to not find them
19250     if test "x$new_path" = x \
19251         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19252         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19253       new_path="$path"
19254 
19255   windows_path="$new_path"
19256   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19257     unix_path=`$CYGPATH -u "$windows_path"`
19258     new_path="$unix_path"
19259   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19260     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19261     new_path="$unix_path"
19262   fi
19263 
19264     fi
19265 
19266     if test "x$new_path" = x; then
19267       # It's still not found. Now this is an unrecoverable error.
19268       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19269 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19270       has_space=`$ECHO "$complete" | $GREP " "`
19271       if test "x$has_space" != x; then
19272         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19273 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19274       fi
19275       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19276     fi
19277   fi
19278 
19279   # Now new_path has a complete unix path to the binary
19280   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19281     # Keep paths in /bin as-is, but remove trailing .exe if any
19282     new_path="${new_path/%.exe/}"
19283     # Do not save /bin paths to all_fixpath_prefixes!
19284   else
19285     # Not in mixed or Windows style, start by that.
19286     new_path=`cmd //c echo $new_path`
19287 
19288   input_path="$new_path"
19289   # Check if we need to convert this using DOS-style short mode. If the path
19290   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19291   # take no chances and rewrite it.
19292   # Note: m4 eats our [], so we need to use [ and ] instead.
19293   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19294   if test "x$has_forbidden_chars" != x; then
19295     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19296     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19297   fi
19298 
19299     # Output is in $new_path
19300 
19301   windows_path="$new_path"
19302   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19303     unix_path=`$CYGPATH -u "$windows_path"`
19304     new_path="$unix_path"
19305   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19306     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19307     new_path="$unix_path"
19308   fi
19309 
19310     # remove trailing .exe if any
19311     new_path="${new_path/%.exe/}"
19312 
19313     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19314     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19315   fi
19316 
19317     else
19318       # We're on a unix platform. Hooray! :)
19319       # First separate the path from the arguments. This will split at the first
19320       # space.
19321       complete="$FOUND_MAKE"
19322       path="${complete%% *}"
19323       tmp="$complete EOL"
19324       arguments="${tmp#* }"
19325 
19326       # Cannot rely on the command "which" here since it doesn't always work.
19327       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19328       if test -z "$is_absolute_path"; then
19329         # Path to executable is not absolute. Find it.
19330         IFS_save="$IFS"
19331         IFS=:
19332         for p in $PATH; do
19333           if test -f "$p/$path" && test -x "$p/$path"; then
19334             new_path="$p/$path"
19335             break
19336           fi
19337         done
19338         IFS="$IFS_save"
19339       else
19340         # This is an absolute path, we can use it without further modifications.
19341         new_path="$path"
19342       fi
19343 
19344       if test "x$new_path" = x; then
19345         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19346 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19347         has_space=`$ECHO "$complete" | $GREP " "`
19348         if test "x$has_space" != x; then
19349           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19350 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19351         fi
19352         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19353       fi
19354     fi
19355 
19356     # Now join together the path and the arguments once again
19357     if test "x$arguments" != xEOL; then
19358       new_complete="$new_path ${arguments% *}"
19359     else
19360       new_complete="$new_path"
19361     fi
19362 
19363     if test "x$complete" != "x$new_complete"; then
19364       FOUND_MAKE="$new_complete"
19365       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19366 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19367     fi
19368   fi
19369 
19370         fi
19371       fi
19372     fi
19373   fi
19374 
19375         if test "x$FOUND_MAKE" = x; then
19376           for ac_prog in make
19377 do
19378   # Extract the first word of "$ac_prog", so it can be a program name with args.
19379 set dummy $ac_prog; ac_word=$2
19380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19381 $as_echo_n "checking for $ac_word... " >&6; }
19382 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19383   $as_echo_n "(cached) " >&6
19384 else
19385   case $CHECK_TOOLSDIR_MAKE in
19386   [\\/]* | ?:[\\/]*)
19387   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19388   ;;
19389   *)
19390   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19391 for as_dir in $PATH
19392 do
19393   IFS=$as_save_IFS
19394   test -z "$as_dir" && as_dir=.
19395     for ac_exec_ext in '' $ac_executable_extensions; do
19396   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19397     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19398     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19399     break 2
19400   fi
19401 done
19402   done
19403 IFS=$as_save_IFS
19404 
19405   ;;
19406 esac
19407 fi
19408 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19409 if test -n "$CHECK_TOOLSDIR_MAKE"; then
19410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19411 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19412 else
19413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19414 $as_echo "no" >&6; }
19415 fi
19416 
19417 
19418   test -n "$CHECK_TOOLSDIR_MAKE" && break
19419 done
19420 
19421 
19422   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19423   DESCRIPTION="make in tools-dir"
19424 
19425   # On Cygwin, we require a newer version of make than on other platforms
19426   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19427     MAKE_VERSION_EXPR="-e 4\."
19428     MAKE_REQUIRED_VERSION="4.0"
19429    else
19430     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19431     MAKE_REQUIRED_VERSION="3.81"
19432   fi
19433 
19434   if test "x$MAKE_CANDIDATE" != x; then
19435     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19436 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19437     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19438     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19439     if test "x$IS_GNU_MAKE" = x; then
19440       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19441 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19442     else
19443       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19444       if test "x$IS_MODERN_MAKE" = x; then
19445         { $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
19446 $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;}
19447       else
19448         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19449           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19450             MAKE_EXPECTED_ENV='cygwin'
19451           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19452             MAKE_EXPECTED_ENV='msys'
19453           else
19454             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19455           fi
19456           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19457           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19458         else
19459           # Not relevant for non-Windows
19460           IS_MAKE_CORRECT_ENV=true
19461         fi
19462         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19463           { $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
19464 $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;}
19465         else
19466           FOUND_MAKE=$MAKE_CANDIDATE
19467 
19468   # Only process if variable expands to non-empty
19469 
19470   if test "x$FOUND_MAKE" != x; then
19471     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19472 
19473   # First separate the path from the arguments. This will split at the first
19474   # space.
19475   complete="$FOUND_MAKE"
19476   path="${complete%% *}"
19477   tmp="$complete EOL"
19478   arguments="${tmp#* }"
19479 
19480   # Input might be given as Windows format, start by converting to
19481   # unix format.
19482   new_path=`$CYGPATH -u "$path"`
19483 
19484   # Now try to locate executable using which
19485   new_path=`$WHICH "$new_path" 2> /dev/null`
19486   # bat and cmd files are not always considered executable in cygwin causing which
19487   # to not find them
19488   if test "x$new_path" = x \
19489       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19490       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19491     new_path=`$CYGPATH -u "$path"`
19492   fi
19493   if test "x$new_path" = x; then
19494     # Oops. Which didn't find the executable.
19495     # The splitting of arguments from the executable at a space might have been incorrect,
19496     # since paths with space are more likely in Windows. Give it another try with the whole
19497     # argument.
19498     path="$complete"
19499     arguments="EOL"
19500     new_path=`$CYGPATH -u "$path"`
19501     new_path=`$WHICH "$new_path" 2> /dev/null`
19502     # bat and cmd files are not always considered executable in cygwin causing which
19503     # to not find them
19504     if test "x$new_path" = x \
19505         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19506         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19507       new_path=`$CYGPATH -u "$path"`
19508     fi
19509     if test "x$new_path" = x; then
19510       # It's still not found. Now this is an unrecoverable error.
19511       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19512 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19513       has_space=`$ECHO "$complete" | $GREP " "`
19514       if test "x$has_space" != x; then
19515         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19516 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19517       fi
19518       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19519     fi
19520   fi
19521 
19522   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19523   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19524   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19525   # "foo.exe" is OK but "foo" is an error.
19526   #
19527   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19528   # It is also a way to make sure we got the proper file name for the real test later on.
19529   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19530   if test "x$test_shortpath" = x; then
19531     # Short path failed, file does not exist as specified.
19532     # Try adding .exe or .cmd
19533     if test -f "${new_path}.exe"; then
19534       input_to_shortpath="${new_path}.exe"
19535     elif test -f "${new_path}.cmd"; then
19536       input_to_shortpath="${new_path}.cmd"
19537     else
19538       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19539 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19540       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19541 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19542       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19543     fi
19544   else
19545     input_to_shortpath="$new_path"
19546   fi
19547 
19548   # Call helper function which possibly converts this using DOS-style short mode.
19549   # If so, the updated path is stored in $new_path.
19550   new_path="$input_to_shortpath"
19551 
19552   input_path="$input_to_shortpath"
19553   # Check if we need to convert this using DOS-style short mode. If the path
19554   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19555   # take no chances and rewrite it.
19556   # Note: m4 eats our [], so we need to use [ and ] instead.
19557   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19558   if test "x$has_forbidden_chars" != x; then
19559     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19560     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19561     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19562     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19563       # Going to short mode and back again did indeed matter. Since short mode is
19564       # case insensitive, let's make it lowercase to improve readability.
19565       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19566       # Now convert it back to Unix-style (cygpath)
19567       input_path=`$CYGPATH -u "$shortmode_path"`
19568       new_path="$input_path"
19569     fi
19570   fi
19571 
19572   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19573   if test "x$test_cygdrive_prefix" = x; then
19574     # As a simple fix, exclude /usr/bin since it's not a real path.
19575     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19576       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19577       # a path prefixed by /cygdrive for fixpath to work.
19578       new_path="$CYGWIN_ROOT_PATH$input_path"
19579     fi
19580   fi
19581 
19582   # remove trailing .exe if any
19583   new_path="${new_path/%.exe/}"
19584 
19585     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19586 
19587   # First separate the path from the arguments. This will split at the first
19588   # space.
19589   complete="$FOUND_MAKE"
19590   path="${complete%% *}"
19591   tmp="$complete EOL"
19592   arguments="${tmp#* }"
19593 
19594   # Input might be given as Windows format, start by converting to
19595   # unix format.
19596   new_path="$path"
19597 
19598   windows_path="$new_path"
19599   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19600     unix_path=`$CYGPATH -u "$windows_path"`
19601     new_path="$unix_path"
19602   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19603     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19604     new_path="$unix_path"
19605   fi
19606 
19607 
19608   # Now try to locate executable using which
19609   new_path=`$WHICH "$new_path" 2> /dev/null`
19610 
19611   if test "x$new_path" = x; then
19612     # Oops. Which didn't find the executable.
19613     # The splitting of arguments from the executable at a space might have been incorrect,
19614     # since paths with space are more likely in Windows. Give it another try with the whole
19615     # argument.
19616     path="$complete"
19617     arguments="EOL"
19618     new_path="$path"
19619 
19620   windows_path="$new_path"
19621   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19622     unix_path=`$CYGPATH -u "$windows_path"`
19623     new_path="$unix_path"
19624   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19625     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19626     new_path="$unix_path"
19627   fi
19628 
19629 
19630     new_path=`$WHICH "$new_path" 2> /dev/null`
19631     # bat and cmd files are not always considered executable in MSYS causing which
19632     # to not find them
19633     if test "x$new_path" = x \
19634         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19635         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19636       new_path="$path"
19637 
19638   windows_path="$new_path"
19639   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19640     unix_path=`$CYGPATH -u "$windows_path"`
19641     new_path="$unix_path"
19642   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19643     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19644     new_path="$unix_path"
19645   fi
19646 
19647     fi
19648 
19649     if test "x$new_path" = x; then
19650       # It's still not found. Now this is an unrecoverable error.
19651       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19652 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19653       has_space=`$ECHO "$complete" | $GREP " "`
19654       if test "x$has_space" != x; then
19655         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19656 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19657       fi
19658       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19659     fi
19660   fi
19661 
19662   # Now new_path has a complete unix path to the binary
19663   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19664     # Keep paths in /bin as-is, but remove trailing .exe if any
19665     new_path="${new_path/%.exe/}"
19666     # Do not save /bin paths to all_fixpath_prefixes!
19667   else
19668     # Not in mixed or Windows style, start by that.
19669     new_path=`cmd //c echo $new_path`
19670 
19671   input_path="$new_path"
19672   # Check if we need to convert this using DOS-style short mode. If the path
19673   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19674   # take no chances and rewrite it.
19675   # Note: m4 eats our [], so we need to use [ and ] instead.
19676   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19677   if test "x$has_forbidden_chars" != x; then
19678     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19679     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19680   fi
19681 
19682     # Output is in $new_path
19683 
19684   windows_path="$new_path"
19685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19686     unix_path=`$CYGPATH -u "$windows_path"`
19687     new_path="$unix_path"
19688   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19689     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19690     new_path="$unix_path"
19691   fi
19692 
19693     # remove trailing .exe if any
19694     new_path="${new_path/%.exe/}"
19695 
19696     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19697     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19698   fi
19699 
19700     else
19701       # We're on a unix platform. Hooray! :)
19702       # First separate the path from the arguments. This will split at the first
19703       # space.
19704       complete="$FOUND_MAKE"
19705       path="${complete%% *}"
19706       tmp="$complete EOL"
19707       arguments="${tmp#* }"
19708 
19709       # Cannot rely on the command "which" here since it doesn't always work.
19710       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19711       if test -z "$is_absolute_path"; then
19712         # Path to executable is not absolute. Find it.
19713         IFS_save="$IFS"
19714         IFS=:
19715         for p in $PATH; do
19716           if test -f "$p/$path" && test -x "$p/$path"; then
19717             new_path="$p/$path"
19718             break
19719           fi
19720         done
19721         IFS="$IFS_save"
19722       else
19723         # This is an absolute path, we can use it without further modifications.
19724         new_path="$path"
19725       fi
19726 
19727       if test "x$new_path" = x; then
19728         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19729 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19730         has_space=`$ECHO "$complete" | $GREP " "`
19731         if test "x$has_space" != x; then
19732           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19733 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19734         fi
19735         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19736       fi
19737     fi
19738 
19739     # Now join together the path and the arguments once again
19740     if test "x$arguments" != xEOL; then
19741       new_complete="$new_path ${arguments% *}"
19742     else
19743       new_complete="$new_path"
19744     fi
19745 
19746     if test "x$complete" != "x$new_complete"; then
19747       FOUND_MAKE="$new_complete"
19748       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19749 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19750     fi
19751   fi
19752 
19753         fi
19754       fi
19755     fi
19756   fi
19757 
19758         fi
19759         PATH=$OLD_PATH
19760       fi
19761     fi
19762 
19763     if test "x$FOUND_MAKE" = x; then
19764       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
19765     fi
19766 
19767     else
19768       # If it succeeded, then it was overridden by the user. We will use it
19769       # for the tool.
19770 
19771       # First remove it from the list of overridden variables, so we can test
19772       # for unknown variables in the end.
19773       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19774 
19775       # Check if we try to supply an empty value
19776       if test "x$MAKE" = x; then
19777         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19778 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19779         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19780 $as_echo_n "checking for MAKE... " >&6; }
19781         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19782 $as_echo "disabled" >&6; }
19783       else
19784         # Check if the provided tool contains a complete path.
19785         tool_specified="$MAKE"
19786         tool_basename="${tool_specified##*/}"
19787         if test "x$tool_basename" = "x$tool_specified"; then
19788           # A command without a complete path is provided, search $PATH.
19789           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19790 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19791           # Extract the first word of "$tool_basename", so it can be a program name with args.
19792 set dummy $tool_basename; ac_word=$2
19793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19794 $as_echo_n "checking for $ac_word... " >&6; }
19795 if ${ac_cv_path_MAKE+:} false; then :
19796   $as_echo_n "(cached) " >&6
19797 else
19798   case $MAKE in
19799   [\\/]* | ?:[\\/]*)
19800   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19801   ;;
19802   *)
19803   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19804 for as_dir in $PATH
19805 do
19806   IFS=$as_save_IFS
19807   test -z "$as_dir" && as_dir=.
19808     for ac_exec_ext in '' $ac_executable_extensions; do
19809   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19810     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19811     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19812     break 2
19813   fi
19814 done
19815   done
19816 IFS=$as_save_IFS
19817 
19818   ;;
19819 esac
19820 fi
19821 MAKE=$ac_cv_path_MAKE
19822 if test -n "$MAKE"; then
19823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19824 $as_echo "$MAKE" >&6; }
19825 else
19826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19827 $as_echo "no" >&6; }
19828 fi
19829 
19830 
19831           if test "x$MAKE" = x; then
19832             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19833           fi
19834         else
19835           # Otherwise we believe it is a complete path. Use it as it is.
19836           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19837 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19838           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19839 $as_echo_n "checking for MAKE... " >&6; }
19840           if test ! -x "$tool_specified"; then
19841             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19842 $as_echo "not found" >&6; }
19843             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19844           fi
19845           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19846 $as_echo "$tool_specified" >&6; }
19847         fi
19848       fi
19849     fi
19850 
19851     # If MAKE was set by user, verify the version
19852 
19853   MAKE_CANDIDATE=""$MAKE""
19854   DESCRIPTION="user supplied MAKE=$MAKE"
19855 
19856   # On Cygwin, we require a newer version of make than on other platforms
19857   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19858     MAKE_VERSION_EXPR="-e 4\."
19859     MAKE_REQUIRED_VERSION="4.0"
19860    else
19861     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19862     MAKE_REQUIRED_VERSION="3.81"
19863   fi
19864 
19865   if test "x$MAKE_CANDIDATE" != x; then
19866     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19867 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19868     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19869     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19870     if test "x$IS_GNU_MAKE" = x; then
19871       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19872 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19873     else
19874       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19875       if test "x$IS_MODERN_MAKE" = x; then
19876         { $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
19877 $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;}
19878       else
19879         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19880           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19881             MAKE_EXPECTED_ENV='cygwin'
19882           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19883             MAKE_EXPECTED_ENV='msys'
19884           else
19885             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19886           fi
19887           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19888           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19889         else
19890           # Not relevant for non-Windows
19891           IS_MAKE_CORRECT_ENV=true
19892         fi
19893         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19894           { $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
19895 $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;}
19896         else
19897           FOUND_MAKE=$MAKE_CANDIDATE
19898 
19899   # Only process if variable expands to non-empty
19900 
19901   if test "x$FOUND_MAKE" != x; then
19902     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19903 
19904   # First separate the path from the arguments. This will split at the first
19905   # space.
19906   complete="$FOUND_MAKE"
19907   path="${complete%% *}"
19908   tmp="$complete EOL"
19909   arguments="${tmp#* }"
19910 
19911   # Input might be given as Windows format, start by converting to
19912   # unix format.
19913   new_path=`$CYGPATH -u "$path"`
19914 
19915   # Now try to locate executable using which
19916   new_path=`$WHICH "$new_path" 2> /dev/null`
19917   # bat and cmd files are not always considered executable in cygwin causing which
19918   # to not find them
19919   if test "x$new_path" = x \
19920       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19921       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19922     new_path=`$CYGPATH -u "$path"`
19923   fi
19924   if test "x$new_path" = x; then
19925     # Oops. Which didn't find the executable.
19926     # The splitting of arguments from the executable at a space might have been incorrect,
19927     # since paths with space are more likely in Windows. Give it another try with the whole
19928     # argument.
19929     path="$complete"
19930     arguments="EOL"
19931     new_path=`$CYGPATH -u "$path"`
19932     new_path=`$WHICH "$new_path" 2> /dev/null`
19933     # bat and cmd files are not always considered executable in cygwin causing which
19934     # to not find them
19935     if test "x$new_path" = x \
19936         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19937         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19938       new_path=`$CYGPATH -u "$path"`
19939     fi
19940     if test "x$new_path" = x; then
19941       # It's still not found. Now this is an unrecoverable error.
19942       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19943 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19944       has_space=`$ECHO "$complete" | $GREP " "`
19945       if test "x$has_space" != x; then
19946         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19947 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19948       fi
19949       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19950     fi
19951   fi
19952 
19953   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19954   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19955   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19956   # "foo.exe" is OK but "foo" is an error.
19957   #
19958   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19959   # It is also a way to make sure we got the proper file name for the real test later on.
19960   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19961   if test "x$test_shortpath" = x; then
19962     # Short path failed, file does not exist as specified.
19963     # Try adding .exe or .cmd
19964     if test -f "${new_path}.exe"; then
19965       input_to_shortpath="${new_path}.exe"
19966     elif test -f "${new_path}.cmd"; then
19967       input_to_shortpath="${new_path}.cmd"
19968     else
19969       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19970 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19971       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19972 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19973       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19974     fi
19975   else
19976     input_to_shortpath="$new_path"
19977   fi
19978 
19979   # Call helper function which possibly converts this using DOS-style short mode.
19980   # If so, the updated path is stored in $new_path.
19981   new_path="$input_to_shortpath"
19982 
19983   input_path="$input_to_shortpath"
19984   # Check if we need to convert this using DOS-style short mode. If the path
19985   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19986   # take no chances and rewrite it.
19987   # Note: m4 eats our [], so we need to use [ and ] instead.
19988   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19989   if test "x$has_forbidden_chars" != x; then
19990     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19991     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19992     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19993     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19994       # Going to short mode and back again did indeed matter. Since short mode is
19995       # case insensitive, let's make it lowercase to improve readability.
19996       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19997       # Now convert it back to Unix-style (cygpath)
19998       input_path=`$CYGPATH -u "$shortmode_path"`
19999       new_path="$input_path"
20000     fi
20001   fi
20002 
20003   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20004   if test "x$test_cygdrive_prefix" = x; then
20005     # As a simple fix, exclude /usr/bin since it's not a real path.
20006     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20007       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20008       # a path prefixed by /cygdrive for fixpath to work.
20009       new_path="$CYGWIN_ROOT_PATH$input_path"
20010     fi
20011   fi
20012 
20013   # remove trailing .exe if any
20014   new_path="${new_path/%.exe/}"
20015 
20016     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20017 
20018   # First separate the path from the arguments. This will split at the first
20019   # space.
20020   complete="$FOUND_MAKE"
20021   path="${complete%% *}"
20022   tmp="$complete EOL"
20023   arguments="${tmp#* }"
20024 
20025   # Input might be given as Windows format, start by converting to
20026   # unix format.
20027   new_path="$path"
20028 
20029   windows_path="$new_path"
20030   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20031     unix_path=`$CYGPATH -u "$windows_path"`
20032     new_path="$unix_path"
20033   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20034     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20035     new_path="$unix_path"
20036   fi
20037 
20038 
20039   # Now try to locate executable using which
20040   new_path=`$WHICH "$new_path" 2> /dev/null`
20041 
20042   if test "x$new_path" = x; then
20043     # Oops. Which didn't find the executable.
20044     # The splitting of arguments from the executable at a space might have been incorrect,
20045     # since paths with space are more likely in Windows. Give it another try with the whole
20046     # argument.
20047     path="$complete"
20048     arguments="EOL"
20049     new_path="$path"
20050 
20051   windows_path="$new_path"
20052   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20053     unix_path=`$CYGPATH -u "$windows_path"`
20054     new_path="$unix_path"
20055   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20056     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20057     new_path="$unix_path"
20058   fi
20059 
20060 
20061     new_path=`$WHICH "$new_path" 2> /dev/null`
20062     # bat and cmd files are not always considered executable in MSYS causing which
20063     # to not find them
20064     if test "x$new_path" = x \
20065         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20066         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20067       new_path="$path"
20068 
20069   windows_path="$new_path"
20070   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20071     unix_path=`$CYGPATH -u "$windows_path"`
20072     new_path="$unix_path"
20073   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20074     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20075     new_path="$unix_path"
20076   fi
20077 
20078     fi
20079 
20080     if test "x$new_path" = x; then
20081       # It's still not found. Now this is an unrecoverable error.
20082       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20083 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20084       has_space=`$ECHO "$complete" | $GREP " "`
20085       if test "x$has_space" != x; then
20086         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20087 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20088       fi
20089       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20090     fi
20091   fi
20092 
20093   # Now new_path has a complete unix path to the binary
20094   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20095     # Keep paths in /bin as-is, but remove trailing .exe if any
20096     new_path="${new_path/%.exe/}"
20097     # Do not save /bin paths to all_fixpath_prefixes!
20098   else
20099     # Not in mixed or Windows style, start by that.
20100     new_path=`cmd //c echo $new_path`
20101 
20102   input_path="$new_path"
20103   # Check if we need to convert this using DOS-style short mode. If the path
20104   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20105   # take no chances and rewrite it.
20106   # Note: m4 eats our [], so we need to use [ and ] instead.
20107   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20108   if test "x$has_forbidden_chars" != x; then
20109     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20110     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20111   fi
20112 
20113     # Output is in $new_path
20114 
20115   windows_path="$new_path"
20116   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20117     unix_path=`$CYGPATH -u "$windows_path"`
20118     new_path="$unix_path"
20119   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20120     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20121     new_path="$unix_path"
20122   fi
20123 
20124     # remove trailing .exe if any
20125     new_path="${new_path/%.exe/}"
20126 
20127     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20128     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20129   fi
20130 
20131     else
20132       # We're on a unix platform. Hooray! :)
20133       # First separate the path from the arguments. This will split at the first
20134       # space.
20135       complete="$FOUND_MAKE"
20136       path="${complete%% *}"
20137       tmp="$complete EOL"
20138       arguments="${tmp#* }"
20139 
20140       # Cannot rely on the command "which" here since it doesn't always work.
20141       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20142       if test -z "$is_absolute_path"; then
20143         # Path to executable is not absolute. Find it.
20144         IFS_save="$IFS"
20145         IFS=:
20146         for p in $PATH; do
20147           if test -f "$p/$path" && test -x "$p/$path"; then
20148             new_path="$p/$path"
20149             break
20150           fi
20151         done
20152         IFS="$IFS_save"
20153       else
20154         # This is an absolute path, we can use it without further modifications.
20155         new_path="$path"
20156       fi
20157 
20158       if test "x$new_path" = x; then
20159         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20160 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20161         has_space=`$ECHO "$complete" | $GREP " "`
20162         if test "x$has_space" != x; then
20163           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20164 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20165         fi
20166         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20167       fi
20168     fi
20169 
20170     # Now join together the path and the arguments once again
20171     if test "x$arguments" != xEOL; then
20172       new_complete="$new_path ${arguments% *}"
20173     else
20174       new_complete="$new_path"
20175     fi
20176 
20177     if test "x$complete" != "x$new_complete"; then
20178       FOUND_MAKE="$new_complete"
20179       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20180 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20181     fi
20182   fi
20183 
20184         fi
20185       fi
20186     fi
20187   fi
20188 
20189     if test "x$FOUND_MAKE" = x; then
20190       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20191     fi
20192 
20193   fi
20194 
20195 
20196   MAKE=$FOUND_MAKE
20197 
20198   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20199 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20200 
20201 
20202   # Check if make supports the output sync option and if so, setup using it.
20203   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20204 $as_echo_n "checking if make --output-sync is supported... " >&6; }
20205   if $MAKE --version -O > /dev/null 2>&1; then
20206     OUTPUT_SYNC_SUPPORTED=true
20207     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20208 $as_echo "yes" >&6; }
20209     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20210 $as_echo_n "checking for output-sync value... " >&6; }
20211 
20212 # Check whether --with-output-sync was given.
20213 if test "${with_output_sync+set}" = set; then :
20214   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20215 fi
20216 
20217     if test "x$OUTPUT_SYNC" = "x"; then
20218       OUTPUT_SYNC=none
20219     fi
20220     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20221 $as_echo "$OUTPUT_SYNC" >&6; }
20222     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20223       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20224     fi
20225   else
20226     OUTPUT_SYNC_SUPPORTED=false
20227     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20228 $as_echo "no" >&6; }
20229   fi
20230 
20231 
20232 
20233 
20234 
20235 
20236   # Test if find supports -delete
20237   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20238 $as_echo_n "checking if find supports -delete... " >&6; }
20239   FIND_DELETE="-delete"
20240 
20241   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20242 
20243   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20244 
20245   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20246   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20247     # No, it does not.
20248     rm $DELETEDIR/TestIfFindSupportsDelete
20249     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20250       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20251       FIND_DELETE="-print | xargs rm"
20252     else
20253       FIND_DELETE="-exec rm \{\} \+"
20254     fi
20255     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20256 $as_echo "no" >&6; }
20257   else
20258     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20259 $as_echo "yes" >&6; }
20260   fi
20261   rmdir $DELETEDIR
20262 
20263 
20264 
20265   # These tools might not be installed by default,
20266   # need hint on how to install them.
20267 
20268 
20269 
20270   # Publish this variable in the help.
20271 
20272 
20273   if [ -z "${UNZIP+x}" ]; then
20274     # The variable is not set by user, try to locate tool using the code snippet
20275     for ac_prog in unzip
20276 do
20277   # Extract the first word of "$ac_prog", so it can be a program name with args.
20278 set dummy $ac_prog; ac_word=$2
20279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20280 $as_echo_n "checking for $ac_word... " >&6; }
20281 if ${ac_cv_path_UNZIP+:} false; then :
20282   $as_echo_n "(cached) " >&6
20283 else
20284   case $UNZIP in
20285   [\\/]* | ?:[\\/]*)
20286   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20287   ;;
20288   *)
20289   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20290 for as_dir in $PATH
20291 do
20292   IFS=$as_save_IFS
20293   test -z "$as_dir" && as_dir=.
20294     for ac_exec_ext in '' $ac_executable_extensions; do
20295   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20296     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20297     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20298     break 2
20299   fi
20300 done
20301   done
20302 IFS=$as_save_IFS
20303 
20304   ;;
20305 esac
20306 fi
20307 UNZIP=$ac_cv_path_UNZIP
20308 if test -n "$UNZIP"; then
20309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20310 $as_echo "$UNZIP" >&6; }
20311 else
20312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20313 $as_echo "no" >&6; }
20314 fi
20315 
20316 
20317   test -n "$UNZIP" && break
20318 done
20319 
20320   else
20321     # The variable is set, but is it from the command line or the environment?
20322 
20323     # Try to remove the string !UNZIP! from our list.
20324     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20325     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20326       # If it failed, the variable was not from the command line. Ignore it,
20327       # but warn the user (except for BASH, which is always set by the calling BASH).
20328       if test "xUNZIP" != xBASH; then
20329         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20330 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20331       fi
20332       # Try to locate tool using the code snippet
20333       for ac_prog in unzip
20334 do
20335   # Extract the first word of "$ac_prog", so it can be a program name with args.
20336 set dummy $ac_prog; ac_word=$2
20337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20338 $as_echo_n "checking for $ac_word... " >&6; }
20339 if ${ac_cv_path_UNZIP+:} false; then :
20340   $as_echo_n "(cached) " >&6
20341 else
20342   case $UNZIP in
20343   [\\/]* | ?:[\\/]*)
20344   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20345   ;;
20346   *)
20347   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20348 for as_dir in $PATH
20349 do
20350   IFS=$as_save_IFS
20351   test -z "$as_dir" && as_dir=.
20352     for ac_exec_ext in '' $ac_executable_extensions; do
20353   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20354     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20355     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20356     break 2
20357   fi
20358 done
20359   done
20360 IFS=$as_save_IFS
20361 
20362   ;;
20363 esac
20364 fi
20365 UNZIP=$ac_cv_path_UNZIP
20366 if test -n "$UNZIP"; then
20367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20368 $as_echo "$UNZIP" >&6; }
20369 else
20370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20371 $as_echo "no" >&6; }
20372 fi
20373 
20374 
20375   test -n "$UNZIP" && break
20376 done
20377 
20378     else
20379       # If it succeeded, then it was overridden by the user. We will use it
20380       # for the tool.
20381 
20382       # First remove it from the list of overridden variables, so we can test
20383       # for unknown variables in the end.
20384       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20385 
20386       # Check if we try to supply an empty value
20387       if test "x$UNZIP" = x; then
20388         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20389 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20390         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20391 $as_echo_n "checking for UNZIP... " >&6; }
20392         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20393 $as_echo "disabled" >&6; }
20394       else
20395         # Check if the provided tool contains a complete path.
20396         tool_specified="$UNZIP"
20397         tool_basename="${tool_specified##*/}"
20398         if test "x$tool_basename" = "x$tool_specified"; then
20399           # A command without a complete path is provided, search $PATH.
20400           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20401 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20402           # Extract the first word of "$tool_basename", so it can be a program name with args.
20403 set dummy $tool_basename; ac_word=$2
20404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20405 $as_echo_n "checking for $ac_word... " >&6; }
20406 if ${ac_cv_path_UNZIP+:} false; then :
20407   $as_echo_n "(cached) " >&6
20408 else
20409   case $UNZIP in
20410   [\\/]* | ?:[\\/]*)
20411   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20412   ;;
20413   *)
20414   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20415 for as_dir in $PATH
20416 do
20417   IFS=$as_save_IFS
20418   test -z "$as_dir" && as_dir=.
20419     for ac_exec_ext in '' $ac_executable_extensions; do
20420   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20421     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20422     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20423     break 2
20424   fi
20425 done
20426   done
20427 IFS=$as_save_IFS
20428 
20429   ;;
20430 esac
20431 fi
20432 UNZIP=$ac_cv_path_UNZIP
20433 if test -n "$UNZIP"; then
20434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20435 $as_echo "$UNZIP" >&6; }
20436 else
20437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20438 $as_echo "no" >&6; }
20439 fi
20440 
20441 
20442           if test "x$UNZIP" = x; then
20443             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20444           fi
20445         else
20446           # Otherwise we believe it is a complete path. Use it as it is.
20447           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20448 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20449           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20450 $as_echo_n "checking for UNZIP... " >&6; }
20451           if test ! -x "$tool_specified"; then
20452             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20453 $as_echo "not found" >&6; }
20454             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20455           fi
20456           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20457 $as_echo "$tool_specified" >&6; }
20458         fi
20459       fi
20460     fi
20461 
20462   fi
20463 
20464 
20465 
20466   if test "x$UNZIP" = x; then
20467     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20468   fi
20469 
20470 
20471 
20472 
20473 
20474   # Publish this variable in the help.
20475 
20476 
20477   if [ -z "${ZIP+x}" ]; then
20478     # The variable is not set by user, try to locate tool using the code snippet
20479     for ac_prog in zip
20480 do
20481   # Extract the first word of "$ac_prog", so it can be a program name with args.
20482 set dummy $ac_prog; ac_word=$2
20483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20484 $as_echo_n "checking for $ac_word... " >&6; }
20485 if ${ac_cv_path_ZIP+:} false; then :
20486   $as_echo_n "(cached) " >&6
20487 else
20488   case $ZIP in
20489   [\\/]* | ?:[\\/]*)
20490   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20491   ;;
20492   *)
20493   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20494 for as_dir in $PATH
20495 do
20496   IFS=$as_save_IFS
20497   test -z "$as_dir" && as_dir=.
20498     for ac_exec_ext in '' $ac_executable_extensions; do
20499   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20500     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20501     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20502     break 2
20503   fi
20504 done
20505   done
20506 IFS=$as_save_IFS
20507 
20508   ;;
20509 esac
20510 fi
20511 ZIP=$ac_cv_path_ZIP
20512 if test -n "$ZIP"; then
20513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20514 $as_echo "$ZIP" >&6; }
20515 else
20516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20517 $as_echo "no" >&6; }
20518 fi
20519 
20520 
20521   test -n "$ZIP" && break
20522 done
20523 
20524   else
20525     # The variable is set, but is it from the command line or the environment?
20526 
20527     # Try to remove the string !ZIP! from our list.
20528     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20529     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20530       # If it failed, the variable was not from the command line. Ignore it,
20531       # but warn the user (except for BASH, which is always set by the calling BASH).
20532       if test "xZIP" != xBASH; then
20533         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20534 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20535       fi
20536       # Try to locate tool using the code snippet
20537       for ac_prog in zip
20538 do
20539   # Extract the first word of "$ac_prog", so it can be a program name with args.
20540 set dummy $ac_prog; ac_word=$2
20541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20542 $as_echo_n "checking for $ac_word... " >&6; }
20543 if ${ac_cv_path_ZIP+:} false; then :
20544   $as_echo_n "(cached) " >&6
20545 else
20546   case $ZIP in
20547   [\\/]* | ?:[\\/]*)
20548   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20549   ;;
20550   *)
20551   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20552 for as_dir in $PATH
20553 do
20554   IFS=$as_save_IFS
20555   test -z "$as_dir" && as_dir=.
20556     for ac_exec_ext in '' $ac_executable_extensions; do
20557   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20558     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20559     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20560     break 2
20561   fi
20562 done
20563   done
20564 IFS=$as_save_IFS
20565 
20566   ;;
20567 esac
20568 fi
20569 ZIP=$ac_cv_path_ZIP
20570 if test -n "$ZIP"; then
20571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20572 $as_echo "$ZIP" >&6; }
20573 else
20574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20575 $as_echo "no" >&6; }
20576 fi
20577 
20578 
20579   test -n "$ZIP" && break
20580 done
20581 
20582     else
20583       # If it succeeded, then it was overridden by the user. We will use it
20584       # for the tool.
20585 
20586       # First remove it from the list of overridden variables, so we can test
20587       # for unknown variables in the end.
20588       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20589 
20590       # Check if we try to supply an empty value
20591       if test "x$ZIP" = x; then
20592         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20593 $as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20594         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20595 $as_echo_n "checking for ZIP... " >&6; }
20596         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20597 $as_echo "disabled" >&6; }
20598       else
20599         # Check if the provided tool contains a complete path.
20600         tool_specified="$ZIP"
20601         tool_basename="${tool_specified##*/}"
20602         if test "x$tool_basename" = "x$tool_specified"; then
20603           # A command without a complete path is provided, search $PATH.
20604           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20605 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20606           # Extract the first word of "$tool_basename", so it can be a program name with args.
20607 set dummy $tool_basename; ac_word=$2
20608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20609 $as_echo_n "checking for $ac_word... " >&6; }
20610 if ${ac_cv_path_ZIP+:} false; then :
20611   $as_echo_n "(cached) " >&6
20612 else
20613   case $ZIP in
20614   [\\/]* | ?:[\\/]*)
20615   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20616   ;;
20617   *)
20618   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20619 for as_dir in $PATH
20620 do
20621   IFS=$as_save_IFS
20622   test -z "$as_dir" && as_dir=.
20623     for ac_exec_ext in '' $ac_executable_extensions; do
20624   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20625     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20626     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20627     break 2
20628   fi
20629 done
20630   done
20631 IFS=$as_save_IFS
20632 
20633   ;;
20634 esac
20635 fi
20636 ZIP=$ac_cv_path_ZIP
20637 if test -n "$ZIP"; then
20638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20639 $as_echo "$ZIP" >&6; }
20640 else
20641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20642 $as_echo "no" >&6; }
20643 fi
20644 
20645 
20646           if test "x$ZIP" = x; then
20647             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20648           fi
20649         else
20650           # Otherwise we believe it is a complete path. Use it as it is.
20651           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20652 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20653           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20654 $as_echo_n "checking for ZIP... " >&6; }
20655           if test ! -x "$tool_specified"; then
20656             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20657 $as_echo "not found" >&6; }
20658             as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20659           fi
20660           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20661 $as_echo "$tool_specified" >&6; }
20662         fi
20663       fi
20664     fi
20665 
20666   fi
20667 
20668 
20669 
20670   if test "x$ZIP" = x; then
20671     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20672   fi
20673 
20674 
20675 
20676   # Non-required basic tools
20677 
20678 
20679 
20680   # Publish this variable in the help.
20681 
20682 
20683   if [ -z "${LDD+x}" ]; then
20684     # The variable is not set by user, try to locate tool using the code snippet
20685     for ac_prog in ldd
20686 do
20687   # Extract the first word of "$ac_prog", so it can be a program name with args.
20688 set dummy $ac_prog; ac_word=$2
20689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20690 $as_echo_n "checking for $ac_word... " >&6; }
20691 if ${ac_cv_path_LDD+:} false; then :
20692   $as_echo_n "(cached) " >&6
20693 else
20694   case $LDD in
20695   [\\/]* | ?:[\\/]*)
20696   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20697   ;;
20698   *)
20699   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20700 for as_dir in $PATH
20701 do
20702   IFS=$as_save_IFS
20703   test -z "$as_dir" && as_dir=.
20704     for ac_exec_ext in '' $ac_executable_extensions; do
20705   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20706     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20707     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20708     break 2
20709   fi
20710 done
20711   done
20712 IFS=$as_save_IFS
20713 
20714   ;;
20715 esac
20716 fi
20717 LDD=$ac_cv_path_LDD
20718 if test -n "$LDD"; then
20719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20720 $as_echo "$LDD" >&6; }
20721 else
20722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20723 $as_echo "no" >&6; }
20724 fi
20725 
20726 
20727   test -n "$LDD" && break
20728 done
20729 
20730   else
20731     # The variable is set, but is it from the command line or the environment?
20732 
20733     # Try to remove the string !LDD! from our list.
20734     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20735     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20736       # If it failed, the variable was not from the command line. Ignore it,
20737       # but warn the user (except for BASH, which is always set by the calling BASH).
20738       if test "xLDD" != xBASH; then
20739         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20740 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20741       fi
20742       # Try to locate tool using the code snippet
20743       for ac_prog in ldd
20744 do
20745   # Extract the first word of "$ac_prog", so it can be a program name with args.
20746 set dummy $ac_prog; ac_word=$2
20747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20748 $as_echo_n "checking for $ac_word... " >&6; }
20749 if ${ac_cv_path_LDD+:} false; then :
20750   $as_echo_n "(cached) " >&6
20751 else
20752   case $LDD in
20753   [\\/]* | ?:[\\/]*)
20754   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20755   ;;
20756   *)
20757   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20758 for as_dir in $PATH
20759 do
20760   IFS=$as_save_IFS
20761   test -z "$as_dir" && as_dir=.
20762     for ac_exec_ext in '' $ac_executable_extensions; do
20763   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20764     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20765     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20766     break 2
20767   fi
20768 done
20769   done
20770 IFS=$as_save_IFS
20771 
20772   ;;
20773 esac
20774 fi
20775 LDD=$ac_cv_path_LDD
20776 if test -n "$LDD"; then
20777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20778 $as_echo "$LDD" >&6; }
20779 else
20780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20781 $as_echo "no" >&6; }
20782 fi
20783 
20784 
20785   test -n "$LDD" && break
20786 done
20787 
20788     else
20789       # If it succeeded, then it was overridden by the user. We will use it
20790       # for the tool.
20791 
20792       # First remove it from the list of overridden variables, so we can test
20793       # for unknown variables in the end.
20794       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20795 
20796       # Check if we try to supply an empty value
20797       if test "x$LDD" = x; then
20798         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20799 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20800         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20801 $as_echo_n "checking for LDD... " >&6; }
20802         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20803 $as_echo "disabled" >&6; }
20804       else
20805         # Check if the provided tool contains a complete path.
20806         tool_specified="$LDD"
20807         tool_basename="${tool_specified##*/}"
20808         if test "x$tool_basename" = "x$tool_specified"; then
20809           # A command without a complete path is provided, search $PATH.
20810           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20811 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20812           # Extract the first word of "$tool_basename", so it can be a program name with args.
20813 set dummy $tool_basename; ac_word=$2
20814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20815 $as_echo_n "checking for $ac_word... " >&6; }
20816 if ${ac_cv_path_LDD+:} false; then :
20817   $as_echo_n "(cached) " >&6
20818 else
20819   case $LDD in
20820   [\\/]* | ?:[\\/]*)
20821   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20822   ;;
20823   *)
20824   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20825 for as_dir in $PATH
20826 do
20827   IFS=$as_save_IFS
20828   test -z "$as_dir" && as_dir=.
20829     for ac_exec_ext in '' $ac_executable_extensions; do
20830   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20831     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20832     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20833     break 2
20834   fi
20835 done
20836   done
20837 IFS=$as_save_IFS
20838 
20839   ;;
20840 esac
20841 fi
20842 LDD=$ac_cv_path_LDD
20843 if test -n "$LDD"; then
20844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20845 $as_echo "$LDD" >&6; }
20846 else
20847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20848 $as_echo "no" >&6; }
20849 fi
20850 
20851 
20852           if test "x$LDD" = x; then
20853             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20854           fi
20855         else
20856           # Otherwise we believe it is a complete path. Use it as it is.
20857           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20858 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20859           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20860 $as_echo_n "checking for LDD... " >&6; }
20861           if test ! -x "$tool_specified"; then
20862             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20863 $as_echo "not found" >&6; }
20864             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20865           fi
20866           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20867 $as_echo "$tool_specified" >&6; }
20868         fi
20869       fi
20870     fi
20871 
20872   fi
20873 
20874 
20875   if test "x$LDD" = "x"; then
20876     # List shared lib dependencies is used for
20877     # debug output and checking for forbidden dependencies.
20878     # We can build without it.
20879     LDD="true"
20880   fi
20881 
20882 
20883   # Publish this variable in the help.
20884 
20885 
20886   if [ -z "${OTOOL+x}" ]; then
20887     # The variable is not set by user, try to locate tool using the code snippet
20888     for ac_prog in otool
20889 do
20890   # Extract the first word of "$ac_prog", so it can be a program name with args.
20891 set dummy $ac_prog; ac_word=$2
20892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20893 $as_echo_n "checking for $ac_word... " >&6; }
20894 if ${ac_cv_path_OTOOL+:} false; then :
20895   $as_echo_n "(cached) " >&6
20896 else
20897   case $OTOOL in
20898   [\\/]* | ?:[\\/]*)
20899   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20900   ;;
20901   *)
20902   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20903 for as_dir in $PATH
20904 do
20905   IFS=$as_save_IFS
20906   test -z "$as_dir" && as_dir=.
20907     for ac_exec_ext in '' $ac_executable_extensions; do
20908   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20909     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20910     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20911     break 2
20912   fi
20913 done
20914   done
20915 IFS=$as_save_IFS
20916 
20917   ;;
20918 esac
20919 fi
20920 OTOOL=$ac_cv_path_OTOOL
20921 if test -n "$OTOOL"; then
20922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20923 $as_echo "$OTOOL" >&6; }
20924 else
20925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20926 $as_echo "no" >&6; }
20927 fi
20928 
20929 
20930   test -n "$OTOOL" && break
20931 done
20932 
20933   else
20934     # The variable is set, but is it from the command line or the environment?
20935 
20936     # Try to remove the string !OTOOL! from our list.
20937     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
20938     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20939       # If it failed, the variable was not from the command line. Ignore it,
20940       # but warn the user (except for BASH, which is always set by the calling BASH).
20941       if test "xOTOOL" != xBASH; then
20942         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
20943 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
20944       fi
20945       # Try to locate tool using the code snippet
20946       for ac_prog in otool
20947 do
20948   # Extract the first word of "$ac_prog", so it can be a program name with args.
20949 set dummy $ac_prog; ac_word=$2
20950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20951 $as_echo_n "checking for $ac_word... " >&6; }
20952 if ${ac_cv_path_OTOOL+:} false; then :
20953   $as_echo_n "(cached) " >&6
20954 else
20955   case $OTOOL in
20956   [\\/]* | ?:[\\/]*)
20957   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20958   ;;
20959   *)
20960   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20961 for as_dir in $PATH
20962 do
20963   IFS=$as_save_IFS
20964   test -z "$as_dir" && as_dir=.
20965     for ac_exec_ext in '' $ac_executable_extensions; do
20966   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20967     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20968     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20969     break 2
20970   fi
20971 done
20972   done
20973 IFS=$as_save_IFS
20974 
20975   ;;
20976 esac
20977 fi
20978 OTOOL=$ac_cv_path_OTOOL
20979 if test -n "$OTOOL"; then
20980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20981 $as_echo "$OTOOL" >&6; }
20982 else
20983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20984 $as_echo "no" >&6; }
20985 fi
20986 
20987 
20988   test -n "$OTOOL" && break
20989 done
20990 
20991     else
20992       # If it succeeded, then it was overridden by the user. We will use it
20993       # for the tool.
20994 
20995       # First remove it from the list of overridden variables, so we can test
20996       # for unknown variables in the end.
20997       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20998 
20999       # Check if we try to supply an empty value
21000       if test "x$OTOOL" = x; then
21001         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21002 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21003         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21004 $as_echo_n "checking for OTOOL... " >&6; }
21005         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21006 $as_echo "disabled" >&6; }
21007       else
21008         # Check if the provided tool contains a complete path.
21009         tool_specified="$OTOOL"
21010         tool_basename="${tool_specified##*/}"
21011         if test "x$tool_basename" = "x$tool_specified"; then
21012           # A command without a complete path is provided, search $PATH.
21013           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21014 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21015           # Extract the first word of "$tool_basename", so it can be a program name with args.
21016 set dummy $tool_basename; ac_word=$2
21017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21018 $as_echo_n "checking for $ac_word... " >&6; }
21019 if ${ac_cv_path_OTOOL+:} false; then :
21020   $as_echo_n "(cached) " >&6
21021 else
21022   case $OTOOL in
21023   [\\/]* | ?:[\\/]*)
21024   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21025   ;;
21026   *)
21027   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21028 for as_dir in $PATH
21029 do
21030   IFS=$as_save_IFS
21031   test -z "$as_dir" && as_dir=.
21032     for ac_exec_ext in '' $ac_executable_extensions; do
21033   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21034     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21035     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21036     break 2
21037   fi
21038 done
21039   done
21040 IFS=$as_save_IFS
21041 
21042   ;;
21043 esac
21044 fi
21045 OTOOL=$ac_cv_path_OTOOL
21046 if test -n "$OTOOL"; then
21047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21048 $as_echo "$OTOOL" >&6; }
21049 else
21050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21051 $as_echo "no" >&6; }
21052 fi
21053 
21054 
21055           if test "x$OTOOL" = x; then
21056             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21057           fi
21058         else
21059           # Otherwise we believe it is a complete path. Use it as it is.
21060           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21061 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21062           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21063 $as_echo_n "checking for OTOOL... " >&6; }
21064           if test ! -x "$tool_specified"; then
21065             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21066 $as_echo "not found" >&6; }
21067             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21068           fi
21069           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21070 $as_echo "$tool_specified" >&6; }
21071         fi
21072       fi
21073     fi
21074 
21075   fi
21076 
21077 
21078   if test "x$OTOOL" = "x"; then
21079     OTOOL="true"
21080   fi
21081 
21082 
21083   # Publish this variable in the help.
21084 
21085 
21086   if [ -z "${READELF+x}" ]; then
21087     # The variable is not set by user, try to locate tool using the code snippet
21088     for ac_prog in greadelf readelf
21089 do
21090   # Extract the first word of "$ac_prog", so it can be a program name with args.
21091 set dummy $ac_prog; ac_word=$2
21092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21093 $as_echo_n "checking for $ac_word... " >&6; }
21094 if ${ac_cv_path_READELF+:} false; then :
21095   $as_echo_n "(cached) " >&6
21096 else
21097   case $READELF in
21098   [\\/]* | ?:[\\/]*)
21099   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21100   ;;
21101   *)
21102   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21103 for as_dir in $PATH
21104 do
21105   IFS=$as_save_IFS
21106   test -z "$as_dir" && as_dir=.
21107     for ac_exec_ext in '' $ac_executable_extensions; do
21108   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21109     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21110     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21111     break 2
21112   fi
21113 done
21114   done
21115 IFS=$as_save_IFS
21116 
21117   ;;
21118 esac
21119 fi
21120 READELF=$ac_cv_path_READELF
21121 if test -n "$READELF"; then
21122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21123 $as_echo "$READELF" >&6; }
21124 else
21125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21126 $as_echo "no" >&6; }
21127 fi
21128 
21129 
21130   test -n "$READELF" && break
21131 done
21132 
21133   else
21134     # The variable is set, but is it from the command line or the environment?
21135 
21136     # Try to remove the string !READELF! from our list.
21137     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21138     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21139       # If it failed, the variable was not from the command line. Ignore it,
21140       # but warn the user (except for BASH, which is always set by the calling BASH).
21141       if test "xREADELF" != xBASH; then
21142         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21143 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21144       fi
21145       # Try to locate tool using the code snippet
21146       for ac_prog in greadelf readelf
21147 do
21148   # Extract the first word of "$ac_prog", so it can be a program name with args.
21149 set dummy $ac_prog; ac_word=$2
21150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21151 $as_echo_n "checking for $ac_word... " >&6; }
21152 if ${ac_cv_path_READELF+:} false; then :
21153   $as_echo_n "(cached) " >&6
21154 else
21155   case $READELF in
21156   [\\/]* | ?:[\\/]*)
21157   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21158   ;;
21159   *)
21160   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21161 for as_dir in $PATH
21162 do
21163   IFS=$as_save_IFS
21164   test -z "$as_dir" && as_dir=.
21165     for ac_exec_ext in '' $ac_executable_extensions; do
21166   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21167     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21168     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21169     break 2
21170   fi
21171 done
21172   done
21173 IFS=$as_save_IFS
21174 
21175   ;;
21176 esac
21177 fi
21178 READELF=$ac_cv_path_READELF
21179 if test -n "$READELF"; then
21180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21181 $as_echo "$READELF" >&6; }
21182 else
21183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21184 $as_echo "no" >&6; }
21185 fi
21186 
21187 
21188   test -n "$READELF" && break
21189 done
21190 
21191     else
21192       # If it succeeded, then it was overridden by the user. We will use it
21193       # for the tool.
21194 
21195       # First remove it from the list of overridden variables, so we can test
21196       # for unknown variables in the end.
21197       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21198 
21199       # Check if we try to supply an empty value
21200       if test "x$READELF" = x; then
21201         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21202 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21203         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21204 $as_echo_n "checking for READELF... " >&6; }
21205         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21206 $as_echo "disabled" >&6; }
21207       else
21208         # Check if the provided tool contains a complete path.
21209         tool_specified="$READELF"
21210         tool_basename="${tool_specified##*/}"
21211         if test "x$tool_basename" = "x$tool_specified"; then
21212           # A command without a complete path is provided, search $PATH.
21213           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21214 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21215           # Extract the first word of "$tool_basename", so it can be a program name with args.
21216 set dummy $tool_basename; ac_word=$2
21217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21218 $as_echo_n "checking for $ac_word... " >&6; }
21219 if ${ac_cv_path_READELF+:} false; then :
21220   $as_echo_n "(cached) " >&6
21221 else
21222   case $READELF in
21223   [\\/]* | ?:[\\/]*)
21224   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21225   ;;
21226   *)
21227   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21228 for as_dir in $PATH
21229 do
21230   IFS=$as_save_IFS
21231   test -z "$as_dir" && as_dir=.
21232     for ac_exec_ext in '' $ac_executable_extensions; do
21233   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21234     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21235     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21236     break 2
21237   fi
21238 done
21239   done
21240 IFS=$as_save_IFS
21241 
21242   ;;
21243 esac
21244 fi
21245 READELF=$ac_cv_path_READELF
21246 if test -n "$READELF"; then
21247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21248 $as_echo "$READELF" >&6; }
21249 else
21250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21251 $as_echo "no" >&6; }
21252 fi
21253 
21254 
21255           if test "x$READELF" = x; then
21256             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21257           fi
21258         else
21259           # Otherwise we believe it is a complete path. Use it as it is.
21260           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21261 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21262           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21263 $as_echo_n "checking for READELF... " >&6; }
21264           if test ! -x "$tool_specified"; then
21265             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21266 $as_echo "not found" >&6; }
21267             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21268           fi
21269           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21270 $as_echo "$tool_specified" >&6; }
21271         fi
21272       fi
21273     fi
21274 
21275   fi
21276 
21277 
21278 
21279 
21280   # Publish this variable in the help.
21281 
21282 
21283   if [ -z "${HG+x}" ]; then
21284     # The variable is not set by user, try to locate tool using the code snippet
21285     for ac_prog in hg
21286 do
21287   # Extract the first word of "$ac_prog", so it can be a program name with args.
21288 set dummy $ac_prog; ac_word=$2
21289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21290 $as_echo_n "checking for $ac_word... " >&6; }
21291 if ${ac_cv_path_HG+:} false; then :
21292   $as_echo_n "(cached) " >&6
21293 else
21294   case $HG in
21295   [\\/]* | ?:[\\/]*)
21296   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21297   ;;
21298   *)
21299   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21300 for as_dir in $PATH
21301 do
21302   IFS=$as_save_IFS
21303   test -z "$as_dir" && as_dir=.
21304     for ac_exec_ext in '' $ac_executable_extensions; do
21305   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21306     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21307     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21308     break 2
21309   fi
21310 done
21311   done
21312 IFS=$as_save_IFS
21313 
21314   ;;
21315 esac
21316 fi
21317 HG=$ac_cv_path_HG
21318 if test -n "$HG"; then
21319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21320 $as_echo "$HG" >&6; }
21321 else
21322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21323 $as_echo "no" >&6; }
21324 fi
21325 
21326 
21327   test -n "$HG" && break
21328 done
21329 
21330   else
21331     # The variable is set, but is it from the command line or the environment?
21332 
21333     # Try to remove the string !HG! from our list.
21334     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21335     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21336       # If it failed, the variable was not from the command line. Ignore it,
21337       # but warn the user (except for BASH, which is always set by the calling BASH).
21338       if test "xHG" != xBASH; then
21339         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21340 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21341       fi
21342       # Try to locate tool using the code snippet
21343       for ac_prog in hg
21344 do
21345   # Extract the first word of "$ac_prog", so it can be a program name with args.
21346 set dummy $ac_prog; ac_word=$2
21347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21348 $as_echo_n "checking for $ac_word... " >&6; }
21349 if ${ac_cv_path_HG+:} false; then :
21350   $as_echo_n "(cached) " >&6
21351 else
21352   case $HG in
21353   [\\/]* | ?:[\\/]*)
21354   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21355   ;;
21356   *)
21357   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21358 for as_dir in $PATH
21359 do
21360   IFS=$as_save_IFS
21361   test -z "$as_dir" && as_dir=.
21362     for ac_exec_ext in '' $ac_executable_extensions; do
21363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21364     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21366     break 2
21367   fi
21368 done
21369   done
21370 IFS=$as_save_IFS
21371 
21372   ;;
21373 esac
21374 fi
21375 HG=$ac_cv_path_HG
21376 if test -n "$HG"; then
21377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21378 $as_echo "$HG" >&6; }
21379 else
21380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21381 $as_echo "no" >&6; }
21382 fi
21383 
21384 
21385   test -n "$HG" && break
21386 done
21387 
21388     else
21389       # If it succeeded, then it was overridden by the user. We will use it
21390       # for the tool.
21391 
21392       # First remove it from the list of overridden variables, so we can test
21393       # for unknown variables in the end.
21394       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21395 
21396       # Check if we try to supply an empty value
21397       if test "x$HG" = x; then
21398         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21399 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21400         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21401 $as_echo_n "checking for HG... " >&6; }
21402         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21403 $as_echo "disabled" >&6; }
21404       else
21405         # Check if the provided tool contains a complete path.
21406         tool_specified="$HG"
21407         tool_basename="${tool_specified##*/}"
21408         if test "x$tool_basename" = "x$tool_specified"; then
21409           # A command without a complete path is provided, search $PATH.
21410           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21411 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21412           # Extract the first word of "$tool_basename", so it can be a program name with args.
21413 set dummy $tool_basename; ac_word=$2
21414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21415 $as_echo_n "checking for $ac_word... " >&6; }
21416 if ${ac_cv_path_HG+:} false; then :
21417   $as_echo_n "(cached) " >&6
21418 else
21419   case $HG in
21420   [\\/]* | ?:[\\/]*)
21421   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21422   ;;
21423   *)
21424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21425 for as_dir in $PATH
21426 do
21427   IFS=$as_save_IFS
21428   test -z "$as_dir" && as_dir=.
21429     for ac_exec_ext in '' $ac_executable_extensions; do
21430   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21431     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21433     break 2
21434   fi
21435 done
21436   done
21437 IFS=$as_save_IFS
21438 
21439   ;;
21440 esac
21441 fi
21442 HG=$ac_cv_path_HG
21443 if test -n "$HG"; then
21444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21445 $as_echo "$HG" >&6; }
21446 else
21447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21448 $as_echo "no" >&6; }
21449 fi
21450 
21451 
21452           if test "x$HG" = x; then
21453             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21454           fi
21455         else
21456           # Otherwise we believe it is a complete path. Use it as it is.
21457           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21458 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21459           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21460 $as_echo_n "checking for HG... " >&6; }
21461           if test ! -x "$tool_specified"; then
21462             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21463 $as_echo "not found" >&6; }
21464             as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21465           fi
21466           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21467 $as_echo "$tool_specified" >&6; }
21468         fi
21469       fi
21470     fi
21471 
21472   fi
21473 
21474 
21475 
21476 
21477   # Publish this variable in the help.
21478 
21479 
21480   if [ -z "${STAT+x}" ]; then
21481     # The variable is not set by user, try to locate tool using the code snippet
21482     for ac_prog in stat
21483 do
21484   # Extract the first word of "$ac_prog", so it can be a program name with args.
21485 set dummy $ac_prog; ac_word=$2
21486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21487 $as_echo_n "checking for $ac_word... " >&6; }
21488 if ${ac_cv_path_STAT+:} false; then :
21489   $as_echo_n "(cached) " >&6
21490 else
21491   case $STAT in
21492   [\\/]* | ?:[\\/]*)
21493   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21494   ;;
21495   *)
21496   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21497 for as_dir in $PATH
21498 do
21499   IFS=$as_save_IFS
21500   test -z "$as_dir" && as_dir=.
21501     for ac_exec_ext in '' $ac_executable_extensions; do
21502   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21503     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21504     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21505     break 2
21506   fi
21507 done
21508   done
21509 IFS=$as_save_IFS
21510 
21511   ;;
21512 esac
21513 fi
21514 STAT=$ac_cv_path_STAT
21515 if test -n "$STAT"; then
21516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21517 $as_echo "$STAT" >&6; }
21518 else
21519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21520 $as_echo "no" >&6; }
21521 fi
21522 
21523 
21524   test -n "$STAT" && break
21525 done
21526 
21527   else
21528     # The variable is set, but is it from the command line or the environment?
21529 
21530     # Try to remove the string !STAT! from our list.
21531     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21532     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21533       # If it failed, the variable was not from the command line. Ignore it,
21534       # but warn the user (except for BASH, which is always set by the calling BASH).
21535       if test "xSTAT" != xBASH; then
21536         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21537 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21538       fi
21539       # Try to locate tool using the code snippet
21540       for ac_prog in stat
21541 do
21542   # Extract the first word of "$ac_prog", so it can be a program name with args.
21543 set dummy $ac_prog; ac_word=$2
21544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21545 $as_echo_n "checking for $ac_word... " >&6; }
21546 if ${ac_cv_path_STAT+:} false; then :
21547   $as_echo_n "(cached) " >&6
21548 else
21549   case $STAT in
21550   [\\/]* | ?:[\\/]*)
21551   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21552   ;;
21553   *)
21554   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21555 for as_dir in $PATH
21556 do
21557   IFS=$as_save_IFS
21558   test -z "$as_dir" && as_dir=.
21559     for ac_exec_ext in '' $ac_executable_extensions; do
21560   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21561     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21562     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21563     break 2
21564   fi
21565 done
21566   done
21567 IFS=$as_save_IFS
21568 
21569   ;;
21570 esac
21571 fi
21572 STAT=$ac_cv_path_STAT
21573 if test -n "$STAT"; then
21574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21575 $as_echo "$STAT" >&6; }
21576 else
21577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21578 $as_echo "no" >&6; }
21579 fi
21580 
21581 
21582   test -n "$STAT" && break
21583 done
21584 
21585     else
21586       # If it succeeded, then it was overridden by the user. We will use it
21587       # for the tool.
21588 
21589       # First remove it from the list of overridden variables, so we can test
21590       # for unknown variables in the end.
21591       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21592 
21593       # Check if we try to supply an empty value
21594       if test "x$STAT" = x; then
21595         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21596 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21597         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21598 $as_echo_n "checking for STAT... " >&6; }
21599         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21600 $as_echo "disabled" >&6; }
21601       else
21602         # Check if the provided tool contains a complete path.
21603         tool_specified="$STAT"
21604         tool_basename="${tool_specified##*/}"
21605         if test "x$tool_basename" = "x$tool_specified"; then
21606           # A command without a complete path is provided, search $PATH.
21607           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21608 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21609           # Extract the first word of "$tool_basename", so it can be a program name with args.
21610 set dummy $tool_basename; ac_word=$2
21611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21612 $as_echo_n "checking for $ac_word... " >&6; }
21613 if ${ac_cv_path_STAT+:} false; then :
21614   $as_echo_n "(cached) " >&6
21615 else
21616   case $STAT in
21617   [\\/]* | ?:[\\/]*)
21618   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21619   ;;
21620   *)
21621   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21622 for as_dir in $PATH
21623 do
21624   IFS=$as_save_IFS
21625   test -z "$as_dir" && as_dir=.
21626     for ac_exec_ext in '' $ac_executable_extensions; do
21627   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21628     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21629     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21630     break 2
21631   fi
21632 done
21633   done
21634 IFS=$as_save_IFS
21635 
21636   ;;
21637 esac
21638 fi
21639 STAT=$ac_cv_path_STAT
21640 if test -n "$STAT"; then
21641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21642 $as_echo "$STAT" >&6; }
21643 else
21644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21645 $as_echo "no" >&6; }
21646 fi
21647 
21648 
21649           if test "x$STAT" = x; then
21650             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21651           fi
21652         else
21653           # Otherwise we believe it is a complete path. Use it as it is.
21654           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21655 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21656           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21657 $as_echo_n "checking for STAT... " >&6; }
21658           if test ! -x "$tool_specified"; then
21659             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21660 $as_echo "not found" >&6; }
21661             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21662           fi
21663           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21664 $as_echo "$tool_specified" >&6; }
21665         fi
21666       fi
21667     fi
21668 
21669   fi
21670 
21671 
21672 
21673 
21674   # Publish this variable in the help.
21675 
21676 
21677   if [ -z "${TIME+x}" ]; then
21678     # The variable is not set by user, try to locate tool using the code snippet
21679     for ac_prog in time
21680 do
21681   # Extract the first word of "$ac_prog", so it can be a program name with args.
21682 set dummy $ac_prog; ac_word=$2
21683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21684 $as_echo_n "checking for $ac_word... " >&6; }
21685 if ${ac_cv_path_TIME+:} false; then :
21686   $as_echo_n "(cached) " >&6
21687 else
21688   case $TIME in
21689   [\\/]* | ?:[\\/]*)
21690   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21691   ;;
21692   *)
21693   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21694 for as_dir in $PATH
21695 do
21696   IFS=$as_save_IFS
21697   test -z "$as_dir" && as_dir=.
21698     for ac_exec_ext in '' $ac_executable_extensions; do
21699   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21700     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21701     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21702     break 2
21703   fi
21704 done
21705   done
21706 IFS=$as_save_IFS
21707 
21708   ;;
21709 esac
21710 fi
21711 TIME=$ac_cv_path_TIME
21712 if test -n "$TIME"; then
21713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21714 $as_echo "$TIME" >&6; }
21715 else
21716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21717 $as_echo "no" >&6; }
21718 fi
21719 
21720 
21721   test -n "$TIME" && break
21722 done
21723 
21724   else
21725     # The variable is set, but is it from the command line or the environment?
21726 
21727     # Try to remove the string !TIME! from our list.
21728     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21729     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21730       # If it failed, the variable was not from the command line. Ignore it,
21731       # but warn the user (except for BASH, which is always set by the calling BASH).
21732       if test "xTIME" != xBASH; then
21733         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21734 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21735       fi
21736       # Try to locate tool using the code snippet
21737       for ac_prog in time
21738 do
21739   # Extract the first word of "$ac_prog", so it can be a program name with args.
21740 set dummy $ac_prog; ac_word=$2
21741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21742 $as_echo_n "checking for $ac_word... " >&6; }
21743 if ${ac_cv_path_TIME+:} false; then :
21744   $as_echo_n "(cached) " >&6
21745 else
21746   case $TIME in
21747   [\\/]* | ?:[\\/]*)
21748   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21749   ;;
21750   *)
21751   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21752 for as_dir in $PATH
21753 do
21754   IFS=$as_save_IFS
21755   test -z "$as_dir" && as_dir=.
21756     for ac_exec_ext in '' $ac_executable_extensions; do
21757   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21758     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21759     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21760     break 2
21761   fi
21762 done
21763   done
21764 IFS=$as_save_IFS
21765 
21766   ;;
21767 esac
21768 fi
21769 TIME=$ac_cv_path_TIME
21770 if test -n "$TIME"; then
21771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21772 $as_echo "$TIME" >&6; }
21773 else
21774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21775 $as_echo "no" >&6; }
21776 fi
21777 
21778 
21779   test -n "$TIME" && break
21780 done
21781 
21782     else
21783       # If it succeeded, then it was overridden by the user. We will use it
21784       # for the tool.
21785 
21786       # First remove it from the list of overridden variables, so we can test
21787       # for unknown variables in the end.
21788       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21789 
21790       # Check if we try to supply an empty value
21791       if test "x$TIME" = x; then
21792         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21793 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21794         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21795 $as_echo_n "checking for TIME... " >&6; }
21796         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21797 $as_echo "disabled" >&6; }
21798       else
21799         # Check if the provided tool contains a complete path.
21800         tool_specified="$TIME"
21801         tool_basename="${tool_specified##*/}"
21802         if test "x$tool_basename" = "x$tool_specified"; then
21803           # A command without a complete path is provided, search $PATH.
21804           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21805 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21806           # Extract the first word of "$tool_basename", so it can be a program name with args.
21807 set dummy $tool_basename; ac_word=$2
21808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21809 $as_echo_n "checking for $ac_word... " >&6; }
21810 if ${ac_cv_path_TIME+:} false; then :
21811   $as_echo_n "(cached) " >&6
21812 else
21813   case $TIME in
21814   [\\/]* | ?:[\\/]*)
21815   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21816   ;;
21817   *)
21818   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21819 for as_dir in $PATH
21820 do
21821   IFS=$as_save_IFS
21822   test -z "$as_dir" && as_dir=.
21823     for ac_exec_ext in '' $ac_executable_extensions; do
21824   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21825     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21826     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21827     break 2
21828   fi
21829 done
21830   done
21831 IFS=$as_save_IFS
21832 
21833   ;;
21834 esac
21835 fi
21836 TIME=$ac_cv_path_TIME
21837 if test -n "$TIME"; then
21838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21839 $as_echo "$TIME" >&6; }
21840 else
21841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21842 $as_echo "no" >&6; }
21843 fi
21844 
21845 
21846           if test "x$TIME" = x; then
21847             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21848           fi
21849         else
21850           # Otherwise we believe it is a complete path. Use it as it is.
21851           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21852 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21853           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21854 $as_echo_n "checking for TIME... " >&6; }
21855           if test ! -x "$tool_specified"; then
21856             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21857 $as_echo "not found" >&6; }
21858             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21859           fi
21860           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21861 $as_echo "$tool_specified" >&6; }
21862         fi
21863       fi
21864     fi
21865 
21866   fi
21867 
21868 
21869 
21870 
21871   # Publish this variable in the help.
21872 
21873 
21874   if [ -z "${PATCH+x}" ]; then
21875     # The variable is not set by user, try to locate tool using the code snippet
21876     for ac_prog in gpatch patch
21877 do
21878   # Extract the first word of "$ac_prog", so it can be a program name with args.
21879 set dummy $ac_prog; ac_word=$2
21880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21881 $as_echo_n "checking for $ac_word... " >&6; }
21882 if ${ac_cv_path_PATCH+:} false; then :
21883   $as_echo_n "(cached) " >&6
21884 else
21885   case $PATCH in
21886   [\\/]* | ?:[\\/]*)
21887   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21888   ;;
21889   *)
21890   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21891 for as_dir in $PATH
21892 do
21893   IFS=$as_save_IFS
21894   test -z "$as_dir" && as_dir=.
21895     for ac_exec_ext in '' $ac_executable_extensions; do
21896   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21897     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21898     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21899     break 2
21900   fi
21901 done
21902   done
21903 IFS=$as_save_IFS
21904 
21905   ;;
21906 esac
21907 fi
21908 PATCH=$ac_cv_path_PATCH
21909 if test -n "$PATCH"; then
21910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21911 $as_echo "$PATCH" >&6; }
21912 else
21913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21914 $as_echo "no" >&6; }
21915 fi
21916 
21917 
21918   test -n "$PATCH" && break
21919 done
21920 
21921   else
21922     # The variable is set, but is it from the command line or the environment?
21923 
21924     # Try to remove the string !PATCH! from our list.
21925     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
21926     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21927       # If it failed, the variable was not from the command line. Ignore it,
21928       # but warn the user (except for BASH, which is always set by the calling BASH).
21929       if test "xPATCH" != xBASH; then
21930         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
21931 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
21932       fi
21933       # Try to locate tool using the code snippet
21934       for ac_prog in gpatch patch
21935 do
21936   # Extract the first word of "$ac_prog", so it can be a program name with args.
21937 set dummy $ac_prog; ac_word=$2
21938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21939 $as_echo_n "checking for $ac_word... " >&6; }
21940 if ${ac_cv_path_PATCH+:} false; then :
21941   $as_echo_n "(cached) " >&6
21942 else
21943   case $PATCH in
21944   [\\/]* | ?:[\\/]*)
21945   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21946   ;;
21947   *)
21948   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21949 for as_dir in $PATH
21950 do
21951   IFS=$as_save_IFS
21952   test -z "$as_dir" && as_dir=.
21953     for ac_exec_ext in '' $ac_executable_extensions; do
21954   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21955     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21956     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21957     break 2
21958   fi
21959 done
21960   done
21961 IFS=$as_save_IFS
21962 
21963   ;;
21964 esac
21965 fi
21966 PATCH=$ac_cv_path_PATCH
21967 if test -n "$PATCH"; then
21968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21969 $as_echo "$PATCH" >&6; }
21970 else
21971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21972 $as_echo "no" >&6; }
21973 fi
21974 
21975 
21976   test -n "$PATCH" && break
21977 done
21978 
21979     else
21980       # If it succeeded, then it was overridden by the user. We will use it
21981       # for the tool.
21982 
21983       # First remove it from the list of overridden variables, so we can test
21984       # for unknown variables in the end.
21985       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21986 
21987       # Check if we try to supply an empty value
21988       if test "x$PATCH" = x; then
21989         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
21990 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
21991         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21992 $as_echo_n "checking for PATCH... " >&6; }
21993         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21994 $as_echo "disabled" >&6; }
21995       else
21996         # Check if the provided tool contains a complete path.
21997         tool_specified="$PATCH"
21998         tool_basename="${tool_specified##*/}"
21999         if test "x$tool_basename" = "x$tool_specified"; then
22000           # A command without a complete path is provided, search $PATH.
22001           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22002 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22003           # Extract the first word of "$tool_basename", so it can be a program name with args.
22004 set dummy $tool_basename; ac_word=$2
22005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22006 $as_echo_n "checking for $ac_word... " >&6; }
22007 if ${ac_cv_path_PATCH+:} false; then :
22008   $as_echo_n "(cached) " >&6
22009 else
22010   case $PATCH in
22011   [\\/]* | ?:[\\/]*)
22012   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22013   ;;
22014   *)
22015   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22016 for as_dir in $PATH
22017 do
22018   IFS=$as_save_IFS
22019   test -z "$as_dir" && as_dir=.
22020     for ac_exec_ext in '' $ac_executable_extensions; do
22021   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22022     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22023     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22024     break 2
22025   fi
22026 done
22027   done
22028 IFS=$as_save_IFS
22029 
22030   ;;
22031 esac
22032 fi
22033 PATCH=$ac_cv_path_PATCH
22034 if test -n "$PATCH"; then
22035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22036 $as_echo "$PATCH" >&6; }
22037 else
22038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22039 $as_echo "no" >&6; }
22040 fi
22041 
22042 
22043           if test "x$PATCH" = x; then
22044             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22045           fi
22046         else
22047           # Otherwise we believe it is a complete path. Use it as it is.
22048           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22049 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22050           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22051 $as_echo_n "checking for PATCH... " >&6; }
22052           if test ! -x "$tool_specified"; then
22053             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22054 $as_echo "not found" >&6; }
22055             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22056           fi
22057           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22058 $as_echo "$tool_specified" >&6; }
22059         fi
22060       fi
22061     fi
22062 
22063   fi
22064 
22065 
22066   # Check if it's GNU time
22067   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22068   if test "x$IS_GNU_TIME" != x; then
22069     IS_GNU_TIME=yes
22070   else
22071     IS_GNU_TIME=no
22072   fi
22073 
22074 
22075   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22076 
22077 
22078 
22079   # Publish this variable in the help.
22080 
22081 
22082   if [ -z "${DSYMUTIL+x}" ]; then
22083     # The variable is not set by user, try to locate tool using the code snippet
22084     for ac_prog in dsymutil
22085 do
22086   # Extract the first word of "$ac_prog", so it can be a program name with args.
22087 set dummy $ac_prog; ac_word=$2
22088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22089 $as_echo_n "checking for $ac_word... " >&6; }
22090 if ${ac_cv_path_DSYMUTIL+:} false; then :
22091   $as_echo_n "(cached) " >&6
22092 else
22093   case $DSYMUTIL in
22094   [\\/]* | ?:[\\/]*)
22095   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22096   ;;
22097   *)
22098   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22099 for as_dir in $PATH
22100 do
22101   IFS=$as_save_IFS
22102   test -z "$as_dir" && as_dir=.
22103     for ac_exec_ext in '' $ac_executable_extensions; do
22104   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22105     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22106     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22107     break 2
22108   fi
22109 done
22110   done
22111 IFS=$as_save_IFS
22112 
22113   ;;
22114 esac
22115 fi
22116 DSYMUTIL=$ac_cv_path_DSYMUTIL
22117 if test -n "$DSYMUTIL"; then
22118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22119 $as_echo "$DSYMUTIL" >&6; }
22120 else
22121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22122 $as_echo "no" >&6; }
22123 fi
22124 
22125 
22126   test -n "$DSYMUTIL" && break
22127 done
22128 
22129   else
22130     # The variable is set, but is it from the command line or the environment?
22131 
22132     # Try to remove the string !DSYMUTIL! from our list.
22133     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22134     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22135       # If it failed, the variable was not from the command line. Ignore it,
22136       # but warn the user (except for BASH, which is always set by the calling BASH).
22137       if test "xDSYMUTIL" != xBASH; then
22138         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22139 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22140       fi
22141       # Try to locate tool using the code snippet
22142       for ac_prog in dsymutil
22143 do
22144   # Extract the first word of "$ac_prog", so it can be a program name with args.
22145 set dummy $ac_prog; ac_word=$2
22146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22147 $as_echo_n "checking for $ac_word... " >&6; }
22148 if ${ac_cv_path_DSYMUTIL+:} false; then :
22149   $as_echo_n "(cached) " >&6
22150 else
22151   case $DSYMUTIL in
22152   [\\/]* | ?:[\\/]*)
22153   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22154   ;;
22155   *)
22156   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22157 for as_dir in $PATH
22158 do
22159   IFS=$as_save_IFS
22160   test -z "$as_dir" && as_dir=.
22161     for ac_exec_ext in '' $ac_executable_extensions; do
22162   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22163     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22164     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22165     break 2
22166   fi
22167 done
22168   done
22169 IFS=$as_save_IFS
22170 
22171   ;;
22172 esac
22173 fi
22174 DSYMUTIL=$ac_cv_path_DSYMUTIL
22175 if test -n "$DSYMUTIL"; then
22176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22177 $as_echo "$DSYMUTIL" >&6; }
22178 else
22179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22180 $as_echo "no" >&6; }
22181 fi
22182 
22183 
22184   test -n "$DSYMUTIL" && break
22185 done
22186 
22187     else
22188       # If it succeeded, then it was overridden by the user. We will use it
22189       # for the tool.
22190 
22191       # First remove it from the list of overridden variables, so we can test
22192       # for unknown variables in the end.
22193       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22194 
22195       # Check if we try to supply an empty value
22196       if test "x$DSYMUTIL" = x; then
22197         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22198 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22199         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22200 $as_echo_n "checking for DSYMUTIL... " >&6; }
22201         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22202 $as_echo "disabled" >&6; }
22203       else
22204         # Check if the provided tool contains a complete path.
22205         tool_specified="$DSYMUTIL"
22206         tool_basename="${tool_specified##*/}"
22207         if test "x$tool_basename" = "x$tool_specified"; then
22208           # A command without a complete path is provided, search $PATH.
22209           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22210 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22211           # Extract the first word of "$tool_basename", so it can be a program name with args.
22212 set dummy $tool_basename; ac_word=$2
22213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22214 $as_echo_n "checking for $ac_word... " >&6; }
22215 if ${ac_cv_path_DSYMUTIL+:} false; then :
22216   $as_echo_n "(cached) " >&6
22217 else
22218   case $DSYMUTIL in
22219   [\\/]* | ?:[\\/]*)
22220   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22221   ;;
22222   *)
22223   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22224 for as_dir in $PATH
22225 do
22226   IFS=$as_save_IFS
22227   test -z "$as_dir" && as_dir=.
22228     for ac_exec_ext in '' $ac_executable_extensions; do
22229   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22230     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22231     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22232     break 2
22233   fi
22234 done
22235   done
22236 IFS=$as_save_IFS
22237 
22238   ;;
22239 esac
22240 fi
22241 DSYMUTIL=$ac_cv_path_DSYMUTIL
22242 if test -n "$DSYMUTIL"; then
22243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22244 $as_echo "$DSYMUTIL" >&6; }
22245 else
22246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22247 $as_echo "no" >&6; }
22248 fi
22249 
22250 
22251           if test "x$DSYMUTIL" = x; then
22252             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22253           fi
22254         else
22255           # Otherwise we believe it is a complete path. Use it as it is.
22256           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22257 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22258           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22259 $as_echo_n "checking for DSYMUTIL... " >&6; }
22260           if test ! -x "$tool_specified"; then
22261             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22262 $as_echo "not found" >&6; }
22263             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22264           fi
22265           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22266 $as_echo "$tool_specified" >&6; }
22267         fi
22268       fi
22269     fi
22270 
22271   fi
22272 
22273 
22274 
22275   if test "x$DSYMUTIL" = x; then
22276     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22277   fi
22278 
22279 
22280 
22281 
22282 
22283   # Publish this variable in the help.
22284 
22285 
22286   if [ -z "${XATTR+x}" ]; then
22287     # The variable is not set by user, try to locate tool using the code snippet
22288     for ac_prog in xattr
22289 do
22290   # Extract the first word of "$ac_prog", so it can be a program name with args.
22291 set dummy $ac_prog; ac_word=$2
22292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22293 $as_echo_n "checking for $ac_word... " >&6; }
22294 if ${ac_cv_path_XATTR+:} false; then :
22295   $as_echo_n "(cached) " >&6
22296 else
22297   case $XATTR in
22298   [\\/]* | ?:[\\/]*)
22299   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22300   ;;
22301   *)
22302   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22303 for as_dir in $PATH
22304 do
22305   IFS=$as_save_IFS
22306   test -z "$as_dir" && as_dir=.
22307     for ac_exec_ext in '' $ac_executable_extensions; do
22308   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22309     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22310     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22311     break 2
22312   fi
22313 done
22314   done
22315 IFS=$as_save_IFS
22316 
22317   ;;
22318 esac
22319 fi
22320 XATTR=$ac_cv_path_XATTR
22321 if test -n "$XATTR"; then
22322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22323 $as_echo "$XATTR" >&6; }
22324 else
22325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22326 $as_echo "no" >&6; }
22327 fi
22328 
22329 
22330   test -n "$XATTR" && break
22331 done
22332 
22333   else
22334     # The variable is set, but is it from the command line or the environment?
22335 
22336     # Try to remove the string !XATTR! from our list.
22337     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22338     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22339       # If it failed, the variable was not from the command line. Ignore it,
22340       # but warn the user (except for BASH, which is always set by the calling BASH).
22341       if test "xXATTR" != xBASH; then
22342         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22343 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22344       fi
22345       # Try to locate tool using the code snippet
22346       for ac_prog in xattr
22347 do
22348   # Extract the first word of "$ac_prog", so it can be a program name with args.
22349 set dummy $ac_prog; ac_word=$2
22350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22351 $as_echo_n "checking for $ac_word... " >&6; }
22352 if ${ac_cv_path_XATTR+:} false; then :
22353   $as_echo_n "(cached) " >&6
22354 else
22355   case $XATTR in
22356   [\\/]* | ?:[\\/]*)
22357   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22358   ;;
22359   *)
22360   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22361 for as_dir in $PATH
22362 do
22363   IFS=$as_save_IFS
22364   test -z "$as_dir" && as_dir=.
22365     for ac_exec_ext in '' $ac_executable_extensions; do
22366   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22367     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22368     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22369     break 2
22370   fi
22371 done
22372   done
22373 IFS=$as_save_IFS
22374 
22375   ;;
22376 esac
22377 fi
22378 XATTR=$ac_cv_path_XATTR
22379 if test -n "$XATTR"; then
22380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22381 $as_echo "$XATTR" >&6; }
22382 else
22383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22384 $as_echo "no" >&6; }
22385 fi
22386 
22387 
22388   test -n "$XATTR" && break
22389 done
22390 
22391     else
22392       # If it succeeded, then it was overridden by the user. We will use it
22393       # for the tool.
22394 
22395       # First remove it from the list of overridden variables, so we can test
22396       # for unknown variables in the end.
22397       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22398 
22399       # Check if we try to supply an empty value
22400       if test "x$XATTR" = x; then
22401         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22402 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22403         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22404 $as_echo_n "checking for XATTR... " >&6; }
22405         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22406 $as_echo "disabled" >&6; }
22407       else
22408         # Check if the provided tool contains a complete path.
22409         tool_specified="$XATTR"
22410         tool_basename="${tool_specified##*/}"
22411         if test "x$tool_basename" = "x$tool_specified"; then
22412           # A command without a complete path is provided, search $PATH.
22413           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22414 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22415           # Extract the first word of "$tool_basename", so it can be a program name with args.
22416 set dummy $tool_basename; ac_word=$2
22417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22418 $as_echo_n "checking for $ac_word... " >&6; }
22419 if ${ac_cv_path_XATTR+:} false; then :
22420   $as_echo_n "(cached) " >&6
22421 else
22422   case $XATTR in
22423   [\\/]* | ?:[\\/]*)
22424   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22425   ;;
22426   *)
22427   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22428 for as_dir in $PATH
22429 do
22430   IFS=$as_save_IFS
22431   test -z "$as_dir" && as_dir=.
22432     for ac_exec_ext in '' $ac_executable_extensions; do
22433   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22434     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22435     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22436     break 2
22437   fi
22438 done
22439   done
22440 IFS=$as_save_IFS
22441 
22442   ;;
22443 esac
22444 fi
22445 XATTR=$ac_cv_path_XATTR
22446 if test -n "$XATTR"; then
22447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22448 $as_echo "$XATTR" >&6; }
22449 else
22450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22451 $as_echo "no" >&6; }
22452 fi
22453 
22454 
22455           if test "x$XATTR" = x; then
22456             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22457           fi
22458         else
22459           # Otherwise we believe it is a complete path. Use it as it is.
22460           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22461 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22462           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22463 $as_echo_n "checking for XATTR... " >&6; }
22464           if test ! -x "$tool_specified"; then
22465             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22466 $as_echo "not found" >&6; }
22467             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22468           fi
22469           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22470 $as_echo "$tool_specified" >&6; }
22471         fi
22472       fi
22473     fi
22474 
22475   fi
22476 
22477 
22478 
22479   if test "x$XATTR" = x; then
22480     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22481   fi
22482 
22483 
22484 
22485 
22486   # Publish this variable in the help.
22487 
22488 
22489   if [ -z "${CODESIGN+x}" ]; then
22490     # The variable is not set by user, try to locate tool using the code snippet
22491     for ac_prog in codesign
22492 do
22493   # Extract the first word of "$ac_prog", so it can be a program name with args.
22494 set dummy $ac_prog; ac_word=$2
22495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22496 $as_echo_n "checking for $ac_word... " >&6; }
22497 if ${ac_cv_path_CODESIGN+:} false; then :
22498   $as_echo_n "(cached) " >&6
22499 else
22500   case $CODESIGN in
22501   [\\/]* | ?:[\\/]*)
22502   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22503   ;;
22504   *)
22505   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22506 for as_dir in $PATH
22507 do
22508   IFS=$as_save_IFS
22509   test -z "$as_dir" && as_dir=.
22510     for ac_exec_ext in '' $ac_executable_extensions; do
22511   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22512     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22513     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22514     break 2
22515   fi
22516 done
22517   done
22518 IFS=$as_save_IFS
22519 
22520   ;;
22521 esac
22522 fi
22523 CODESIGN=$ac_cv_path_CODESIGN
22524 if test -n "$CODESIGN"; then
22525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22526 $as_echo "$CODESIGN" >&6; }
22527 else
22528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22529 $as_echo "no" >&6; }
22530 fi
22531 
22532 
22533   test -n "$CODESIGN" && break
22534 done
22535 
22536   else
22537     # The variable is set, but is it from the command line or the environment?
22538 
22539     # Try to remove the string !CODESIGN! from our list.
22540     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22541     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22542       # If it failed, the variable was not from the command line. Ignore it,
22543       # but warn the user (except for BASH, which is always set by the calling BASH).
22544       if test "xCODESIGN" != xBASH; then
22545         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22546 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22547       fi
22548       # Try to locate tool using the code snippet
22549       for ac_prog in codesign
22550 do
22551   # Extract the first word of "$ac_prog", so it can be a program name with args.
22552 set dummy $ac_prog; ac_word=$2
22553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22554 $as_echo_n "checking for $ac_word... " >&6; }
22555 if ${ac_cv_path_CODESIGN+:} false; then :
22556   $as_echo_n "(cached) " >&6
22557 else
22558   case $CODESIGN in
22559   [\\/]* | ?:[\\/]*)
22560   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22561   ;;
22562   *)
22563   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22564 for as_dir in $PATH
22565 do
22566   IFS=$as_save_IFS
22567   test -z "$as_dir" && as_dir=.
22568     for ac_exec_ext in '' $ac_executable_extensions; do
22569   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22570     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22571     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22572     break 2
22573   fi
22574 done
22575   done
22576 IFS=$as_save_IFS
22577 
22578   ;;
22579 esac
22580 fi
22581 CODESIGN=$ac_cv_path_CODESIGN
22582 if test -n "$CODESIGN"; then
22583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22584 $as_echo "$CODESIGN" >&6; }
22585 else
22586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22587 $as_echo "no" >&6; }
22588 fi
22589 
22590 
22591   test -n "$CODESIGN" && break
22592 done
22593 
22594     else
22595       # If it succeeded, then it was overridden by the user. We will use it
22596       # for the tool.
22597 
22598       # First remove it from the list of overridden variables, so we can test
22599       # for unknown variables in the end.
22600       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22601 
22602       # Check if we try to supply an empty value
22603       if test "x$CODESIGN" = x; then
22604         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22605 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22606         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22607 $as_echo_n "checking for CODESIGN... " >&6; }
22608         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22609 $as_echo "disabled" >&6; }
22610       else
22611         # Check if the provided tool contains a complete path.
22612         tool_specified="$CODESIGN"
22613         tool_basename="${tool_specified##*/}"
22614         if test "x$tool_basename" = "x$tool_specified"; then
22615           # A command without a complete path is provided, search $PATH.
22616           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22617 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22618           # Extract the first word of "$tool_basename", so it can be a program name with args.
22619 set dummy $tool_basename; ac_word=$2
22620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22621 $as_echo_n "checking for $ac_word... " >&6; }
22622 if ${ac_cv_path_CODESIGN+:} false; then :
22623   $as_echo_n "(cached) " >&6
22624 else
22625   case $CODESIGN in
22626   [\\/]* | ?:[\\/]*)
22627   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22628   ;;
22629   *)
22630   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22631 for as_dir in $PATH
22632 do
22633   IFS=$as_save_IFS
22634   test -z "$as_dir" && as_dir=.
22635     for ac_exec_ext in '' $ac_executable_extensions; do
22636   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22637     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22638     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22639     break 2
22640   fi
22641 done
22642   done
22643 IFS=$as_save_IFS
22644 
22645   ;;
22646 esac
22647 fi
22648 CODESIGN=$ac_cv_path_CODESIGN
22649 if test -n "$CODESIGN"; then
22650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22651 $as_echo "$CODESIGN" >&6; }
22652 else
22653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22654 $as_echo "no" >&6; }
22655 fi
22656 
22657 
22658           if test "x$CODESIGN" = x; then
22659             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22660           fi
22661         else
22662           # Otherwise we believe it is a complete path. Use it as it is.
22663           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22664 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22665           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22666 $as_echo_n "checking for CODESIGN... " >&6; }
22667           if test ! -x "$tool_specified"; then
22668             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22669 $as_echo "not found" >&6; }
22670             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22671           fi
22672           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22673 $as_echo "$tool_specified" >&6; }
22674         fi
22675       fi
22676     fi
22677 
22678   fi
22679 
22680 
22681     if test "x$CODESIGN" != "x"; then
22682       # Verify that the openjdk_codesign certificate is present
22683       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22684 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22685       rm -f codesign-testfile
22686       touch codesign-testfile
22687       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22688       rm -f codesign-testfile
22689       if test "x$CODESIGN" = x; then
22690         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22691 $as_echo "no" >&6; }
22692       else
22693         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22694 $as_echo "yes" >&6; }
22695       fi
22696     fi
22697 
22698 
22699 
22700   # Publish this variable in the help.
22701 
22702 
22703   if [ -z "${SETFILE+x}" ]; then
22704     # The variable is not set by user, try to locate tool using the code snippet
22705     for ac_prog in SetFile
22706 do
22707   # Extract the first word of "$ac_prog", so it can be a program name with args.
22708 set dummy $ac_prog; ac_word=$2
22709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22710 $as_echo_n "checking for $ac_word... " >&6; }
22711 if ${ac_cv_path_SETFILE+:} false; then :
22712   $as_echo_n "(cached) " >&6
22713 else
22714   case $SETFILE in
22715   [\\/]* | ?:[\\/]*)
22716   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22717   ;;
22718   *)
22719   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22720 for as_dir in $PATH
22721 do
22722   IFS=$as_save_IFS
22723   test -z "$as_dir" && as_dir=.
22724     for ac_exec_ext in '' $ac_executable_extensions; do
22725   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22726     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22727     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22728     break 2
22729   fi
22730 done
22731   done
22732 IFS=$as_save_IFS
22733 
22734   ;;
22735 esac
22736 fi
22737 SETFILE=$ac_cv_path_SETFILE
22738 if test -n "$SETFILE"; then
22739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22740 $as_echo "$SETFILE" >&6; }
22741 else
22742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22743 $as_echo "no" >&6; }
22744 fi
22745 
22746 
22747   test -n "$SETFILE" && break
22748 done
22749 
22750   else
22751     # The variable is set, but is it from the command line or the environment?
22752 
22753     # Try to remove the string !SETFILE! from our list.
22754     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22755     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22756       # If it failed, the variable was not from the command line. Ignore it,
22757       # but warn the user (except for BASH, which is always set by the calling BASH).
22758       if test "xSETFILE" != xBASH; then
22759         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22760 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22761       fi
22762       # Try to locate tool using the code snippet
22763       for ac_prog in SetFile
22764 do
22765   # Extract the first word of "$ac_prog", so it can be a program name with args.
22766 set dummy $ac_prog; ac_word=$2
22767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22768 $as_echo_n "checking for $ac_word... " >&6; }
22769 if ${ac_cv_path_SETFILE+:} false; then :
22770   $as_echo_n "(cached) " >&6
22771 else
22772   case $SETFILE in
22773   [\\/]* | ?:[\\/]*)
22774   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22775   ;;
22776   *)
22777   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22778 for as_dir in $PATH
22779 do
22780   IFS=$as_save_IFS
22781   test -z "$as_dir" && as_dir=.
22782     for ac_exec_ext in '' $ac_executable_extensions; do
22783   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22784     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22785     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22786     break 2
22787   fi
22788 done
22789   done
22790 IFS=$as_save_IFS
22791 
22792   ;;
22793 esac
22794 fi
22795 SETFILE=$ac_cv_path_SETFILE
22796 if test -n "$SETFILE"; then
22797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22798 $as_echo "$SETFILE" >&6; }
22799 else
22800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22801 $as_echo "no" >&6; }
22802 fi
22803 
22804 
22805   test -n "$SETFILE" && break
22806 done
22807 
22808     else
22809       # If it succeeded, then it was overridden by the user. We will use it
22810       # for the tool.
22811 
22812       # First remove it from the list of overridden variables, so we can test
22813       # for unknown variables in the end.
22814       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22815 
22816       # Check if we try to supply an empty value
22817       if test "x$SETFILE" = x; then
22818         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22819 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22820         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22821 $as_echo_n "checking for SETFILE... " >&6; }
22822         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22823 $as_echo "disabled" >&6; }
22824       else
22825         # Check if the provided tool contains a complete path.
22826         tool_specified="$SETFILE"
22827         tool_basename="${tool_specified##*/}"
22828         if test "x$tool_basename" = "x$tool_specified"; then
22829           # A command without a complete path is provided, search $PATH.
22830           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22831 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22832           # Extract the first word of "$tool_basename", so it can be a program name with args.
22833 set dummy $tool_basename; ac_word=$2
22834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22835 $as_echo_n "checking for $ac_word... " >&6; }
22836 if ${ac_cv_path_SETFILE+:} false; then :
22837   $as_echo_n "(cached) " >&6
22838 else
22839   case $SETFILE in
22840   [\\/]* | ?:[\\/]*)
22841   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22842   ;;
22843   *)
22844   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22845 for as_dir in $PATH
22846 do
22847   IFS=$as_save_IFS
22848   test -z "$as_dir" && as_dir=.
22849     for ac_exec_ext in '' $ac_executable_extensions; do
22850   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22851     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22852     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22853     break 2
22854   fi
22855 done
22856   done
22857 IFS=$as_save_IFS
22858 
22859   ;;
22860 esac
22861 fi
22862 SETFILE=$ac_cv_path_SETFILE
22863 if test -n "$SETFILE"; then
22864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22865 $as_echo "$SETFILE" >&6; }
22866 else
22867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22868 $as_echo "no" >&6; }
22869 fi
22870 
22871 
22872           if test "x$SETFILE" = x; then
22873             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22874           fi
22875         else
22876           # Otherwise we believe it is a complete path. Use it as it is.
22877           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22878 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22879           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22880 $as_echo_n "checking for SETFILE... " >&6; }
22881           if test ! -x "$tool_specified"; then
22882             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22883 $as_echo "not found" >&6; }
22884             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22885           fi
22886           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22887 $as_echo "$tool_specified" >&6; }
22888         fi
22889       fi
22890     fi
22891 
22892   fi
22893 
22894 
22895 
22896   if test "x$SETFILE" = x; then
22897     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22898   fi
22899 
22900 
22901   fi
22902 
22903 
22904   # Test if bash supports pipefail.
22905   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
22906 $as_echo_n "checking if bash supports pipefail... " >&6; }
22907   if ${BASH} -c 'set -o pipefail'; then
22908     BASH_ARGS="$BASH_ARGS -o pipefail"
22909     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22910 $as_echo "yes" >&6; }
22911   else
22912     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22913 $as_echo "no" >&6; }
22914   fi
22915 
22916   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
22917 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
22918   if ${BASH} -e -c 'true'; then
22919     BASH_ARGS="$BASH_ARGS -e"
22920     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22921 $as_echo "yes" >&6; }
22922   else
22923     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22924 $as_echo "no" >&6; }
22925   fi
22926 
22927 
22928 
22929 
22930 # Check if pkg-config is available.
22931 
22932 
22933 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
22934         if test -n "$ac_tool_prefix"; then
22935   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22936 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
22937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22938 $as_echo_n "checking for $ac_word... " >&6; }
22939 if ${ac_cv_path_PKG_CONFIG+:} false; then :
22940   $as_echo_n "(cached) " >&6
22941 else
22942   case $PKG_CONFIG in
22943   [\\/]* | ?:[\\/]*)
22944   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
22945   ;;
22946   *)
22947   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22948 for as_dir in $PATH
22949 do
22950   IFS=$as_save_IFS
22951   test -z "$as_dir" && as_dir=.
22952     for ac_exec_ext in '' $ac_executable_extensions; do
22953   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22954     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22955     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22956     break 2
22957   fi
22958 done
22959   done
22960 IFS=$as_save_IFS
22961 
22962   ;;
22963 esac
22964 fi
22965 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
22966 if test -n "$PKG_CONFIG"; then
22967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
22968 $as_echo "$PKG_CONFIG" >&6; }
22969 else
22970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22971 $as_echo "no" >&6; }
22972 fi
22973 
22974 
22975 fi
22976 if test -z "$ac_cv_path_PKG_CONFIG"; then
22977   ac_pt_PKG_CONFIG=$PKG_CONFIG
22978   # Extract the first word of "pkg-config", so it can be a program name with args.
22979 set dummy pkg-config; ac_word=$2
22980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22981 $as_echo_n "checking for $ac_word... " >&6; }
22982 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
22983   $as_echo_n "(cached) " >&6
22984 else
22985   case $ac_pt_PKG_CONFIG in
22986   [\\/]* | ?:[\\/]*)
22987   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
22988   ;;
22989   *)
22990   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22991 for as_dir in $PATH
22992 do
22993   IFS=$as_save_IFS
22994   test -z "$as_dir" && as_dir=.
22995     for ac_exec_ext in '' $ac_executable_extensions; do
22996   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22997     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22998     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22999     break 2
23000   fi
23001 done
23002   done
23003 IFS=$as_save_IFS
23004 
23005   ;;
23006 esac
23007 fi
23008 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23009 if test -n "$ac_pt_PKG_CONFIG"; then
23010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23011 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
23012 else
23013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23014 $as_echo "no" >&6; }
23015 fi
23016 
23017   if test "x$ac_pt_PKG_CONFIG" = x; then
23018     PKG_CONFIG=""
23019   else
23020     case $cross_compiling:$ac_tool_warned in
23021 yes:)
23022 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23023 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23024 ac_tool_warned=yes ;;
23025 esac
23026     PKG_CONFIG=$ac_pt_PKG_CONFIG
23027   fi
23028 else
23029   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23030 fi
23031 
23032 fi
23033 if test -n "$PKG_CONFIG"; then
23034         _pkg_min_version=0.9.0
23035         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23036 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23037         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23038                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23039 $as_echo "yes" >&6; }
23040         else
23041                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23042 $as_echo "no" >&6; }
23043                 PKG_CONFIG=""
23044         fi
23045 
23046 fi
23047 
23048 # After basic tools have been setup, we can check build os specific details.
23049 
23050   ###############################################################################
23051 
23052   # Note that this is the build platform OS version!
23053 
23054   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23055   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23056   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23057   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23058 
23059 
23060 
23061 
23062 
23063 ###############################################################################
23064 #
23065 # Determine OpenJDK variants, options and version numbers.
23066 #
23067 ###############################################################################
23068 
23069 # We need build & target for this.
23070 
23071 
23072   ###############################################################################
23073   #
23074   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23075   # We always build headless support.
23076   #
23077   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23078 $as_echo_n "checking headful support... " >&6; }
23079   # Check whether --enable-headful was given.
23080 if test "${enable_headful+set}" = set; then :
23081   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23082 else
23083   SUPPORT_HEADFUL=yes
23084 fi
23085 
23086 
23087   SUPPORT_HEADLESS=yes
23088   BUILD_HEADLESS="BUILD_HEADLESS:=true"
23089 
23090   if test "x$SUPPORT_HEADFUL" = xyes; then
23091     # We are building both headful and headless.
23092     headful_msg="include support for both headful and headless"
23093   fi
23094 
23095   if test "x$SUPPORT_HEADFUL" = xno; then
23096     # Thus we are building headless only.
23097     BUILD_HEADLESS="BUILD_HEADLESS:=true"
23098     headful_msg="headless only"
23099   fi
23100 
23101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23102 $as_echo "$headful_msg" >&6; }
23103 
23104 
23105 
23106 
23107 
23108   # Control wether Hotspot runs Queens test after build.
23109   # Check whether --enable-hotspot-test-in-build was given.
23110 if test "${enable_hotspot_test_in_build+set}" = set; then :
23111   enableval=$enable_hotspot_test_in_build;
23112 else
23113   enable_hotspot_test_in_build=no
23114 fi
23115 
23116   if test "x$enable_hotspot_test_in_build" = "xyes"; then
23117     TEST_IN_BUILD=true
23118   else
23119     TEST_IN_BUILD=false
23120   fi
23121 
23122 
23123   ###############################################################################
23124   #
23125   # Choose cacerts source file
23126   #
23127 
23128 # Check whether --with-cacerts-file was given.
23129 if test "${with_cacerts_file+set}" = set; then :
23130   withval=$with_cacerts_file;
23131 fi
23132 
23133   if test "x$with_cacerts_file" != x; then
23134     CACERTS_FILE=$with_cacerts_file
23135   fi
23136 
23137 
23138   ###############################################################################
23139   #
23140   # Enable or disable unlimited crypto
23141   #
23142   # Check whether --enable-unlimited-crypto was given.
23143 if test "${enable_unlimited_crypto+set}" = set; then :
23144   enableval=$enable_unlimited_crypto;
23145 else
23146   enable_unlimited_crypto=no
23147 fi
23148 
23149   if test "x$enable_unlimited_crypto" = "xyes"; then
23150     UNLIMITED_CRYPTO=true
23151   else
23152     UNLIMITED_CRYPTO=false
23153   fi
23154 
23155 
23156   ###############################################################################
23157   #
23158   # Compress jars
23159   #
23160   COMPRESS_JARS=false
23161 
23162 
23163 
23164   # Setup default copyright year. Mostly overridden when building close to a new year.
23165 
23166 # Check whether --with-copyright-year was given.
23167 if test "${with_copyright_year+set}" = set; then :
23168   withval=$with_copyright_year;
23169 fi
23170 
23171   if test "x$with_copyright_year" = xyes; then
23172     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23173   elif test "x$with_copyright_year" != x; then
23174     COPYRIGHT_YEAR="$with_copyright_year"
23175   else
23176     COPYRIGHT_YEAR=`date +'%Y'`
23177   fi
23178 
23179 
23180 
23181   # Warn user that old version arguments are deprecated.
23182 
23183 
23184 # Check whether --with-milestone was given.
23185 if test "${with_milestone+set}" = set; then :
23186   withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23187 $as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23188 fi
23189 
23190 
23191 
23192 
23193 # Check whether --with-update-version was given.
23194 if test "${with_update_version+set}" = set; then :
23195   withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23196 $as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23197 fi
23198 
23199 
23200 
23201 
23202 # Check whether --with-user-release-suffix was given.
23203 if test "${with_user_release_suffix+set}" = set; then :
23204   withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
23205 $as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23206 fi
23207 
23208 
23209 
23210 
23211 # Check whether --with-build-number was given.
23212 if test "${with_build_number+set}" = set; then :
23213   withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23214 $as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23215 fi
23216 
23217 
23218 
23219   # Source the version numbers file
23220   . $AUTOCONF_DIR/version-numbers
23221 
23222   # Some non-version number information is set in that file
23223 
23224 
23225 
23226 
23227 
23228 
23229 
23230 
23231   # Override version from arguments
23232 
23233   # If --with-version-string is set, process it first. It is possible to
23234   # override parts with more specific flags, since these are processed later.
23235 
23236 # Check whether --with-version-string was given.
23237 if test "${with_version_string+set}" = set; then :
23238   withval=$with_version_string;
23239 fi
23240 
23241   if test "x$with_version_string" = xyes; then
23242     as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23243   elif test "x$with_version_string" != x; then
23244     # Additional [] needed to keep m4 from mangling shell constructs.
23245     if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23246       VERSION_MAJOR=${BASH_REMATCH[1]}
23247       VERSION_MINOR=${BASH_REMATCH[3]}
23248       VERSION_SECURITY=${BASH_REMATCH[5]}
23249       VERSION_PATCH=${BASH_REMATCH[7]}
23250       VERSION_PRE=${BASH_REMATCH[9]}
23251       version_plus_separator=${BASH_REMATCH[11]}
23252       VERSION_BUILD=${BASH_REMATCH[12]}
23253       VERSION_OPT=${BASH_REMATCH[14]}
23254       # Unspecified numerical fields are interpreted as 0.
23255       if test "x$VERSION_MINOR" = x; then
23256         VERSION_MINOR=0
23257       fi
23258       if test "x$VERSION_SECURITY" = x; then
23259         VERSION_SECURITY=0
23260       fi
23261       if test "x$VERSION_PATCH" = x; then
23262         VERSION_PATCH=0
23263       fi
23264       if test "x$version_plus_separator" != x \
23265           && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23266         as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23267       fi
23268       # Stop the version part process from setting default values.
23269       # We still allow them to explicitely override though.
23270       NO_DEFAULT_VERSION_PARTS=true
23271     else
23272       as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23273     fi
23274   fi
23275 
23276 
23277 # Check whether --with-version-pre was given.
23278 if test "${with_version_pre+set}" = set; then :
23279   withval=$with_version_pre; with_version_pre_present=true
23280 else
23281   with_version_pre_present=false
23282 fi
23283 
23284 
23285   if test "x$with_version_pre_present" = xtrue; then
23286     if test "x$with_version_pre" = xyes; then
23287       as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23288     elif test "x$with_version_pre" = xno; then
23289       # Interpret --without-* as empty string instead of the literal "no"
23290       VERSION_PRE=
23291     else
23292       # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23293        VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23294       if test "x$VERSION_PRE" != "x$with_version_pre"; then
23295         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23296 $as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23297       fi
23298     fi
23299   else
23300     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23301       # Default is to use "internal" as pre
23302       VERSION_PRE="internal"
23303     fi
23304   fi
23305 
23306 
23307 # Check whether --with-version-opt was given.
23308 if test "${with_version_opt+set}" = set; then :
23309   withval=$with_version_opt; with_version_opt_present=true
23310 else
23311   with_version_opt_present=false
23312 fi
23313 
23314 
23315   if test "x$with_version_opt_present" = xtrue; then
23316     if test "x$with_version_opt" = xyes; then
23317       as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23318     elif test "x$with_version_opt" = xno; then
23319       # Interpret --without-* as empty string instead of the literal "no"
23320       VERSION_OPT=
23321     else
23322       # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23323        VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23324       if test "x$VERSION_OPT" != "x$with_version_opt"; then
23325         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23326 $as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23327       fi
23328     fi
23329   else
23330     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23331       # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23332       timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23333       # Outer [ ] to quote m4.
23334        username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
23335        basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23336       VERSION_OPT="$timestamp.$username.$basedirname"
23337     fi
23338   fi
23339 
23340 
23341 # Check whether --with-version-build was given.
23342 if test "${with_version_build+set}" = set; then :
23343   withval=$with_version_build; with_version_build_present=true
23344 else
23345   with_version_build_present=false
23346 fi
23347 
23348 
23349   if test "x$with_version_build_present" = xtrue; then
23350     if test "x$with_version_build" = xyes; then
23351       as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23352     elif test "x$with_version_build" = xno; then
23353       # Interpret --without-* as empty string instead of the literal "no"
23354       VERSION_BUILD=
23355     elif test "x$with_version_build" = x; then
23356       VERSION_BUILD=
23357     else
23358 
23359   # Additional [] needed to keep m4 from mangling shell constructs.
23360   if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23361     as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
23362   fi
23363   # Extract the version number without leading zeros.
23364   cleaned_value=${BASH_REMATCH[1]}
23365   if test "x$cleaned_value" = x; then
23366     # Special case for zero
23367     cleaned_value=${BASH_REMATCH[2]}
23368   fi
23369 
23370   if test $cleaned_value -gt 255; then
23371     as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
23372   fi
23373   if test "x$cleaned_value" != "x$with_version_build"; then
23374     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
23375 $as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
23376   fi
23377   VERSION_BUILD=$cleaned_value
23378 
23379     fi
23380   else
23381     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23382       # Default is to not have a build number.
23383       VERSION_BUILD=""
23384       # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
23385       VERSION_BUILD=0
23386     fi
23387   fi
23388 
23389 
23390 # Check whether --with-version-major was given.
23391 if test "${with_version_major+set}" = set; then :
23392   withval=$with_version_major; with_version_major_present=true
23393 else
23394   with_version_major_present=false
23395 fi
23396 
23397 
23398   if test "x$with_version_major_present" = xtrue; then
23399     if test "x$with_version_major" = xyes; then
23400       as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
23401     else
23402 
23403   # Additional [] needed to keep m4 from mangling shell constructs.
23404   if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23405     as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
23406   fi
23407   # Extract the version number without leading zeros.
23408   cleaned_value=${BASH_REMATCH[1]}
23409   if test "x$cleaned_value" = x; then
23410     # Special case for zero
23411     cleaned_value=${BASH_REMATCH[2]}
23412   fi
23413 
23414   if test $cleaned_value -gt 255; then
23415     as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
23416   fi
23417   if test "x$cleaned_value" != "x$with_version_major"; then
23418     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
23419 $as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
23420   fi
23421   VERSION_MAJOR=$cleaned_value
23422 
23423     fi
23424   else
23425     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23426       # Default is to get value from version-numbers
23427       VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
23428     fi
23429   fi
23430 
23431 
23432 # Check whether --with-version-minor was given.
23433 if test "${with_version_minor+set}" = set; then :
23434   withval=$with_version_minor; with_version_minor_present=true
23435 else
23436   with_version_minor_present=false
23437 fi
23438 
23439 
23440   if test "x$with_version_minor_present" = xtrue; then
23441     if test "x$with_version_minor" = xyes; then
23442       as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
23443     elif test "x$with_version_minor" = xno; then
23444       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23445       VERSION_MINOR=0
23446     elif test "x$with_version_minor" = x; then
23447       VERSION_MINOR=0
23448     else
23449 
23450   # Additional [] needed to keep m4 from mangling shell constructs.
23451   if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23452     as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
23453   fi
23454   # Extract the version number without leading zeros.
23455   cleaned_value=${BASH_REMATCH[1]}
23456   if test "x$cleaned_value" = x; then
23457     # Special case for zero
23458     cleaned_value=${BASH_REMATCH[2]}
23459   fi
23460 
23461   if test $cleaned_value -gt 255; then
23462     as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
23463   fi
23464   if test "x$cleaned_value" != "x$with_version_minor"; then
23465     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
23466 $as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
23467   fi
23468   VERSION_MINOR=$cleaned_value
23469 
23470     fi
23471   else
23472     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23473       # Default is 0, if unspecified
23474       VERSION_MINOR=0
23475     fi
23476   fi
23477 
23478 
23479 # Check whether --with-version-security was given.
23480 if test "${with_version_security+set}" = set; then :
23481   withval=$with_version_security; with_version_security_present=true
23482 else
23483   with_version_security_present=false
23484 fi
23485 
23486 
23487   if test "x$with_version_security_present" = xtrue; then
23488     if test "x$with_version_security" = xyes; then
23489       as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
23490     elif test "x$with_version_security" = xno; then
23491       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23492       VERSION_SECURITY=0
23493     elif test "x$with_version_security" = x; then
23494       VERSION_SECURITY=0
23495     else
23496 
23497   # Additional [] needed to keep m4 from mangling shell constructs.
23498   if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23499     as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
23500   fi
23501   # Extract the version number without leading zeros.
23502   cleaned_value=${BASH_REMATCH[1]}
23503   if test "x$cleaned_value" = x; then
23504     # Special case for zero
23505     cleaned_value=${BASH_REMATCH[2]}
23506   fi
23507 
23508   if test $cleaned_value -gt 255; then
23509     as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
23510   fi
23511   if test "x$cleaned_value" != "x$with_version_security"; then
23512     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
23513 $as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
23514   fi
23515   VERSION_SECURITY=$cleaned_value
23516 
23517     fi
23518   else
23519     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23520       # Default is 0, if unspecified
23521       VERSION_SECURITY=0
23522     fi
23523   fi
23524 
23525 
23526 # Check whether --with-version-patch was given.
23527 if test "${with_version_patch+set}" = set; then :
23528   withval=$with_version_patch; with_version_patch_present=true
23529 else
23530   with_version_patch_present=false
23531 fi
23532 
23533 
23534   if test "x$with_version_patch_present" = xtrue; then
23535     if test "x$with_version_patch" = xyes; then
23536       as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
23537     elif test "x$with_version_patch" = xno; then
23538       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23539       VERSION_PATCH=0
23540     elif test "x$with_version_patch" = x; then
23541       VERSION_PATCH=0
23542     else
23543 
23544   # Additional [] needed to keep m4 from mangling shell constructs.
23545   if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23546     as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
23547   fi
23548   # Extract the version number without leading zeros.
23549   cleaned_value=${BASH_REMATCH[1]}
23550   if test "x$cleaned_value" = x; then
23551     # Special case for zero
23552     cleaned_value=${BASH_REMATCH[2]}
23553   fi
23554 
23555   if test $cleaned_value -gt 255; then
23556     as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
23557   fi
23558   if test "x$cleaned_value" != "x$with_version_patch"; then
23559     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
23560 $as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
23561   fi
23562   VERSION_PATCH=$cleaned_value
23563 
23564     fi
23565   else
23566     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23567       # Default is 0, if unspecified
23568       VERSION_PATCH=0
23569     fi
23570   fi
23571 
23572   # Calculate derived version properties
23573 
23574   # Set VERSION_IS_GA based on if VERSION_PRE has a value
23575   if test "x$VERSION_PRE" = x; then
23576     VERSION_IS_GA=true
23577   else
23578     VERSION_IS_GA=false
23579   fi
23580 
23581   # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
23582   VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
23583 
23584   stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
23585   # Strip trailing zeroes from stripped_version_number
23586   for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
23587   VERSION_NUMBER=$stripped_version_number
23588 
23589   # The complete version string, with additional build information
23590   if test "x$VERSION_BUILD$VERSION_OPT" = x; then
23591     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23592   else
23593     # If either build or opt is set, we need a + separator
23594     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
23595   fi
23596 
23597   # The short version string, just VERSION_NUMBER and PRE, if present.
23598   VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23599 
23600   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
23601 $as_echo_n "checking for version string... " >&6; }
23602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
23603 $as_echo "$VERSION_STRING" >&6; }
23604 
23605 
23606 
23607 
23608 
23609 
23610 
23611 
23612 
23613 
23614 
23615 
23616 
23617 
23618 
23619 ###############################################################################
23620 #
23621 # Setup BootJDK, used to bootstrap the build.
23622 #
23623 ###############################################################################
23624 
23625 
23626   BOOT_JDK_FOUND=no
23627 
23628 # Check whether --with-boot-jdk was given.
23629 if test "${with_boot_jdk+set}" = set; then :
23630   withval=$with_boot_jdk;
23631 fi
23632 
23633 
23634   # We look for the Boot JDK through various means, going from more certain to
23635   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23636   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23637   # must check if this is indeed valid; otherwise we'll continue looking.
23638 
23639   # Test: Is bootjdk explicitely set by command line arguments?
23640 
23641   if test "x$BOOT_JDK_FOUND" = xno; then
23642     # Now execute the test
23643 
23644   if test "x$with_boot_jdk" != x; then
23645     BOOT_JDK=$with_boot_jdk
23646     BOOT_JDK_FOUND=maybe
23647     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23648 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23649   fi
23650 
23651 
23652     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23653     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23654       # Do we have a bin/java?
23655       if test ! -x "$BOOT_JDK/bin/java"; then
23656         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23657 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23658         BOOT_JDK_FOUND=no
23659       else
23660         # Do we have a bin/javac?
23661         if test ! -x "$BOOT_JDK/bin/javac"; then
23662           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23663 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23664           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23665 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23666           BOOT_JDK_FOUND=no
23667         else
23668           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23669           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23670 
23671           # Extra M4 quote needed to protect [] in grep expression.
23672           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23673           if test "x$FOUND_CORRECT_VERSION" = x; then
23674             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23675 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23676             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23677 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23678             BOOT_JDK_FOUND=no
23679           else
23680             # We're done! :-)
23681             BOOT_JDK_FOUND=yes
23682 
23683   # Only process if variable expands to non-empty
23684 
23685   if test "x$BOOT_JDK" != x; then
23686     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23687 
23688   # Input might be given as Windows format, start by converting to
23689   # unix format.
23690   path="$BOOT_JDK"
23691   new_path=`$CYGPATH -u "$path"`
23692 
23693   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23694   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23695   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23696   # "foo.exe" is OK but "foo" is an error.
23697   #
23698   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23699   # It is also a way to make sure we got the proper file name for the real test later on.
23700   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23701   if test "x$test_shortpath" = x; then
23702     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23703 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23704     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23705   fi
23706 
23707   # Call helper function which possibly converts this using DOS-style short mode.
23708   # If so, the updated path is stored in $new_path.
23709 
23710   input_path="$new_path"
23711   # Check if we need to convert this using DOS-style short mode. If the path
23712   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23713   # take no chances and rewrite it.
23714   # Note: m4 eats our [], so we need to use [ and ] instead.
23715   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23716   if test "x$has_forbidden_chars" != x; then
23717     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23718     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23719     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23720     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23721       # Going to short mode and back again did indeed matter. Since short mode is
23722       # case insensitive, let's make it lowercase to improve readability.
23723       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23724       # Now convert it back to Unix-style (cygpath)
23725       input_path=`$CYGPATH -u "$shortmode_path"`
23726       new_path="$input_path"
23727     fi
23728   fi
23729 
23730   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23731   if test "x$test_cygdrive_prefix" = x; then
23732     # As a simple fix, exclude /usr/bin since it's not a real path.
23733     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23734       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23735       # a path prefixed by /cygdrive for fixpath to work.
23736       new_path="$CYGWIN_ROOT_PATH$input_path"
23737     fi
23738   fi
23739 
23740 
23741   if test "x$path" != "x$new_path"; then
23742     BOOT_JDK="$new_path"
23743     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23744 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23745   fi
23746 
23747     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23748 
23749   path="$BOOT_JDK"
23750   has_colon=`$ECHO $path | $GREP ^.:`
23751   new_path="$path"
23752   if test "x$has_colon" = x; then
23753     # Not in mixed or Windows style, start by that.
23754     new_path=`cmd //c echo $path`
23755   fi
23756 
23757 
23758   input_path="$new_path"
23759   # Check if we need to convert this using DOS-style short mode. If the path
23760   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23761   # take no chances and rewrite it.
23762   # Note: m4 eats our [], so we need to use [ and ] instead.
23763   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23764   if test "x$has_forbidden_chars" != x; then
23765     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23766     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23767   fi
23768 
23769 
23770   windows_path="$new_path"
23771   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23772     unix_path=`$CYGPATH -u "$windows_path"`
23773     new_path="$unix_path"
23774   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23775     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23776     new_path="$unix_path"
23777   fi
23778 
23779   if test "x$path" != "x$new_path"; then
23780     BOOT_JDK="$new_path"
23781     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23782 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23783   fi
23784 
23785   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23786   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23787 
23788     else
23789       # We're on a unix platform. Hooray! :)
23790       path="$BOOT_JDK"
23791       has_space=`$ECHO "$path" | $GREP " "`
23792       if test "x$has_space" != x; then
23793         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23794 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23795         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23796       fi
23797 
23798       # Use eval to expand a potential ~
23799       eval path="$path"
23800       if test ! -f "$path" && test ! -d "$path"; then
23801         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23802       fi
23803 
23804       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23805     fi
23806   fi
23807 
23808             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23809 $as_echo_n "checking for Boot JDK... " >&6; }
23810             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23811 $as_echo "$BOOT_JDK" >&6; }
23812             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23813 $as_echo_n "checking Boot JDK version... " >&6; }
23814             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23815             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23816 $as_echo "$BOOT_JDK_VERSION" >&6; }
23817           fi # end check jdk version
23818         fi # end check javac
23819       fi # end check java
23820     fi # end check boot jdk found
23821   fi
23822 
23823   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23824     # Having specified an argument which is incorrect will produce an instant failure;
23825     # we should not go on looking
23826     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23827   fi
23828 
23829   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23830 
23831   if test "x$BOOT_JDK_FOUND" = xno; then
23832     # Now execute the test
23833 
23834   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23835     # First check at user selected default
23836 
23837   if test "x$BOOT_JDK_FOUND" = xno; then
23838     # Now execute the test
23839 
23840   if test -x /usr/libexec/java_home; then
23841     BOOT_JDK=`/usr/libexec/java_home `
23842     BOOT_JDK_FOUND=maybe
23843     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23844 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23845   fi
23846 
23847 
23848     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23849     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23850       # Do we have a bin/java?
23851       if test ! -x "$BOOT_JDK/bin/java"; then
23852         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23853 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23854         BOOT_JDK_FOUND=no
23855       else
23856         # Do we have a bin/javac?
23857         if test ! -x "$BOOT_JDK/bin/javac"; then
23858           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23859 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23860           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23861 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23862           BOOT_JDK_FOUND=no
23863         else
23864           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23865           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23866 
23867           # Extra M4 quote needed to protect [] in grep expression.
23868           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23869           if test "x$FOUND_CORRECT_VERSION" = x; then
23870             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23871 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23872             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23873 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23874             BOOT_JDK_FOUND=no
23875           else
23876             # We're done! :-)
23877             BOOT_JDK_FOUND=yes
23878 
23879   # Only process if variable expands to non-empty
23880 
23881   if test "x$BOOT_JDK" != x; then
23882     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23883 
23884   # Input might be given as Windows format, start by converting to
23885   # unix format.
23886   path="$BOOT_JDK"
23887   new_path=`$CYGPATH -u "$path"`
23888 
23889   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23890   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23891   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23892   # "foo.exe" is OK but "foo" is an error.
23893   #
23894   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23895   # It is also a way to make sure we got the proper file name for the real test later on.
23896   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23897   if test "x$test_shortpath" = x; then
23898     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23899 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23900     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23901   fi
23902 
23903   # Call helper function which possibly converts this using DOS-style short mode.
23904   # If so, the updated path is stored in $new_path.
23905 
23906   input_path="$new_path"
23907   # Check if we need to convert this using DOS-style short mode. If the path
23908   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23909   # take no chances and rewrite it.
23910   # Note: m4 eats our [], so we need to use [ and ] instead.
23911   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23912   if test "x$has_forbidden_chars" != x; then
23913     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23914     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23915     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23916     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23917       # Going to short mode and back again did indeed matter. Since short mode is
23918       # case insensitive, let's make it lowercase to improve readability.
23919       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23920       # Now convert it back to Unix-style (cygpath)
23921       input_path=`$CYGPATH -u "$shortmode_path"`
23922       new_path="$input_path"
23923     fi
23924   fi
23925 
23926   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23927   if test "x$test_cygdrive_prefix" = x; then
23928     # As a simple fix, exclude /usr/bin since it's not a real path.
23929     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23930       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23931       # a path prefixed by /cygdrive for fixpath to work.
23932       new_path="$CYGWIN_ROOT_PATH$input_path"
23933     fi
23934   fi
23935 
23936 
23937   if test "x$path" != "x$new_path"; then
23938     BOOT_JDK="$new_path"
23939     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23940 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23941   fi
23942 
23943     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23944 
23945   path="$BOOT_JDK"
23946   has_colon=`$ECHO $path | $GREP ^.:`
23947   new_path="$path"
23948   if test "x$has_colon" = x; then
23949     # Not in mixed or Windows style, start by that.
23950     new_path=`cmd //c echo $path`
23951   fi
23952 
23953 
23954   input_path="$new_path"
23955   # Check if we need to convert this using DOS-style short mode. If the path
23956   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23957   # take no chances and rewrite it.
23958   # Note: m4 eats our [], so we need to use [ and ] instead.
23959   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23960   if test "x$has_forbidden_chars" != x; then
23961     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23962     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23963   fi
23964 
23965 
23966   windows_path="$new_path"
23967   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23968     unix_path=`$CYGPATH -u "$windows_path"`
23969     new_path="$unix_path"
23970   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23971     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23972     new_path="$unix_path"
23973   fi
23974 
23975   if test "x$path" != "x$new_path"; then
23976     BOOT_JDK="$new_path"
23977     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23978 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23979   fi
23980 
23981   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23982   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23983 
23984     else
23985       # We're on a unix platform. Hooray! :)
23986       path="$BOOT_JDK"
23987       has_space=`$ECHO "$path" | $GREP " "`
23988       if test "x$has_space" != x; then
23989         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23990 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23991         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23992       fi
23993 
23994       # Use eval to expand a potential ~
23995       eval path="$path"
23996       if test ! -f "$path" && test ! -d "$path"; then
23997         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23998       fi
23999 
24000       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24001     fi
24002   fi
24003 
24004             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24005 $as_echo_n "checking for Boot JDK... " >&6; }
24006             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24007 $as_echo "$BOOT_JDK" >&6; }
24008             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24009 $as_echo_n "checking Boot JDK version... " >&6; }
24010             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24011             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24012 $as_echo "$BOOT_JDK_VERSION" >&6; }
24013           fi # end check jdk version
24014         fi # end check javac
24015       fi # end check java
24016     fi # end check boot jdk found
24017   fi
24018 
24019     # If that did not work out (e.g. too old), try explicit versions instead
24020 
24021   if test "x$BOOT_JDK_FOUND" = xno; then
24022     # Now execute the test
24023 
24024   if test -x /usr/libexec/java_home; then
24025     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24026     BOOT_JDK_FOUND=maybe
24027     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24028 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24029   fi
24030 
24031 
24032     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24033     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24034       # Do we have a bin/java?
24035       if test ! -x "$BOOT_JDK/bin/java"; then
24036         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24037 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24038         BOOT_JDK_FOUND=no
24039       else
24040         # Do we have a bin/javac?
24041         if test ! -x "$BOOT_JDK/bin/javac"; then
24042           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24043 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24044           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24045 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24046           BOOT_JDK_FOUND=no
24047         else
24048           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24049           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24050 
24051           # Extra M4 quote needed to protect [] in grep expression.
24052           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24053           if test "x$FOUND_CORRECT_VERSION" = x; then
24054             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24055 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24056             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24057 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24058             BOOT_JDK_FOUND=no
24059           else
24060             # We're done! :-)
24061             BOOT_JDK_FOUND=yes
24062 
24063   # Only process if variable expands to non-empty
24064 
24065   if test "x$BOOT_JDK" != x; then
24066     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24067 
24068   # Input might be given as Windows format, start by converting to
24069   # unix format.
24070   path="$BOOT_JDK"
24071   new_path=`$CYGPATH -u "$path"`
24072 
24073   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24074   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24075   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24076   # "foo.exe" is OK but "foo" is an error.
24077   #
24078   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24079   # It is also a way to make sure we got the proper file name for the real test later on.
24080   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24081   if test "x$test_shortpath" = x; then
24082     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24083 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24084     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24085   fi
24086 
24087   # Call helper function which possibly converts this using DOS-style short mode.
24088   # If so, the updated path is stored in $new_path.
24089 
24090   input_path="$new_path"
24091   # Check if we need to convert this using DOS-style short mode. If the path
24092   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24093   # take no chances and rewrite it.
24094   # Note: m4 eats our [], so we need to use [ and ] instead.
24095   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24096   if test "x$has_forbidden_chars" != x; then
24097     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24098     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24099     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24100     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24101       # Going to short mode and back again did indeed matter. Since short mode is
24102       # case insensitive, let's make it lowercase to improve readability.
24103       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24104       # Now convert it back to Unix-style (cygpath)
24105       input_path=`$CYGPATH -u "$shortmode_path"`
24106       new_path="$input_path"
24107     fi
24108   fi
24109 
24110   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24111   if test "x$test_cygdrive_prefix" = x; then
24112     # As a simple fix, exclude /usr/bin since it's not a real path.
24113     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24114       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24115       # a path prefixed by /cygdrive for fixpath to work.
24116       new_path="$CYGWIN_ROOT_PATH$input_path"
24117     fi
24118   fi
24119 
24120 
24121   if test "x$path" != "x$new_path"; then
24122     BOOT_JDK="$new_path"
24123     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24124 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24125   fi
24126 
24127     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24128 
24129   path="$BOOT_JDK"
24130   has_colon=`$ECHO $path | $GREP ^.:`
24131   new_path="$path"
24132   if test "x$has_colon" = x; then
24133     # Not in mixed or Windows style, start by that.
24134     new_path=`cmd //c echo $path`
24135   fi
24136 
24137 
24138   input_path="$new_path"
24139   # Check if we need to convert this using DOS-style short mode. If the path
24140   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24141   # take no chances and rewrite it.
24142   # Note: m4 eats our [], so we need to use [ and ] instead.
24143   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24144   if test "x$has_forbidden_chars" != x; then
24145     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24146     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24147   fi
24148 
24149 
24150   windows_path="$new_path"
24151   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24152     unix_path=`$CYGPATH -u "$windows_path"`
24153     new_path="$unix_path"
24154   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24155     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24156     new_path="$unix_path"
24157   fi
24158 
24159   if test "x$path" != "x$new_path"; then
24160     BOOT_JDK="$new_path"
24161     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24162 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24163   fi
24164 
24165   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24166   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24167 
24168     else
24169       # We're on a unix platform. Hooray! :)
24170       path="$BOOT_JDK"
24171       has_space=`$ECHO "$path" | $GREP " "`
24172       if test "x$has_space" != x; then
24173         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24174 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24175         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24176       fi
24177 
24178       # Use eval to expand a potential ~
24179       eval path="$path"
24180       if test ! -f "$path" && test ! -d "$path"; then
24181         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24182       fi
24183 
24184       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24185     fi
24186   fi
24187 
24188             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24189 $as_echo_n "checking for Boot JDK... " >&6; }
24190             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24191 $as_echo "$BOOT_JDK" >&6; }
24192             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24193 $as_echo_n "checking Boot JDK version... " >&6; }
24194             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24195             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24196 $as_echo "$BOOT_JDK_VERSION" >&6; }
24197           fi # end check jdk version
24198         fi # end check javac
24199       fi # end check java
24200     fi # end check boot jdk found
24201   fi
24202 
24203 
24204   if test "x$BOOT_JDK_FOUND" = xno; then
24205     # Now execute the test
24206 
24207   if test -x /usr/libexec/java_home; then
24208     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24209     BOOT_JDK_FOUND=maybe
24210     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24211 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24212   fi
24213 
24214 
24215     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24216     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24217       # Do we have a bin/java?
24218       if test ! -x "$BOOT_JDK/bin/java"; then
24219         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24220 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24221         BOOT_JDK_FOUND=no
24222       else
24223         # Do we have a bin/javac?
24224         if test ! -x "$BOOT_JDK/bin/javac"; then
24225           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24226 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24227           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24228 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24229           BOOT_JDK_FOUND=no
24230         else
24231           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24232           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24233 
24234           # Extra M4 quote needed to protect [] in grep expression.
24235           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24236           if test "x$FOUND_CORRECT_VERSION" = x; then
24237             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24238 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24239             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24240 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24241             BOOT_JDK_FOUND=no
24242           else
24243             # We're done! :-)
24244             BOOT_JDK_FOUND=yes
24245 
24246   # Only process if variable expands to non-empty
24247 
24248   if test "x$BOOT_JDK" != x; then
24249     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24250 
24251   # Input might be given as Windows format, start by converting to
24252   # unix format.
24253   path="$BOOT_JDK"
24254   new_path=`$CYGPATH -u "$path"`
24255 
24256   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24257   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24258   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24259   # "foo.exe" is OK but "foo" is an error.
24260   #
24261   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24262   # It is also a way to make sure we got the proper file name for the real test later on.
24263   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24264   if test "x$test_shortpath" = x; then
24265     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24266 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24267     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24268   fi
24269 
24270   # Call helper function which possibly converts this using DOS-style short mode.
24271   # If so, the updated path is stored in $new_path.
24272 
24273   input_path="$new_path"
24274   # Check if we need to convert this using DOS-style short mode. If the path
24275   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24276   # take no chances and rewrite it.
24277   # Note: m4 eats our [], so we need to use [ and ] instead.
24278   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24279   if test "x$has_forbidden_chars" != x; then
24280     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24281     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24282     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24283     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24284       # Going to short mode and back again did indeed matter. Since short mode is
24285       # case insensitive, let's make it lowercase to improve readability.
24286       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24287       # Now convert it back to Unix-style (cygpath)
24288       input_path=`$CYGPATH -u "$shortmode_path"`
24289       new_path="$input_path"
24290     fi
24291   fi
24292 
24293   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24294   if test "x$test_cygdrive_prefix" = x; then
24295     # As a simple fix, exclude /usr/bin since it's not a real path.
24296     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24297       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24298       # a path prefixed by /cygdrive for fixpath to work.
24299       new_path="$CYGWIN_ROOT_PATH$input_path"
24300     fi
24301   fi
24302 
24303 
24304   if test "x$path" != "x$new_path"; then
24305     BOOT_JDK="$new_path"
24306     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24307 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24308   fi
24309 
24310     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24311 
24312   path="$BOOT_JDK"
24313   has_colon=`$ECHO $path | $GREP ^.:`
24314   new_path="$path"
24315   if test "x$has_colon" = x; then
24316     # Not in mixed or Windows style, start by that.
24317     new_path=`cmd //c echo $path`
24318   fi
24319 
24320 
24321   input_path="$new_path"
24322   # Check if we need to convert this using DOS-style short mode. If the path
24323   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24324   # take no chances and rewrite it.
24325   # Note: m4 eats our [], so we need to use [ and ] instead.
24326   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24327   if test "x$has_forbidden_chars" != x; then
24328     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24329     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24330   fi
24331 
24332 
24333   windows_path="$new_path"
24334   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24335     unix_path=`$CYGPATH -u "$windows_path"`
24336     new_path="$unix_path"
24337   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24338     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24339     new_path="$unix_path"
24340   fi
24341 
24342   if test "x$path" != "x$new_path"; then
24343     BOOT_JDK="$new_path"
24344     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24345 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24346   fi
24347 
24348   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24349   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24350 
24351     else
24352       # We're on a unix platform. Hooray! :)
24353       path="$BOOT_JDK"
24354       has_space=`$ECHO "$path" | $GREP " "`
24355       if test "x$has_space" != x; then
24356         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24357 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24358         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24359       fi
24360 
24361       # Use eval to expand a potential ~
24362       eval path="$path"
24363       if test ! -f "$path" && test ! -d "$path"; then
24364         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24365       fi
24366 
24367       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24368     fi
24369   fi
24370 
24371             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24372 $as_echo_n "checking for Boot JDK... " >&6; }
24373             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24374 $as_echo "$BOOT_JDK" >&6; }
24375             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24376 $as_echo_n "checking Boot JDK version... " >&6; }
24377             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24378             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24379 $as_echo "$BOOT_JDK_VERSION" >&6; }
24380           fi # end check jdk version
24381         fi # end check javac
24382       fi # end check java
24383     fi # end check boot jdk found
24384   fi
24385 
24386 
24387   if test "x$BOOT_JDK_FOUND" = xno; then
24388     # Now execute the test
24389 
24390   if test -x /usr/libexec/java_home; then
24391     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
24392     BOOT_JDK_FOUND=maybe
24393     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
24394 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
24395   fi
24396 
24397 
24398     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24399     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24400       # Do we have a bin/java?
24401       if test ! -x "$BOOT_JDK/bin/java"; then
24402         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24403 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24404         BOOT_JDK_FOUND=no
24405       else
24406         # Do we have a bin/javac?
24407         if test ! -x "$BOOT_JDK/bin/javac"; then
24408           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24409 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24410           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24411 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24412           BOOT_JDK_FOUND=no
24413         else
24414           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24415           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24416 
24417           # Extra M4 quote needed to protect [] in grep expression.
24418           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24419           if test "x$FOUND_CORRECT_VERSION" = x; then
24420             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24421 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24422             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24423 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24424             BOOT_JDK_FOUND=no
24425           else
24426             # We're done! :-)
24427             BOOT_JDK_FOUND=yes
24428 
24429   # Only process if variable expands to non-empty
24430 
24431   if test "x$BOOT_JDK" != x; then
24432     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24433 
24434   # Input might be given as Windows format, start by converting to
24435   # unix format.
24436   path="$BOOT_JDK"
24437   new_path=`$CYGPATH -u "$path"`
24438 
24439   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24440   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24441   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24442   # "foo.exe" is OK but "foo" is an error.
24443   #
24444   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24445   # It is also a way to make sure we got the proper file name for the real test later on.
24446   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24447   if test "x$test_shortpath" = x; then
24448     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24449 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24450     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24451   fi
24452 
24453   # Call helper function which possibly converts this using DOS-style short mode.
24454   # If so, the updated path is stored in $new_path.
24455 
24456   input_path="$new_path"
24457   # Check if we need to convert this using DOS-style short mode. If the path
24458   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24459   # take no chances and rewrite it.
24460   # Note: m4 eats our [], so we need to use [ and ] instead.
24461   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24462   if test "x$has_forbidden_chars" != x; then
24463     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24464     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24465     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24466     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24467       # Going to short mode and back again did indeed matter. Since short mode is
24468       # case insensitive, let's make it lowercase to improve readability.
24469       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24470       # Now convert it back to Unix-style (cygpath)
24471       input_path=`$CYGPATH -u "$shortmode_path"`
24472       new_path="$input_path"
24473     fi
24474   fi
24475 
24476   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24477   if test "x$test_cygdrive_prefix" = x; then
24478     # As a simple fix, exclude /usr/bin since it's not a real path.
24479     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24480       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24481       # a path prefixed by /cygdrive for fixpath to work.
24482       new_path="$CYGWIN_ROOT_PATH$input_path"
24483     fi
24484   fi
24485 
24486 
24487   if test "x$path" != "x$new_path"; then
24488     BOOT_JDK="$new_path"
24489     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24490 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24491   fi
24492 
24493     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24494 
24495   path="$BOOT_JDK"
24496   has_colon=`$ECHO $path | $GREP ^.:`
24497   new_path="$path"
24498   if test "x$has_colon" = x; then
24499     # Not in mixed or Windows style, start by that.
24500     new_path=`cmd //c echo $path`
24501   fi
24502 
24503 
24504   input_path="$new_path"
24505   # Check if we need to convert this using DOS-style short mode. If the path
24506   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24507   # take no chances and rewrite it.
24508   # Note: m4 eats our [], so we need to use [ and ] instead.
24509   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24510   if test "x$has_forbidden_chars" != x; then
24511     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24512     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24513   fi
24514 
24515 
24516   windows_path="$new_path"
24517   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24518     unix_path=`$CYGPATH -u "$windows_path"`
24519     new_path="$unix_path"
24520   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24521     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24522     new_path="$unix_path"
24523   fi
24524 
24525   if test "x$path" != "x$new_path"; then
24526     BOOT_JDK="$new_path"
24527     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24528 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24529   fi
24530 
24531   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24532   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24533 
24534     else
24535       # We're on a unix platform. Hooray! :)
24536       path="$BOOT_JDK"
24537       has_space=`$ECHO "$path" | $GREP " "`
24538       if test "x$has_space" != x; then
24539         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24540 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24541         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24542       fi
24543 
24544       # Use eval to expand a potential ~
24545       eval path="$path"
24546       if test ! -f "$path" && test ! -d "$path"; then
24547         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24548       fi
24549 
24550       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24551     fi
24552   fi
24553 
24554             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24555 $as_echo_n "checking for Boot JDK... " >&6; }
24556             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24557 $as_echo "$BOOT_JDK" >&6; }
24558             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24559 $as_echo_n "checking Boot JDK version... " >&6; }
24560             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24561             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24562 $as_echo "$BOOT_JDK_VERSION" >&6; }
24563           fi # end check jdk version
24564         fi # end check javac
24565       fi # end check java
24566     fi # end check boot jdk found
24567   fi
24568 
24569   fi
24570 
24571 
24572     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24573     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24574       # Do we have a bin/java?
24575       if test ! -x "$BOOT_JDK/bin/java"; then
24576         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24577 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24578         BOOT_JDK_FOUND=no
24579       else
24580         # Do we have a bin/javac?
24581         if test ! -x "$BOOT_JDK/bin/javac"; then
24582           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24583 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24584           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24585 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24586           BOOT_JDK_FOUND=no
24587         else
24588           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24589           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24590 
24591           # Extra M4 quote needed to protect [] in grep expression.
24592           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24593           if test "x$FOUND_CORRECT_VERSION" = x; then
24594             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24595 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24596             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24597 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24598             BOOT_JDK_FOUND=no
24599           else
24600             # We're done! :-)
24601             BOOT_JDK_FOUND=yes
24602 
24603   # Only process if variable expands to non-empty
24604 
24605   if test "x$BOOT_JDK" != x; then
24606     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24607 
24608   # Input might be given as Windows format, start by converting to
24609   # unix format.
24610   path="$BOOT_JDK"
24611   new_path=`$CYGPATH -u "$path"`
24612 
24613   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24614   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24615   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24616   # "foo.exe" is OK but "foo" is an error.
24617   #
24618   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24619   # It is also a way to make sure we got the proper file name for the real test later on.
24620   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24621   if test "x$test_shortpath" = x; then
24622     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24623 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24624     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24625   fi
24626 
24627   # Call helper function which possibly converts this using DOS-style short mode.
24628   # If so, the updated path is stored in $new_path.
24629 
24630   input_path="$new_path"
24631   # Check if we need to convert this using DOS-style short mode. If the path
24632   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24633   # take no chances and rewrite it.
24634   # Note: m4 eats our [], so we need to use [ and ] instead.
24635   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24636   if test "x$has_forbidden_chars" != x; then
24637     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24638     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24639     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24640     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24641       # Going to short mode and back again did indeed matter. Since short mode is
24642       # case insensitive, let's make it lowercase to improve readability.
24643       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24644       # Now convert it back to Unix-style (cygpath)
24645       input_path=`$CYGPATH -u "$shortmode_path"`
24646       new_path="$input_path"
24647     fi
24648   fi
24649 
24650   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24651   if test "x$test_cygdrive_prefix" = x; then
24652     # As a simple fix, exclude /usr/bin since it's not a real path.
24653     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24654       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24655       # a path prefixed by /cygdrive for fixpath to work.
24656       new_path="$CYGWIN_ROOT_PATH$input_path"
24657     fi
24658   fi
24659 
24660 
24661   if test "x$path" != "x$new_path"; then
24662     BOOT_JDK="$new_path"
24663     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24664 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24665   fi
24666 
24667     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24668 
24669   path="$BOOT_JDK"
24670   has_colon=`$ECHO $path | $GREP ^.:`
24671   new_path="$path"
24672   if test "x$has_colon" = x; then
24673     # Not in mixed or Windows style, start by that.
24674     new_path=`cmd //c echo $path`
24675   fi
24676 
24677 
24678   input_path="$new_path"
24679   # Check if we need to convert this using DOS-style short mode. If the path
24680   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24681   # take no chances and rewrite it.
24682   # Note: m4 eats our [], so we need to use [ and ] instead.
24683   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24684   if test "x$has_forbidden_chars" != x; then
24685     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24686     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24687   fi
24688 
24689 
24690   windows_path="$new_path"
24691   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24692     unix_path=`$CYGPATH -u "$windows_path"`
24693     new_path="$unix_path"
24694   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24695     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24696     new_path="$unix_path"
24697   fi
24698 
24699   if test "x$path" != "x$new_path"; then
24700     BOOT_JDK="$new_path"
24701     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24702 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24703   fi
24704 
24705   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24706   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24707 
24708     else
24709       # We're on a unix platform. Hooray! :)
24710       path="$BOOT_JDK"
24711       has_space=`$ECHO "$path" | $GREP " "`
24712       if test "x$has_space" != x; then
24713         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24714 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24715         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24716       fi
24717 
24718       # Use eval to expand a potential ~
24719       eval path="$path"
24720       if test ! -f "$path" && test ! -d "$path"; then
24721         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24722       fi
24723 
24724       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24725     fi
24726   fi
24727 
24728             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24729 $as_echo_n "checking for Boot JDK... " >&6; }
24730             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24731 $as_echo "$BOOT_JDK" >&6; }
24732             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24733 $as_echo_n "checking Boot JDK version... " >&6; }
24734             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24735             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24736 $as_echo "$BOOT_JDK_VERSION" >&6; }
24737           fi # end check jdk version
24738         fi # end check javac
24739       fi # end check java
24740     fi # end check boot jdk found
24741   fi
24742 
24743 
24744   # Test: Is $JAVA_HOME set?
24745 
24746   if test "x$BOOT_JDK_FOUND" = xno; then
24747     # Now execute the test
24748 
24749   if test "x$JAVA_HOME" != x; then
24750     JAVA_HOME_PROCESSED="$JAVA_HOME"
24751 
24752   # Only process if variable expands to non-empty
24753 
24754   if test "x$JAVA_HOME_PROCESSED" != x; then
24755     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24756 
24757   # Input might be given as Windows format, start by converting to
24758   # unix format.
24759   path="$JAVA_HOME_PROCESSED"
24760   new_path=`$CYGPATH -u "$path"`
24761 
24762   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24763   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24764   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24765   # "foo.exe" is OK but "foo" is an error.
24766   #
24767   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24768   # It is also a way to make sure we got the proper file name for the real test later on.
24769   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24770   if test "x$test_shortpath" = x; then
24771     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24772 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24773     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24774   fi
24775 
24776   # Call helper function which possibly converts this using DOS-style short mode.
24777   # If so, the updated path is stored in $new_path.
24778 
24779   input_path="$new_path"
24780   # Check if we need to convert this using DOS-style short mode. If the path
24781   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24782   # take no chances and rewrite it.
24783   # Note: m4 eats our [], so we need to use [ and ] instead.
24784   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24785   if test "x$has_forbidden_chars" != x; then
24786     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24787     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24788     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24789     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24790       # Going to short mode and back again did indeed matter. Since short mode is
24791       # case insensitive, let's make it lowercase to improve readability.
24792       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24793       # Now convert it back to Unix-style (cygpath)
24794       input_path=`$CYGPATH -u "$shortmode_path"`
24795       new_path="$input_path"
24796     fi
24797   fi
24798 
24799   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24800   if test "x$test_cygdrive_prefix" = x; then
24801     # As a simple fix, exclude /usr/bin since it's not a real path.
24802     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24803       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24804       # a path prefixed by /cygdrive for fixpath to work.
24805       new_path="$CYGWIN_ROOT_PATH$input_path"
24806     fi
24807   fi
24808 
24809 
24810   if test "x$path" != "x$new_path"; then
24811     JAVA_HOME_PROCESSED="$new_path"
24812     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24813 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24814   fi
24815 
24816     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24817 
24818   path="$JAVA_HOME_PROCESSED"
24819   has_colon=`$ECHO $path | $GREP ^.:`
24820   new_path="$path"
24821   if test "x$has_colon" = x; then
24822     # Not in mixed or Windows style, start by that.
24823     new_path=`cmd //c echo $path`
24824   fi
24825 
24826 
24827   input_path="$new_path"
24828   # Check if we need to convert this using DOS-style short mode. If the path
24829   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24830   # take no chances and rewrite it.
24831   # Note: m4 eats our [], so we need to use [ and ] instead.
24832   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24833   if test "x$has_forbidden_chars" != x; then
24834     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24835     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24836   fi
24837 
24838 
24839   windows_path="$new_path"
24840   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24841     unix_path=`$CYGPATH -u "$windows_path"`
24842     new_path="$unix_path"
24843   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24844     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24845     new_path="$unix_path"
24846   fi
24847 
24848   if test "x$path" != "x$new_path"; then
24849     JAVA_HOME_PROCESSED="$new_path"
24850     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24851 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24852   fi
24853 
24854   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24855   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24856 
24857     else
24858       # We're on a unix platform. Hooray! :)
24859       path="$JAVA_HOME_PROCESSED"
24860       has_space=`$ECHO "$path" | $GREP " "`
24861       if test "x$has_space" != x; then
24862         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24863 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24864         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24865       fi
24866 
24867       # Use eval to expand a potential ~
24868       eval path="$path"
24869       if test ! -f "$path" && test ! -d "$path"; then
24870         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
24871       fi
24872 
24873       JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
24874     fi
24875   fi
24876 
24877     if test ! -d "$JAVA_HOME_PROCESSED"; then
24878       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
24879 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
24880     else
24881       # Aha, the user has set a JAVA_HOME
24882       # let us use that as the Boot JDK.
24883       BOOT_JDK="$JAVA_HOME_PROCESSED"
24884       BOOT_JDK_FOUND=maybe
24885       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
24886 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
24887     fi
24888   fi
24889 
24890 
24891     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24892     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24893       # Do we have a bin/java?
24894       if test ! -x "$BOOT_JDK/bin/java"; then
24895         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24896 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24897         BOOT_JDK_FOUND=no
24898       else
24899         # Do we have a bin/javac?
24900         if test ! -x "$BOOT_JDK/bin/javac"; then
24901           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24902 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24903           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24904 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24905           BOOT_JDK_FOUND=no
24906         else
24907           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24908           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24909 
24910           # Extra M4 quote needed to protect [] in grep expression.
24911           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24912           if test "x$FOUND_CORRECT_VERSION" = x; then
24913             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24914 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24915             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24916 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24917             BOOT_JDK_FOUND=no
24918           else
24919             # We're done! :-)
24920             BOOT_JDK_FOUND=yes
24921 
24922   # Only process if variable expands to non-empty
24923 
24924   if test "x$BOOT_JDK" != x; then
24925     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24926 
24927   # Input might be given as Windows format, start by converting to
24928   # unix format.
24929   path="$BOOT_JDK"
24930   new_path=`$CYGPATH -u "$path"`
24931 
24932   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24933   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24934   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24935   # "foo.exe" is OK but "foo" is an error.
24936   #
24937   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24938   # It is also a way to make sure we got the proper file name for the real test later on.
24939   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24940   if test "x$test_shortpath" = x; then
24941     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24942 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24943     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24944   fi
24945 
24946   # Call helper function which possibly converts this using DOS-style short mode.
24947   # If so, the updated path is stored in $new_path.
24948 
24949   input_path="$new_path"
24950   # Check if we need to convert this using DOS-style short mode. If the path
24951   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24952   # take no chances and rewrite it.
24953   # Note: m4 eats our [], so we need to use [ and ] instead.
24954   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24955   if test "x$has_forbidden_chars" != x; then
24956     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24957     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24958     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24959     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24960       # Going to short mode and back again did indeed matter. Since short mode is
24961       # case insensitive, let's make it lowercase to improve readability.
24962       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24963       # Now convert it back to Unix-style (cygpath)
24964       input_path=`$CYGPATH -u "$shortmode_path"`
24965       new_path="$input_path"
24966     fi
24967   fi
24968 
24969   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24970   if test "x$test_cygdrive_prefix" = x; then
24971     # As a simple fix, exclude /usr/bin since it's not a real path.
24972     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24973       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24974       # a path prefixed by /cygdrive for fixpath to work.
24975       new_path="$CYGWIN_ROOT_PATH$input_path"
24976     fi
24977   fi
24978 
24979 
24980   if test "x$path" != "x$new_path"; then
24981     BOOT_JDK="$new_path"
24982     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24983 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24984   fi
24985 
24986     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24987 
24988   path="$BOOT_JDK"
24989   has_colon=`$ECHO $path | $GREP ^.:`
24990   new_path="$path"
24991   if test "x$has_colon" = x; then
24992     # Not in mixed or Windows style, start by that.
24993     new_path=`cmd //c echo $path`
24994   fi
24995 
24996 
24997   input_path="$new_path"
24998   # Check if we need to convert this using DOS-style short mode. If the path
24999   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25000   # take no chances and rewrite it.
25001   # Note: m4 eats our [], so we need to use [ and ] instead.
25002   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25003   if test "x$has_forbidden_chars" != x; then
25004     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25005     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25006   fi
25007 
25008 
25009   windows_path="$new_path"
25010   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25011     unix_path=`$CYGPATH -u "$windows_path"`
25012     new_path="$unix_path"
25013   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25014     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25015     new_path="$unix_path"
25016   fi
25017 
25018   if test "x$path" != "x$new_path"; then
25019     BOOT_JDK="$new_path"
25020     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25021 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25022   fi
25023 
25024   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25025   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25026 
25027     else
25028       # We're on a unix platform. Hooray! :)
25029       path="$BOOT_JDK"
25030       has_space=`$ECHO "$path" | $GREP " "`
25031       if test "x$has_space" != x; then
25032         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25033 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25034         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25035       fi
25036 
25037       # Use eval to expand a potential ~
25038       eval path="$path"
25039       if test ! -f "$path" && test ! -d "$path"; then
25040         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25041       fi
25042 
25043       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25044     fi
25045   fi
25046 
25047             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25048 $as_echo_n "checking for Boot JDK... " >&6; }
25049             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25050 $as_echo "$BOOT_JDK" >&6; }
25051             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25052 $as_echo_n "checking Boot JDK version... " >&6; }
25053             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25054             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25055 $as_echo "$BOOT_JDK_VERSION" >&6; }
25056           fi # end check jdk version
25057         fi # end check javac
25058       fi # end check java
25059     fi # end check boot jdk found
25060   fi
25061 
25062 
25063   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25064 
25065   if test "x$BOOT_JDK_FOUND" = xno; then
25066     # Now execute the test
25067 
25068   # Extract the first word of "javac", so it can be a program name with args.
25069 set dummy javac; ac_word=$2
25070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25071 $as_echo_n "checking for $ac_word... " >&6; }
25072 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25073   $as_echo_n "(cached) " >&6
25074 else
25075   case $JAVAC_CHECK in
25076   [\\/]* | ?:[\\/]*)
25077   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25078   ;;
25079   *)
25080   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25081 for as_dir in $PATH
25082 do
25083   IFS=$as_save_IFS
25084   test -z "$as_dir" && as_dir=.
25085     for ac_exec_ext in '' $ac_executable_extensions; do
25086   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25087     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25088     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25089     break 2
25090   fi
25091 done
25092   done
25093 IFS=$as_save_IFS
25094 
25095   ;;
25096 esac
25097 fi
25098 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25099 if test -n "$JAVAC_CHECK"; then
25100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25101 $as_echo "$JAVAC_CHECK" >&6; }
25102 else
25103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25104 $as_echo "no" >&6; }
25105 fi
25106 
25107 
25108   # Extract the first word of "java", so it can be a program name with args.
25109 set dummy java; ac_word=$2
25110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25111 $as_echo_n "checking for $ac_word... " >&6; }
25112 if ${ac_cv_path_JAVA_CHECK+:} false; then :
25113   $as_echo_n "(cached) " >&6
25114 else
25115   case $JAVA_CHECK in
25116   [\\/]* | ?:[\\/]*)
25117   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25118   ;;
25119   *)
25120   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25121 for as_dir in $PATH
25122 do
25123   IFS=$as_save_IFS
25124   test -z "$as_dir" && as_dir=.
25125     for ac_exec_ext in '' $ac_executable_extensions; do
25126   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25127     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25128     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25129     break 2
25130   fi
25131 done
25132   done
25133 IFS=$as_save_IFS
25134 
25135   ;;
25136 esac
25137 fi
25138 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25139 if test -n "$JAVA_CHECK"; then
25140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25141 $as_echo "$JAVA_CHECK" >&6; }
25142 else
25143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25144 $as_echo "no" >&6; }
25145 fi
25146 
25147 
25148   BINARY="$JAVAC_CHECK"
25149   if test "x$JAVAC_CHECK" = x; then
25150     BINARY="$JAVA_CHECK"
25151   fi
25152   if test "x$BINARY" != x; then
25153     # So there is a java(c) binary, it might be part of a JDK.
25154     # Lets find the JDK/JRE directory by following symbolic links.
25155     # Linux/GNU systems often have links from /usr/bin/java to
25156     # /etc/alternatives/java to the real JDK binary.
25157 
25158   if test "x$OPENJDK_BUILD_OS" != xwindows; then
25159     # Follow a chain of symbolic links. Use readlink
25160     # where it exists, else fall back to horribly
25161     # complicated shell code.
25162     if test "x$READLINK_TESTED" != yes; then
25163       # On MacOSX there is a readlink tool with a different
25164       # purpose than the GNU readlink tool. Check the found readlink.
25165       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25166       if test "x$ISGNU" = x; then
25167         # A readlink that we do not know how to use.
25168         # Are there other non-GNU readlinks out there?
25169         READLINK_TESTED=yes
25170         READLINK=
25171       fi
25172     fi
25173 
25174     if test "x$READLINK" != x; then
25175       BINARY=`$READLINK -f $BINARY`
25176     else
25177       # Save the current directory for restoring afterwards
25178       STARTDIR=$PWD
25179       COUNTER=0
25180       sym_link_dir=`$DIRNAME $BINARY`
25181       sym_link_file=`$BASENAME $BINARY`
25182       cd $sym_link_dir
25183       # Use -P flag to resolve symlinks in directories.
25184       cd `$THEPWDCMD -P`
25185       sym_link_dir=`$THEPWDCMD -P`
25186       # Resolve file symlinks
25187       while test $COUNTER -lt 20; do
25188         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25189         if test "x$ISLINK" == x; then
25190           # This is not a symbolic link! We are done!
25191           break
25192         fi
25193         # Again resolve directory symlinks since the target of the just found
25194         # link could be in a different directory
25195         cd `$DIRNAME $ISLINK`
25196         sym_link_dir=`$THEPWDCMD -P`
25197         sym_link_file=`$BASENAME $ISLINK`
25198         let COUNTER=COUNTER+1
25199       done
25200       cd $STARTDIR
25201       BINARY=$sym_link_dir/$sym_link_file
25202     fi
25203   fi
25204 
25205     BOOT_JDK=`dirname "$BINARY"`
25206     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25207     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25208       # Looks like we found ourselves an JDK
25209       BOOT_JDK_FOUND=maybe
25210       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25211 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25212     fi
25213   fi
25214 
25215 
25216     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25217     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25218       # Do we have a bin/java?
25219       if test ! -x "$BOOT_JDK/bin/java"; then
25220         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25221 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25222         BOOT_JDK_FOUND=no
25223       else
25224         # Do we have a bin/javac?
25225         if test ! -x "$BOOT_JDK/bin/javac"; then
25226           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25227 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25228           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25229 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25230           BOOT_JDK_FOUND=no
25231         else
25232           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25233           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25234 
25235           # Extra M4 quote needed to protect [] in grep expression.
25236           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25237           if test "x$FOUND_CORRECT_VERSION" = x; then
25238             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25239 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25240             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25241 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25242             BOOT_JDK_FOUND=no
25243           else
25244             # We're done! :-)
25245             BOOT_JDK_FOUND=yes
25246 
25247   # Only process if variable expands to non-empty
25248 
25249   if test "x$BOOT_JDK" != x; then
25250     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25251 
25252   # Input might be given as Windows format, start by converting to
25253   # unix format.
25254   path="$BOOT_JDK"
25255   new_path=`$CYGPATH -u "$path"`
25256 
25257   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25258   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25259   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25260   # "foo.exe" is OK but "foo" is an error.
25261   #
25262   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25263   # It is also a way to make sure we got the proper file name for the real test later on.
25264   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25265   if test "x$test_shortpath" = x; then
25266     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25267 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25268     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25269   fi
25270 
25271   # Call helper function which possibly converts this using DOS-style short mode.
25272   # If so, the updated path is stored in $new_path.
25273 
25274   input_path="$new_path"
25275   # Check if we need to convert this using DOS-style short mode. If the path
25276   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25277   # take no chances and rewrite it.
25278   # Note: m4 eats our [], so we need to use [ and ] instead.
25279   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25280   if test "x$has_forbidden_chars" != x; then
25281     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25282     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25283     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25284     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25285       # Going to short mode and back again did indeed matter. Since short mode is
25286       # case insensitive, let's make it lowercase to improve readability.
25287       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25288       # Now convert it back to Unix-style (cygpath)
25289       input_path=`$CYGPATH -u "$shortmode_path"`
25290       new_path="$input_path"
25291     fi
25292   fi
25293 
25294   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25295   if test "x$test_cygdrive_prefix" = x; then
25296     # As a simple fix, exclude /usr/bin since it's not a real path.
25297     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25298       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25299       # a path prefixed by /cygdrive for fixpath to work.
25300       new_path="$CYGWIN_ROOT_PATH$input_path"
25301     fi
25302   fi
25303 
25304 
25305   if test "x$path" != "x$new_path"; then
25306     BOOT_JDK="$new_path"
25307     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25308 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25309   fi
25310 
25311     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25312 
25313   path="$BOOT_JDK"
25314   has_colon=`$ECHO $path | $GREP ^.:`
25315   new_path="$path"
25316   if test "x$has_colon" = x; then
25317     # Not in mixed or Windows style, start by that.
25318     new_path=`cmd //c echo $path`
25319   fi
25320 
25321 
25322   input_path="$new_path"
25323   # Check if we need to convert this using DOS-style short mode. If the path
25324   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25325   # take no chances and rewrite it.
25326   # Note: m4 eats our [], so we need to use [ and ] instead.
25327   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25328   if test "x$has_forbidden_chars" != x; then
25329     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25330     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25331   fi
25332 
25333 
25334   windows_path="$new_path"
25335   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25336     unix_path=`$CYGPATH -u "$windows_path"`
25337     new_path="$unix_path"
25338   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25339     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25340     new_path="$unix_path"
25341   fi
25342 
25343   if test "x$path" != "x$new_path"; then
25344     BOOT_JDK="$new_path"
25345     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25346 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25347   fi
25348 
25349   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25350   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25351 
25352     else
25353       # We're on a unix platform. Hooray! :)
25354       path="$BOOT_JDK"
25355       has_space=`$ECHO "$path" | $GREP " "`
25356       if test "x$has_space" != x; then
25357         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25358 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25359         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25360       fi
25361 
25362       # Use eval to expand a potential ~
25363       eval path="$path"
25364       if test ! -f "$path" && test ! -d "$path"; then
25365         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25366       fi
25367 
25368       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25369     fi
25370   fi
25371 
25372             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25373 $as_echo_n "checking for Boot JDK... " >&6; }
25374             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25375 $as_echo "$BOOT_JDK" >&6; }
25376             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25377 $as_echo_n "checking Boot JDK version... " >&6; }
25378             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25379             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25380 $as_echo "$BOOT_JDK_VERSION" >&6; }
25381           fi # end check jdk version
25382         fi # end check javac
25383       fi # end check java
25384     fi # end check boot jdk found
25385   fi
25386 
25387 
25388   # Test: Is there a JDK installed in default, well-known locations?
25389 
25390   if test "x$BOOT_JDK_FOUND" = xno; then
25391     # Now execute the test
25392 
25393   if test "x$OPENJDK_TARGET_OS" = xwindows; then
25394 
25395   if test "x$BOOT_JDK_FOUND" = xno; then
25396     # Now execute the test
25397 
25398   if test "x$ProgramW6432" != x; then
25399     VIRTUAL_DIR="$ProgramW6432/Java"
25400 
25401   windows_path="$VIRTUAL_DIR"
25402   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25403     unix_path=`$CYGPATH -u "$windows_path"`
25404     VIRTUAL_DIR="$unix_path"
25405   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25406     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25407     VIRTUAL_DIR="$unix_path"
25408   fi
25409 
25410 
25411   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25412   BOOT_JDK_SUFFIX=""
25413   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25414   if test "x$ALL_JDKS_FOUND" != x; then
25415     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25416 
25417   if test "x$BOOT_JDK_FOUND" = xno; then
25418     # Now execute the test
25419 
25420         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25421         if test -d "$BOOT_JDK"; then
25422           BOOT_JDK_FOUND=maybe
25423           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25424 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25425         fi
25426 
25427 
25428     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25429     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25430       # Do we have a bin/java?
25431       if test ! -x "$BOOT_JDK/bin/java"; then
25432         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25433 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25434         BOOT_JDK_FOUND=no
25435       else
25436         # Do we have a bin/javac?
25437         if test ! -x "$BOOT_JDK/bin/javac"; then
25438           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25439 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25440           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25441 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25442           BOOT_JDK_FOUND=no
25443         else
25444           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25445           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25446 
25447           # Extra M4 quote needed to protect [] in grep expression.
25448           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25449           if test "x$FOUND_CORRECT_VERSION" = x; then
25450             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25451 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25452             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25453 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25454             BOOT_JDK_FOUND=no
25455           else
25456             # We're done! :-)
25457             BOOT_JDK_FOUND=yes
25458 
25459   # Only process if variable expands to non-empty
25460 
25461   if test "x$BOOT_JDK" != x; then
25462     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25463 
25464   # Input might be given as Windows format, start by converting to
25465   # unix format.
25466   path="$BOOT_JDK"
25467   new_path=`$CYGPATH -u "$path"`
25468 
25469   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25470   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25471   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25472   # "foo.exe" is OK but "foo" is an error.
25473   #
25474   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25475   # It is also a way to make sure we got the proper file name for the real test later on.
25476   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25477   if test "x$test_shortpath" = x; then
25478     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25479 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25480     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25481   fi
25482 
25483   # Call helper function which possibly converts this using DOS-style short mode.
25484   # If so, the updated path is stored in $new_path.
25485 
25486   input_path="$new_path"
25487   # Check if we need to convert this using DOS-style short mode. If the path
25488   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25489   # take no chances and rewrite it.
25490   # Note: m4 eats our [], so we need to use [ and ] instead.
25491   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25492   if test "x$has_forbidden_chars" != x; then
25493     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25494     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25495     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25496     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25497       # Going to short mode and back again did indeed matter. Since short mode is
25498       # case insensitive, let's make it lowercase to improve readability.
25499       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25500       # Now convert it back to Unix-style (cygpath)
25501       input_path=`$CYGPATH -u "$shortmode_path"`
25502       new_path="$input_path"
25503     fi
25504   fi
25505 
25506   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25507   if test "x$test_cygdrive_prefix" = x; then
25508     # As a simple fix, exclude /usr/bin since it's not a real path.
25509     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25510       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25511       # a path prefixed by /cygdrive for fixpath to work.
25512       new_path="$CYGWIN_ROOT_PATH$input_path"
25513     fi
25514   fi
25515 
25516 
25517   if test "x$path" != "x$new_path"; then
25518     BOOT_JDK="$new_path"
25519     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25520 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25521   fi
25522 
25523     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25524 
25525   path="$BOOT_JDK"
25526   has_colon=`$ECHO $path | $GREP ^.:`
25527   new_path="$path"
25528   if test "x$has_colon" = x; then
25529     # Not in mixed or Windows style, start by that.
25530     new_path=`cmd //c echo $path`
25531   fi
25532 
25533 
25534   input_path="$new_path"
25535   # Check if we need to convert this using DOS-style short mode. If the path
25536   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25537   # take no chances and rewrite it.
25538   # Note: m4 eats our [], so we need to use [ and ] instead.
25539   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25540   if test "x$has_forbidden_chars" != x; then
25541     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25542     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25543   fi
25544 
25545 
25546   windows_path="$new_path"
25547   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25548     unix_path=`$CYGPATH -u "$windows_path"`
25549     new_path="$unix_path"
25550   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25551     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25552     new_path="$unix_path"
25553   fi
25554 
25555   if test "x$path" != "x$new_path"; then
25556     BOOT_JDK="$new_path"
25557     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25558 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25559   fi
25560 
25561   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25562   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25563 
25564     else
25565       # We're on a unix platform. Hooray! :)
25566       path="$BOOT_JDK"
25567       has_space=`$ECHO "$path" | $GREP " "`
25568       if test "x$has_space" != x; then
25569         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25570 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25571         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25572       fi
25573 
25574       # Use eval to expand a potential ~
25575       eval path="$path"
25576       if test ! -f "$path" && test ! -d "$path"; then
25577         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25578       fi
25579 
25580       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25581     fi
25582   fi
25583 
25584             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25585 $as_echo_n "checking for Boot JDK... " >&6; }
25586             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25587 $as_echo "$BOOT_JDK" >&6; }
25588             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25589 $as_echo_n "checking Boot JDK version... " >&6; }
25590             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25591             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25592 $as_echo "$BOOT_JDK_VERSION" >&6; }
25593           fi # end check jdk version
25594         fi # end check javac
25595       fi # end check java
25596     fi # end check boot jdk found
25597   fi
25598 
25599     done
25600   fi
25601 
25602   fi
25603 
25604 
25605     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25606     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25607       # Do we have a bin/java?
25608       if test ! -x "$BOOT_JDK/bin/java"; then
25609         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25610 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25611         BOOT_JDK_FOUND=no
25612       else
25613         # Do we have a bin/javac?
25614         if test ! -x "$BOOT_JDK/bin/javac"; then
25615           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25616 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25617           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25618 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25619           BOOT_JDK_FOUND=no
25620         else
25621           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25622           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25623 
25624           # Extra M4 quote needed to protect [] in grep expression.
25625           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25626           if test "x$FOUND_CORRECT_VERSION" = x; then
25627             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25628 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25629             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25630 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25631             BOOT_JDK_FOUND=no
25632           else
25633             # We're done! :-)
25634             BOOT_JDK_FOUND=yes
25635 
25636   # Only process if variable expands to non-empty
25637 
25638   if test "x$BOOT_JDK" != x; then
25639     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25640 
25641   # Input might be given as Windows format, start by converting to
25642   # unix format.
25643   path="$BOOT_JDK"
25644   new_path=`$CYGPATH -u "$path"`
25645 
25646   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25647   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25648   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25649   # "foo.exe" is OK but "foo" is an error.
25650   #
25651   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25652   # It is also a way to make sure we got the proper file name for the real test later on.
25653   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25654   if test "x$test_shortpath" = x; then
25655     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25656 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25657     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25658   fi
25659 
25660   # Call helper function which possibly converts this using DOS-style short mode.
25661   # If so, the updated path is stored in $new_path.
25662 
25663   input_path="$new_path"
25664   # Check if we need to convert this using DOS-style short mode. If the path
25665   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25666   # take no chances and rewrite it.
25667   # Note: m4 eats our [], so we need to use [ and ] instead.
25668   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25669   if test "x$has_forbidden_chars" != x; then
25670     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25671     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25672     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25673     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25674       # Going to short mode and back again did indeed matter. Since short mode is
25675       # case insensitive, let's make it lowercase to improve readability.
25676       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25677       # Now convert it back to Unix-style (cygpath)
25678       input_path=`$CYGPATH -u "$shortmode_path"`
25679       new_path="$input_path"
25680     fi
25681   fi
25682 
25683   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25684   if test "x$test_cygdrive_prefix" = x; then
25685     # As a simple fix, exclude /usr/bin since it's not a real path.
25686     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25687       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25688       # a path prefixed by /cygdrive for fixpath to work.
25689       new_path="$CYGWIN_ROOT_PATH$input_path"
25690     fi
25691   fi
25692 
25693 
25694   if test "x$path" != "x$new_path"; then
25695     BOOT_JDK="$new_path"
25696     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25697 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25698   fi
25699 
25700     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25701 
25702   path="$BOOT_JDK"
25703   has_colon=`$ECHO $path | $GREP ^.:`
25704   new_path="$path"
25705   if test "x$has_colon" = x; then
25706     # Not in mixed or Windows style, start by that.
25707     new_path=`cmd //c echo $path`
25708   fi
25709 
25710 
25711   input_path="$new_path"
25712   # Check if we need to convert this using DOS-style short mode. If the path
25713   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25714   # take no chances and rewrite it.
25715   # Note: m4 eats our [], so we need to use [ and ] instead.
25716   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25717   if test "x$has_forbidden_chars" != x; then
25718     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25719     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25720   fi
25721 
25722 
25723   windows_path="$new_path"
25724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25725     unix_path=`$CYGPATH -u "$windows_path"`
25726     new_path="$unix_path"
25727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25728     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25729     new_path="$unix_path"
25730   fi
25731 
25732   if test "x$path" != "x$new_path"; then
25733     BOOT_JDK="$new_path"
25734     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25735 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25736   fi
25737 
25738   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25739   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25740 
25741     else
25742       # We're on a unix platform. Hooray! :)
25743       path="$BOOT_JDK"
25744       has_space=`$ECHO "$path" | $GREP " "`
25745       if test "x$has_space" != x; then
25746         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25747 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25748         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25749       fi
25750 
25751       # Use eval to expand a potential ~
25752       eval path="$path"
25753       if test ! -f "$path" && test ! -d "$path"; then
25754         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25755       fi
25756 
25757       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25758     fi
25759   fi
25760 
25761             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25762 $as_echo_n "checking for Boot JDK... " >&6; }
25763             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25764 $as_echo "$BOOT_JDK" >&6; }
25765             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25766 $as_echo_n "checking Boot JDK version... " >&6; }
25767             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25768             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25769 $as_echo "$BOOT_JDK_VERSION" >&6; }
25770           fi # end check jdk version
25771         fi # end check javac
25772       fi # end check java
25773     fi # end check boot jdk found
25774   fi
25775 
25776 
25777   if test "x$BOOT_JDK_FOUND" = xno; then
25778     # Now execute the test
25779 
25780   if test "x$PROGRAMW6432" != x; then
25781     VIRTUAL_DIR="$PROGRAMW6432/Java"
25782 
25783   windows_path="$VIRTUAL_DIR"
25784   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25785     unix_path=`$CYGPATH -u "$windows_path"`
25786     VIRTUAL_DIR="$unix_path"
25787   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25788     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25789     VIRTUAL_DIR="$unix_path"
25790   fi
25791 
25792 
25793   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25794   BOOT_JDK_SUFFIX=""
25795   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25796   if test "x$ALL_JDKS_FOUND" != x; then
25797     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25798 
25799   if test "x$BOOT_JDK_FOUND" = xno; then
25800     # Now execute the test
25801 
25802         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25803         if test -d "$BOOT_JDK"; then
25804           BOOT_JDK_FOUND=maybe
25805           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25806 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25807         fi
25808 
25809 
25810     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25811     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25812       # Do we have a bin/java?
25813       if test ! -x "$BOOT_JDK/bin/java"; then
25814         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25815 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25816         BOOT_JDK_FOUND=no
25817       else
25818         # Do we have a bin/javac?
25819         if test ! -x "$BOOT_JDK/bin/javac"; then
25820           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25821 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25822           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25823 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25824           BOOT_JDK_FOUND=no
25825         else
25826           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25827           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25828 
25829           # Extra M4 quote needed to protect [] in grep expression.
25830           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25831           if test "x$FOUND_CORRECT_VERSION" = x; then
25832             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25833 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25834             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25835 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25836             BOOT_JDK_FOUND=no
25837           else
25838             # We're done! :-)
25839             BOOT_JDK_FOUND=yes
25840 
25841   # Only process if variable expands to non-empty
25842 
25843   if test "x$BOOT_JDK" != x; then
25844     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25845 
25846   # Input might be given as Windows format, start by converting to
25847   # unix format.
25848   path="$BOOT_JDK"
25849   new_path=`$CYGPATH -u "$path"`
25850 
25851   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25852   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25853   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25854   # "foo.exe" is OK but "foo" is an error.
25855   #
25856   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25857   # It is also a way to make sure we got the proper file name for the real test later on.
25858   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25859   if test "x$test_shortpath" = x; then
25860     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25861 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25862     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25863   fi
25864 
25865   # Call helper function which possibly converts this using DOS-style short mode.
25866   # If so, the updated path is stored in $new_path.
25867 
25868   input_path="$new_path"
25869   # Check if we need to convert this using DOS-style short mode. If the path
25870   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25871   # take no chances and rewrite it.
25872   # Note: m4 eats our [], so we need to use [ and ] instead.
25873   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25874   if test "x$has_forbidden_chars" != x; then
25875     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25876     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25877     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25878     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25879       # Going to short mode and back again did indeed matter. Since short mode is
25880       # case insensitive, let's make it lowercase to improve readability.
25881       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25882       # Now convert it back to Unix-style (cygpath)
25883       input_path=`$CYGPATH -u "$shortmode_path"`
25884       new_path="$input_path"
25885     fi
25886   fi
25887 
25888   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25889   if test "x$test_cygdrive_prefix" = x; then
25890     # As a simple fix, exclude /usr/bin since it's not a real path.
25891     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25892       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25893       # a path prefixed by /cygdrive for fixpath to work.
25894       new_path="$CYGWIN_ROOT_PATH$input_path"
25895     fi
25896   fi
25897 
25898 
25899   if test "x$path" != "x$new_path"; then
25900     BOOT_JDK="$new_path"
25901     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25902 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25903   fi
25904 
25905     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25906 
25907   path="$BOOT_JDK"
25908   has_colon=`$ECHO $path | $GREP ^.:`
25909   new_path="$path"
25910   if test "x$has_colon" = x; then
25911     # Not in mixed or Windows style, start by that.
25912     new_path=`cmd //c echo $path`
25913   fi
25914 
25915 
25916   input_path="$new_path"
25917   # Check if we need to convert this using DOS-style short mode. If the path
25918   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25919   # take no chances and rewrite it.
25920   # Note: m4 eats our [], so we need to use [ and ] instead.
25921   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25922   if test "x$has_forbidden_chars" != x; then
25923     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25924     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25925   fi
25926 
25927 
25928   windows_path="$new_path"
25929   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25930     unix_path=`$CYGPATH -u "$windows_path"`
25931     new_path="$unix_path"
25932   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25933     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25934     new_path="$unix_path"
25935   fi
25936 
25937   if test "x$path" != "x$new_path"; then
25938     BOOT_JDK="$new_path"
25939     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25940 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25941   fi
25942 
25943   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25944   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25945 
25946     else
25947       # We're on a unix platform. Hooray! :)
25948       path="$BOOT_JDK"
25949       has_space=`$ECHO "$path" | $GREP " "`
25950       if test "x$has_space" != x; then
25951         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25952 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25953         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25954       fi
25955 
25956       # Use eval to expand a potential ~
25957       eval path="$path"
25958       if test ! -f "$path" && test ! -d "$path"; then
25959         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25960       fi
25961 
25962       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25963     fi
25964   fi
25965 
25966             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25967 $as_echo_n "checking for Boot JDK... " >&6; }
25968             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25969 $as_echo "$BOOT_JDK" >&6; }
25970             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25971 $as_echo_n "checking Boot JDK version... " >&6; }
25972             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25973             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25974 $as_echo "$BOOT_JDK_VERSION" >&6; }
25975           fi # end check jdk version
25976         fi # end check javac
25977       fi # end check java
25978     fi # end check boot jdk found
25979   fi
25980 
25981     done
25982   fi
25983 
25984   fi
25985 
25986 
25987     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25988     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25989       # Do we have a bin/java?
25990       if test ! -x "$BOOT_JDK/bin/java"; then
25991         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25992 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25993         BOOT_JDK_FOUND=no
25994       else
25995         # Do we have a bin/javac?
25996         if test ! -x "$BOOT_JDK/bin/javac"; then
25997           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25998 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25999           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26000 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26001           BOOT_JDK_FOUND=no
26002         else
26003           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26004           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26005 
26006           # Extra M4 quote needed to protect [] in grep expression.
26007           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26008           if test "x$FOUND_CORRECT_VERSION" = x; then
26009             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26010 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26011             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26012 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26013             BOOT_JDK_FOUND=no
26014           else
26015             # We're done! :-)
26016             BOOT_JDK_FOUND=yes
26017 
26018   # Only process if variable expands to non-empty
26019 
26020   if test "x$BOOT_JDK" != x; then
26021     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26022 
26023   # Input might be given as Windows format, start by converting to
26024   # unix format.
26025   path="$BOOT_JDK"
26026   new_path=`$CYGPATH -u "$path"`
26027 
26028   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26029   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26030   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26031   # "foo.exe" is OK but "foo" is an error.
26032   #
26033   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26034   # It is also a way to make sure we got the proper file name for the real test later on.
26035   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26036   if test "x$test_shortpath" = x; then
26037     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26038 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26039     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26040   fi
26041 
26042   # Call helper function which possibly converts this using DOS-style short mode.
26043   # If so, the updated path is stored in $new_path.
26044 
26045   input_path="$new_path"
26046   # Check if we need to convert this using DOS-style short mode. If the path
26047   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26048   # take no chances and rewrite it.
26049   # Note: m4 eats our [], so we need to use [ and ] instead.
26050   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26051   if test "x$has_forbidden_chars" != x; then
26052     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26053     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26054     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26055     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26056       # Going to short mode and back again did indeed matter. Since short mode is
26057       # case insensitive, let's make it lowercase to improve readability.
26058       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26059       # Now convert it back to Unix-style (cygpath)
26060       input_path=`$CYGPATH -u "$shortmode_path"`
26061       new_path="$input_path"
26062     fi
26063   fi
26064 
26065   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26066   if test "x$test_cygdrive_prefix" = x; then
26067     # As a simple fix, exclude /usr/bin since it's not a real path.
26068     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26069       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26070       # a path prefixed by /cygdrive for fixpath to work.
26071       new_path="$CYGWIN_ROOT_PATH$input_path"
26072     fi
26073   fi
26074 
26075 
26076   if test "x$path" != "x$new_path"; then
26077     BOOT_JDK="$new_path"
26078     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26079 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26080   fi
26081 
26082     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26083 
26084   path="$BOOT_JDK"
26085   has_colon=`$ECHO $path | $GREP ^.:`
26086   new_path="$path"
26087   if test "x$has_colon" = x; then
26088     # Not in mixed or Windows style, start by that.
26089     new_path=`cmd //c echo $path`
26090   fi
26091 
26092 
26093   input_path="$new_path"
26094   # Check if we need to convert this using DOS-style short mode. If the path
26095   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26096   # take no chances and rewrite it.
26097   # Note: m4 eats our [], so we need to use [ and ] instead.
26098   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26099   if test "x$has_forbidden_chars" != x; then
26100     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26101     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26102   fi
26103 
26104 
26105   windows_path="$new_path"
26106   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26107     unix_path=`$CYGPATH -u "$windows_path"`
26108     new_path="$unix_path"
26109   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26110     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26111     new_path="$unix_path"
26112   fi
26113 
26114   if test "x$path" != "x$new_path"; then
26115     BOOT_JDK="$new_path"
26116     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26117 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26118   fi
26119 
26120   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26121   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26122 
26123     else
26124       # We're on a unix platform. Hooray! :)
26125       path="$BOOT_JDK"
26126       has_space=`$ECHO "$path" | $GREP " "`
26127       if test "x$has_space" != x; then
26128         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26129 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26130         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26131       fi
26132 
26133       # Use eval to expand a potential ~
26134       eval path="$path"
26135       if test ! -f "$path" && test ! -d "$path"; then
26136         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26137       fi
26138 
26139       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26140     fi
26141   fi
26142 
26143             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26144 $as_echo_n "checking for Boot JDK... " >&6; }
26145             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26146 $as_echo "$BOOT_JDK" >&6; }
26147             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26148 $as_echo_n "checking Boot JDK version... " >&6; }
26149             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26150             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26151 $as_echo "$BOOT_JDK_VERSION" >&6; }
26152           fi # end check jdk version
26153         fi # end check javac
26154       fi # end check java
26155     fi # end check boot jdk found
26156   fi
26157 
26158 
26159   if test "x$BOOT_JDK_FOUND" = xno; then
26160     # Now execute the test
26161 
26162   if test "x$PROGRAMFILES" != x; then
26163     VIRTUAL_DIR="$PROGRAMFILES/Java"
26164 
26165   windows_path="$VIRTUAL_DIR"
26166   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26167     unix_path=`$CYGPATH -u "$windows_path"`
26168     VIRTUAL_DIR="$unix_path"
26169   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26170     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26171     VIRTUAL_DIR="$unix_path"
26172   fi
26173 
26174 
26175   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26176   BOOT_JDK_SUFFIX=""
26177   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26178   if test "x$ALL_JDKS_FOUND" != x; then
26179     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26180 
26181   if test "x$BOOT_JDK_FOUND" = xno; then
26182     # Now execute the test
26183 
26184         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26185         if test -d "$BOOT_JDK"; then
26186           BOOT_JDK_FOUND=maybe
26187           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26188 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26189         fi
26190 
26191 
26192     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26193     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26194       # Do we have a bin/java?
26195       if test ! -x "$BOOT_JDK/bin/java"; then
26196         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26197 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26198         BOOT_JDK_FOUND=no
26199       else
26200         # Do we have a bin/javac?
26201         if test ! -x "$BOOT_JDK/bin/javac"; then
26202           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26203 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26204           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26205 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26206           BOOT_JDK_FOUND=no
26207         else
26208           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26209           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26210 
26211           # Extra M4 quote needed to protect [] in grep expression.
26212           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26213           if test "x$FOUND_CORRECT_VERSION" = x; then
26214             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26215 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26216             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26217 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26218             BOOT_JDK_FOUND=no
26219           else
26220             # We're done! :-)
26221             BOOT_JDK_FOUND=yes
26222 
26223   # Only process if variable expands to non-empty
26224 
26225   if test "x$BOOT_JDK" != x; then
26226     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26227 
26228   # Input might be given as Windows format, start by converting to
26229   # unix format.
26230   path="$BOOT_JDK"
26231   new_path=`$CYGPATH -u "$path"`
26232 
26233   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26234   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26235   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26236   # "foo.exe" is OK but "foo" is an error.
26237   #
26238   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26239   # It is also a way to make sure we got the proper file name for the real test later on.
26240   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26241   if test "x$test_shortpath" = x; then
26242     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26243 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26244     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26245   fi
26246 
26247   # Call helper function which possibly converts this using DOS-style short mode.
26248   # If so, the updated path is stored in $new_path.
26249 
26250   input_path="$new_path"
26251   # Check if we need to convert this using DOS-style short mode. If the path
26252   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26253   # take no chances and rewrite it.
26254   # Note: m4 eats our [], so we need to use [ and ] instead.
26255   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26256   if test "x$has_forbidden_chars" != x; then
26257     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26258     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26259     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26260     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26261       # Going to short mode and back again did indeed matter. Since short mode is
26262       # case insensitive, let's make it lowercase to improve readability.
26263       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26264       # Now convert it back to Unix-style (cygpath)
26265       input_path=`$CYGPATH -u "$shortmode_path"`
26266       new_path="$input_path"
26267     fi
26268   fi
26269 
26270   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26271   if test "x$test_cygdrive_prefix" = x; then
26272     # As a simple fix, exclude /usr/bin since it's not a real path.
26273     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26274       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26275       # a path prefixed by /cygdrive for fixpath to work.
26276       new_path="$CYGWIN_ROOT_PATH$input_path"
26277     fi
26278   fi
26279 
26280 
26281   if test "x$path" != "x$new_path"; then
26282     BOOT_JDK="$new_path"
26283     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26284 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26285   fi
26286 
26287     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26288 
26289   path="$BOOT_JDK"
26290   has_colon=`$ECHO $path | $GREP ^.:`
26291   new_path="$path"
26292   if test "x$has_colon" = x; then
26293     # Not in mixed or Windows style, start by that.
26294     new_path=`cmd //c echo $path`
26295   fi
26296 
26297 
26298   input_path="$new_path"
26299   # Check if we need to convert this using DOS-style short mode. If the path
26300   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26301   # take no chances and rewrite it.
26302   # Note: m4 eats our [], so we need to use [ and ] instead.
26303   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26304   if test "x$has_forbidden_chars" != x; then
26305     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26306     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26307   fi
26308 
26309 
26310   windows_path="$new_path"
26311   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26312     unix_path=`$CYGPATH -u "$windows_path"`
26313     new_path="$unix_path"
26314   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26315     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26316     new_path="$unix_path"
26317   fi
26318 
26319   if test "x$path" != "x$new_path"; then
26320     BOOT_JDK="$new_path"
26321     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26322 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26323   fi
26324 
26325   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26326   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26327 
26328     else
26329       # We're on a unix platform. Hooray! :)
26330       path="$BOOT_JDK"
26331       has_space=`$ECHO "$path" | $GREP " "`
26332       if test "x$has_space" != x; then
26333         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26334 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26335         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26336       fi
26337 
26338       # Use eval to expand a potential ~
26339       eval path="$path"
26340       if test ! -f "$path" && test ! -d "$path"; then
26341         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26342       fi
26343 
26344       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26345     fi
26346   fi
26347 
26348             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26349 $as_echo_n "checking for Boot JDK... " >&6; }
26350             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26351 $as_echo "$BOOT_JDK" >&6; }
26352             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26353 $as_echo_n "checking Boot JDK version... " >&6; }
26354             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26355             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26356 $as_echo "$BOOT_JDK_VERSION" >&6; }
26357           fi # end check jdk version
26358         fi # end check javac
26359       fi # end check java
26360     fi # end check boot jdk found
26361   fi
26362 
26363     done
26364   fi
26365 
26366   fi
26367 
26368 
26369     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26370     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26371       # Do we have a bin/java?
26372       if test ! -x "$BOOT_JDK/bin/java"; then
26373         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26374 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26375         BOOT_JDK_FOUND=no
26376       else
26377         # Do we have a bin/javac?
26378         if test ! -x "$BOOT_JDK/bin/javac"; then
26379           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26380 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26381           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26382 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26383           BOOT_JDK_FOUND=no
26384         else
26385           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26386           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26387 
26388           # Extra M4 quote needed to protect [] in grep expression.
26389           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26390           if test "x$FOUND_CORRECT_VERSION" = x; then
26391             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26392 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26393             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26394 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26395             BOOT_JDK_FOUND=no
26396           else
26397             # We're done! :-)
26398             BOOT_JDK_FOUND=yes
26399 
26400   # Only process if variable expands to non-empty
26401 
26402   if test "x$BOOT_JDK" != x; then
26403     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26404 
26405   # Input might be given as Windows format, start by converting to
26406   # unix format.
26407   path="$BOOT_JDK"
26408   new_path=`$CYGPATH -u "$path"`
26409 
26410   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26411   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26412   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26413   # "foo.exe" is OK but "foo" is an error.
26414   #
26415   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26416   # It is also a way to make sure we got the proper file name for the real test later on.
26417   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26418   if test "x$test_shortpath" = x; then
26419     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26420 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26421     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26422   fi
26423 
26424   # Call helper function which possibly converts this using DOS-style short mode.
26425   # If so, the updated path is stored in $new_path.
26426 
26427   input_path="$new_path"
26428   # Check if we need to convert this using DOS-style short mode. If the path
26429   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26430   # take no chances and rewrite it.
26431   # Note: m4 eats our [], so we need to use [ and ] instead.
26432   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26433   if test "x$has_forbidden_chars" != x; then
26434     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26435     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26436     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26437     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26438       # Going to short mode and back again did indeed matter. Since short mode is
26439       # case insensitive, let's make it lowercase to improve readability.
26440       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26441       # Now convert it back to Unix-style (cygpath)
26442       input_path=`$CYGPATH -u "$shortmode_path"`
26443       new_path="$input_path"
26444     fi
26445   fi
26446 
26447   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26448   if test "x$test_cygdrive_prefix" = x; then
26449     # As a simple fix, exclude /usr/bin since it's not a real path.
26450     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26451       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26452       # a path prefixed by /cygdrive for fixpath to work.
26453       new_path="$CYGWIN_ROOT_PATH$input_path"
26454     fi
26455   fi
26456 
26457 
26458   if test "x$path" != "x$new_path"; then
26459     BOOT_JDK="$new_path"
26460     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26461 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26462   fi
26463 
26464     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26465 
26466   path="$BOOT_JDK"
26467   has_colon=`$ECHO $path | $GREP ^.:`
26468   new_path="$path"
26469   if test "x$has_colon" = x; then
26470     # Not in mixed or Windows style, start by that.
26471     new_path=`cmd //c echo $path`
26472   fi
26473 
26474 
26475   input_path="$new_path"
26476   # Check if we need to convert this using DOS-style short mode. If the path
26477   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26478   # take no chances and rewrite it.
26479   # Note: m4 eats our [], so we need to use [ and ] instead.
26480   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26481   if test "x$has_forbidden_chars" != x; then
26482     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26483     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26484   fi
26485 
26486 
26487   windows_path="$new_path"
26488   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26489     unix_path=`$CYGPATH -u "$windows_path"`
26490     new_path="$unix_path"
26491   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26492     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26493     new_path="$unix_path"
26494   fi
26495 
26496   if test "x$path" != "x$new_path"; then
26497     BOOT_JDK="$new_path"
26498     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26499 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26500   fi
26501 
26502   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26503   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26504 
26505     else
26506       # We're on a unix platform. Hooray! :)
26507       path="$BOOT_JDK"
26508       has_space=`$ECHO "$path" | $GREP " "`
26509       if test "x$has_space" != x; then
26510         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26511 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26512         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26513       fi
26514 
26515       # Use eval to expand a potential ~
26516       eval path="$path"
26517       if test ! -f "$path" && test ! -d "$path"; then
26518         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26519       fi
26520 
26521       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26522     fi
26523   fi
26524 
26525             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26526 $as_echo_n "checking for Boot JDK... " >&6; }
26527             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26528 $as_echo "$BOOT_JDK" >&6; }
26529             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26530 $as_echo_n "checking Boot JDK version... " >&6; }
26531             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26532             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26533 $as_echo "$BOOT_JDK_VERSION" >&6; }
26534           fi # end check jdk version
26535         fi # end check javac
26536       fi # end check java
26537     fi # end check boot jdk found
26538   fi
26539 
26540 
26541   if test "x$BOOT_JDK_FOUND" = xno; then
26542     # Now execute the test
26543 
26544   if test "x$ProgramFiles" != x; then
26545     VIRTUAL_DIR="$ProgramFiles/Java"
26546 
26547   windows_path="$VIRTUAL_DIR"
26548   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26549     unix_path=`$CYGPATH -u "$windows_path"`
26550     VIRTUAL_DIR="$unix_path"
26551   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26552     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26553     VIRTUAL_DIR="$unix_path"
26554   fi
26555 
26556 
26557   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26558   BOOT_JDK_SUFFIX=""
26559   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26560   if test "x$ALL_JDKS_FOUND" != x; then
26561     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26562 
26563   if test "x$BOOT_JDK_FOUND" = xno; then
26564     # Now execute the test
26565 
26566         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26567         if test -d "$BOOT_JDK"; then
26568           BOOT_JDK_FOUND=maybe
26569           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26570 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26571         fi
26572 
26573 
26574     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26575     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26576       # Do we have a bin/java?
26577       if test ! -x "$BOOT_JDK/bin/java"; then
26578         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26579 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26580         BOOT_JDK_FOUND=no
26581       else
26582         # Do we have a bin/javac?
26583         if test ! -x "$BOOT_JDK/bin/javac"; then
26584           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26585 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26586           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26587 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26588           BOOT_JDK_FOUND=no
26589         else
26590           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26591           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26592 
26593           # Extra M4 quote needed to protect [] in grep expression.
26594           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26595           if test "x$FOUND_CORRECT_VERSION" = x; then
26596             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26597 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26598             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26599 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26600             BOOT_JDK_FOUND=no
26601           else
26602             # We're done! :-)
26603             BOOT_JDK_FOUND=yes
26604 
26605   # Only process if variable expands to non-empty
26606 
26607   if test "x$BOOT_JDK" != x; then
26608     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26609 
26610   # Input might be given as Windows format, start by converting to
26611   # unix format.
26612   path="$BOOT_JDK"
26613   new_path=`$CYGPATH -u "$path"`
26614 
26615   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26616   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26617   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26618   # "foo.exe" is OK but "foo" is an error.
26619   #
26620   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26621   # It is also a way to make sure we got the proper file name for the real test later on.
26622   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26623   if test "x$test_shortpath" = x; then
26624     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26625 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26626     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26627   fi
26628 
26629   # Call helper function which possibly converts this using DOS-style short mode.
26630   # If so, the updated path is stored in $new_path.
26631 
26632   input_path="$new_path"
26633   # Check if we need to convert this using DOS-style short mode. If the path
26634   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26635   # take no chances and rewrite it.
26636   # Note: m4 eats our [], so we need to use [ and ] instead.
26637   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26638   if test "x$has_forbidden_chars" != x; then
26639     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26640     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26641     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26642     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26643       # Going to short mode and back again did indeed matter. Since short mode is
26644       # case insensitive, let's make it lowercase to improve readability.
26645       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26646       # Now convert it back to Unix-style (cygpath)
26647       input_path=`$CYGPATH -u "$shortmode_path"`
26648       new_path="$input_path"
26649     fi
26650   fi
26651 
26652   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26653   if test "x$test_cygdrive_prefix" = x; then
26654     # As a simple fix, exclude /usr/bin since it's not a real path.
26655     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26656       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26657       # a path prefixed by /cygdrive for fixpath to work.
26658       new_path="$CYGWIN_ROOT_PATH$input_path"
26659     fi
26660   fi
26661 
26662 
26663   if test "x$path" != "x$new_path"; then
26664     BOOT_JDK="$new_path"
26665     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26666 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26667   fi
26668 
26669     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26670 
26671   path="$BOOT_JDK"
26672   has_colon=`$ECHO $path | $GREP ^.:`
26673   new_path="$path"
26674   if test "x$has_colon" = x; then
26675     # Not in mixed or Windows style, start by that.
26676     new_path=`cmd //c echo $path`
26677   fi
26678 
26679 
26680   input_path="$new_path"
26681   # Check if we need to convert this using DOS-style short mode. If the path
26682   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26683   # take no chances and rewrite it.
26684   # Note: m4 eats our [], so we need to use [ and ] instead.
26685   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26686   if test "x$has_forbidden_chars" != x; then
26687     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26688     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26689   fi
26690 
26691 
26692   windows_path="$new_path"
26693   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26694     unix_path=`$CYGPATH -u "$windows_path"`
26695     new_path="$unix_path"
26696   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26697     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26698     new_path="$unix_path"
26699   fi
26700 
26701   if test "x$path" != "x$new_path"; then
26702     BOOT_JDK="$new_path"
26703     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26704 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26705   fi
26706 
26707   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26708   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26709 
26710     else
26711       # We're on a unix platform. Hooray! :)
26712       path="$BOOT_JDK"
26713       has_space=`$ECHO "$path" | $GREP " "`
26714       if test "x$has_space" != x; then
26715         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26716 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26717         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26718       fi
26719 
26720       # Use eval to expand a potential ~
26721       eval path="$path"
26722       if test ! -f "$path" && test ! -d "$path"; then
26723         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26724       fi
26725 
26726       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26727     fi
26728   fi
26729 
26730             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26731 $as_echo_n "checking for Boot JDK... " >&6; }
26732             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26733 $as_echo "$BOOT_JDK" >&6; }
26734             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26735 $as_echo_n "checking Boot JDK version... " >&6; }
26736             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26737             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26738 $as_echo "$BOOT_JDK_VERSION" >&6; }
26739           fi # end check jdk version
26740         fi # end check javac
26741       fi # end check java
26742     fi # end check boot jdk found
26743   fi
26744 
26745     done
26746   fi
26747 
26748   fi
26749 
26750 
26751     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26752     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26753       # Do we have a bin/java?
26754       if test ! -x "$BOOT_JDK/bin/java"; then
26755         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26756 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26757         BOOT_JDK_FOUND=no
26758       else
26759         # Do we have a bin/javac?
26760         if test ! -x "$BOOT_JDK/bin/javac"; then
26761           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26762 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26763           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26764 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26765           BOOT_JDK_FOUND=no
26766         else
26767           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26768           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26769 
26770           # Extra M4 quote needed to protect [] in grep expression.
26771           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26772           if test "x$FOUND_CORRECT_VERSION" = x; then
26773             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26774 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26775             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26776 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26777             BOOT_JDK_FOUND=no
26778           else
26779             # We're done! :-)
26780             BOOT_JDK_FOUND=yes
26781 
26782   # Only process if variable expands to non-empty
26783 
26784   if test "x$BOOT_JDK" != x; then
26785     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26786 
26787   # Input might be given as Windows format, start by converting to
26788   # unix format.
26789   path="$BOOT_JDK"
26790   new_path=`$CYGPATH -u "$path"`
26791 
26792   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26793   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26794   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26795   # "foo.exe" is OK but "foo" is an error.
26796   #
26797   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26798   # It is also a way to make sure we got the proper file name for the real test later on.
26799   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26800   if test "x$test_shortpath" = x; then
26801     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26802 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26803     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26804   fi
26805 
26806   # Call helper function which possibly converts this using DOS-style short mode.
26807   # If so, the updated path is stored in $new_path.
26808 
26809   input_path="$new_path"
26810   # Check if we need to convert this using DOS-style short mode. If the path
26811   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26812   # take no chances and rewrite it.
26813   # Note: m4 eats our [], so we need to use [ and ] instead.
26814   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26815   if test "x$has_forbidden_chars" != x; then
26816     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26817     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26818     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26819     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26820       # Going to short mode and back again did indeed matter. Since short mode is
26821       # case insensitive, let's make it lowercase to improve readability.
26822       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26823       # Now convert it back to Unix-style (cygpath)
26824       input_path=`$CYGPATH -u "$shortmode_path"`
26825       new_path="$input_path"
26826     fi
26827   fi
26828 
26829   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26830   if test "x$test_cygdrive_prefix" = x; then
26831     # As a simple fix, exclude /usr/bin since it's not a real path.
26832     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26833       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26834       # a path prefixed by /cygdrive for fixpath to work.
26835       new_path="$CYGWIN_ROOT_PATH$input_path"
26836     fi
26837   fi
26838 
26839 
26840   if test "x$path" != "x$new_path"; then
26841     BOOT_JDK="$new_path"
26842     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26843 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26844   fi
26845 
26846     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26847 
26848   path="$BOOT_JDK"
26849   has_colon=`$ECHO $path | $GREP ^.:`
26850   new_path="$path"
26851   if test "x$has_colon" = x; then
26852     # Not in mixed or Windows style, start by that.
26853     new_path=`cmd //c echo $path`
26854   fi
26855 
26856 
26857   input_path="$new_path"
26858   # Check if we need to convert this using DOS-style short mode. If the path
26859   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26860   # take no chances and rewrite it.
26861   # Note: m4 eats our [], so we need to use [ and ] instead.
26862   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26863   if test "x$has_forbidden_chars" != x; then
26864     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26865     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26866   fi
26867 
26868 
26869   windows_path="$new_path"
26870   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26871     unix_path=`$CYGPATH -u "$windows_path"`
26872     new_path="$unix_path"
26873   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26874     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26875     new_path="$unix_path"
26876   fi
26877 
26878   if test "x$path" != "x$new_path"; then
26879     BOOT_JDK="$new_path"
26880     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26881 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26882   fi
26883 
26884   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26885   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26886 
26887     else
26888       # We're on a unix platform. Hooray! :)
26889       path="$BOOT_JDK"
26890       has_space=`$ECHO "$path" | $GREP " "`
26891       if test "x$has_space" != x; then
26892         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26893 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26894         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26895       fi
26896 
26897       # Use eval to expand a potential ~
26898       eval path="$path"
26899       if test ! -f "$path" && test ! -d "$path"; then
26900         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26901       fi
26902 
26903       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26904     fi
26905   fi
26906 
26907             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26908 $as_echo_n "checking for Boot JDK... " >&6; }
26909             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26910 $as_echo "$BOOT_JDK" >&6; }
26911             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26912 $as_echo_n "checking Boot JDK version... " >&6; }
26913             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26914             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26915 $as_echo "$BOOT_JDK_VERSION" >&6; }
26916           fi # end check jdk version
26917         fi # end check javac
26918       fi # end check java
26919     fi # end check boot jdk found
26920   fi
26921 
26922 
26923   if test "x$BOOT_JDK_FOUND" = xno; then
26924     # Now execute the test
26925 
26926   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
26927   BOOT_JDK_SUFFIX=""
26928   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26929   if test "x$ALL_JDKS_FOUND" != x; then
26930     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26931 
26932   if test "x$BOOT_JDK_FOUND" = xno; then
26933     # Now execute the test
26934 
26935         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26936         if test -d "$BOOT_JDK"; then
26937           BOOT_JDK_FOUND=maybe
26938           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26939 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26940         fi
26941 
26942 
26943     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26944     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26945       # Do we have a bin/java?
26946       if test ! -x "$BOOT_JDK/bin/java"; then
26947         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26948 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26949         BOOT_JDK_FOUND=no
26950       else
26951         # Do we have a bin/javac?
26952         if test ! -x "$BOOT_JDK/bin/javac"; then
26953           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26954 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26955           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26956 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26957           BOOT_JDK_FOUND=no
26958         else
26959           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26960           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26961 
26962           # Extra M4 quote needed to protect [] in grep expression.
26963           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26964           if test "x$FOUND_CORRECT_VERSION" = x; then
26965             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26966 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26967             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26968 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26969             BOOT_JDK_FOUND=no
26970           else
26971             # We're done! :-)
26972             BOOT_JDK_FOUND=yes
26973 
26974   # Only process if variable expands to non-empty
26975 
26976   if test "x$BOOT_JDK" != x; then
26977     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26978 
26979   # Input might be given as Windows format, start by converting to
26980   # unix format.
26981   path="$BOOT_JDK"
26982   new_path=`$CYGPATH -u "$path"`
26983 
26984   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26985   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26986   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26987   # "foo.exe" is OK but "foo" is an error.
26988   #
26989   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26990   # It is also a way to make sure we got the proper file name for the real test later on.
26991   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26992   if test "x$test_shortpath" = x; then
26993     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26994 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26995     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26996   fi
26997 
26998   # Call helper function which possibly converts this using DOS-style short mode.
26999   # If so, the updated path is stored in $new_path.
27000 
27001   input_path="$new_path"
27002   # Check if we need to convert this using DOS-style short mode. If the path
27003   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27004   # take no chances and rewrite it.
27005   # Note: m4 eats our [], so we need to use [ and ] instead.
27006   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27007   if test "x$has_forbidden_chars" != x; then
27008     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27009     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27010     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27011     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27012       # Going to short mode and back again did indeed matter. Since short mode is
27013       # case insensitive, let's make it lowercase to improve readability.
27014       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27015       # Now convert it back to Unix-style (cygpath)
27016       input_path=`$CYGPATH -u "$shortmode_path"`
27017       new_path="$input_path"
27018     fi
27019   fi
27020 
27021   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27022   if test "x$test_cygdrive_prefix" = x; then
27023     # As a simple fix, exclude /usr/bin since it's not a real path.
27024     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27025       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27026       # a path prefixed by /cygdrive for fixpath to work.
27027       new_path="$CYGWIN_ROOT_PATH$input_path"
27028     fi
27029   fi
27030 
27031 
27032   if test "x$path" != "x$new_path"; then
27033     BOOT_JDK="$new_path"
27034     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27035 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27036   fi
27037 
27038     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27039 
27040   path="$BOOT_JDK"
27041   has_colon=`$ECHO $path | $GREP ^.:`
27042   new_path="$path"
27043   if test "x$has_colon" = x; then
27044     # Not in mixed or Windows style, start by that.
27045     new_path=`cmd //c echo $path`
27046   fi
27047 
27048 
27049   input_path="$new_path"
27050   # Check if we need to convert this using DOS-style short mode. If the path
27051   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27052   # take no chances and rewrite it.
27053   # Note: m4 eats our [], so we need to use [ and ] instead.
27054   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27055   if test "x$has_forbidden_chars" != x; then
27056     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27057     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27058   fi
27059 
27060 
27061   windows_path="$new_path"
27062   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27063     unix_path=`$CYGPATH -u "$windows_path"`
27064     new_path="$unix_path"
27065   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27066     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27067     new_path="$unix_path"
27068   fi
27069 
27070   if test "x$path" != "x$new_path"; then
27071     BOOT_JDK="$new_path"
27072     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27073 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27074   fi
27075 
27076   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27077   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27078 
27079     else
27080       # We're on a unix platform. Hooray! :)
27081       path="$BOOT_JDK"
27082       has_space=`$ECHO "$path" | $GREP " "`
27083       if test "x$has_space" != x; then
27084         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27085 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27086         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27087       fi
27088 
27089       # Use eval to expand a potential ~
27090       eval path="$path"
27091       if test ! -f "$path" && test ! -d "$path"; then
27092         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27093       fi
27094 
27095       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27096     fi
27097   fi
27098 
27099             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27100 $as_echo_n "checking for Boot JDK... " >&6; }
27101             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27102 $as_echo "$BOOT_JDK" >&6; }
27103             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27104 $as_echo_n "checking Boot JDK version... " >&6; }
27105             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27106             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27107 $as_echo "$BOOT_JDK_VERSION" >&6; }
27108           fi # end check jdk version
27109         fi # end check javac
27110       fi # end check java
27111     fi # end check boot jdk found
27112   fi
27113 
27114     done
27115   fi
27116 
27117 
27118     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27119     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27120       # Do we have a bin/java?
27121       if test ! -x "$BOOT_JDK/bin/java"; then
27122         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27123 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27124         BOOT_JDK_FOUND=no
27125       else
27126         # Do we have a bin/javac?
27127         if test ! -x "$BOOT_JDK/bin/javac"; then
27128           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27129 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27130           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27131 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27132           BOOT_JDK_FOUND=no
27133         else
27134           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27135           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27136 
27137           # Extra M4 quote needed to protect [] in grep expression.
27138           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27139           if test "x$FOUND_CORRECT_VERSION" = x; then
27140             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27141 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27142             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27143 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27144             BOOT_JDK_FOUND=no
27145           else
27146             # We're done! :-)
27147             BOOT_JDK_FOUND=yes
27148 
27149   # Only process if variable expands to non-empty
27150 
27151   if test "x$BOOT_JDK" != x; then
27152     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27153 
27154   # Input might be given as Windows format, start by converting to
27155   # unix format.
27156   path="$BOOT_JDK"
27157   new_path=`$CYGPATH -u "$path"`
27158 
27159   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27160   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27161   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27162   # "foo.exe" is OK but "foo" is an error.
27163   #
27164   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27165   # It is also a way to make sure we got the proper file name for the real test later on.
27166   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27167   if test "x$test_shortpath" = x; then
27168     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27169 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27170     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27171   fi
27172 
27173   # Call helper function which possibly converts this using DOS-style short mode.
27174   # If so, the updated path is stored in $new_path.
27175 
27176   input_path="$new_path"
27177   # Check if we need to convert this using DOS-style short mode. If the path
27178   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27179   # take no chances and rewrite it.
27180   # Note: m4 eats our [], so we need to use [ and ] instead.
27181   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27182   if test "x$has_forbidden_chars" != x; then
27183     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27184     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27185     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27186     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27187       # Going to short mode and back again did indeed matter. Since short mode is
27188       # case insensitive, let's make it lowercase to improve readability.
27189       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27190       # Now convert it back to Unix-style (cygpath)
27191       input_path=`$CYGPATH -u "$shortmode_path"`
27192       new_path="$input_path"
27193     fi
27194   fi
27195 
27196   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27197   if test "x$test_cygdrive_prefix" = x; then
27198     # As a simple fix, exclude /usr/bin since it's not a real path.
27199     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27200       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27201       # a path prefixed by /cygdrive for fixpath to work.
27202       new_path="$CYGWIN_ROOT_PATH$input_path"
27203     fi
27204   fi
27205 
27206 
27207   if test "x$path" != "x$new_path"; then
27208     BOOT_JDK="$new_path"
27209     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27210 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27211   fi
27212 
27213     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27214 
27215   path="$BOOT_JDK"
27216   has_colon=`$ECHO $path | $GREP ^.:`
27217   new_path="$path"
27218   if test "x$has_colon" = x; then
27219     # Not in mixed or Windows style, start by that.
27220     new_path=`cmd //c echo $path`
27221   fi
27222 
27223 
27224   input_path="$new_path"
27225   # Check if we need to convert this using DOS-style short mode. If the path
27226   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27227   # take no chances and rewrite it.
27228   # Note: m4 eats our [], so we need to use [ and ] instead.
27229   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27230   if test "x$has_forbidden_chars" != x; then
27231     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27232     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27233   fi
27234 
27235 
27236   windows_path="$new_path"
27237   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27238     unix_path=`$CYGPATH -u "$windows_path"`
27239     new_path="$unix_path"
27240   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27241     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27242     new_path="$unix_path"
27243   fi
27244 
27245   if test "x$path" != "x$new_path"; then
27246     BOOT_JDK="$new_path"
27247     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27248 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27249   fi
27250 
27251   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27252   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27253 
27254     else
27255       # We're on a unix platform. Hooray! :)
27256       path="$BOOT_JDK"
27257       has_space=`$ECHO "$path" | $GREP " "`
27258       if test "x$has_space" != x; then
27259         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27260 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27261         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27262       fi
27263 
27264       # Use eval to expand a potential ~
27265       eval path="$path"
27266       if test ! -f "$path" && test ! -d "$path"; then
27267         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27268       fi
27269 
27270       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27271     fi
27272   fi
27273 
27274             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27275 $as_echo_n "checking for Boot JDK... " >&6; }
27276             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27277 $as_echo "$BOOT_JDK" >&6; }
27278             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27279 $as_echo_n "checking Boot JDK version... " >&6; }
27280             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27281             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27282 $as_echo "$BOOT_JDK_VERSION" >&6; }
27283           fi # end check jdk version
27284         fi # end check javac
27285       fi # end check java
27286     fi # end check boot jdk found
27287   fi
27288 
27289   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
27290 
27291   if test "x$BOOT_JDK_FOUND" = xno; then
27292     # Now execute the test
27293 
27294   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
27295   BOOT_JDK_SUFFIX="/Contents/Home"
27296   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27297   if test "x$ALL_JDKS_FOUND" != x; then
27298     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27299 
27300   if test "x$BOOT_JDK_FOUND" = xno; then
27301     # Now execute the test
27302 
27303         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27304         if test -d "$BOOT_JDK"; then
27305           BOOT_JDK_FOUND=maybe
27306           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27307 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27308         fi
27309 
27310 
27311     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27312     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27313       # Do we have a bin/java?
27314       if test ! -x "$BOOT_JDK/bin/java"; then
27315         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27316 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27317         BOOT_JDK_FOUND=no
27318       else
27319         # Do we have a bin/javac?
27320         if test ! -x "$BOOT_JDK/bin/javac"; then
27321           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27322 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27323           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27324 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27325           BOOT_JDK_FOUND=no
27326         else
27327           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27328           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27329 
27330           # Extra M4 quote needed to protect [] in grep expression.
27331           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27332           if test "x$FOUND_CORRECT_VERSION" = x; then
27333             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27334 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27335             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27336 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27337             BOOT_JDK_FOUND=no
27338           else
27339             # We're done! :-)
27340             BOOT_JDK_FOUND=yes
27341 
27342   # Only process if variable expands to non-empty
27343 
27344   if test "x$BOOT_JDK" != x; then
27345     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27346 
27347   # Input might be given as Windows format, start by converting to
27348   # unix format.
27349   path="$BOOT_JDK"
27350   new_path=`$CYGPATH -u "$path"`
27351 
27352   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27353   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27354   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27355   # "foo.exe" is OK but "foo" is an error.
27356   #
27357   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27358   # It is also a way to make sure we got the proper file name for the real test later on.
27359   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27360   if test "x$test_shortpath" = x; then
27361     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27362 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27363     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27364   fi
27365 
27366   # Call helper function which possibly converts this using DOS-style short mode.
27367   # If so, the updated path is stored in $new_path.
27368 
27369   input_path="$new_path"
27370   # Check if we need to convert this using DOS-style short mode. If the path
27371   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27372   # take no chances and rewrite it.
27373   # Note: m4 eats our [], so we need to use [ and ] instead.
27374   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27375   if test "x$has_forbidden_chars" != x; then
27376     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27377     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27378     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27379     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27380       # Going to short mode and back again did indeed matter. Since short mode is
27381       # case insensitive, let's make it lowercase to improve readability.
27382       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27383       # Now convert it back to Unix-style (cygpath)
27384       input_path=`$CYGPATH -u "$shortmode_path"`
27385       new_path="$input_path"
27386     fi
27387   fi
27388 
27389   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27390   if test "x$test_cygdrive_prefix" = x; then
27391     # As a simple fix, exclude /usr/bin since it's not a real path.
27392     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27393       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27394       # a path prefixed by /cygdrive for fixpath to work.
27395       new_path="$CYGWIN_ROOT_PATH$input_path"
27396     fi
27397   fi
27398 
27399 
27400   if test "x$path" != "x$new_path"; then
27401     BOOT_JDK="$new_path"
27402     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27403 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27404   fi
27405 
27406     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27407 
27408   path="$BOOT_JDK"
27409   has_colon=`$ECHO $path | $GREP ^.:`
27410   new_path="$path"
27411   if test "x$has_colon" = x; then
27412     # Not in mixed or Windows style, start by that.
27413     new_path=`cmd //c echo $path`
27414   fi
27415 
27416 
27417   input_path="$new_path"
27418   # Check if we need to convert this using DOS-style short mode. If the path
27419   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27420   # take no chances and rewrite it.
27421   # Note: m4 eats our [], so we need to use [ and ] instead.
27422   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27423   if test "x$has_forbidden_chars" != x; then
27424     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27425     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27426   fi
27427 
27428 
27429   windows_path="$new_path"
27430   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27431     unix_path=`$CYGPATH -u "$windows_path"`
27432     new_path="$unix_path"
27433   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27434     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27435     new_path="$unix_path"
27436   fi
27437 
27438   if test "x$path" != "x$new_path"; then
27439     BOOT_JDK="$new_path"
27440     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27441 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27442   fi
27443 
27444   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27445   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27446 
27447     else
27448       # We're on a unix platform. Hooray! :)
27449       path="$BOOT_JDK"
27450       has_space=`$ECHO "$path" | $GREP " "`
27451       if test "x$has_space" != x; then
27452         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27453 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27454         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27455       fi
27456 
27457       # Use eval to expand a potential ~
27458       eval path="$path"
27459       if test ! -f "$path" && test ! -d "$path"; then
27460         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27461       fi
27462 
27463       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27464     fi
27465   fi
27466 
27467             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27468 $as_echo_n "checking for Boot JDK... " >&6; }
27469             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27470 $as_echo "$BOOT_JDK" >&6; }
27471             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27472 $as_echo_n "checking Boot JDK version... " >&6; }
27473             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27474             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27475 $as_echo "$BOOT_JDK_VERSION" >&6; }
27476           fi # end check jdk version
27477         fi # end check javac
27478       fi # end check java
27479     fi # end check boot jdk found
27480   fi
27481 
27482     done
27483   fi
27484 
27485 
27486     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27487     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27488       # Do we have a bin/java?
27489       if test ! -x "$BOOT_JDK/bin/java"; then
27490         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27491 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27492         BOOT_JDK_FOUND=no
27493       else
27494         # Do we have a bin/javac?
27495         if test ! -x "$BOOT_JDK/bin/javac"; then
27496           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27497 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27498           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27499 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27500           BOOT_JDK_FOUND=no
27501         else
27502           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27503           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27504 
27505           # Extra M4 quote needed to protect [] in grep expression.
27506           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27507           if test "x$FOUND_CORRECT_VERSION" = x; then
27508             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27509 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27510             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27511 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27512             BOOT_JDK_FOUND=no
27513           else
27514             # We're done! :-)
27515             BOOT_JDK_FOUND=yes
27516 
27517   # Only process if variable expands to non-empty
27518 
27519   if test "x$BOOT_JDK" != x; then
27520     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27521 
27522   # Input might be given as Windows format, start by converting to
27523   # unix format.
27524   path="$BOOT_JDK"
27525   new_path=`$CYGPATH -u "$path"`
27526 
27527   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27528   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27529   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27530   # "foo.exe" is OK but "foo" is an error.
27531   #
27532   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27533   # It is also a way to make sure we got the proper file name for the real test later on.
27534   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27535   if test "x$test_shortpath" = x; then
27536     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27537 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27538     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27539   fi
27540 
27541   # Call helper function which possibly converts this using DOS-style short mode.
27542   # If so, the updated path is stored in $new_path.
27543 
27544   input_path="$new_path"
27545   # Check if we need to convert this using DOS-style short mode. If the path
27546   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27547   # take no chances and rewrite it.
27548   # Note: m4 eats our [], so we need to use [ and ] instead.
27549   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27550   if test "x$has_forbidden_chars" != x; then
27551     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27552     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27553     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27554     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27555       # Going to short mode and back again did indeed matter. Since short mode is
27556       # case insensitive, let's make it lowercase to improve readability.
27557       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27558       # Now convert it back to Unix-style (cygpath)
27559       input_path=`$CYGPATH -u "$shortmode_path"`
27560       new_path="$input_path"
27561     fi
27562   fi
27563 
27564   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27565   if test "x$test_cygdrive_prefix" = x; then
27566     # As a simple fix, exclude /usr/bin since it's not a real path.
27567     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27568       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27569       # a path prefixed by /cygdrive for fixpath to work.
27570       new_path="$CYGWIN_ROOT_PATH$input_path"
27571     fi
27572   fi
27573 
27574 
27575   if test "x$path" != "x$new_path"; then
27576     BOOT_JDK="$new_path"
27577     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27578 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27579   fi
27580 
27581     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27582 
27583   path="$BOOT_JDK"
27584   has_colon=`$ECHO $path | $GREP ^.:`
27585   new_path="$path"
27586   if test "x$has_colon" = x; then
27587     # Not in mixed or Windows style, start by that.
27588     new_path=`cmd //c echo $path`
27589   fi
27590 
27591 
27592   input_path="$new_path"
27593   # Check if we need to convert this using DOS-style short mode. If the path
27594   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27595   # take no chances and rewrite it.
27596   # Note: m4 eats our [], so we need to use [ and ] instead.
27597   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27598   if test "x$has_forbidden_chars" != x; then
27599     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27600     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27601   fi
27602 
27603 
27604   windows_path="$new_path"
27605   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27606     unix_path=`$CYGPATH -u "$windows_path"`
27607     new_path="$unix_path"
27608   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27609     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27610     new_path="$unix_path"
27611   fi
27612 
27613   if test "x$path" != "x$new_path"; then
27614     BOOT_JDK="$new_path"
27615     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27616 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27617   fi
27618 
27619   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27620   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27621 
27622     else
27623       # We're on a unix platform. Hooray! :)
27624       path="$BOOT_JDK"
27625       has_space=`$ECHO "$path" | $GREP " "`
27626       if test "x$has_space" != x; then
27627         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27628 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27629         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27630       fi
27631 
27632       # Use eval to expand a potential ~
27633       eval path="$path"
27634       if test ! -f "$path" && test ! -d "$path"; then
27635         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27636       fi
27637 
27638       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27639     fi
27640   fi
27641 
27642             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27643 $as_echo_n "checking for Boot JDK... " >&6; }
27644             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27645 $as_echo "$BOOT_JDK" >&6; }
27646             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27647 $as_echo_n "checking Boot JDK version... " >&6; }
27648             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27649             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27650 $as_echo "$BOOT_JDK_VERSION" >&6; }
27651           fi # end check jdk version
27652         fi # end check javac
27653       fi # end check java
27654     fi # end check boot jdk found
27655   fi
27656 
27657 
27658   if test "x$BOOT_JDK_FOUND" = xno; then
27659     # Now execute the test
27660 
27661   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27662   BOOT_JDK_SUFFIX="/Contents/Home"
27663   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27664   if test "x$ALL_JDKS_FOUND" != x; then
27665     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27666 
27667   if test "x$BOOT_JDK_FOUND" = xno; then
27668     # Now execute the test
27669 
27670         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27671         if test -d "$BOOT_JDK"; then
27672           BOOT_JDK_FOUND=maybe
27673           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27674 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27675         fi
27676 
27677 
27678     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27679     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27680       # Do we have a bin/java?
27681       if test ! -x "$BOOT_JDK/bin/java"; then
27682         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27683 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27684         BOOT_JDK_FOUND=no
27685       else
27686         # Do we have a bin/javac?
27687         if test ! -x "$BOOT_JDK/bin/javac"; then
27688           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27689 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27690           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27691 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27692           BOOT_JDK_FOUND=no
27693         else
27694           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27695           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27696 
27697           # Extra M4 quote needed to protect [] in grep expression.
27698           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27699           if test "x$FOUND_CORRECT_VERSION" = x; then
27700             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27701 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27702             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27703 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27704             BOOT_JDK_FOUND=no
27705           else
27706             # We're done! :-)
27707             BOOT_JDK_FOUND=yes
27708 
27709   # Only process if variable expands to non-empty
27710 
27711   if test "x$BOOT_JDK" != x; then
27712     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27713 
27714   # Input might be given as Windows format, start by converting to
27715   # unix format.
27716   path="$BOOT_JDK"
27717   new_path=`$CYGPATH -u "$path"`
27718 
27719   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27720   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27721   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27722   # "foo.exe" is OK but "foo" is an error.
27723   #
27724   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27725   # It is also a way to make sure we got the proper file name for the real test later on.
27726   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27727   if test "x$test_shortpath" = x; then
27728     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27729 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27730     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27731   fi
27732 
27733   # Call helper function which possibly converts this using DOS-style short mode.
27734   # If so, the updated path is stored in $new_path.
27735 
27736   input_path="$new_path"
27737   # Check if we need to convert this using DOS-style short mode. If the path
27738   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27739   # take no chances and rewrite it.
27740   # Note: m4 eats our [], so we need to use [ and ] instead.
27741   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27742   if test "x$has_forbidden_chars" != x; then
27743     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27744     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27745     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27746     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27747       # Going to short mode and back again did indeed matter. Since short mode is
27748       # case insensitive, let's make it lowercase to improve readability.
27749       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27750       # Now convert it back to Unix-style (cygpath)
27751       input_path=`$CYGPATH -u "$shortmode_path"`
27752       new_path="$input_path"
27753     fi
27754   fi
27755 
27756   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27757   if test "x$test_cygdrive_prefix" = x; then
27758     # As a simple fix, exclude /usr/bin since it's not a real path.
27759     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27760       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27761       # a path prefixed by /cygdrive for fixpath to work.
27762       new_path="$CYGWIN_ROOT_PATH$input_path"
27763     fi
27764   fi
27765 
27766 
27767   if test "x$path" != "x$new_path"; then
27768     BOOT_JDK="$new_path"
27769     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27770 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27771   fi
27772 
27773     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27774 
27775   path="$BOOT_JDK"
27776   has_colon=`$ECHO $path | $GREP ^.:`
27777   new_path="$path"
27778   if test "x$has_colon" = x; then
27779     # Not in mixed or Windows style, start by that.
27780     new_path=`cmd //c echo $path`
27781   fi
27782 
27783 
27784   input_path="$new_path"
27785   # Check if we need to convert this using DOS-style short mode. If the path
27786   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27787   # take no chances and rewrite it.
27788   # Note: m4 eats our [], so we need to use [ and ] instead.
27789   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27790   if test "x$has_forbidden_chars" != x; then
27791     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27792     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27793   fi
27794 
27795 
27796   windows_path="$new_path"
27797   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27798     unix_path=`$CYGPATH -u "$windows_path"`
27799     new_path="$unix_path"
27800   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27801     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27802     new_path="$unix_path"
27803   fi
27804 
27805   if test "x$path" != "x$new_path"; then
27806     BOOT_JDK="$new_path"
27807     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27808 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27809   fi
27810 
27811   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27812   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27813 
27814     else
27815       # We're on a unix platform. Hooray! :)
27816       path="$BOOT_JDK"
27817       has_space=`$ECHO "$path" | $GREP " "`
27818       if test "x$has_space" != x; then
27819         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27820 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27821         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27822       fi
27823 
27824       # Use eval to expand a potential ~
27825       eval path="$path"
27826       if test ! -f "$path" && test ! -d "$path"; then
27827         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27828       fi
27829 
27830       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27831     fi
27832   fi
27833 
27834             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27835 $as_echo_n "checking for Boot JDK... " >&6; }
27836             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27837 $as_echo "$BOOT_JDK" >&6; }
27838             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27839 $as_echo_n "checking Boot JDK version... " >&6; }
27840             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27841             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27842 $as_echo "$BOOT_JDK_VERSION" >&6; }
27843           fi # end check jdk version
27844         fi # end check javac
27845       fi # end check java
27846     fi # end check boot jdk found
27847   fi
27848 
27849     done
27850   fi
27851 
27852 
27853     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27854     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27855       # Do we have a bin/java?
27856       if test ! -x "$BOOT_JDK/bin/java"; then
27857         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27858 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27859         BOOT_JDK_FOUND=no
27860       else
27861         # Do we have a bin/javac?
27862         if test ! -x "$BOOT_JDK/bin/javac"; then
27863           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27864 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27865           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27866 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27867           BOOT_JDK_FOUND=no
27868         else
27869           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27870           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27871 
27872           # Extra M4 quote needed to protect [] in grep expression.
27873           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27874           if test "x$FOUND_CORRECT_VERSION" = x; then
27875             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27876 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27877             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27878 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27879             BOOT_JDK_FOUND=no
27880           else
27881             # We're done! :-)
27882             BOOT_JDK_FOUND=yes
27883 
27884   # Only process if variable expands to non-empty
27885 
27886   if test "x$BOOT_JDK" != x; then
27887     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27888 
27889   # Input might be given as Windows format, start by converting to
27890   # unix format.
27891   path="$BOOT_JDK"
27892   new_path=`$CYGPATH -u "$path"`
27893 
27894   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27895   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27896   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27897   # "foo.exe" is OK but "foo" is an error.
27898   #
27899   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27900   # It is also a way to make sure we got the proper file name for the real test later on.
27901   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27902   if test "x$test_shortpath" = x; then
27903     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27904 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27905     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27906   fi
27907 
27908   # Call helper function which possibly converts this using DOS-style short mode.
27909   # If so, the updated path is stored in $new_path.
27910 
27911   input_path="$new_path"
27912   # Check if we need to convert this using DOS-style short mode. If the path
27913   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27914   # take no chances and rewrite it.
27915   # Note: m4 eats our [], so we need to use [ and ] instead.
27916   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27917   if test "x$has_forbidden_chars" != x; then
27918     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27919     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27920     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27921     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27922       # Going to short mode and back again did indeed matter. Since short mode is
27923       # case insensitive, let's make it lowercase to improve readability.
27924       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27925       # Now convert it back to Unix-style (cygpath)
27926       input_path=`$CYGPATH -u "$shortmode_path"`
27927       new_path="$input_path"
27928     fi
27929   fi
27930 
27931   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27932   if test "x$test_cygdrive_prefix" = x; then
27933     # As a simple fix, exclude /usr/bin since it's not a real path.
27934     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27935       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27936       # a path prefixed by /cygdrive for fixpath to work.
27937       new_path="$CYGWIN_ROOT_PATH$input_path"
27938     fi
27939   fi
27940 
27941 
27942   if test "x$path" != "x$new_path"; then
27943     BOOT_JDK="$new_path"
27944     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27945 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27946   fi
27947 
27948     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27949 
27950   path="$BOOT_JDK"
27951   has_colon=`$ECHO $path | $GREP ^.:`
27952   new_path="$path"
27953   if test "x$has_colon" = x; then
27954     # Not in mixed or Windows style, start by that.
27955     new_path=`cmd //c echo $path`
27956   fi
27957 
27958 
27959   input_path="$new_path"
27960   # Check if we need to convert this using DOS-style short mode. If the path
27961   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27962   # take no chances and rewrite it.
27963   # Note: m4 eats our [], so we need to use [ and ] instead.
27964   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27965   if test "x$has_forbidden_chars" != x; then
27966     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27967     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27968   fi
27969 
27970 
27971   windows_path="$new_path"
27972   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27973     unix_path=`$CYGPATH -u "$windows_path"`
27974     new_path="$unix_path"
27975   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27976     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27977     new_path="$unix_path"
27978   fi
27979 
27980   if test "x$path" != "x$new_path"; then
27981     BOOT_JDK="$new_path"
27982     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27983 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27984   fi
27985 
27986   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27987   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27988 
27989     else
27990       # We're on a unix platform. Hooray! :)
27991       path="$BOOT_JDK"
27992       has_space=`$ECHO "$path" | $GREP " "`
27993       if test "x$has_space" != x; then
27994         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27995 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27996         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27997       fi
27998 
27999       # Use eval to expand a potential ~
28000       eval path="$path"
28001       if test ! -f "$path" && test ! -d "$path"; then
28002         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28003       fi
28004 
28005       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28006     fi
28007   fi
28008 
28009             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28010 $as_echo_n "checking for Boot JDK... " >&6; }
28011             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28012 $as_echo "$BOOT_JDK" >&6; }
28013             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28014 $as_echo_n "checking Boot JDK version... " >&6; }
28015             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28016             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28017 $as_echo "$BOOT_JDK_VERSION" >&6; }
28018           fi # end check jdk version
28019         fi # end check javac
28020       fi # end check java
28021     fi # end check boot jdk found
28022   fi
28023 
28024   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28025 
28026   if test "x$BOOT_JDK_FOUND" = xno; then
28027     # Now execute the test
28028 
28029   BOOT_JDK_PREFIX="/usr/lib/jvm"
28030   BOOT_JDK_SUFFIX=""
28031   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28032   if test "x$ALL_JDKS_FOUND" != x; then
28033     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28034 
28035   if test "x$BOOT_JDK_FOUND" = xno; then
28036     # Now execute the test
28037 
28038         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28039         if test -d "$BOOT_JDK"; then
28040           BOOT_JDK_FOUND=maybe
28041           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28042 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28043         fi
28044 
28045 
28046     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28047     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28048       # Do we have a bin/java?
28049       if test ! -x "$BOOT_JDK/bin/java"; then
28050         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28051 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28052         BOOT_JDK_FOUND=no
28053       else
28054         # Do we have a bin/javac?
28055         if test ! -x "$BOOT_JDK/bin/javac"; then
28056           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28057 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28058           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28059 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28060           BOOT_JDK_FOUND=no
28061         else
28062           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28063           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28064 
28065           # Extra M4 quote needed to protect [] in grep expression.
28066           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28067           if test "x$FOUND_CORRECT_VERSION" = x; then
28068             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28069 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28070             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28071 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28072             BOOT_JDK_FOUND=no
28073           else
28074             # We're done! :-)
28075             BOOT_JDK_FOUND=yes
28076 
28077   # Only process if variable expands to non-empty
28078 
28079   if test "x$BOOT_JDK" != x; then
28080     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28081 
28082   # Input might be given as Windows format, start by converting to
28083   # unix format.
28084   path="$BOOT_JDK"
28085   new_path=`$CYGPATH -u "$path"`
28086 
28087   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28088   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28089   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28090   # "foo.exe" is OK but "foo" is an error.
28091   #
28092   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28093   # It is also a way to make sure we got the proper file name for the real test later on.
28094   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28095   if test "x$test_shortpath" = x; then
28096     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28097 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28098     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28099   fi
28100 
28101   # Call helper function which possibly converts this using DOS-style short mode.
28102   # If so, the updated path is stored in $new_path.
28103 
28104   input_path="$new_path"
28105   # Check if we need to convert this using DOS-style short mode. If the path
28106   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28107   # take no chances and rewrite it.
28108   # Note: m4 eats our [], so we need to use [ and ] instead.
28109   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28110   if test "x$has_forbidden_chars" != x; then
28111     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28112     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28113     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28114     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28115       # Going to short mode and back again did indeed matter. Since short mode is
28116       # case insensitive, let's make it lowercase to improve readability.
28117       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28118       # Now convert it back to Unix-style (cygpath)
28119       input_path=`$CYGPATH -u "$shortmode_path"`
28120       new_path="$input_path"
28121     fi
28122   fi
28123 
28124   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28125   if test "x$test_cygdrive_prefix" = x; then
28126     # As a simple fix, exclude /usr/bin since it's not a real path.
28127     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28128       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28129       # a path prefixed by /cygdrive for fixpath to work.
28130       new_path="$CYGWIN_ROOT_PATH$input_path"
28131     fi
28132   fi
28133 
28134 
28135   if test "x$path" != "x$new_path"; then
28136     BOOT_JDK="$new_path"
28137     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28138 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28139   fi
28140 
28141     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28142 
28143   path="$BOOT_JDK"
28144   has_colon=`$ECHO $path | $GREP ^.:`
28145   new_path="$path"
28146   if test "x$has_colon" = x; then
28147     # Not in mixed or Windows style, start by that.
28148     new_path=`cmd //c echo $path`
28149   fi
28150 
28151 
28152   input_path="$new_path"
28153   # Check if we need to convert this using DOS-style short mode. If the path
28154   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28155   # take no chances and rewrite it.
28156   # Note: m4 eats our [], so we need to use [ and ] instead.
28157   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28158   if test "x$has_forbidden_chars" != x; then
28159     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28160     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28161   fi
28162 
28163 
28164   windows_path="$new_path"
28165   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28166     unix_path=`$CYGPATH -u "$windows_path"`
28167     new_path="$unix_path"
28168   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28169     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28170     new_path="$unix_path"
28171   fi
28172 
28173   if test "x$path" != "x$new_path"; then
28174     BOOT_JDK="$new_path"
28175     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28176 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28177   fi
28178 
28179   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28180   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28181 
28182     else
28183       # We're on a unix platform. Hooray! :)
28184       path="$BOOT_JDK"
28185       has_space=`$ECHO "$path" | $GREP " "`
28186       if test "x$has_space" != x; then
28187         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28188 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28189         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28190       fi
28191 
28192       # Use eval to expand a potential ~
28193       eval path="$path"
28194       if test ! -f "$path" && test ! -d "$path"; then
28195         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28196       fi
28197 
28198       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28199     fi
28200   fi
28201 
28202             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28203 $as_echo_n "checking for Boot JDK... " >&6; }
28204             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28205 $as_echo "$BOOT_JDK" >&6; }
28206             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28207 $as_echo_n "checking Boot JDK version... " >&6; }
28208             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28209             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28210 $as_echo "$BOOT_JDK_VERSION" >&6; }
28211           fi # end check jdk version
28212         fi # end check javac
28213       fi # end check java
28214     fi # end check boot jdk found
28215   fi
28216 
28217     done
28218   fi
28219 
28220 
28221     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28222     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28223       # Do we have a bin/java?
28224       if test ! -x "$BOOT_JDK/bin/java"; then
28225         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28226 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28227         BOOT_JDK_FOUND=no
28228       else
28229         # Do we have a bin/javac?
28230         if test ! -x "$BOOT_JDK/bin/javac"; then
28231           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28232 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28233           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28234 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28235           BOOT_JDK_FOUND=no
28236         else
28237           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28238           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28239 
28240           # Extra M4 quote needed to protect [] in grep expression.
28241           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28242           if test "x$FOUND_CORRECT_VERSION" = x; then
28243             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28244 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28245             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28246 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28247             BOOT_JDK_FOUND=no
28248           else
28249             # We're done! :-)
28250             BOOT_JDK_FOUND=yes
28251 
28252   # Only process if variable expands to non-empty
28253 
28254   if test "x$BOOT_JDK" != x; then
28255     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28256 
28257   # Input might be given as Windows format, start by converting to
28258   # unix format.
28259   path="$BOOT_JDK"
28260   new_path=`$CYGPATH -u "$path"`
28261 
28262   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28263   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28264   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28265   # "foo.exe" is OK but "foo" is an error.
28266   #
28267   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28268   # It is also a way to make sure we got the proper file name for the real test later on.
28269   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28270   if test "x$test_shortpath" = x; then
28271     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28272 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28273     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28274   fi
28275 
28276   # Call helper function which possibly converts this using DOS-style short mode.
28277   # If so, the updated path is stored in $new_path.
28278 
28279   input_path="$new_path"
28280   # Check if we need to convert this using DOS-style short mode. If the path
28281   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28282   # take no chances and rewrite it.
28283   # Note: m4 eats our [], so we need to use [ and ] instead.
28284   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28285   if test "x$has_forbidden_chars" != x; then
28286     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28287     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28288     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28289     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28290       # Going to short mode and back again did indeed matter. Since short mode is
28291       # case insensitive, let's make it lowercase to improve readability.
28292       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28293       # Now convert it back to Unix-style (cygpath)
28294       input_path=`$CYGPATH -u "$shortmode_path"`
28295       new_path="$input_path"
28296     fi
28297   fi
28298 
28299   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28300   if test "x$test_cygdrive_prefix" = x; then
28301     # As a simple fix, exclude /usr/bin since it's not a real path.
28302     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28303       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28304       # a path prefixed by /cygdrive for fixpath to work.
28305       new_path="$CYGWIN_ROOT_PATH$input_path"
28306     fi
28307   fi
28308 
28309 
28310   if test "x$path" != "x$new_path"; then
28311     BOOT_JDK="$new_path"
28312     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28313 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28314   fi
28315 
28316     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28317 
28318   path="$BOOT_JDK"
28319   has_colon=`$ECHO $path | $GREP ^.:`
28320   new_path="$path"
28321   if test "x$has_colon" = x; then
28322     # Not in mixed or Windows style, start by that.
28323     new_path=`cmd //c echo $path`
28324   fi
28325 
28326 
28327   input_path="$new_path"
28328   # Check if we need to convert this using DOS-style short mode. If the path
28329   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28330   # take no chances and rewrite it.
28331   # Note: m4 eats our [], so we need to use [ and ] instead.
28332   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28333   if test "x$has_forbidden_chars" != x; then
28334     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28335     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28336   fi
28337 
28338 
28339   windows_path="$new_path"
28340   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28341     unix_path=`$CYGPATH -u "$windows_path"`
28342     new_path="$unix_path"
28343   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28344     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28345     new_path="$unix_path"
28346   fi
28347 
28348   if test "x$path" != "x$new_path"; then
28349     BOOT_JDK="$new_path"
28350     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28351 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28352   fi
28353 
28354   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28355   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28356 
28357     else
28358       # We're on a unix platform. Hooray! :)
28359       path="$BOOT_JDK"
28360       has_space=`$ECHO "$path" | $GREP " "`
28361       if test "x$has_space" != x; then
28362         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28363 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28364         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28365       fi
28366 
28367       # Use eval to expand a potential ~
28368       eval path="$path"
28369       if test ! -f "$path" && test ! -d "$path"; then
28370         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28371       fi
28372 
28373       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28374     fi
28375   fi
28376 
28377             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28378 $as_echo_n "checking for Boot JDK... " >&6; }
28379             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28380 $as_echo "$BOOT_JDK" >&6; }
28381             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28382 $as_echo_n "checking Boot JDK version... " >&6; }
28383             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28384             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28385 $as_echo "$BOOT_JDK_VERSION" >&6; }
28386           fi # end check jdk version
28387         fi # end check javac
28388       fi # end check java
28389     fi # end check boot jdk found
28390   fi
28391 
28392   fi
28393 
28394 
28395     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28396     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28397       # Do we have a bin/java?
28398       if test ! -x "$BOOT_JDK/bin/java"; then
28399         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28400 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28401         BOOT_JDK_FOUND=no
28402       else
28403         # Do we have a bin/javac?
28404         if test ! -x "$BOOT_JDK/bin/javac"; then
28405           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28406 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28407           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28408 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28409           BOOT_JDK_FOUND=no
28410         else
28411           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28412           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28413 
28414           # Extra M4 quote needed to protect [] in grep expression.
28415           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28416           if test "x$FOUND_CORRECT_VERSION" = x; then
28417             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28418 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28419             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28420 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28421             BOOT_JDK_FOUND=no
28422           else
28423             # We're done! :-)
28424             BOOT_JDK_FOUND=yes
28425 
28426   # Only process if variable expands to non-empty
28427 
28428   if test "x$BOOT_JDK" != x; then
28429     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28430 
28431   # Input might be given as Windows format, start by converting to
28432   # unix format.
28433   path="$BOOT_JDK"
28434   new_path=`$CYGPATH -u "$path"`
28435 
28436   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28437   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28438   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28439   # "foo.exe" is OK but "foo" is an error.
28440   #
28441   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28442   # It is also a way to make sure we got the proper file name for the real test later on.
28443   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28444   if test "x$test_shortpath" = x; then
28445     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28446 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28447     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28448   fi
28449 
28450   # Call helper function which possibly converts this using DOS-style short mode.
28451   # If so, the updated path is stored in $new_path.
28452 
28453   input_path="$new_path"
28454   # Check if we need to convert this using DOS-style short mode. If the path
28455   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28456   # take no chances and rewrite it.
28457   # Note: m4 eats our [], so we need to use [ and ] instead.
28458   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28459   if test "x$has_forbidden_chars" != x; then
28460     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28461     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28462     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28463     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28464       # Going to short mode and back again did indeed matter. Since short mode is
28465       # case insensitive, let's make it lowercase to improve readability.
28466       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28467       # Now convert it back to Unix-style (cygpath)
28468       input_path=`$CYGPATH -u "$shortmode_path"`
28469       new_path="$input_path"
28470     fi
28471   fi
28472 
28473   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28474   if test "x$test_cygdrive_prefix" = x; then
28475     # As a simple fix, exclude /usr/bin since it's not a real path.
28476     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28477       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28478       # a path prefixed by /cygdrive for fixpath to work.
28479       new_path="$CYGWIN_ROOT_PATH$input_path"
28480     fi
28481   fi
28482 
28483 
28484   if test "x$path" != "x$new_path"; then
28485     BOOT_JDK="$new_path"
28486     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28487 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28488   fi
28489 
28490     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28491 
28492   path="$BOOT_JDK"
28493   has_colon=`$ECHO $path | $GREP ^.:`
28494   new_path="$path"
28495   if test "x$has_colon" = x; then
28496     # Not in mixed or Windows style, start by that.
28497     new_path=`cmd //c echo $path`
28498   fi
28499 
28500 
28501   input_path="$new_path"
28502   # Check if we need to convert this using DOS-style short mode. If the path
28503   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28504   # take no chances and rewrite it.
28505   # Note: m4 eats our [], so we need to use [ and ] instead.
28506   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28507   if test "x$has_forbidden_chars" != x; then
28508     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28509     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28510   fi
28511 
28512 
28513   windows_path="$new_path"
28514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28515     unix_path=`$CYGPATH -u "$windows_path"`
28516     new_path="$unix_path"
28517   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28518     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28519     new_path="$unix_path"
28520   fi
28521 
28522   if test "x$path" != "x$new_path"; then
28523     BOOT_JDK="$new_path"
28524     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28525 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28526   fi
28527 
28528   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28529   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28530 
28531     else
28532       # We're on a unix platform. Hooray! :)
28533       path="$BOOT_JDK"
28534       has_space=`$ECHO "$path" | $GREP " "`
28535       if test "x$has_space" != x; then
28536         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28537 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28538         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28539       fi
28540 
28541       # Use eval to expand a potential ~
28542       eval path="$path"
28543       if test ! -f "$path" && test ! -d "$path"; then
28544         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28545       fi
28546 
28547       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28548     fi
28549   fi
28550 
28551             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28552 $as_echo_n "checking for Boot JDK... " >&6; }
28553             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28554 $as_echo "$BOOT_JDK" >&6; }
28555             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28556 $as_echo_n "checking Boot JDK version... " >&6; }
28557             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28558             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28559 $as_echo "$BOOT_JDK_VERSION" >&6; }
28560           fi # end check jdk version
28561         fi # end check javac
28562       fi # end check java
28563     fi # end check boot jdk found
28564   fi
28565 
28566 
28567   # If we haven't found anything yet, we've truly lost. Give up.
28568   if test "x$BOOT_JDK_FOUND" = xno; then
28569 
28570   # Print a helpful message on how to acquire the necessary build dependency.
28571   # openjdk is the help tag: freetype, cups, alsa etc
28572   MISSING_DEPENDENCY=openjdk
28573 
28574   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28575     cygwin_help $MISSING_DEPENDENCY
28576   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28577     msys_help $MISSING_DEPENDENCY
28578   else
28579     PKGHANDLER_COMMAND=
28580 
28581     case $PKGHANDLER in
28582       apt-get)
28583         apt_help     $MISSING_DEPENDENCY ;;
28584       yum)
28585         yum_help     $MISSING_DEPENDENCY ;;
28586       port)
28587         port_help    $MISSING_DEPENDENCY ;;
28588       pkgutil)
28589         pkgutil_help $MISSING_DEPENDENCY ;;
28590       pkgadd)
28591         pkgadd_help  $MISSING_DEPENDENCY ;;
28592     esac
28593 
28594     if test "x$PKGHANDLER_COMMAND" != x; then
28595       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28596     fi
28597   fi
28598 
28599     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28600 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28601     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28602 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28603     as_fn_error $? "Cannot continue" "$LINENO" 5
28604   fi
28605 
28606 
28607 
28608   # Setup tools from the Boot JDK.
28609 
28610   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28611 
28612   # Publish this variable in the help.
28613 
28614 
28615   if [ -z "${JAVA+x}" ]; then
28616     # The variable is not set by user, try to locate tool using the code snippet
28617 
28618       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28619 $as_echo_n "checking for java in Boot JDK... " >&6; }
28620       JAVA=$BOOT_JDK/bin/java
28621       if test ! -x $JAVA; then
28622         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28623 $as_echo "not found" >&6; }
28624         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28625 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28626         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28627       fi
28628       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28629 $as_echo "ok" >&6; }
28630 
28631 
28632   else
28633     # The variable is set, but is it from the command line or the environment?
28634 
28635     # Try to remove the string !JAVA! from our list.
28636     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28637     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28638       # If it failed, the variable was not from the command line. Ignore it,
28639       # but warn the user (except for BASH, which is always set by the calling BASH).
28640       if test "xJAVA" != xBASH; then
28641         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28642 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28643       fi
28644       # Try to locate tool using the code snippet
28645 
28646       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28647 $as_echo_n "checking for java in Boot JDK... " >&6; }
28648       JAVA=$BOOT_JDK/bin/java
28649       if test ! -x $JAVA; then
28650         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28651 $as_echo "not found" >&6; }
28652         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28653 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28654         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28655       fi
28656       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28657 $as_echo "ok" >&6; }
28658 
28659 
28660     else
28661       # If it succeeded, then it was overridden by the user. We will use it
28662       # for the tool.
28663 
28664       # First remove it from the list of overridden variables, so we can test
28665       # for unknown variables in the end.
28666       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28667 
28668       # Check if we try to supply an empty value
28669       if test "x$JAVA" = x; then
28670         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28671 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28672         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28673 $as_echo_n "checking for JAVA... " >&6; }
28674         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28675 $as_echo "disabled" >&6; }
28676       else
28677         # Check if the provided tool contains a complete path.
28678         tool_specified="$JAVA"
28679         tool_basename="${tool_specified##*/}"
28680         if test "x$tool_basename" = "x$tool_specified"; then
28681           # A command without a complete path is provided, search $PATH.
28682           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28683 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28684           # Extract the first word of "$tool_basename", so it can be a program name with args.
28685 set dummy $tool_basename; ac_word=$2
28686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28687 $as_echo_n "checking for $ac_word... " >&6; }
28688 if ${ac_cv_path_JAVA+:} false; then :
28689   $as_echo_n "(cached) " >&6
28690 else
28691   case $JAVA in
28692   [\\/]* | ?:[\\/]*)
28693   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28694   ;;
28695   *)
28696   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28697 for as_dir in $PATH
28698 do
28699   IFS=$as_save_IFS
28700   test -z "$as_dir" && as_dir=.
28701     for ac_exec_ext in '' $ac_executable_extensions; do
28702   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28703     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28704     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28705     break 2
28706   fi
28707 done
28708   done
28709 IFS=$as_save_IFS
28710 
28711   ;;
28712 esac
28713 fi
28714 JAVA=$ac_cv_path_JAVA
28715 if test -n "$JAVA"; then
28716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28717 $as_echo "$JAVA" >&6; }
28718 else
28719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28720 $as_echo "no" >&6; }
28721 fi
28722 
28723 
28724           if test "x$JAVA" = x; then
28725             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28726           fi
28727         else
28728           # Otherwise we believe it is a complete path. Use it as it is.
28729           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28730 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28731           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28732 $as_echo_n "checking for JAVA... " >&6; }
28733           if test ! -x "$tool_specified"; then
28734             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28735 $as_echo "not found" >&6; }
28736             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28737           fi
28738           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28739 $as_echo "$tool_specified" >&6; }
28740         fi
28741       fi
28742     fi
28743 
28744   fi
28745 
28746 
28747 
28748   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28749 
28750   # Publish this variable in the help.
28751 
28752 
28753   if [ -z "${JAVAC+x}" ]; then
28754     # The variable is not set by user, try to locate tool using the code snippet
28755 
28756       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28757 $as_echo_n "checking for javac in Boot JDK... " >&6; }
28758       JAVAC=$BOOT_JDK/bin/javac
28759       if test ! -x $JAVAC; then
28760         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28761 $as_echo "not found" >&6; }
28762         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28763 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28764         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28765       fi
28766       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28767 $as_echo "ok" >&6; }
28768 
28769 
28770   else
28771     # The variable is set, but is it from the command line or the environment?
28772 
28773     # Try to remove the string !JAVAC! from our list.
28774     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
28775     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28776       # If it failed, the variable was not from the command line. Ignore it,
28777       # but warn the user (except for BASH, which is always set by the calling BASH).
28778       if test "xJAVAC" != xBASH; then
28779         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
28780 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
28781       fi
28782       # Try to locate tool using the code snippet
28783 
28784       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28785 $as_echo_n "checking for javac in Boot JDK... " >&6; }
28786       JAVAC=$BOOT_JDK/bin/javac
28787       if test ! -x $JAVAC; then
28788         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28789 $as_echo "not found" >&6; }
28790         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28791 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28792         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28793       fi
28794       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28795 $as_echo "ok" >&6; }
28796 
28797 
28798     else
28799       # If it succeeded, then it was overridden by the user. We will use it
28800       # for the tool.
28801 
28802       # First remove it from the list of overridden variables, so we can test
28803       # for unknown variables in the end.
28804       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28805 
28806       # Check if we try to supply an empty value
28807       if test "x$JAVAC" = x; then
28808         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
28809 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
28810         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28811 $as_echo_n "checking for JAVAC... " >&6; }
28812         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28813 $as_echo "disabled" >&6; }
28814       else
28815         # Check if the provided tool contains a complete path.
28816         tool_specified="$JAVAC"
28817         tool_basename="${tool_specified##*/}"
28818         if test "x$tool_basename" = "x$tool_specified"; then
28819           # A command without a complete path is provided, search $PATH.
28820           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
28821 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
28822           # Extract the first word of "$tool_basename", so it can be a program name with args.
28823 set dummy $tool_basename; ac_word=$2
28824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28825 $as_echo_n "checking for $ac_word... " >&6; }
28826 if ${ac_cv_path_JAVAC+:} false; then :
28827   $as_echo_n "(cached) " >&6
28828 else
28829   case $JAVAC in
28830   [\\/]* | ?:[\\/]*)
28831   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
28832   ;;
28833   *)
28834   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28835 for as_dir in $PATH
28836 do
28837   IFS=$as_save_IFS
28838   test -z "$as_dir" && as_dir=.
28839     for ac_exec_ext in '' $ac_executable_extensions; do
28840   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28841     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
28842     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28843     break 2
28844   fi
28845 done
28846   done
28847 IFS=$as_save_IFS
28848 
28849   ;;
28850 esac
28851 fi
28852 JAVAC=$ac_cv_path_JAVAC
28853 if test -n "$JAVAC"; then
28854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
28855 $as_echo "$JAVAC" >&6; }
28856 else
28857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28858 $as_echo "no" >&6; }
28859 fi
28860 
28861 
28862           if test "x$JAVAC" = x; then
28863             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28864           fi
28865         else
28866           # Otherwise we believe it is a complete path. Use it as it is.
28867           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
28868 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
28869           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28870 $as_echo_n "checking for JAVAC... " >&6; }
28871           if test ! -x "$tool_specified"; then
28872             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28873 $as_echo "not found" >&6; }
28874             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
28875           fi
28876           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28877 $as_echo "$tool_specified" >&6; }
28878         fi
28879       fi
28880     fi
28881 
28882   fi
28883 
28884 
28885 
28886   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28887 
28888   # Publish this variable in the help.
28889 
28890 
28891   if [ -z "${JAVAH+x}" ]; then
28892     # The variable is not set by user, try to locate tool using the code snippet
28893 
28894       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28895 $as_echo_n "checking for javah in Boot JDK... " >&6; }
28896       JAVAH=$BOOT_JDK/bin/javah
28897       if test ! -x $JAVAH; then
28898         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28899 $as_echo "not found" >&6; }
28900         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28901 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28902         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28903       fi
28904       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28905 $as_echo "ok" >&6; }
28906 
28907 
28908   else
28909     # The variable is set, but is it from the command line or the environment?
28910 
28911     # Try to remove the string !JAVAH! from our list.
28912     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
28913     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28914       # If it failed, the variable was not from the command line. Ignore it,
28915       # but warn the user (except for BASH, which is always set by the calling BASH).
28916       if test "xJAVAH" != xBASH; then
28917         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
28918 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
28919       fi
28920       # Try to locate tool using the code snippet
28921 
28922       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28923 $as_echo_n "checking for javah in Boot JDK... " >&6; }
28924       JAVAH=$BOOT_JDK/bin/javah
28925       if test ! -x $JAVAH; then
28926         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28927 $as_echo "not found" >&6; }
28928         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28929 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28930         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28931       fi
28932       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28933 $as_echo "ok" >&6; }
28934 
28935 
28936     else
28937       # If it succeeded, then it was overridden by the user. We will use it
28938       # for the tool.
28939 
28940       # First remove it from the list of overridden variables, so we can test
28941       # for unknown variables in the end.
28942       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28943 
28944       # Check if we try to supply an empty value
28945       if test "x$JAVAH" = x; then
28946         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
28947 $as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
28948         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28949 $as_echo_n "checking for JAVAH... " >&6; }
28950         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28951 $as_echo "disabled" >&6; }
28952       else
28953         # Check if the provided tool contains a complete path.
28954         tool_specified="$JAVAH"
28955         tool_basename="${tool_specified##*/}"
28956         if test "x$tool_basename" = "x$tool_specified"; then
28957           # A command without a complete path is provided, search $PATH.
28958           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
28959 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
28960           # Extract the first word of "$tool_basename", so it can be a program name with args.
28961 set dummy $tool_basename; ac_word=$2
28962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28963 $as_echo_n "checking for $ac_word... " >&6; }
28964 if ${ac_cv_path_JAVAH+:} false; then :
28965   $as_echo_n "(cached) " >&6
28966 else
28967   case $JAVAH in
28968   [\\/]* | ?:[\\/]*)
28969   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
28970   ;;
28971   *)
28972   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28973 for as_dir in $PATH
28974 do
28975   IFS=$as_save_IFS
28976   test -z "$as_dir" && as_dir=.
28977     for ac_exec_ext in '' $ac_executable_extensions; do
28978   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28979     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
28980     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28981     break 2
28982   fi
28983 done
28984   done
28985 IFS=$as_save_IFS
28986 
28987   ;;
28988 esac
28989 fi
28990 JAVAH=$ac_cv_path_JAVAH
28991 if test -n "$JAVAH"; then
28992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
28993 $as_echo "$JAVAH" >&6; }
28994 else
28995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28996 $as_echo "no" >&6; }
28997 fi
28998 
28999 
29000           if test "x$JAVAH" = x; then
29001             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29002           fi
29003         else
29004           # Otherwise we believe it is a complete path. Use it as it is.
29005           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29006 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29007           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29008 $as_echo_n "checking for JAVAH... " >&6; }
29009           if test ! -x "$tool_specified"; then
29010             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29011 $as_echo "not found" >&6; }
29012             as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29013           fi
29014           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29015 $as_echo "$tool_specified" >&6; }
29016         fi
29017       fi
29018     fi
29019 
29020   fi
29021 
29022 
29023 
29024   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29025 
29026   # Publish this variable in the help.
29027 
29028 
29029   if [ -z "${JAR+x}" ]; then
29030     # The variable is not set by user, try to locate tool using the code snippet
29031 
29032       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29033 $as_echo_n "checking for jar in Boot JDK... " >&6; }
29034       JAR=$BOOT_JDK/bin/jar
29035       if test ! -x $JAR; then
29036         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29037 $as_echo "not found" >&6; }
29038         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29039 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29040         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29041       fi
29042       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29043 $as_echo "ok" >&6; }
29044 
29045 
29046   else
29047     # The variable is set, but is it from the command line or the environment?
29048 
29049     # Try to remove the string !JAR! from our list.
29050     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29051     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29052       # If it failed, the variable was not from the command line. Ignore it,
29053       # but warn the user (except for BASH, which is always set by the calling BASH).
29054       if test "xJAR" != xBASH; then
29055         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29056 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29057       fi
29058       # Try to locate tool using the code snippet
29059 
29060       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29061 $as_echo_n "checking for jar in Boot JDK... " >&6; }
29062       JAR=$BOOT_JDK/bin/jar
29063       if test ! -x $JAR; then
29064         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29065 $as_echo "not found" >&6; }
29066         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29067 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29068         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29069       fi
29070       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29071 $as_echo "ok" >&6; }
29072 
29073 
29074     else
29075       # If it succeeded, then it was overridden by the user. We will use it
29076       # for the tool.
29077 
29078       # First remove it from the list of overridden variables, so we can test
29079       # for unknown variables in the end.
29080       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29081 
29082       # Check if we try to supply an empty value
29083       if test "x$JAR" = x; then
29084         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29085 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29086         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29087 $as_echo_n "checking for JAR... " >&6; }
29088         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29089 $as_echo "disabled" >&6; }
29090       else
29091         # Check if the provided tool contains a complete path.
29092         tool_specified="$JAR"
29093         tool_basename="${tool_specified##*/}"
29094         if test "x$tool_basename" = "x$tool_specified"; then
29095           # A command without a complete path is provided, search $PATH.
29096           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29097 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29098           # Extract the first word of "$tool_basename", so it can be a program name with args.
29099 set dummy $tool_basename; ac_word=$2
29100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29101 $as_echo_n "checking for $ac_word... " >&6; }
29102 if ${ac_cv_path_JAR+:} false; then :
29103   $as_echo_n "(cached) " >&6
29104 else
29105   case $JAR in
29106   [\\/]* | ?:[\\/]*)
29107   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29108   ;;
29109   *)
29110   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29111 for as_dir in $PATH
29112 do
29113   IFS=$as_save_IFS
29114   test -z "$as_dir" && as_dir=.
29115     for ac_exec_ext in '' $ac_executable_extensions; do
29116   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29117     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29118     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29119     break 2
29120   fi
29121 done
29122   done
29123 IFS=$as_save_IFS
29124 
29125   ;;
29126 esac
29127 fi
29128 JAR=$ac_cv_path_JAR
29129 if test -n "$JAR"; then
29130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29131 $as_echo "$JAR" >&6; }
29132 else
29133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29134 $as_echo "no" >&6; }
29135 fi
29136 
29137 
29138           if test "x$JAR" = x; then
29139             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29140           fi
29141         else
29142           # Otherwise we believe it is a complete path. Use it as it is.
29143           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29144 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29145           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29146 $as_echo_n "checking for JAR... " >&6; }
29147           if test ! -x "$tool_specified"; then
29148             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29149 $as_echo "not found" >&6; }
29150             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29151           fi
29152           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29153 $as_echo "$tool_specified" >&6; }
29154         fi
29155       fi
29156     fi
29157 
29158   fi
29159 
29160 
29161 
29162   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29163 
29164   # Publish this variable in the help.
29165 
29166 
29167   if [ -z "${JARSIGNER+x}" ]; then
29168     # The variable is not set by user, try to locate tool using the code snippet
29169 
29170       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29171 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29172       JARSIGNER=$BOOT_JDK/bin/jarsigner
29173       if test ! -x $JARSIGNER; then
29174         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29175 $as_echo "not found" >&6; }
29176         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29177 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29178         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29179       fi
29180       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29181 $as_echo "ok" >&6; }
29182 
29183 
29184   else
29185     # The variable is set, but is it from the command line or the environment?
29186 
29187     # Try to remove the string !JARSIGNER! from our list.
29188     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29189     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29190       # If it failed, the variable was not from the command line. Ignore it,
29191       # but warn the user (except for BASH, which is always set by the calling BASH).
29192       if test "xJARSIGNER" != xBASH; then
29193         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29194 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29195       fi
29196       # Try to locate tool using the code snippet
29197 
29198       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29199 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29200       JARSIGNER=$BOOT_JDK/bin/jarsigner
29201       if test ! -x $JARSIGNER; then
29202         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29203 $as_echo "not found" >&6; }
29204         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29205 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29206         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29207       fi
29208       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29209 $as_echo "ok" >&6; }
29210 
29211 
29212     else
29213       # If it succeeded, then it was overridden by the user. We will use it
29214       # for the tool.
29215 
29216       # First remove it from the list of overridden variables, so we can test
29217       # for unknown variables in the end.
29218       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29219 
29220       # Check if we try to supply an empty value
29221       if test "x$JARSIGNER" = x; then
29222         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
29223 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
29224         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29225 $as_echo_n "checking for JARSIGNER... " >&6; }
29226         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29227 $as_echo "disabled" >&6; }
29228       else
29229         # Check if the provided tool contains a complete path.
29230         tool_specified="$JARSIGNER"
29231         tool_basename="${tool_specified##*/}"
29232         if test "x$tool_basename" = "x$tool_specified"; then
29233           # A command without a complete path is provided, search $PATH.
29234           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
29235 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
29236           # Extract the first word of "$tool_basename", so it can be a program name with args.
29237 set dummy $tool_basename; ac_word=$2
29238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29239 $as_echo_n "checking for $ac_word... " >&6; }
29240 if ${ac_cv_path_JARSIGNER+:} false; then :
29241   $as_echo_n "(cached) " >&6
29242 else
29243   case $JARSIGNER in
29244   [\\/]* | ?:[\\/]*)
29245   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
29246   ;;
29247   *)
29248   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29249 for as_dir in $PATH
29250 do
29251   IFS=$as_save_IFS
29252   test -z "$as_dir" && as_dir=.
29253     for ac_exec_ext in '' $ac_executable_extensions; do
29254   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29255     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
29256     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29257     break 2
29258   fi
29259 done
29260   done
29261 IFS=$as_save_IFS
29262 
29263   ;;
29264 esac
29265 fi
29266 JARSIGNER=$ac_cv_path_JARSIGNER
29267 if test -n "$JARSIGNER"; then
29268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
29269 $as_echo "$JARSIGNER" >&6; }
29270 else
29271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29272 $as_echo "no" >&6; }
29273 fi
29274 
29275 
29276           if test "x$JARSIGNER" = x; then
29277             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29278           fi
29279         else
29280           # Otherwise we believe it is a complete path. Use it as it is.
29281           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
29282 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
29283           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29284 $as_echo_n "checking for JARSIGNER... " >&6; }
29285           if test ! -x "$tool_specified"; then
29286             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29287 $as_echo "not found" >&6; }
29288             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
29289           fi
29290           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29291 $as_echo "$tool_specified" >&6; }
29292         fi
29293       fi
29294     fi
29295 
29296   fi
29297 
29298 
29299 
29300   # Finally, set some other options...
29301 
29302   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
29303   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
29304 
29305 
29306 
29307   # Check if the boot jdk is 32 or 64 bit
29308   if "$JAVA" -d64 -version > /dev/null 2>&1; then
29309     BOOT_JDK_BITS="64"
29310   else
29311     BOOT_JDK_BITS="32"
29312   fi
29313   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
29314 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
29315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
29316 $as_echo "$BOOT_JDK_BITS" >&6; }
29317 
29318 
29319 
29320 ###############################################################################
29321 #
29322 # Configure the sources to use. We can add or override individual directories.
29323 #
29324 ###############################################################################
29325 
29326 
29327   # Where are the sources.
29328   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
29329   CORBA_TOPDIR="$SRC_ROOT/corba"
29330   JAXP_TOPDIR="$SRC_ROOT/jaxp"
29331   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
29332   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
29333   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
29334   JDK_TOPDIR="$SRC_ROOT/jdk"
29335 
29336 
29337 
29338 
29339 
29340 
29341 
29342 
29343 
29344   # This feature is no longer supported.
29345 
29346 
29347 
29348 # Check whether --with-add-source-root was given.
29349 if test "${with_add_source_root+set}" = set; then :
29350   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
29351 $as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
29352 fi
29353 
29354 
29355 
29356 
29357 # Check whether --with-override-source-root was given.
29358 if test "${with_override_source_root+set}" = set; then :
29359   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
29360 $as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
29361 fi
29362 
29363 
29364 
29365 
29366 # Check whether --with-adds-and-overrides was given.
29367 if test "${with_adds_and_overrides+set}" = set; then :
29368   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
29369 $as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
29370 fi
29371 
29372 
29373 
29374 
29375 # Check whether --with-override-langtools was given.
29376 if test "${with_override_langtools+set}" = set; then :
29377   withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
29378 $as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
29379 fi
29380 
29381 
29382 
29383 
29384 # Check whether --with-override-corba was given.
29385 if test "${with_override_corba+set}" = set; then :
29386   withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
29387 $as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
29388 fi
29389 
29390 
29391 
29392 
29393 # Check whether --with-override-jaxp was given.
29394 if test "${with_override_jaxp+set}" = set; then :
29395   withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
29396 $as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
29397 fi
29398 
29399 
29400 
29401 
29402 # Check whether --with-override-jaxws was given.
29403 if test "${with_override_jaxws+set}" = set; then :
29404   withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
29405 $as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
29406 fi
29407 
29408 
29409 
29410 
29411 # Check whether --with-override-hotspot was given.
29412 if test "${with_override_hotspot+set}" = set; then :
29413   withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
29414 $as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
29415 fi
29416 
29417 
29418 
29419 
29420 # Check whether --with-override-nashorn was given.
29421 if test "${with_override_nashorn+set}" = set; then :
29422   withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
29423 $as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
29424 fi
29425 
29426 
29427 
29428 
29429 # Check whether --with-override-jdk was given.
29430 if test "${with_override_jdk+set}" = set; then :
29431   withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
29432 $as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
29433 fi
29434 
29435 
29436 
29437 
29438   BUILD_OUTPUT="$OUTPUT_ROOT"
29439 
29440 
29441   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29442   BUILD_HOTSPOT=true
29443 
29444 
29445 
29446 # Check whether --with-import-hotspot was given.
29447 if test "${with_import_hotspot+set}" = set; then :
29448   withval=$with_import_hotspot;
29449 fi
29450 
29451   if test "x$with_import_hotspot" != x; then
29452     CURDIR="$PWD"
29453     cd "$with_import_hotspot"
29454     HOTSPOT_DIST="`pwd`"
29455     cd "$CURDIR"
29456     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29457       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29458     fi
29459     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29460 $as_echo_n "checking if hotspot should be imported... " >&6; }
29461     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29462 $as_echo "yes from $HOTSPOT_DIST" >&6; }
29463     BUILD_HOTSPOT=false
29464   fi
29465 
29466   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29467 
29468 
29469 ###############################################################################
29470 #
29471 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
29472 # native code.
29473 #
29474 ###############################################################################
29475 
29476 # See if we are doing a complete static build or not
29477 
29478   # Check whether --enable-static-build was given.
29479 if test "${enable_static_build+set}" = set; then :
29480   enableval=$enable_static_build;
29481 fi
29482 
29483   STATIC_BUILD=false
29484   if test "x$enable_static_build" = "xyes"; then
29485     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29486 $as_echo_n "checking if static build is enabled... " >&6; }
29487     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29488 $as_echo "yes" >&6; }
29489     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29490       as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29491     fi
29492     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29493     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29494     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29495     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29496     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29497     STATIC_BUILD=true
29498   elif test "x$enable_static_build" = "xno"; then
29499     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29500 $as_echo_n "checking if static build is enabled... " >&6; }
29501     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29502 $as_echo "no" >&6; }
29503   elif test "x$enable_static_build" != "x"; then
29504     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29505   fi
29506 
29507 
29508 
29509 
29510 # First determine the toolchain type (compiler family)
29511 
29512 
29513 # Check whether --with-toolchain-type was given.
29514 if test "${with_toolchain_type+set}" = set; then :
29515   withval=$with_toolchain_type;
29516 fi
29517 
29518 
29519   # Use indirect variable referencing
29520   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29521   VALID_TOOLCHAINS=${!toolchain_var_name}
29522 
29523   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29524     if test -n "$XCODEBUILD"; then
29525       # On Mac OS X, default toolchain to clang after Xcode 5
29526       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29527       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29528       if test $? -ne 0; then
29529         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29530       fi
29531       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29532           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29533           $CUT -f 1 -d .`
29534       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29535 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29536       if test $XCODE_MAJOR_VERSION -ge 5; then
29537           DEFAULT_TOOLCHAIN="clang"
29538       else
29539           DEFAULT_TOOLCHAIN="gcc"
29540       fi
29541     else
29542       # If Xcode is not installed, but the command line tools are
29543       # then we can't run xcodebuild. On these systems we should
29544       # default to clang
29545       DEFAULT_TOOLCHAIN="clang"
29546     fi
29547   else
29548     # First toolchain type in the list is the default
29549     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29550   fi
29551 
29552   if test "x$with_toolchain_type" = xlist; then
29553     # List all toolchains
29554     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29555 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29556     for toolchain in $VALID_TOOLCHAINS; do
29557       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29558       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29559       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29560     done
29561 
29562     exit 0
29563   elif test "x$with_toolchain_type" != x; then
29564     # User override; check that it is valid
29565     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29566       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29567 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29568       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29569 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29570       as_fn_error $? "Cannot continue." "$LINENO" 5
29571     fi
29572     TOOLCHAIN_TYPE=$with_toolchain_type
29573   else
29574     # No flag given, use default
29575     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29576   fi
29577 
29578 
29579   TOOLCHAIN_CC_BINARY_clang="clang"
29580   TOOLCHAIN_CC_BINARY_gcc="gcc"
29581   TOOLCHAIN_CC_BINARY_microsoft="cl"
29582   TOOLCHAIN_CC_BINARY_solstudio="cc"
29583   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29584 
29585   TOOLCHAIN_CXX_BINARY_clang="clang++"
29586   TOOLCHAIN_CXX_BINARY_gcc="g++"
29587   TOOLCHAIN_CXX_BINARY_microsoft="cl"
29588   TOOLCHAIN_CXX_BINARY_solstudio="CC"
29589   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29590 
29591   # Use indirect variable referencing
29592   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29593   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29594   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29595   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29596   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29597   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29598 
29599 
29600   # Define filename patterns
29601   if test "x$OPENJDK_TARGET_OS" = xwindows; then
29602     LIBRARY_PREFIX=
29603     SHARED_LIBRARY_SUFFIX='.dll'
29604     STATIC_LIBRARY_SUFFIX='.lib'
29605     SHARED_LIBRARY='$1.dll'
29606     STATIC_LIBRARY='$1.lib'
29607     OBJ_SUFFIX='.obj'
29608     EXE_SUFFIX='.exe'
29609   else
29610     LIBRARY_PREFIX=lib
29611     SHARED_LIBRARY_SUFFIX='.so'
29612     STATIC_LIBRARY_SUFFIX='.a'
29613     SHARED_LIBRARY='lib$1.so'
29614     STATIC_LIBRARY='lib$1.a'
29615     OBJ_SUFFIX='.o'
29616     EXE_SUFFIX=''
29617     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29618       # For full static builds, we're overloading the SHARED_LIBRARY
29619       # variables in order to limit the amount of changes required.
29620       # It would be better to remove SHARED and just use LIBRARY and
29621       # LIBRARY_SUFFIX for libraries that can be built either
29622       # shared or static and use STATIC_* for libraries that are
29623       # always built statically.
29624       if test "x$STATIC_BUILD" = xtrue; then
29625         SHARED_LIBRARY='lib$1.a'
29626         SHARED_LIBRARY_SUFFIX='.a'
29627       else
29628         SHARED_LIBRARY='lib$1.dylib'
29629         SHARED_LIBRARY_SUFFIX='.dylib'
29630       fi
29631     fi
29632   fi
29633 
29634 
29635 
29636 
29637 
29638 
29639 
29640 
29641 
29642 
29643   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29644     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29645 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29646   else
29647     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29648 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29649   fi
29650 
29651 
29652 # User supplied flags should be used when configure detects compilers
29653 
29654   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29655     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29656 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29657   fi
29658 
29659   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29660     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29661 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29662   fi
29663 
29664   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29665     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29666 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29667   fi
29668 
29669 
29670 # Check whether --with-extra-cflags was given.
29671 if test "${with_extra_cflags+set}" = set; then :
29672   withval=$with_extra_cflags;
29673 fi
29674 
29675 
29676 
29677 # Check whether --with-extra-cxxflags was given.
29678 if test "${with_extra_cxxflags+set}" = set; then :
29679   withval=$with_extra_cxxflags;
29680 fi
29681 
29682 
29683 
29684 # Check whether --with-extra-ldflags was given.
29685 if test "${with_extra_ldflags+set}" = set; then :
29686   withval=$with_extra_ldflags;
29687 fi
29688 
29689 
29690   EXTRA_CFLAGS="$with_extra_cflags"
29691   EXTRA_CXXFLAGS="$with_extra_cxxflags"
29692   EXTRA_LDFLAGS="$with_extra_ldflags"
29693 
29694   # Hotspot needs these set in their legacy form
29695   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29696   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29697   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29698 
29699 
29700 
29701 
29702 
29703   # The global CFLAGS and LDLAGS variables are used by configure tests and
29704   # should include the extra parameters
29705   CFLAGS="$EXTRA_CFLAGS"
29706   CXXFLAGS="$EXTRA_CXXFLAGS"
29707   LDFLAGS="$EXTRA_LDFLAGS"
29708   CPPFLAGS=""
29709 
29710 # The sysroot cflags are needed for configure to be able to run the compilers
29711 
29712   if test "x$SYSROOT" != "x"; then
29713     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29714       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29715         # Solaris Studio does not have a concept of sysroot. Instead we must
29716         # make sure the default include and lib dirs are appended to each
29717         # compile and link command line.
29718         SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29719         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29720             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29721             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29722       fi
29723     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29724       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29725       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29726     elif test "x$TOOLCHAIN_TYPE" = xclang; then
29727       SYSROOT_CFLAGS="-isysroot $SYSROOT"
29728       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29729     fi
29730     # Propagate the sysroot args to hotspot
29731     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29732     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29733     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29734     # The global CFLAGS and LDFLAGS variables need these for configure to function
29735     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29736     CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29737     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29738     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29739   fi
29740 
29741   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29742     # We also need -iframework<path>/System/Library/Frameworks
29743     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29744     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29745     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
29746     # set this here so it doesn't have to be peppered throughout the forest
29747     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29748     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29749   fi
29750 
29751 
29752 
29753 
29754 
29755 # Then detect the actual binaries needed
29756 
29757   # FIXME: Is this needed?
29758   ac_ext=cpp
29759 ac_cpp='$CXXCPP $CPPFLAGS'
29760 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29761 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29762 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29763 
29764 
29765   # Store the CFLAGS etc passed to the configure script.
29766   ORG_CFLAGS="$CFLAGS"
29767   ORG_CXXFLAGS="$CXXFLAGS"
29768 
29769   # autoconf magic only relies on PATH, so update it if tools dir is specified
29770   OLD_PATH="$PATH"
29771 
29772   # On Windows, we need to detect the visual studio installation first.
29773   # This will change the PATH, but we need to keep that new PATH even
29774   # after toolchain detection is done, since the compiler (on x86) uses
29775   # it for DLL resolution in runtime.
29776   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
29777       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
29778 
29779   # Store path to cygwin link.exe to help excluding it when searching for
29780   # VS linker. This must be done before changing the PATH when looking for VS.
29781   # Extract the first word of "link", so it can be a program name with args.
29782 set dummy link; ac_word=$2
29783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29784 $as_echo_n "checking for $ac_word... " >&6; }
29785 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
29786   $as_echo_n "(cached) " >&6
29787 else
29788   case $CYGWIN_LINK in
29789   [\\/]* | ?:[\\/]*)
29790   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
29791   ;;
29792   *)
29793   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29794 for as_dir in $PATH
29795 do
29796   IFS=$as_save_IFS
29797   test -z "$as_dir" && as_dir=.
29798     for ac_exec_ext in '' $ac_executable_extensions; do
29799   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29800     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
29801     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29802     break 2
29803   fi
29804 done
29805   done
29806 IFS=$as_save_IFS
29807 
29808   ;;
29809 esac
29810 fi
29811 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
29812 if test -n "$CYGWIN_LINK"; then
29813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
29814 $as_echo "$CYGWIN_LINK" >&6; }
29815 else
29816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29817 $as_echo "no" >&6; }
29818 fi
29819 
29820 
29821   if test "x$CYGWIN_LINK" != x; then
29822     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
29823 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
29824     "$CYGWIN_LINK" --version > /dev/null
29825     if test $? -eq 0 ; then
29826       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29827 $as_echo "yes" >&6; }
29828     else
29829       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29830 $as_echo "no" >&6; }
29831       # This might be the VS linker. Don't exclude it later on.
29832       CYGWIN_LINK=""
29833     fi
29834   fi
29835 
29836   # First-hand choice is to locate and run the vsvars bat file.
29837 
29838 
29839 # Check whether --with-toolchain-version was given.
29840 if test "${with_toolchain_version+set}" = set; then :
29841   withval=$with_toolchain_version;
29842 fi
29843 
29844 
29845   if test "x$with_toolchain_version" = xlist; then
29846     # List all toolchains
29847     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
29848 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
29849     for version in $VALID_VS_VERSIONS; do
29850       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
29851       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
29852     done
29853 
29854     exit 0
29855   elif test "x$DEVKIT_VS_VERSION" != x; then
29856     VS_VERSION=$DEVKIT_VS_VERSION
29857     TOOLCHAIN_VERSION=$VS_VERSION
29858     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
29859     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
29860     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
29861     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
29862     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29863     VS_PATH="$TOOLCHAIN_PATH:$PATH"
29864 
29865     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
29866     # can still be exported as INCLUDE for compiler invocations without
29867     # SYSROOT_CFLAGS
29868     OLDIFS="$IFS"
29869     IFS=";"
29870     for i in $DEVKIT_VS_INCLUDE; do
29871       ipath=$i
29872 
29873   unix_path="$ipath"
29874   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29875     windows_path=`$CYGPATH -m "$unix_path"`
29876     ipath="$windows_path"
29877   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29878     windows_path=`cmd //c echo $unix_path`
29879     ipath="$windows_path"
29880   fi
29881 
29882       VS_INCLUDE="$VS_INCLUDE;$ipath"
29883     done
29884     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
29885     # as LIB for compiler invocations without SYSROOT_LDFLAGS
29886     for i in $DEVKIT_VS_LIB; do
29887       libpath=$i
29888 
29889   unix_path="$libpath"
29890   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29891     windows_path=`$CYGPATH -m "$unix_path"`
29892     libpath="$windows_path"
29893   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29894     windows_path=`cmd //c echo $unix_path`
29895     libpath="$windows_path"
29896   fi
29897 
29898       VS_LIB="$VS_LIB;$libpath"
29899     done
29900     IFS="$OLDIFS"
29901 
29902     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
29903 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
29904 
29905   elif test "x$with_toolchain_version" != x; then
29906     # User override; check that it is valid
29907     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
29908       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
29909 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
29910       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
29911 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
29912       as_fn_error $? "Cannot continue." "$LINENO" 5
29913     fi
29914     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
29915   else
29916     # No flag given, use default
29917     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
29918   fi
29919 
29920   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
29921 
29922   VS_VERSION="$VS_VERSION"
29923   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
29924   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
29925   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
29926   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
29927 
29928   # When using --with-tools-dir, assume it points to the correct and default
29929   # version of Visual Studio or that --with-toolchain-version was also set.
29930   if test "x$with_tools_dir" != x; then
29931 
29932   if test "x$VS_ENV_CMD" = x; then
29933     VS_VERSION="${VS_VERSION}"
29934     VS_BASE="$with_tools_dir/../.."
29935     METHOD="--with-tools-dir"
29936 
29937     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29938       VCVARSFILE="vc/bin/vcvars32.bat"
29939     else
29940       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29941     fi
29942 
29943 
29944   windows_path="$VS_BASE"
29945   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29946     unix_path=`$CYGPATH -u "$windows_path"`
29947     VS_BASE="$unix_path"
29948   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29949     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29950     VS_BASE="$unix_path"
29951   fi
29952 
29953     if test -d "$VS_BASE"; then
29954       if test -f "$VS_BASE/$VCVARSFILE"; then
29955         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29956 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29957         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29958         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29959         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29960         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29961       else
29962         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29963 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29964         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29965 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29966       fi
29967     fi
29968   fi
29969 
29970 
29971   if test "x$VS_ENV_CMD" = x; then
29972     VS_VERSION="${VS_VERSION}"
29973     VS_BASE="$with_tools_dir/../../.."
29974     METHOD="--with-tools-dir"
29975 
29976     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29977       VCVARSFILE="vc/bin/vcvars32.bat"
29978     else
29979       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29980     fi
29981 
29982 
29983   windows_path="$VS_BASE"
29984   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29985     unix_path=`$CYGPATH -u "$windows_path"`
29986     VS_BASE="$unix_path"
29987   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29988     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29989     VS_BASE="$unix_path"
29990   fi
29991 
29992     if test -d "$VS_BASE"; then
29993       if test -f "$VS_BASE/$VCVARSFILE"; then
29994         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29995 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29996         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29997         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29998         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29999         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30000       else
30001         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30002 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30003         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30004 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30005       fi
30006     fi
30007   fi
30008 
30009     if test "x$VS_ENV_CMD" = x; then
30010       # Having specified an argument which is incorrect will produce an instant failure;
30011       # we should not go on looking
30012       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
30013 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
30014       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
30015 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
30016       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
30017 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
30018       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
30019     fi
30020   fi
30021 
30022   VS_ENV_CMD=""
30023   VS_ENV_ARGS=""
30024 
30025   if test "x$VS_COMNTOOLS" != x; then
30026 
30027   if test "x$VS_ENV_CMD" = x; then
30028     VS_VERSION="${VS_VERSION}"
30029     VS_BASE="$VS_COMNTOOLS/../.."
30030     METHOD="$VS_COMNTOOLS_VAR variable"
30031 
30032     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30033       VCVARSFILE="vc/bin/vcvars32.bat"
30034     else
30035       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30036     fi
30037 
30038 
30039   windows_path="$VS_BASE"
30040   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30041     unix_path=`$CYGPATH -u "$windows_path"`
30042     VS_BASE="$unix_path"
30043   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30044     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30045     VS_BASE="$unix_path"
30046   fi
30047 
30048     if test -d "$VS_BASE"; then
30049       if test -f "$VS_BASE/$VCVARSFILE"; then
30050         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30051 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30052         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30053         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30054         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30055         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30056       else
30057         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30058 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30059         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30060 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30061       fi
30062     fi
30063   fi
30064 
30065   fi
30066   if test "x$PROGRAMFILES" != x; then
30067 
30068   if test "x$VS_ENV_CMD" = x; then
30069     VS_VERSION="${VS_VERSION}"
30070     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
30071     METHOD="well-known name"
30072 
30073     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30074       VCVARSFILE="vc/bin/vcvars32.bat"
30075     else
30076       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30077     fi
30078 
30079 
30080   windows_path="$VS_BASE"
30081   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30082     unix_path=`$CYGPATH -u "$windows_path"`
30083     VS_BASE="$unix_path"
30084   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30085     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30086     VS_BASE="$unix_path"
30087   fi
30088 
30089     if test -d "$VS_BASE"; then
30090       if test -f "$VS_BASE/$VCVARSFILE"; then
30091         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30092 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30093         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30094         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30095         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30096         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30097       else
30098         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30099 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30100         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30101 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30102       fi
30103     fi
30104   fi
30105 
30106   fi
30107   # Work around the insanely named ProgramFiles(x86) env variable
30108   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
30109   if test "x$PROGRAMFILES_X86" != x; then
30110 
30111   if test "x$VS_ENV_CMD" = x; then
30112     VS_VERSION="${VS_VERSION}"
30113     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
30114     METHOD="well-known name"
30115 
30116     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30117       VCVARSFILE="vc/bin/vcvars32.bat"
30118     else
30119       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30120     fi
30121 
30122 
30123   windows_path="$VS_BASE"
30124   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30125     unix_path=`$CYGPATH -u "$windows_path"`
30126     VS_BASE="$unix_path"
30127   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30128     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30129     VS_BASE="$unix_path"
30130   fi
30131 
30132     if test -d "$VS_BASE"; then
30133       if test -f "$VS_BASE/$VCVARSFILE"; then
30134         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30135 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30136         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30137         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30138         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30139         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30140       else
30141         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30142 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30143         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30144 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30145       fi
30146     fi
30147   fi
30148 
30149   fi
30150 
30151   if test "x$VS_ENV_CMD" = x; then
30152     VS_VERSION="${VS_VERSION}"
30153     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
30154     METHOD="well-known name"
30155 
30156     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30157       VCVARSFILE="vc/bin/vcvars32.bat"
30158     else
30159       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30160     fi
30161 
30162 
30163   windows_path="$VS_BASE"
30164   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30165     unix_path=`$CYGPATH -u "$windows_path"`
30166     VS_BASE="$unix_path"
30167   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30168     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30169     VS_BASE="$unix_path"
30170   fi
30171 
30172     if test -d "$VS_BASE"; then
30173       if test -f "$VS_BASE/$VCVARSFILE"; then
30174         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30175 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30176         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30177         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30178         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30179         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30180       else
30181         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30182 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30183         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30184 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30185       fi
30186     fi
30187   fi
30188 
30189 
30190   if test "x$VS_ENV_CMD" = x; then
30191     VS_VERSION="${VS_VERSION}"
30192     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
30193     METHOD="well-known name"
30194 
30195     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30196       VCVARSFILE="vc/bin/vcvars32.bat"
30197     else
30198       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30199     fi
30200 
30201 
30202   windows_path="$VS_BASE"
30203   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30204     unix_path=`$CYGPATH -u "$windows_path"`
30205     VS_BASE="$unix_path"
30206   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30207     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30208     VS_BASE="$unix_path"
30209   fi
30210 
30211     if test -d "$VS_BASE"; then
30212       if test -f "$VS_BASE/$VCVARSFILE"; then
30213         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30214 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30215         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30216         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30217         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30218         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30219       else
30220         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30221 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30222         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30223 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30224       fi
30225     fi
30226   fi
30227 
30228 
30229   if test "x$SDK_INSTALL_DIR" != x; then
30230     if test "x$ProgramW6432" != x; then
30231 
30232   if test "x$VS_ENV_CMD" = x; then
30233     VS_VERSION="${VS_VERSION}"
30234     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
30235     METHOD="well-known name"
30236 
30237   windows_path="$WIN_SDK_BASE"
30238   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30239     unix_path=`$CYGPATH -u "$windows_path"`
30240     WIN_SDK_BASE="$unix_path"
30241   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30242     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30243     WIN_SDK_BASE="$unix_path"
30244   fi
30245 
30246     if test -d "$WIN_SDK_BASE"; then
30247       # There have been cases of partial or broken SDK installations. A missing
30248       # lib dir is not going to work.
30249       if test ! -d "$WIN_SDK_BASE/lib"; then
30250         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30251 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30252         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30253 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30254       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30255         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30256 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30257         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30258         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30259           VS_ENV_ARGS="/x86"
30260         else
30261           VS_ENV_ARGS="/x64"
30262         fi
30263         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30264         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30265         # TODO: improve detection for other versions of SDK
30266         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30267       else
30268         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30269 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30270         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30271 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30272       fi
30273     fi
30274   fi
30275 
30276     fi
30277     if test "x$PROGRAMW6432" != x; then
30278 
30279   if test "x$VS_ENV_CMD" = x; then
30280     VS_VERSION="${VS_VERSION}"
30281     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
30282     METHOD="well-known name"
30283 
30284   windows_path="$WIN_SDK_BASE"
30285   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30286     unix_path=`$CYGPATH -u "$windows_path"`
30287     WIN_SDK_BASE="$unix_path"
30288   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30289     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30290     WIN_SDK_BASE="$unix_path"
30291   fi
30292 
30293     if test -d "$WIN_SDK_BASE"; then
30294       # There have been cases of partial or broken SDK installations. A missing
30295       # lib dir is not going to work.
30296       if test ! -d "$WIN_SDK_BASE/lib"; then
30297         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30298 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30299         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30300 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30301       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30302         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30303 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30304         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30305         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30306           VS_ENV_ARGS="/x86"
30307         else
30308           VS_ENV_ARGS="/x64"
30309         fi
30310         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30311         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30312         # TODO: improve detection for other versions of SDK
30313         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30314       else
30315         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30316 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30317         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30318 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30319       fi
30320     fi
30321   fi
30322 
30323     fi
30324     if test "x$PROGRAMFILES" != x; then
30325 
30326   if test "x$VS_ENV_CMD" = x; then
30327     VS_VERSION="${VS_VERSION}"
30328     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
30329     METHOD="well-known name"
30330 
30331   windows_path="$WIN_SDK_BASE"
30332   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30333     unix_path=`$CYGPATH -u "$windows_path"`
30334     WIN_SDK_BASE="$unix_path"
30335   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30336     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30337     WIN_SDK_BASE="$unix_path"
30338   fi
30339 
30340     if test -d "$WIN_SDK_BASE"; then
30341       # There have been cases of partial or broken SDK installations. A missing
30342       # lib dir is not going to work.
30343       if test ! -d "$WIN_SDK_BASE/lib"; then
30344         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30345 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30346         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30347 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30348       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30349         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30350 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30351         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30352         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30353           VS_ENV_ARGS="/x86"
30354         else
30355           VS_ENV_ARGS="/x64"
30356         fi
30357         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30358         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30359         # TODO: improve detection for other versions of SDK
30360         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30361       else
30362         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30363 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30364         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30365 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30366       fi
30367     fi
30368   fi
30369 
30370     fi
30371 
30372   if test "x$VS_ENV_CMD" = x; then
30373     VS_VERSION="${VS_VERSION}"
30374     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
30375     METHOD="well-known name"
30376 
30377   windows_path="$WIN_SDK_BASE"
30378   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30379     unix_path=`$CYGPATH -u "$windows_path"`
30380     WIN_SDK_BASE="$unix_path"
30381   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30382     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30383     WIN_SDK_BASE="$unix_path"
30384   fi
30385 
30386     if test -d "$WIN_SDK_BASE"; then
30387       # There have been cases of partial or broken SDK installations. A missing
30388       # lib dir is not going to work.
30389       if test ! -d "$WIN_SDK_BASE/lib"; then
30390         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30391 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30392         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30393 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30394       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30395         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30396 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30397         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30398         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30399           VS_ENV_ARGS="/x86"
30400         else
30401           VS_ENV_ARGS="/x64"
30402         fi
30403         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30404         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30405         # TODO: improve detection for other versions of SDK
30406         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30407       else
30408         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30409 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30410         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30411 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30412       fi
30413     fi
30414   fi
30415 
30416 
30417   if test "x$VS_ENV_CMD" = x; then
30418     VS_VERSION="${VS_VERSION}"
30419     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30420     METHOD="well-known name"
30421 
30422   windows_path="$WIN_SDK_BASE"
30423   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30424     unix_path=`$CYGPATH -u "$windows_path"`
30425     WIN_SDK_BASE="$unix_path"
30426   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30427     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30428     WIN_SDK_BASE="$unix_path"
30429   fi
30430 
30431     if test -d "$WIN_SDK_BASE"; then
30432       # There have been cases of partial or broken SDK installations. A missing
30433       # lib dir is not going to work.
30434       if test ! -d "$WIN_SDK_BASE/lib"; then
30435         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30436 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30437         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30438 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30439       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30440         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30441 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30442         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30443         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30444           VS_ENV_ARGS="/x86"
30445         else
30446           VS_ENV_ARGS="/x64"
30447         fi
30448         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30449         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30450         # TODO: improve detection for other versions of SDK
30451         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30452       else
30453         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30454 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30455         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30456 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30457       fi
30458     fi
30459   fi
30460 
30461   fi
30462 
30463     if test "x$VS_ENV_CMD" != x; then
30464       TOOLCHAIN_VERSION=$VS_VERSION
30465       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30466       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30467       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30468       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30469       # The rest of the variables are already evaled while probing
30470       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30471 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30472       break
30473     fi
30474   done
30475 
30476 
30477   # If we have a devkit, skip all of the below.
30478   if test "x$DEVKIT_VS_VERSION" = x; then
30479     if test "x$VS_ENV_CMD" != x; then
30480       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30481 
30482   # Only process if variable expands to non-empty
30483 
30484   if test "x$VS_ENV_CMD" != x; then
30485     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30486 
30487   # First separate the path from the arguments. This will split at the first
30488   # space.
30489   complete="$VS_ENV_CMD"
30490   path="${complete%% *}"
30491   tmp="$complete EOL"
30492   arguments="${tmp#* }"
30493 
30494   # Input might be given as Windows format, start by converting to
30495   # unix format.
30496   new_path=`$CYGPATH -u "$path"`
30497 
30498   # Now try to locate executable using which
30499   new_path=`$WHICH "$new_path" 2> /dev/null`
30500   # bat and cmd files are not always considered executable in cygwin causing which
30501   # to not find them
30502   if test "x$new_path" = x \
30503       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30504       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30505     new_path=`$CYGPATH -u "$path"`
30506   fi
30507   if test "x$new_path" = x; then
30508     # Oops. Which didn't find the executable.
30509     # The splitting of arguments from the executable at a space might have been incorrect,
30510     # since paths with space are more likely in Windows. Give it another try with the whole
30511     # argument.
30512     path="$complete"
30513     arguments="EOL"
30514     new_path=`$CYGPATH -u "$path"`
30515     new_path=`$WHICH "$new_path" 2> /dev/null`
30516     # bat and cmd files are not always considered executable in cygwin causing which
30517     # to not find them
30518     if test "x$new_path" = x \
30519         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30520         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30521       new_path=`$CYGPATH -u "$path"`
30522     fi
30523     if test "x$new_path" = x; then
30524       # It's still not found. Now this is an unrecoverable error.
30525       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30526 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30527       has_space=`$ECHO "$complete" | $GREP " "`
30528       if test "x$has_space" != x; then
30529         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30530 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30531       fi
30532       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30533     fi
30534   fi
30535 
30536   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30537   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30538   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30539   # "foo.exe" is OK but "foo" is an error.
30540   #
30541   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30542   # It is also a way to make sure we got the proper file name for the real test later on.
30543   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30544   if test "x$test_shortpath" = x; then
30545     # Short path failed, file does not exist as specified.
30546     # Try adding .exe or .cmd
30547     if test -f "${new_path}.exe"; then
30548       input_to_shortpath="${new_path}.exe"
30549     elif test -f "${new_path}.cmd"; then
30550       input_to_shortpath="${new_path}.cmd"
30551     else
30552       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30553 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30554       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30555 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30556       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30557     fi
30558   else
30559     input_to_shortpath="$new_path"
30560   fi
30561 
30562   # Call helper function which possibly converts this using DOS-style short mode.
30563   # If so, the updated path is stored in $new_path.
30564   new_path="$input_to_shortpath"
30565 
30566   input_path="$input_to_shortpath"
30567   # Check if we need to convert this using DOS-style short mode. If the path
30568   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30569   # take no chances and rewrite it.
30570   # Note: m4 eats our [], so we need to use [ and ] instead.
30571   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30572   if test "x$has_forbidden_chars" != x; then
30573     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30574     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30575     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30576     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30577       # Going to short mode and back again did indeed matter. Since short mode is
30578       # case insensitive, let's make it lowercase to improve readability.
30579       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30580       # Now convert it back to Unix-style (cygpath)
30581       input_path=`$CYGPATH -u "$shortmode_path"`
30582       new_path="$input_path"
30583     fi
30584   fi
30585 
30586   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30587   if test "x$test_cygdrive_prefix" = x; then
30588     # As a simple fix, exclude /usr/bin since it's not a real path.
30589     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30590       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30591       # a path prefixed by /cygdrive for fixpath to work.
30592       new_path="$CYGWIN_ROOT_PATH$input_path"
30593     fi
30594   fi
30595 
30596   # remove trailing .exe if any
30597   new_path="${new_path/%.exe/}"
30598 
30599     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30600 
30601   # First separate the path from the arguments. This will split at the first
30602   # space.
30603   complete="$VS_ENV_CMD"
30604   path="${complete%% *}"
30605   tmp="$complete EOL"
30606   arguments="${tmp#* }"
30607 
30608   # Input might be given as Windows format, start by converting to
30609   # unix format.
30610   new_path="$path"
30611 
30612   windows_path="$new_path"
30613   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30614     unix_path=`$CYGPATH -u "$windows_path"`
30615     new_path="$unix_path"
30616   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30617     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30618     new_path="$unix_path"
30619   fi
30620 
30621 
30622   # Now try to locate executable using which
30623   new_path=`$WHICH "$new_path" 2> /dev/null`
30624 
30625   if test "x$new_path" = x; then
30626     # Oops. Which didn't find the executable.
30627     # The splitting of arguments from the executable at a space might have been incorrect,
30628     # since paths with space are more likely in Windows. Give it another try with the whole
30629     # argument.
30630     path="$complete"
30631     arguments="EOL"
30632     new_path="$path"
30633 
30634   windows_path="$new_path"
30635   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30636     unix_path=`$CYGPATH -u "$windows_path"`
30637     new_path="$unix_path"
30638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30639     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30640     new_path="$unix_path"
30641   fi
30642 
30643 
30644     new_path=`$WHICH "$new_path" 2> /dev/null`
30645     # bat and cmd files are not always considered executable in MSYS causing which
30646     # to not find them
30647     if test "x$new_path" = x \
30648         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30649         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30650       new_path="$path"
30651 
30652   windows_path="$new_path"
30653   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30654     unix_path=`$CYGPATH -u "$windows_path"`
30655     new_path="$unix_path"
30656   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30657     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30658     new_path="$unix_path"
30659   fi
30660 
30661     fi
30662 
30663     if test "x$new_path" = x; then
30664       # It's still not found. Now this is an unrecoverable error.
30665       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30666 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30667       has_space=`$ECHO "$complete" | $GREP " "`
30668       if test "x$has_space" != x; then
30669         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30670 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30671       fi
30672       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30673     fi
30674   fi
30675 
30676   # Now new_path has a complete unix path to the binary
30677   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30678     # Keep paths in /bin as-is, but remove trailing .exe if any
30679     new_path="${new_path/%.exe/}"
30680     # Do not save /bin paths to all_fixpath_prefixes!
30681   else
30682     # Not in mixed or Windows style, start by that.
30683     new_path=`cmd //c echo $new_path`
30684 
30685   input_path="$new_path"
30686   # Check if we need to convert this using DOS-style short mode. If the path
30687   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30688   # take no chances and rewrite it.
30689   # Note: m4 eats our [], so we need to use [ and ] instead.
30690   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30691   if test "x$has_forbidden_chars" != x; then
30692     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30693     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30694   fi
30695 
30696     # Output is in $new_path
30697 
30698   windows_path="$new_path"
30699   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30700     unix_path=`$CYGPATH -u "$windows_path"`
30701     new_path="$unix_path"
30702   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30703     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30704     new_path="$unix_path"
30705   fi
30706 
30707     # remove trailing .exe if any
30708     new_path="${new_path/%.exe/}"
30709 
30710     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30711     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30712   fi
30713 
30714     else
30715       # We're on a unix platform. Hooray! :)
30716       # First separate the path from the arguments. This will split at the first
30717       # space.
30718       complete="$VS_ENV_CMD"
30719       path="${complete%% *}"
30720       tmp="$complete EOL"
30721       arguments="${tmp#* }"
30722 
30723       # Cannot rely on the command "which" here since it doesn't always work.
30724       is_absolute_path=`$ECHO "$path" | $GREP ^/`
30725       if test -z "$is_absolute_path"; then
30726         # Path to executable is not absolute. Find it.
30727         IFS_save="$IFS"
30728         IFS=:
30729         for p in $PATH; do
30730           if test -f "$p/$path" && test -x "$p/$path"; then
30731             new_path="$p/$path"
30732             break
30733           fi
30734         done
30735         IFS="$IFS_save"
30736       else
30737         # This is an absolute path, we can use it without further modifications.
30738         new_path="$path"
30739       fi
30740 
30741       if test "x$new_path" = x; then
30742         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30743 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30744         has_space=`$ECHO "$complete" | $GREP " "`
30745         if test "x$has_space" != x; then
30746           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30747 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30748         fi
30749         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30750       fi
30751     fi
30752 
30753     # Now join together the path and the arguments once again
30754     if test "x$arguments" != xEOL; then
30755       new_complete="$new_path ${arguments% *}"
30756     else
30757       new_complete="$new_path"
30758     fi
30759 
30760     if test "x$complete" != "x$new_complete"; then
30761       VS_ENV_CMD="$new_complete"
30762       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
30763 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
30764     fi
30765   fi
30766 
30767 
30768       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
30769       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
30770 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
30771 
30772       # We need to create a couple of temporary files.
30773       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
30774       $MKDIR -p $VS_ENV_TMP_DIR
30775 
30776       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
30777       # Instead create a shell script which will set the relevant variables when run.
30778       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
30779 
30780   unix_path="$WINPATH_VS_ENV_CMD"
30781   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30782     windows_path=`$CYGPATH -m "$unix_path"`
30783     WINPATH_VS_ENV_CMD="$windows_path"
30784   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30785     windows_path=`cmd //c echo $unix_path`
30786     WINPATH_VS_ENV_CMD="$windows_path"
30787   fi
30788 
30789       WINPATH_BASH="$BASH"
30790 
30791   unix_path="$WINPATH_BASH"
30792   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30793     windows_path=`$CYGPATH -m "$unix_path"`
30794     WINPATH_BASH="$windows_path"
30795   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30796     windows_path=`cmd //c echo $unix_path`
30797     WINPATH_BASH="$windows_path"
30798   fi
30799 
30800 
30801       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
30802       # script (executable by bash) that will setup the important variables.
30803       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
30804       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
30805       # This will end up something like:
30806       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
30807       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
30808       # These will end up something like:
30809       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
30810       # The trailing space for everyone except PATH is no typo, but is needed due
30811       # to trailing \ in the Windows paths. These will be stripped later.
30812       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
30813           >> $EXTRACT_VC_ENV_BAT_FILE
30814       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
30815           >> $EXTRACT_VC_ENV_BAT_FILE
30816       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
30817           >> $EXTRACT_VC_ENV_BAT_FILE
30818       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
30819           >> $EXTRACT_VC_ENV_BAT_FILE
30820       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
30821           >> $EXTRACT_VC_ENV_BAT_FILE
30822       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
30823           >> $EXTRACT_VC_ENV_BAT_FILE
30824 
30825       # Now execute the newly created bat file.
30826       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
30827       # Change directory so we don't need to mess with Windows paths in redirects.
30828       cd $VS_ENV_TMP_DIR
30829       cmd /c extract-vs-env.bat | $CAT
30830       cd $CURDIR
30831 
30832       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
30833         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
30834 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
30835         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30836 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30837         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30838 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30839         as_fn_error $? "Cannot continue" "$LINENO" 5
30840       fi
30841 
30842       # Now set all paths and other env variables. This will allow the rest of
30843       # the configure script to find and run the compiler in the proper way.
30844       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
30845 $as_echo "$as_me: Setting extracted environment variables" >&6;}
30846       . $VS_ENV_TMP_DIR/set-vs-env.sh
30847       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
30848       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
30849     else
30850       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
30851       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
30852 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
30853     fi
30854   fi
30855 
30856   # At this point, we should have correct variables in the environment, or we can't continue.
30857   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
30858 $as_echo_n "checking for Visual Studio variables... " >&6; }
30859 
30860   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
30861       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
30862     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
30863       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
30864 $as_echo "present but broken" >&6; }
30865       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
30866     else
30867       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30868 $as_echo "ok" >&6; }
30869       # Remove any trailing "\" ";" and " " from the variables.
30870       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
30871       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
30872       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
30873       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
30874       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
30875       # Remove any paths containing # (typically F#) as that messes up make. This
30876       # is needed if visual studio was installed with F# support.
30877       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
30878 
30879 
30880 
30881 
30882 
30883       # Convert VS_INCLUDE into SYSROOT_CFLAGS
30884       OLDIFS="$IFS"
30885       IFS=";"
30886       for i in $VS_INCLUDE; do
30887         ipath=$i
30888         # Only process non-empty elements
30889         if test "x$ipath" != x; then
30890           IFS="$OLDIFS"
30891           # Check that directory exists before calling fixup_path
30892           testpath=$ipath
30893 
30894   windows_path="$testpath"
30895   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30896     unix_path=`$CYGPATH -u "$windows_path"`
30897     testpath="$unix_path"
30898   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30899     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30900     testpath="$unix_path"
30901   fi
30902 
30903           if test -d "$testpath"; then
30904 
30905   # Only process if variable expands to non-empty
30906 
30907   if test "x$ipath" != x; then
30908     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30909 
30910   # Input might be given as Windows format, start by converting to
30911   # unix format.
30912   path="$ipath"
30913   new_path=`$CYGPATH -u "$path"`
30914 
30915   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30916   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30917   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30918   # "foo.exe" is OK but "foo" is an error.
30919   #
30920   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30921   # It is also a way to make sure we got the proper file name for the real test later on.
30922   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30923   if test "x$test_shortpath" = x; then
30924     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30925 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30926     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
30927   fi
30928 
30929   # Call helper function which possibly converts this using DOS-style short mode.
30930   # If so, the updated path is stored in $new_path.
30931 
30932   input_path="$new_path"
30933   # Check if we need to convert this using DOS-style short mode. If the path
30934   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30935   # take no chances and rewrite it.
30936   # Note: m4 eats our [], so we need to use [ and ] instead.
30937   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30938   if test "x$has_forbidden_chars" != x; then
30939     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30940     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30941     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30942     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30943       # Going to short mode and back again did indeed matter. Since short mode is
30944       # case insensitive, let's make it lowercase to improve readability.
30945       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30946       # Now convert it back to Unix-style (cygpath)
30947       input_path=`$CYGPATH -u "$shortmode_path"`
30948       new_path="$input_path"
30949     fi
30950   fi
30951 
30952   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30953   if test "x$test_cygdrive_prefix" = x; then
30954     # As a simple fix, exclude /usr/bin since it's not a real path.
30955     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30956       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30957       # a path prefixed by /cygdrive for fixpath to work.
30958       new_path="$CYGWIN_ROOT_PATH$input_path"
30959     fi
30960   fi
30961 
30962 
30963   if test "x$path" != "x$new_path"; then
30964     ipath="$new_path"
30965     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30966 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30967   fi
30968 
30969     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30970 
30971   path="$ipath"
30972   has_colon=`$ECHO $path | $GREP ^.:`
30973   new_path="$path"
30974   if test "x$has_colon" = x; then
30975     # Not in mixed or Windows style, start by that.
30976     new_path=`cmd //c echo $path`
30977   fi
30978 
30979 
30980   input_path="$new_path"
30981   # Check if we need to convert this using DOS-style short mode. If the path
30982   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30983   # take no chances and rewrite it.
30984   # Note: m4 eats our [], so we need to use [ and ] instead.
30985   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30986   if test "x$has_forbidden_chars" != x; then
30987     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30988     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30989   fi
30990 
30991 
30992   windows_path="$new_path"
30993   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30994     unix_path=`$CYGPATH -u "$windows_path"`
30995     new_path="$unix_path"
30996   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30997     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30998     new_path="$unix_path"
30999   fi
31000 
31001   if test "x$path" != "x$new_path"; then
31002     ipath="$new_path"
31003     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31004 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31005   fi
31006 
31007   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31008   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31009 
31010     else
31011       # We're on a unix platform. Hooray! :)
31012       path="$ipath"
31013       has_space=`$ECHO "$path" | $GREP " "`
31014       if test "x$has_space" != x; then
31015         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31016 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31017         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31018       fi
31019 
31020       # Use eval to expand a potential ~
31021       eval path="$path"
31022       if test ! -f "$path" && test ! -d "$path"; then
31023         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
31024       fi
31025 
31026       ipath="`cd "$path"; $THEPWDCMD -L`"
31027     fi
31028   fi
31029 
31030             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
31031           fi
31032           IFS=";"
31033         fi
31034       done
31035       # Convert VS_LIB into SYSROOT_LDFLAGS
31036       for i in $VS_LIB; do
31037         libpath=$i
31038         # Only process non-empty elements
31039         if test "x$libpath" != x; then
31040           IFS="$OLDIFS"
31041           # Check that directory exists before calling fixup_path
31042           testpath=$libpath
31043 
31044   windows_path="$testpath"
31045   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31046     unix_path=`$CYGPATH -u "$windows_path"`
31047     testpath="$unix_path"
31048   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31049     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31050     testpath="$unix_path"
31051   fi
31052 
31053           if test -d "$testpath"; then
31054 
31055   # Only process if variable expands to non-empty
31056 
31057   if test "x$libpath" != x; then
31058     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31059 
31060   # Input might be given as Windows format, start by converting to
31061   # unix format.
31062   path="$libpath"
31063   new_path=`$CYGPATH -u "$path"`
31064 
31065   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31066   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31067   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31068   # "foo.exe" is OK but "foo" is an error.
31069   #
31070   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31071   # It is also a way to make sure we got the proper file name for the real test later on.
31072   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31073   if test "x$test_shortpath" = x; then
31074     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31075 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31076     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
31077   fi
31078 
31079   # Call helper function which possibly converts this using DOS-style short mode.
31080   # If so, the updated path is stored in $new_path.
31081 
31082   input_path="$new_path"
31083   # Check if we need to convert this using DOS-style short mode. If the path
31084   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31085   # take no chances and rewrite it.
31086   # Note: m4 eats our [], so we need to use [ and ] instead.
31087   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31088   if test "x$has_forbidden_chars" != x; then
31089     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31090     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31091     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31092     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31093       # Going to short mode and back again did indeed matter. Since short mode is
31094       # case insensitive, let's make it lowercase to improve readability.
31095       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31096       # Now convert it back to Unix-style (cygpath)
31097       input_path=`$CYGPATH -u "$shortmode_path"`
31098       new_path="$input_path"
31099     fi
31100   fi
31101 
31102   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31103   if test "x$test_cygdrive_prefix" = x; then
31104     # As a simple fix, exclude /usr/bin since it's not a real path.
31105     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31106       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31107       # a path prefixed by /cygdrive for fixpath to work.
31108       new_path="$CYGWIN_ROOT_PATH$input_path"
31109     fi
31110   fi
31111 
31112 
31113   if test "x$path" != "x$new_path"; then
31114     libpath="$new_path"
31115     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31116 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31117   fi
31118 
31119     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31120 
31121   path="$libpath"
31122   has_colon=`$ECHO $path | $GREP ^.:`
31123   new_path="$path"
31124   if test "x$has_colon" = x; then
31125     # Not in mixed or Windows style, start by that.
31126     new_path=`cmd //c echo $path`
31127   fi
31128 
31129 
31130   input_path="$new_path"
31131   # Check if we need to convert this using DOS-style short mode. If the path
31132   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31133   # take no chances and rewrite it.
31134   # Note: m4 eats our [], so we need to use [ and ] instead.
31135   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31136   if test "x$has_forbidden_chars" != x; then
31137     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31138     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31139   fi
31140 
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   if test "x$path" != "x$new_path"; then
31152     libpath="$new_path"
31153     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31154 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31155   fi
31156 
31157   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31158   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31159 
31160     else
31161       # We're on a unix platform. Hooray! :)
31162       path="$libpath"
31163       has_space=`$ECHO "$path" | $GREP " "`
31164       if test "x$has_space" != x; then
31165         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31166 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31167         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31168       fi
31169 
31170       # Use eval to expand a potential ~
31171       eval path="$path"
31172       if test ! -f "$path" && test ! -d "$path"; then
31173         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
31174       fi
31175 
31176       libpath="`cd "$path"; $THEPWDCMD -L`"
31177     fi
31178   fi
31179 
31180             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
31181           fi
31182           IFS=";"
31183         fi
31184       done
31185       IFS="$OLDIFS"
31186     fi
31187   else
31188     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31189 $as_echo "not found" >&6; }
31190 
31191     if test "x$VS_ENV_CMD" = x; then
31192       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
31193 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
31194       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
31195 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
31196     else
31197       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
31198 $as_echo "$as_me: Running the extraction script failed." >&6;}
31199     fi
31200     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31201 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31202     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31203 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31204     as_fn_error $? "Cannot continue" "$LINENO" 5
31205   fi
31206 
31207     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
31208     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
31209     PATH="$VS_PATH"
31210     # The microsoft toolchain also requires INCLUDE and LIB to be set.
31211     export INCLUDE="$VS_INCLUDE"
31212     export LIB="$VS_LIB"
31213   fi
31214 
31215   # For solaris we really need solaris tools, and not the GNU equivalent.
31216   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
31217   # so add that to path before starting to probe.
31218   # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
31219   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
31220     PATH="/usr/ccs/bin:$PATH"
31221   fi
31222 
31223   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
31224   # override all other locations.
31225   if test "x$TOOLCHAIN_PATH" != x; then
31226     PATH=$TOOLCHAIN_PATH:$PATH
31227   fi
31228 
31229 
31230   #
31231   # Setup the compilers (CC and CXX)
31232   #
31233 
31234   COMPILER_NAME=C
31235   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
31236 
31237   if test "x$CC" != x; then
31238     # User has supplied compiler name already, always let that override.
31239     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
31240 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
31241     if test "x`basename $CC`" = "x$CC"; then
31242       # A command without a complete path is provided, search $PATH.
31243 
31244       for ac_prog in $CC
31245 do
31246   # Extract the first word of "$ac_prog", so it can be a program name with args.
31247 set dummy $ac_prog; ac_word=$2
31248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31249 $as_echo_n "checking for $ac_word... " >&6; }
31250 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31251   $as_echo_n "(cached) " >&6
31252 else
31253   case $POTENTIAL_CC in
31254   [\\/]* | ?:[\\/]*)
31255   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31256   ;;
31257   *)
31258   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31259 for as_dir in $PATH
31260 do
31261   IFS=$as_save_IFS
31262   test -z "$as_dir" && as_dir=.
31263     for ac_exec_ext in '' $ac_executable_extensions; do
31264   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31265     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31266     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31267     break 2
31268   fi
31269 done
31270   done
31271 IFS=$as_save_IFS
31272 
31273   ;;
31274 esac
31275 fi
31276 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31277 if test -n "$POTENTIAL_CC"; then
31278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31279 $as_echo "$POTENTIAL_CC" >&6; }
31280 else
31281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31282 $as_echo "no" >&6; }
31283 fi
31284 
31285 
31286   test -n "$POTENTIAL_CC" && break
31287 done
31288 
31289       if test "x$POTENTIAL_CC" != x; then
31290         CC=$POTENTIAL_CC
31291       else
31292         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
31293       fi
31294     else
31295       # Otherwise it might already be a complete path
31296       if test ! -x "$CC"; then
31297         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
31298       fi
31299     fi
31300   else
31301     # No user supplied value. Locate compiler ourselves.
31302 
31303     # If we are cross compiling, assume cross compilation tools follows the
31304     # cross compilation standard where they are prefixed with the autoconf
31305     # standard name for the target. For example the binary
31306     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
31307     # If we are not cross compiling, then the default compiler name will be
31308     # used.
31309 
31310     CC=
31311     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
31312     # before checking the rest of the PATH.
31313     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
31314     # step, this should not be necessary.
31315     if test -n "$TOOLCHAIN_PATH"; then
31316       PATH_save="$PATH"
31317       PATH="$TOOLCHAIN_PATH"
31318       for ac_prog in $SEARCH_LIST
31319 do
31320   # Extract the first word of "$ac_prog", so it can be a program name with args.
31321 set dummy $ac_prog; ac_word=$2
31322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31323 $as_echo_n "checking for $ac_word... " >&6; }
31324 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
31325   $as_echo_n "(cached) " >&6
31326 else
31327   case $TOOLCHAIN_PATH_CC in
31328   [\\/]* | ?:[\\/]*)
31329   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
31330   ;;
31331   *)
31332   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31333 for as_dir in $PATH
31334 do
31335   IFS=$as_save_IFS
31336   test -z "$as_dir" && as_dir=.
31337     for ac_exec_ext in '' $ac_executable_extensions; do
31338   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31339     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
31340     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31341     break 2
31342   fi
31343 done
31344   done
31345 IFS=$as_save_IFS
31346 
31347   ;;
31348 esac
31349 fi
31350 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
31351 if test -n "$TOOLCHAIN_PATH_CC"; then
31352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
31353 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
31354 else
31355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31356 $as_echo "no" >&6; }
31357 fi
31358 
31359 
31360   test -n "$TOOLCHAIN_PATH_CC" && break
31361 done
31362 
31363       CC=$TOOLCHAIN_PATH_CC
31364       PATH="$PATH_save"
31365     fi
31366 
31367     # AC_PATH_PROGS can't be run multiple times with the same variable,
31368     # so create a new name for this run.
31369     if test "x$CC" = x; then
31370       for ac_prog in $SEARCH_LIST
31371 do
31372   # Extract the first word of "$ac_prog", so it can be a program name with args.
31373 set dummy $ac_prog; ac_word=$2
31374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31375 $as_echo_n "checking for $ac_word... " >&6; }
31376 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31377   $as_echo_n "(cached) " >&6
31378 else
31379   case $POTENTIAL_CC in
31380   [\\/]* | ?:[\\/]*)
31381   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31382   ;;
31383   *)
31384   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31385 for as_dir in $PATH
31386 do
31387   IFS=$as_save_IFS
31388   test -z "$as_dir" && as_dir=.
31389     for ac_exec_ext in '' $ac_executable_extensions; do
31390   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31391     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31392     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31393     break 2
31394   fi
31395 done
31396   done
31397 IFS=$as_save_IFS
31398 
31399   ;;
31400 esac
31401 fi
31402 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31403 if test -n "$POTENTIAL_CC"; then
31404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31405 $as_echo "$POTENTIAL_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 "$POTENTIAL_CC" && break
31413 done
31414 
31415       CC=$POTENTIAL_CC
31416     fi
31417 
31418     if test "x$CC" = x; then
31419 
31420   # Print a helpful message on how to acquire the necessary build dependency.
31421   # devkit is the help tag: freetype, cups, alsa etc
31422   MISSING_DEPENDENCY=devkit
31423 
31424   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31425     cygwin_help $MISSING_DEPENDENCY
31426   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31427     msys_help $MISSING_DEPENDENCY
31428   else
31429     PKGHANDLER_COMMAND=
31430 
31431     case $PKGHANDLER in
31432       apt-get)
31433         apt_help     $MISSING_DEPENDENCY ;;
31434       yum)
31435         yum_help     $MISSING_DEPENDENCY ;;
31436       port)
31437         port_help    $MISSING_DEPENDENCY ;;
31438       pkgutil)
31439         pkgutil_help $MISSING_DEPENDENCY ;;
31440       pkgadd)
31441         pkgadd_help  $MISSING_DEPENDENCY ;;
31442     esac
31443 
31444     if test "x$PKGHANDLER_COMMAND" != x; then
31445       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31446     fi
31447   fi
31448 
31449       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31450     fi
31451   fi
31452 
31453   # Now we have a compiler binary in CC. Make sure it's okay.
31454 
31455   # Only process if variable expands to non-empty
31456 
31457   if test "x$CC" != x; then
31458     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31459 
31460   # First separate the path from the arguments. This will split at the first
31461   # space.
31462   complete="$CC"
31463   path="${complete%% *}"
31464   tmp="$complete EOL"
31465   arguments="${tmp#* }"
31466 
31467   # Input might be given as Windows format, start by converting to
31468   # unix format.
31469   new_path=`$CYGPATH -u "$path"`
31470 
31471   # Now try to locate executable using which
31472   new_path=`$WHICH "$new_path" 2> /dev/null`
31473   # bat and cmd files are not always considered executable in cygwin causing which
31474   # to not find them
31475   if test "x$new_path" = x \
31476       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31477       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31478     new_path=`$CYGPATH -u "$path"`
31479   fi
31480   if test "x$new_path" = x; then
31481     # Oops. Which didn't find the executable.
31482     # The splitting of arguments from the executable at a space might have been incorrect,
31483     # since paths with space are more likely in Windows. Give it another try with the whole
31484     # argument.
31485     path="$complete"
31486     arguments="EOL"
31487     new_path=`$CYGPATH -u "$path"`
31488     new_path=`$WHICH "$new_path" 2> /dev/null`
31489     # bat and cmd files are not always considered executable in cygwin causing which
31490     # to not find them
31491     if test "x$new_path" = x \
31492         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31493         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31494       new_path=`$CYGPATH -u "$path"`
31495     fi
31496     if test "x$new_path" = x; then
31497       # It's still not found. Now this is an unrecoverable error.
31498       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31499 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31500       has_space=`$ECHO "$complete" | $GREP " "`
31501       if test "x$has_space" != x; then
31502         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31503 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31504       fi
31505       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31506     fi
31507   fi
31508 
31509   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31510   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31511   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31512   # "foo.exe" is OK but "foo" is an error.
31513   #
31514   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31515   # It is also a way to make sure we got the proper file name for the real test later on.
31516   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31517   if test "x$test_shortpath" = x; then
31518     # Short path failed, file does not exist as specified.
31519     # Try adding .exe or .cmd
31520     if test -f "${new_path}.exe"; then
31521       input_to_shortpath="${new_path}.exe"
31522     elif test -f "${new_path}.cmd"; then
31523       input_to_shortpath="${new_path}.cmd"
31524     else
31525       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31526 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31527       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31528 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31529       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31530     fi
31531   else
31532     input_to_shortpath="$new_path"
31533   fi
31534 
31535   # Call helper function which possibly converts this using DOS-style short mode.
31536   # If so, the updated path is stored in $new_path.
31537   new_path="$input_to_shortpath"
31538 
31539   input_path="$input_to_shortpath"
31540   # Check if we need to convert this using DOS-style short mode. If the path
31541   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31542   # take no chances and rewrite it.
31543   # Note: m4 eats our [], so we need to use [ and ] instead.
31544   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31545   if test "x$has_forbidden_chars" != x; then
31546     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31547     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31548     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31549     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31550       # Going to short mode and back again did indeed matter. Since short mode is
31551       # case insensitive, let's make it lowercase to improve readability.
31552       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31553       # Now convert it back to Unix-style (cygpath)
31554       input_path=`$CYGPATH -u "$shortmode_path"`
31555       new_path="$input_path"
31556     fi
31557   fi
31558 
31559   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31560   if test "x$test_cygdrive_prefix" = x; then
31561     # As a simple fix, exclude /usr/bin since it's not a real path.
31562     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31563       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31564       # a path prefixed by /cygdrive for fixpath to work.
31565       new_path="$CYGWIN_ROOT_PATH$input_path"
31566     fi
31567   fi
31568 
31569   # remove trailing .exe if any
31570   new_path="${new_path/%.exe/}"
31571 
31572     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31573 
31574   # First separate the path from the arguments. This will split at the first
31575   # space.
31576   complete="$CC"
31577   path="${complete%% *}"
31578   tmp="$complete EOL"
31579   arguments="${tmp#* }"
31580 
31581   # Input might be given as Windows format, start by converting to
31582   # unix format.
31583   new_path="$path"
31584 
31585   windows_path="$new_path"
31586   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31587     unix_path=`$CYGPATH -u "$windows_path"`
31588     new_path="$unix_path"
31589   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31590     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31591     new_path="$unix_path"
31592   fi
31593 
31594 
31595   # Now try to locate executable using which
31596   new_path=`$WHICH "$new_path" 2> /dev/null`
31597 
31598   if test "x$new_path" = x; then
31599     # Oops. Which didn't find the executable.
31600     # The splitting of arguments from the executable at a space might have been incorrect,
31601     # since paths with space are more likely in Windows. Give it another try with the whole
31602     # argument.
31603     path="$complete"
31604     arguments="EOL"
31605     new_path="$path"
31606 
31607   windows_path="$new_path"
31608   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31609     unix_path=`$CYGPATH -u "$windows_path"`
31610     new_path="$unix_path"
31611   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31612     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31613     new_path="$unix_path"
31614   fi
31615 
31616 
31617     new_path=`$WHICH "$new_path" 2> /dev/null`
31618     # bat and cmd files are not always considered executable in MSYS causing which
31619     # to not find them
31620     if test "x$new_path" = x \
31621         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31622         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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     fi
31635 
31636     if test "x$new_path" = x; then
31637       # It's still not found. Now this is an unrecoverable error.
31638       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31639 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31640       has_space=`$ECHO "$complete" | $GREP " "`
31641       if test "x$has_space" != x; then
31642         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31643 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31644       fi
31645       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31646     fi
31647   fi
31648 
31649   # Now new_path has a complete unix path to the binary
31650   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31651     # Keep paths in /bin as-is, but remove trailing .exe if any
31652     new_path="${new_path/%.exe/}"
31653     # Do not save /bin paths to all_fixpath_prefixes!
31654   else
31655     # Not in mixed or Windows style, start by that.
31656     new_path=`cmd //c echo $new_path`
31657 
31658   input_path="$new_path"
31659   # Check if we need to convert this using DOS-style short mode. If the path
31660   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31661   # take no chances and rewrite it.
31662   # Note: m4 eats our [], so we need to use [ and ] instead.
31663   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31664   if test "x$has_forbidden_chars" != x; then
31665     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31666     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31667   fi
31668 
31669     # Output is in $new_path
31670 
31671   windows_path="$new_path"
31672   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31673     unix_path=`$CYGPATH -u "$windows_path"`
31674     new_path="$unix_path"
31675   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31676     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31677     new_path="$unix_path"
31678   fi
31679 
31680     # remove trailing .exe if any
31681     new_path="${new_path/%.exe/}"
31682 
31683     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31684     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31685   fi
31686 
31687     else
31688       # We're on a unix platform. Hooray! :)
31689       # First separate the path from the arguments. This will split at the first
31690       # space.
31691       complete="$CC"
31692       path="${complete%% *}"
31693       tmp="$complete EOL"
31694       arguments="${tmp#* }"
31695 
31696       # Cannot rely on the command "which" here since it doesn't always work.
31697       is_absolute_path=`$ECHO "$path" | $GREP ^/`
31698       if test -z "$is_absolute_path"; then
31699         # Path to executable is not absolute. Find it.
31700         IFS_save="$IFS"
31701         IFS=:
31702         for p in $PATH; do
31703           if test -f "$p/$path" && test -x "$p/$path"; then
31704             new_path="$p/$path"
31705             break
31706           fi
31707         done
31708         IFS="$IFS_save"
31709       else
31710         # This is an absolute path, we can use it without further modifications.
31711         new_path="$path"
31712       fi
31713 
31714       if test "x$new_path" = x; then
31715         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31716 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31717         has_space=`$ECHO "$complete" | $GREP " "`
31718         if test "x$has_space" != x; then
31719           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31720 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31721         fi
31722         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31723       fi
31724     fi
31725 
31726     # Now join together the path and the arguments once again
31727     if test "x$arguments" != xEOL; then
31728       new_complete="$new_path ${arguments% *}"
31729     else
31730       new_complete="$new_path"
31731     fi
31732 
31733     if test "x$complete" != "x$new_complete"; then
31734       CC="$new_complete"
31735       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
31736 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
31737     fi
31738   fi
31739 
31740   TEST_COMPILER="$CC"
31741   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31742   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31743   if test "x$OPENJDK_BUILD_OS" != xaix; then
31744     # FIXME: This test should not be needed anymore; we don't do that for any platform.
31745     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
31746 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
31747 
31748   if test "x$OPENJDK_BUILD_OS" != xwindows; then
31749     # Follow a chain of symbolic links. Use readlink
31750     # where it exists, else fall back to horribly
31751     # complicated shell code.
31752     if test "x$READLINK_TESTED" != yes; then
31753       # On MacOSX there is a readlink tool with a different
31754       # purpose than the GNU readlink tool. Check the found readlink.
31755       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31756       if test "x$ISGNU" = x; then
31757         # A readlink that we do not know how to use.
31758         # Are there other non-GNU readlinks out there?
31759         READLINK_TESTED=yes
31760         READLINK=
31761       fi
31762     fi
31763 
31764     if test "x$READLINK" != x; then
31765       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31766     else
31767       # Save the current directory for restoring afterwards
31768       STARTDIR=$PWD
31769       COUNTER=0
31770       sym_link_dir=`$DIRNAME $TEST_COMPILER`
31771       sym_link_file=`$BASENAME $TEST_COMPILER`
31772       cd $sym_link_dir
31773       # Use -P flag to resolve symlinks in directories.
31774       cd `$THEPWDCMD -P`
31775       sym_link_dir=`$THEPWDCMD -P`
31776       # Resolve file symlinks
31777       while test $COUNTER -lt 20; do
31778         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31779         if test "x$ISLINK" == x; then
31780           # This is not a symbolic link! We are done!
31781           break
31782         fi
31783         # Again resolve directory symlinks since the target of the just found
31784         # link could be in a different directory
31785         cd `$DIRNAME $ISLINK`
31786         sym_link_dir=`$THEPWDCMD -P`
31787         sym_link_file=`$BASENAME $ISLINK`
31788         let COUNTER=COUNTER+1
31789       done
31790       cd $STARTDIR
31791       TEST_COMPILER=$sym_link_dir/$sym_link_file
31792     fi
31793   fi
31794 
31795     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31796 $as_echo "$TEST_COMPILER" >&6; }
31797   fi
31798   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
31799 $as_echo_n "checking if CC is disguised ccache... " >&6; }
31800 
31801   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31802   if test "x$COMPILER_BASENAME" = "xccache"; then
31803     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31804 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31805     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31806     # We want to control ccache invocation ourselves, so ignore this cc and try
31807     # searching again.
31808 
31809     # Remove the path to the fake ccache cc from the PATH
31810     RETRY_COMPILER_SAVED_PATH="$PATH"
31811     COMPILER_DIRNAME=`$DIRNAME $CC`
31812     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31813 
31814     # Try again looking for our compiler
31815     if test -n "$ac_tool_prefix"; then
31816   for ac_prog in $TOOLCHAIN_CC_BINARY
31817   do
31818     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31819 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31821 $as_echo_n "checking for $ac_word... " >&6; }
31822 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
31823   $as_echo_n "(cached) " >&6
31824 else
31825   if test -n "$PROPER_COMPILER_CC"; then
31826   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
31827 else
31828 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31829 for as_dir in $PATH
31830 do
31831   IFS=$as_save_IFS
31832   test -z "$as_dir" && as_dir=.
31833     for ac_exec_ext in '' $ac_executable_extensions; do
31834   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31835     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
31836     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31837     break 2
31838   fi
31839 done
31840   done
31841 IFS=$as_save_IFS
31842 
31843 fi
31844 fi
31845 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
31846 if test -n "$PROPER_COMPILER_CC"; then
31847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31848 $as_echo "$PROPER_COMPILER_CC" >&6; }
31849 else
31850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31851 $as_echo "no" >&6; }
31852 fi
31853 
31854 
31855     test -n "$PROPER_COMPILER_CC" && break
31856   done
31857 fi
31858 if test -z "$PROPER_COMPILER_CC"; then
31859   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
31860   for ac_prog in $TOOLCHAIN_CC_BINARY
31861 do
31862   # Extract the first word of "$ac_prog", so it can be a program name with args.
31863 set dummy $ac_prog; ac_word=$2
31864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31865 $as_echo_n "checking for $ac_word... " >&6; }
31866 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
31867   $as_echo_n "(cached) " >&6
31868 else
31869   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31870   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
31871 else
31872 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31873 for as_dir in $PATH
31874 do
31875   IFS=$as_save_IFS
31876   test -z "$as_dir" && as_dir=.
31877     for ac_exec_ext in '' $ac_executable_extensions; do
31878   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31879     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
31880     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31881     break 2
31882   fi
31883 done
31884   done
31885 IFS=$as_save_IFS
31886 
31887 fi
31888 fi
31889 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
31890 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
31892 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
31893 else
31894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31895 $as_echo "no" >&6; }
31896 fi
31897 
31898 
31899   test -n "$ac_ct_PROPER_COMPILER_CC" && break
31900 done
31901 
31902   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
31903     PROPER_COMPILER_CC=""
31904   else
31905     case $cross_compiling:$ac_tool_warned in
31906 yes:)
31907 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31908 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31909 ac_tool_warned=yes ;;
31910 esac
31911     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
31912   fi
31913 fi
31914 
31915 
31916   # Only process if variable expands to non-empty
31917 
31918   if test "x$PROPER_COMPILER_CC" != x; then
31919     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31920 
31921   # First separate the path from the arguments. This will split at the first
31922   # space.
31923   complete="$PROPER_COMPILER_CC"
31924   path="${complete%% *}"
31925   tmp="$complete EOL"
31926   arguments="${tmp#* }"
31927 
31928   # Input might be given as Windows format, start by converting to
31929   # unix format.
31930   new_path=`$CYGPATH -u "$path"`
31931 
31932   # Now try to locate executable using which
31933   new_path=`$WHICH "$new_path" 2> /dev/null`
31934   # bat and cmd files are not always considered executable in cygwin causing which
31935   # to not find them
31936   if test "x$new_path" = x \
31937       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31938       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31939     new_path=`$CYGPATH -u "$path"`
31940   fi
31941   if test "x$new_path" = x; then
31942     # Oops. Which didn't find the executable.
31943     # The splitting of arguments from the executable at a space might have been incorrect,
31944     # since paths with space are more likely in Windows. Give it another try with the whole
31945     # argument.
31946     path="$complete"
31947     arguments="EOL"
31948     new_path=`$CYGPATH -u "$path"`
31949     new_path=`$WHICH "$new_path" 2> /dev/null`
31950     # bat and cmd files are not always considered executable in cygwin causing which
31951     # to not find them
31952     if test "x$new_path" = x \
31953         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31954         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31955       new_path=`$CYGPATH -u "$path"`
31956     fi
31957     if test "x$new_path" = x; then
31958       # It's still not found. Now this is an unrecoverable error.
31959       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31960 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31961       has_space=`$ECHO "$complete" | $GREP " "`
31962       if test "x$has_space" != x; then
31963         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31964 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31965       fi
31966       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31967     fi
31968   fi
31969 
31970   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31971   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31972   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31973   # "foo.exe" is OK but "foo" is an error.
31974   #
31975   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31976   # It is also a way to make sure we got the proper file name for the real test later on.
31977   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31978   if test "x$test_shortpath" = x; then
31979     # Short path failed, file does not exist as specified.
31980     # Try adding .exe or .cmd
31981     if test -f "${new_path}.exe"; then
31982       input_to_shortpath="${new_path}.exe"
31983     elif test -f "${new_path}.cmd"; then
31984       input_to_shortpath="${new_path}.cmd"
31985     else
31986       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
31987 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
31988       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31989 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31990       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31991     fi
31992   else
31993     input_to_shortpath="$new_path"
31994   fi
31995 
31996   # Call helper function which possibly converts this using DOS-style short mode.
31997   # If so, the updated path is stored in $new_path.
31998   new_path="$input_to_shortpath"
31999 
32000   input_path="$input_to_shortpath"
32001   # Check if we need to convert this using DOS-style short mode. If the path
32002   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32003   # take no chances and rewrite it.
32004   # Note: m4 eats our [], so we need to use [ and ] instead.
32005   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32006   if test "x$has_forbidden_chars" != x; then
32007     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32008     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32009     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32010     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32011       # Going to short mode and back again did indeed matter. Since short mode is
32012       # case insensitive, let's make it lowercase to improve readability.
32013       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32014       # Now convert it back to Unix-style (cygpath)
32015       input_path=`$CYGPATH -u "$shortmode_path"`
32016       new_path="$input_path"
32017     fi
32018   fi
32019 
32020   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32021   if test "x$test_cygdrive_prefix" = x; then
32022     # As a simple fix, exclude /usr/bin since it's not a real path.
32023     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32024       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32025       # a path prefixed by /cygdrive for fixpath to work.
32026       new_path="$CYGWIN_ROOT_PATH$input_path"
32027     fi
32028   fi
32029 
32030   # remove trailing .exe if any
32031   new_path="${new_path/%.exe/}"
32032 
32033     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32034 
32035   # First separate the path from the arguments. This will split at the first
32036   # space.
32037   complete="$PROPER_COMPILER_CC"
32038   path="${complete%% *}"
32039   tmp="$complete EOL"
32040   arguments="${tmp#* }"
32041 
32042   # Input might be given as Windows format, start by converting to
32043   # unix format.
32044   new_path="$path"
32045 
32046   windows_path="$new_path"
32047   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32048     unix_path=`$CYGPATH -u "$windows_path"`
32049     new_path="$unix_path"
32050   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32051     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32052     new_path="$unix_path"
32053   fi
32054 
32055 
32056   # Now try to locate executable using which
32057   new_path=`$WHICH "$new_path" 2> /dev/null`
32058 
32059   if test "x$new_path" = x; then
32060     # Oops. Which didn't find the executable.
32061     # The splitting of arguments from the executable at a space might have been incorrect,
32062     # since paths with space are more likely in Windows. Give it another try with the whole
32063     # argument.
32064     path="$complete"
32065     arguments="EOL"
32066     new_path="$path"
32067 
32068   windows_path="$new_path"
32069   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32070     unix_path=`$CYGPATH -u "$windows_path"`
32071     new_path="$unix_path"
32072   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32073     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32074     new_path="$unix_path"
32075   fi
32076 
32077 
32078     new_path=`$WHICH "$new_path" 2> /dev/null`
32079     # bat and cmd files are not always considered executable in MSYS causing which
32080     # to not find them
32081     if test "x$new_path" = x \
32082         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32083         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32084       new_path="$path"
32085 
32086   windows_path="$new_path"
32087   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32088     unix_path=`$CYGPATH -u "$windows_path"`
32089     new_path="$unix_path"
32090   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32091     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32092     new_path="$unix_path"
32093   fi
32094 
32095     fi
32096 
32097     if test "x$new_path" = x; then
32098       # It's still not found. Now this is an unrecoverable error.
32099       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32100 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32101       has_space=`$ECHO "$complete" | $GREP " "`
32102       if test "x$has_space" != x; then
32103         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32104 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32105       fi
32106       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32107     fi
32108   fi
32109 
32110   # Now new_path has a complete unix path to the binary
32111   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32112     # Keep paths in /bin as-is, but remove trailing .exe if any
32113     new_path="${new_path/%.exe/}"
32114     # Do not save /bin paths to all_fixpath_prefixes!
32115   else
32116     # Not in mixed or Windows style, start by that.
32117     new_path=`cmd //c echo $new_path`
32118 
32119   input_path="$new_path"
32120   # Check if we need to convert this using DOS-style short mode. If the path
32121   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32122   # take no chances and rewrite it.
32123   # Note: m4 eats our [], so we need to use [ and ] instead.
32124   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32125   if test "x$has_forbidden_chars" != x; then
32126     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32127     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32128   fi
32129 
32130     # Output is in $new_path
32131 
32132   windows_path="$new_path"
32133   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32134     unix_path=`$CYGPATH -u "$windows_path"`
32135     new_path="$unix_path"
32136   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32137     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32138     new_path="$unix_path"
32139   fi
32140 
32141     # remove trailing .exe if any
32142     new_path="${new_path/%.exe/}"
32143 
32144     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32145     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32146   fi
32147 
32148     else
32149       # We're on a unix platform. Hooray! :)
32150       # First separate the path from the arguments. This will split at the first
32151       # space.
32152       complete="$PROPER_COMPILER_CC"
32153       path="${complete%% *}"
32154       tmp="$complete EOL"
32155       arguments="${tmp#* }"
32156 
32157       # Cannot rely on the command "which" here since it doesn't always work.
32158       is_absolute_path=`$ECHO "$path" | $GREP ^/`
32159       if test -z "$is_absolute_path"; then
32160         # Path to executable is not absolute. Find it.
32161         IFS_save="$IFS"
32162         IFS=:
32163         for p in $PATH; do
32164           if test -f "$p/$path" && test -x "$p/$path"; then
32165             new_path="$p/$path"
32166             break
32167           fi
32168         done
32169         IFS="$IFS_save"
32170       else
32171         # This is an absolute path, we can use it without further modifications.
32172         new_path="$path"
32173       fi
32174 
32175       if test "x$new_path" = x; then
32176         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32177 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32178         has_space=`$ECHO "$complete" | $GREP " "`
32179         if test "x$has_space" != x; then
32180           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32181 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32182         fi
32183         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32184       fi
32185     fi
32186 
32187     # Now join together the path and the arguments once again
32188     if test "x$arguments" != xEOL; then
32189       new_complete="$new_path ${arguments% *}"
32190     else
32191       new_complete="$new_path"
32192     fi
32193 
32194     if test "x$complete" != "x$new_complete"; then
32195       PROPER_COMPILER_CC="$new_complete"
32196       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
32197 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
32198     fi
32199   fi
32200 
32201     PATH="$RETRY_COMPILER_SAVED_PATH"
32202 
32203     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
32204 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
32205 
32206   if test "x$OPENJDK_BUILD_OS" != xwindows; then
32207     # Follow a chain of symbolic links. Use readlink
32208     # where it exists, else fall back to horribly
32209     # complicated shell code.
32210     if test "x$READLINK_TESTED" != yes; then
32211       # On MacOSX there is a readlink tool with a different
32212       # purpose than the GNU readlink tool. Check the found readlink.
32213       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32214       if test "x$ISGNU" = x; then
32215         # A readlink that we do not know how to use.
32216         # Are there other non-GNU readlinks out there?
32217         READLINK_TESTED=yes
32218         READLINK=
32219       fi
32220     fi
32221 
32222     if test "x$READLINK" != x; then
32223       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
32224     else
32225       # Save the current directory for restoring afterwards
32226       STARTDIR=$PWD
32227       COUNTER=0
32228       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
32229       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
32230       cd $sym_link_dir
32231       # Use -P flag to resolve symlinks in directories.
32232       cd `$THEPWDCMD -P`
32233       sym_link_dir=`$THEPWDCMD -P`
32234       # Resolve file symlinks
32235       while test $COUNTER -lt 20; do
32236         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32237         if test "x$ISLINK" == x; then
32238           # This is not a symbolic link! We are done!
32239           break
32240         fi
32241         # Again resolve directory symlinks since the target of the just found
32242         # link could be in a different directory
32243         cd `$DIRNAME $ISLINK`
32244         sym_link_dir=`$THEPWDCMD -P`
32245         sym_link_file=`$BASENAME $ISLINK`
32246         let COUNTER=COUNTER+1
32247       done
32248       cd $STARTDIR
32249       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
32250     fi
32251   fi
32252 
32253     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
32254 $as_echo "$PROPER_COMPILER_CC" >&6; }
32255     CC="$PROPER_COMPILER_CC"
32256   else
32257     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
32258 $as_echo "no, keeping CC" >&6; }
32259   fi
32260 
32261 
32262   COMPILER=$CC
32263   COMPILER_NAME=$COMPILER_NAME
32264 
32265   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32266     # cc -V output typically looks like
32267     #     cc: Sun C 5.12 Linux_i386 2011/11/16
32268     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
32269     # Check that this is likely to be the Solaris Studio cc.
32270     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
32271     if test $? -ne 0; then
32272       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32273       { $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
32274 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32275       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32276 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32277       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32278 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32279       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32280     fi
32281     # Remove usage instructions (if present), and
32282     # collapse compiler output into a single line
32283     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32284         $SED -e 's/ *[Uu]sage:.*//'`
32285     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32286         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
32287   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
32288     # xlc -qversion output typically looks like
32289     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
32290     #     Version: 11.01.0000.0015
32291     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
32292     # Check that this is likely to be the IBM XL C compiler.
32293     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
32294     if test $? -ne 0; then
32295       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32296       { $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
32297 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32298       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32299 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32300       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32301 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32302       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32303     fi
32304     # Collapse compiler output into a single line
32305     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32306     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32307         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32308   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32309     # There is no specific version flag, but all output starts with a version string.
32310     # First line typically looks something like:
32311     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32312     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32313     # Check that this is likely to be Microsoft CL.EXE.
32314     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32315     if test $? -ne 0; then
32316       { $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
32317 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32318       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32319 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32320       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32321     fi
32322     # Collapse compiler output into a single line
32323     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32324     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32325         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32326   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32327     # gcc --version output typically looks like
32328     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32329     #     Copyright (C) 2013 Free Software Foundation, Inc.
32330     #     This is free software; see the source for copying conditions.  There is NO
32331     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32332     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32333     # Check that this is likely to be GCC.
32334     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32335     if test $? -ne 0; then
32336       { $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
32337 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32338       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32339 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32340       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32341     fi
32342     # Remove Copyright and legalese from version string, and
32343     # collapse into a single line
32344     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32345         $SED -e 's/ *Copyright .*//'`
32346     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32347         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32348   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32349     # clang --version output typically looks like
32350     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32351     #    clang version 3.3 (tags/RELEASE_33/final)
32352     # or
32353     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32354     #    Target: x86_64-pc-linux-gnu
32355     #    Thread model: posix
32356     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32357     # Check that this is likely to be clang
32358     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32359     if test $? -ne 0; then
32360       { $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
32361 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32362       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32363 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32364       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32365     fi
32366     # Collapse compiler output into a single line
32367     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32368     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32369         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
32370   else
32371       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32372   fi
32373   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32374   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32375   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32376   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32377 
32378   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32379 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32380 
32381 
32382   # Now that we have resolved CC ourself, let autoconf have its go at it
32383   ac_ext=c
32384 ac_cpp='$CPP $CPPFLAGS'
32385 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32386 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32387 ac_compiler_gnu=$ac_cv_c_compiler_gnu
32388 if test -n "$ac_tool_prefix"; then
32389   for ac_prog in $CC
32390   do
32391     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32392 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32394 $as_echo_n "checking for $ac_word... " >&6; }
32395 if ${ac_cv_prog_CC+:} false; then :
32396   $as_echo_n "(cached) " >&6
32397 else
32398   if test -n "$CC"; then
32399   ac_cv_prog_CC="$CC" # Let the user override the test.
32400 else
32401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32402 for as_dir in $PATH
32403 do
32404   IFS=$as_save_IFS
32405   test -z "$as_dir" && as_dir=.
32406     for ac_exec_ext in '' $ac_executable_extensions; do
32407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32408     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32410     break 2
32411   fi
32412 done
32413   done
32414 IFS=$as_save_IFS
32415 
32416 fi
32417 fi
32418 CC=$ac_cv_prog_CC
32419 if test -n "$CC"; then
32420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32421 $as_echo "$CC" >&6; }
32422 else
32423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32424 $as_echo "no" >&6; }
32425 fi
32426 
32427 
32428     test -n "$CC" && break
32429   done
32430 fi
32431 if test -z "$CC"; then
32432   ac_ct_CC=$CC
32433   for ac_prog in $CC
32434 do
32435   # Extract the first word of "$ac_prog", so it can be a program name with args.
32436 set dummy $ac_prog; ac_word=$2
32437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32438 $as_echo_n "checking for $ac_word... " >&6; }
32439 if ${ac_cv_prog_ac_ct_CC+:} false; then :
32440   $as_echo_n "(cached) " >&6
32441 else
32442   if test -n "$ac_ct_CC"; then
32443   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32444 else
32445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32446 for as_dir in $PATH
32447 do
32448   IFS=$as_save_IFS
32449   test -z "$as_dir" && as_dir=.
32450     for ac_exec_ext in '' $ac_executable_extensions; do
32451   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32452     ac_cv_prog_ac_ct_CC="$ac_prog"
32453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32454     break 2
32455   fi
32456 done
32457   done
32458 IFS=$as_save_IFS
32459 
32460 fi
32461 fi
32462 ac_ct_CC=$ac_cv_prog_ac_ct_CC
32463 if test -n "$ac_ct_CC"; then
32464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32465 $as_echo "$ac_ct_CC" >&6; }
32466 else
32467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32468 $as_echo "no" >&6; }
32469 fi
32470 
32471 
32472   test -n "$ac_ct_CC" && break
32473 done
32474 
32475   if test "x$ac_ct_CC" = x; then
32476     CC=""
32477   else
32478     case $cross_compiling:$ac_tool_warned in
32479 yes:)
32480 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32481 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32482 ac_tool_warned=yes ;;
32483 esac
32484     CC=$ac_ct_CC
32485   fi
32486 fi
32487 
32488 
32489 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32490 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32491 as_fn_error $? "no acceptable C compiler found in \$PATH
32492 See \`config.log' for more details" "$LINENO" 5; }
32493 
32494 # Provide some information about the compiler.
32495 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32496 set X $ac_compile
32497 ac_compiler=$2
32498 for ac_option in --version -v -V -qversion; do
32499   { { ac_try="$ac_compiler $ac_option >&5"
32500 case "(($ac_try" in
32501   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32502   *) ac_try_echo=$ac_try;;
32503 esac
32504 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32505 $as_echo "$ac_try_echo"; } >&5
32506   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32507   ac_status=$?
32508   if test -s conftest.err; then
32509     sed '10a\
32510 ... rest of stderr output deleted ...
32511          10q' conftest.err >conftest.er1
32512     cat conftest.er1 >&5
32513   fi
32514   rm -f conftest.er1 conftest.err
32515   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32516   test $ac_status = 0; }
32517 done
32518 
32519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32520 /* end confdefs.h.  */
32521 
32522 int
32523 main ()
32524 {
32525 
32526   ;
32527   return 0;
32528 }
32529 _ACEOF
32530 ac_clean_files_save=$ac_clean_files
32531 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32532 # Try to create an executable without -o first, disregard a.out.
32533 # It will help us diagnose broken compilers, and finding out an intuition
32534 # of exeext.
32535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32536 $as_echo_n "checking whether the C compiler works... " >&6; }
32537 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32538 
32539 # The possible output files:
32540 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32541 
32542 ac_rmfiles=
32543 for ac_file in $ac_files
32544 do
32545   case $ac_file in
32546     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32547     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32548   esac
32549 done
32550 rm -f $ac_rmfiles
32551 
32552 if { { ac_try="$ac_link_default"
32553 case "(($ac_try" in
32554   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32555   *) ac_try_echo=$ac_try;;
32556 esac
32557 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32558 $as_echo "$ac_try_echo"; } >&5
32559   (eval "$ac_link_default") 2>&5
32560   ac_status=$?
32561   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32562   test $ac_status = 0; }; then :
32563   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32564 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32565 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
32566 # so that the user can short-circuit this test for compilers unknown to
32567 # Autoconf.
32568 for ac_file in $ac_files ''
32569 do
32570   test -f "$ac_file" || continue
32571   case $ac_file in
32572     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32573         ;;
32574     [ab].out )
32575         # We found the default executable, but exeext='' is most
32576         # certainly right.
32577         break;;
32578     *.* )
32579         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32580         then :; else
32581            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32582         fi
32583         # We set ac_cv_exeext here because the later test for it is not
32584         # safe: cross compilers may not add the suffix if given an `-o'
32585         # argument, so we may need to know it at that point already.
32586         # Even if this section looks crufty: it has the advantage of
32587         # actually working.
32588         break;;
32589     * )
32590         break;;
32591   esac
32592 done
32593 test "$ac_cv_exeext" = no && ac_cv_exeext=
32594 
32595 else
32596   ac_file=''
32597 fi
32598 if test -z "$ac_file"; then :
32599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32600 $as_echo "no" >&6; }
32601 $as_echo "$as_me: failed program was:" >&5
32602 sed 's/^/| /' conftest.$ac_ext >&5
32603 
32604 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32605 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32606 as_fn_error 77 "C compiler cannot create executables
32607 See \`config.log' for more details" "$LINENO" 5; }
32608 else
32609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32610 $as_echo "yes" >&6; }
32611 fi
32612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32613 $as_echo_n "checking for C compiler default output file name... " >&6; }
32614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32615 $as_echo "$ac_file" >&6; }
32616 ac_exeext=$ac_cv_exeext
32617 
32618 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32619 ac_clean_files=$ac_clean_files_save
32620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32621 $as_echo_n "checking for suffix of executables... " >&6; }
32622 if { { ac_try="$ac_link"
32623 case "(($ac_try" in
32624   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32625   *) ac_try_echo=$ac_try;;
32626 esac
32627 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32628 $as_echo "$ac_try_echo"; } >&5
32629   (eval "$ac_link") 2>&5
32630   ac_status=$?
32631   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32632   test $ac_status = 0; }; then :
32633   # If both `conftest.exe' and `conftest' are `present' (well, observable)
32634 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32635 # work properly (i.e., refer to `conftest.exe'), while it won't with
32636 # `rm'.
32637 for ac_file in conftest.exe conftest conftest.*; do
32638   test -f "$ac_file" || continue
32639   case $ac_file in
32640     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32641     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32642           break;;
32643     * ) break;;
32644   esac
32645 done
32646 else
32647   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32648 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32649 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32650 See \`config.log' for more details" "$LINENO" 5; }
32651 fi
32652 rm -f conftest conftest$ac_cv_exeext
32653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32654 $as_echo "$ac_cv_exeext" >&6; }
32655 
32656 rm -f conftest.$ac_ext
32657 EXEEXT=$ac_cv_exeext
32658 ac_exeext=$EXEEXT
32659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32660 /* end confdefs.h.  */
32661 #include <stdio.h>
32662 int
32663 main ()
32664 {
32665 FILE *f = fopen ("conftest.out", "w");
32666  return ferror (f) || fclose (f) != 0;
32667 
32668   ;
32669   return 0;
32670 }
32671 _ACEOF
32672 ac_clean_files="$ac_clean_files conftest.out"
32673 # Check that the compiler produces executables we can run.  If not, either
32674 # the compiler is broken, or we cross compile.
32675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32676 $as_echo_n "checking whether we are cross compiling... " >&6; }
32677 if test "$cross_compiling" != yes; then
32678   { { ac_try="$ac_link"
32679 case "(($ac_try" in
32680   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32681   *) ac_try_echo=$ac_try;;
32682 esac
32683 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32684 $as_echo "$ac_try_echo"; } >&5
32685   (eval "$ac_link") 2>&5
32686   ac_status=$?
32687   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32688   test $ac_status = 0; }
32689   if { ac_try='./conftest$ac_cv_exeext'
32690   { { case "(($ac_try" in
32691   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32692   *) ac_try_echo=$ac_try;;
32693 esac
32694 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32695 $as_echo "$ac_try_echo"; } >&5
32696   (eval "$ac_try") 2>&5
32697   ac_status=$?
32698   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32699   test $ac_status = 0; }; }; then
32700     cross_compiling=no
32701   else
32702     if test "$cross_compiling" = maybe; then
32703         cross_compiling=yes
32704     else
32705         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32706 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32707 as_fn_error $? "cannot run C compiled programs.
32708 If you meant to cross compile, use \`--host'.
32709 See \`config.log' for more details" "$LINENO" 5; }
32710     fi
32711   fi
32712 fi
32713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32714 $as_echo "$cross_compiling" >&6; }
32715 
32716 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32717 ac_clean_files=$ac_clean_files_save
32718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32719 $as_echo_n "checking for suffix of object files... " >&6; }
32720 if ${ac_cv_objext+:} false; then :
32721   $as_echo_n "(cached) " >&6
32722 else
32723   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32724 /* end confdefs.h.  */
32725 
32726 int
32727 main ()
32728 {
32729 
32730   ;
32731   return 0;
32732 }
32733 _ACEOF
32734 rm -f conftest.o conftest.obj
32735 if { { ac_try="$ac_compile"
32736 case "(($ac_try" in
32737   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32738   *) ac_try_echo=$ac_try;;
32739 esac
32740 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32741 $as_echo "$ac_try_echo"; } >&5
32742   (eval "$ac_compile") 2>&5
32743   ac_status=$?
32744   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32745   test $ac_status = 0; }; then :
32746   for ac_file in conftest.o conftest.obj conftest.*; do
32747   test -f "$ac_file" || continue;
32748   case $ac_file in
32749     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32750     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32751        break;;
32752   esac
32753 done
32754 else
32755   $as_echo "$as_me: failed program was:" >&5
32756 sed 's/^/| /' conftest.$ac_ext >&5
32757 
32758 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32759 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32760 as_fn_error $? "cannot compute suffix of object files: cannot compile
32761 See \`config.log' for more details" "$LINENO" 5; }
32762 fi
32763 rm -f conftest.$ac_cv_objext conftest.$ac_ext
32764 fi
32765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32766 $as_echo "$ac_cv_objext" >&6; }
32767 OBJEXT=$ac_cv_objext
32768 ac_objext=$OBJEXT
32769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32770 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32771 if ${ac_cv_c_compiler_gnu+:} false; then :
32772   $as_echo_n "(cached) " >&6
32773 else
32774   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32775 /* end confdefs.h.  */
32776 
32777 int
32778 main ()
32779 {
32780 #ifndef __GNUC__
32781        choke me
32782 #endif
32783 
32784   ;
32785   return 0;
32786 }
32787 _ACEOF
32788 if ac_fn_c_try_compile "$LINENO"; then :
32789   ac_compiler_gnu=yes
32790 else
32791   ac_compiler_gnu=no
32792 fi
32793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32794 ac_cv_c_compiler_gnu=$ac_compiler_gnu
32795 
32796 fi
32797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
32798 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
32799 if test $ac_compiler_gnu = yes; then
32800   GCC=yes
32801 else
32802   GCC=
32803 fi
32804 ac_test_CFLAGS=${CFLAGS+set}
32805 ac_save_CFLAGS=$CFLAGS
32806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
32807 $as_echo_n "checking whether $CC accepts -g... " >&6; }
32808 if ${ac_cv_prog_cc_g+:} false; then :
32809   $as_echo_n "(cached) " >&6
32810 else
32811   ac_save_c_werror_flag=$ac_c_werror_flag
32812    ac_c_werror_flag=yes
32813    ac_cv_prog_cc_g=no
32814    CFLAGS="-g"
32815    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32816 /* end confdefs.h.  */
32817 
32818 int
32819 main ()
32820 {
32821 
32822   ;
32823   return 0;
32824 }
32825 _ACEOF
32826 if ac_fn_c_try_compile "$LINENO"; then :
32827   ac_cv_prog_cc_g=yes
32828 else
32829   CFLAGS=""
32830       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32831 /* end confdefs.h.  */
32832 
32833 int
32834 main ()
32835 {
32836 
32837   ;
32838   return 0;
32839 }
32840 _ACEOF
32841 if ac_fn_c_try_compile "$LINENO"; then :
32842 
32843 else
32844   ac_c_werror_flag=$ac_save_c_werror_flag
32845          CFLAGS="-g"
32846          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32847 /* end confdefs.h.  */
32848 
32849 int
32850 main ()
32851 {
32852 
32853   ;
32854   return 0;
32855 }
32856 _ACEOF
32857 if ac_fn_c_try_compile "$LINENO"; then :
32858   ac_cv_prog_cc_g=yes
32859 fi
32860 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32861 fi
32862 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32863 fi
32864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32865    ac_c_werror_flag=$ac_save_c_werror_flag
32866 fi
32867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
32868 $as_echo "$ac_cv_prog_cc_g" >&6; }
32869 if test "$ac_test_CFLAGS" = set; then
32870   CFLAGS=$ac_save_CFLAGS
32871 elif test $ac_cv_prog_cc_g = yes; then
32872   if test "$GCC" = yes; then
32873     CFLAGS="-g -O2"
32874   else
32875     CFLAGS="-g"
32876   fi
32877 else
32878   if test "$GCC" = yes; then
32879     CFLAGS="-O2"
32880   else
32881     CFLAGS=
32882   fi
32883 fi
32884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
32885 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
32886 if ${ac_cv_prog_cc_c89+:} false; then :
32887   $as_echo_n "(cached) " >&6
32888 else
32889   ac_cv_prog_cc_c89=no
32890 ac_save_CC=$CC
32891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32892 /* end confdefs.h.  */
32893 #include <stdarg.h>
32894 #include <stdio.h>
32895 struct stat;
32896 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
32897 struct buf { int x; };
32898 FILE * (*rcsopen) (struct buf *, struct stat *, int);
32899 static char *e (p, i)
32900      char **p;
32901      int i;
32902 {
32903   return p[i];
32904 }
32905 static char *f (char * (*g) (char **, int), char **p, ...)
32906 {
32907   char *s;
32908   va_list v;
32909   va_start (v,p);
32910   s = g (p, va_arg (v,int));
32911   va_end (v);
32912   return s;
32913 }
32914 
32915 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
32916    function prototypes and stuff, but not '\xHH' hex character constants.
32917    These don't provoke an error unfortunately, instead are silently treated
32918    as 'x'.  The following induces an error, until -std is added to get
32919    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
32920    array size at least.  It's necessary to write '\x00'==0 to get something
32921    that's true only with -std.  */
32922 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
32923 
32924 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
32925    inside strings and character constants.  */
32926 #define FOO(x) 'x'
32927 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
32928 
32929 int test (int i, double x);
32930 struct s1 {int (*f) (int a);};
32931 struct s2 {int (*f) (double a);};
32932 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
32933 int argc;
32934 char **argv;
32935 int
32936 main ()
32937 {
32938 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
32939   ;
32940   return 0;
32941 }
32942 _ACEOF
32943 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
32944         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
32945 do
32946   CC="$ac_save_CC $ac_arg"
32947   if ac_fn_c_try_compile "$LINENO"; then :
32948   ac_cv_prog_cc_c89=$ac_arg
32949 fi
32950 rm -f core conftest.err conftest.$ac_objext
32951   test "x$ac_cv_prog_cc_c89" != "xno" && break
32952 done
32953 rm -f conftest.$ac_ext
32954 CC=$ac_save_CC
32955 
32956 fi
32957 # AC_CACHE_VAL
32958 case "x$ac_cv_prog_cc_c89" in
32959   x)
32960     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
32961 $as_echo "none needed" >&6; } ;;
32962   xno)
32963     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
32964 $as_echo "unsupported" >&6; } ;;
32965   *)
32966     CC="$CC $ac_cv_prog_cc_c89"
32967     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
32968 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
32969 esac
32970 if test "x$ac_cv_prog_cc_c89" != xno; then :
32971 
32972 fi
32973 
32974 ac_ext=cpp
32975 ac_cpp='$CXXCPP $CPPFLAGS'
32976 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32977 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32978 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32979 
32980 
32981 
32982   COMPILER_NAME=C++
32983   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
32984 
32985   if test "x$CXX" != x; then
32986     # User has supplied compiler name already, always let that override.
32987     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
32988 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
32989     if test "x`basename $CXX`" = "x$CXX"; then
32990       # A command without a complete path is provided, search $PATH.
32991 
32992       for ac_prog in $CXX
32993 do
32994   # Extract the first word of "$ac_prog", so it can be a program name with args.
32995 set dummy $ac_prog; ac_word=$2
32996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32997 $as_echo_n "checking for $ac_word... " >&6; }
32998 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32999   $as_echo_n "(cached) " >&6
33000 else
33001   case $POTENTIAL_CXX in
33002   [\\/]* | ?:[\\/]*)
33003   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33004   ;;
33005   *)
33006   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33007 for as_dir in $PATH
33008 do
33009   IFS=$as_save_IFS
33010   test -z "$as_dir" && as_dir=.
33011     for ac_exec_ext in '' $ac_executable_extensions; do
33012   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33013     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33014     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33015     break 2
33016   fi
33017 done
33018   done
33019 IFS=$as_save_IFS
33020 
33021   ;;
33022 esac
33023 fi
33024 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33025 if test -n "$POTENTIAL_CXX"; then
33026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33027 $as_echo "$POTENTIAL_CXX" >&6; }
33028 else
33029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33030 $as_echo "no" >&6; }
33031 fi
33032 
33033 
33034   test -n "$POTENTIAL_CXX" && break
33035 done
33036 
33037       if test "x$POTENTIAL_CXX" != x; then
33038         CXX=$POTENTIAL_CXX
33039       else
33040         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33041       fi
33042     else
33043       # Otherwise it might already be a complete path
33044       if test ! -x "$CXX"; then
33045         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33046       fi
33047     fi
33048   else
33049     # No user supplied value. Locate compiler ourselves.
33050 
33051     # If we are cross compiling, assume cross compilation tools follows the
33052     # cross compilation standard where they are prefixed with the autoconf
33053     # standard name for the target. For example the binary
33054     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33055     # If we are not cross compiling, then the default compiler name will be
33056     # used.
33057 
33058     CXX=
33059     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33060     # before checking the rest of the PATH.
33061     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33062     # step, this should not be necessary.
33063     if test -n "$TOOLCHAIN_PATH"; then
33064       PATH_save="$PATH"
33065       PATH="$TOOLCHAIN_PATH"
33066       for ac_prog in $SEARCH_LIST
33067 do
33068   # Extract the first word of "$ac_prog", so it can be a program name with args.
33069 set dummy $ac_prog; ac_word=$2
33070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33071 $as_echo_n "checking for $ac_word... " >&6; }
33072 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33073   $as_echo_n "(cached) " >&6
33074 else
33075   case $TOOLCHAIN_PATH_CXX in
33076   [\\/]* | ?:[\\/]*)
33077   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33078   ;;
33079   *)
33080   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33081 for as_dir in $PATH
33082 do
33083   IFS=$as_save_IFS
33084   test -z "$as_dir" && as_dir=.
33085     for ac_exec_ext in '' $ac_executable_extensions; do
33086   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33087     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33088     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33089     break 2
33090   fi
33091 done
33092   done
33093 IFS=$as_save_IFS
33094 
33095   ;;
33096 esac
33097 fi
33098 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33099 if test -n "$TOOLCHAIN_PATH_CXX"; then
33100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33101 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33102 else
33103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33104 $as_echo "no" >&6; }
33105 fi
33106 
33107 
33108   test -n "$TOOLCHAIN_PATH_CXX" && break
33109 done
33110 
33111       CXX=$TOOLCHAIN_PATH_CXX
33112       PATH="$PATH_save"
33113     fi
33114 
33115     # AC_PATH_PROGS can't be run multiple times with the same variable,
33116     # so create a new name for this run.
33117     if test "x$CXX" = x; then
33118       for ac_prog in $SEARCH_LIST
33119 do
33120   # Extract the first word of "$ac_prog", so it can be a program name with args.
33121 set dummy $ac_prog; ac_word=$2
33122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33123 $as_echo_n "checking for $ac_word... " >&6; }
33124 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33125   $as_echo_n "(cached) " >&6
33126 else
33127   case $POTENTIAL_CXX in
33128   [\\/]* | ?:[\\/]*)
33129   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33130   ;;
33131   *)
33132   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33133 for as_dir in $PATH
33134 do
33135   IFS=$as_save_IFS
33136   test -z "$as_dir" && as_dir=.
33137     for ac_exec_ext in '' $ac_executable_extensions; do
33138   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33139     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33140     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33141     break 2
33142   fi
33143 done
33144   done
33145 IFS=$as_save_IFS
33146 
33147   ;;
33148 esac
33149 fi
33150 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33151 if test -n "$POTENTIAL_CXX"; then
33152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33153 $as_echo "$POTENTIAL_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 "$POTENTIAL_CXX" && break
33161 done
33162 
33163       CXX=$POTENTIAL_CXX
33164     fi
33165 
33166     if test "x$CXX" = x; then
33167 
33168   # Print a helpful message on how to acquire the necessary build dependency.
33169   # devkit is the help tag: freetype, cups, alsa etc
33170   MISSING_DEPENDENCY=devkit
33171 
33172   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33173     cygwin_help $MISSING_DEPENDENCY
33174   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33175     msys_help $MISSING_DEPENDENCY
33176   else
33177     PKGHANDLER_COMMAND=
33178 
33179     case $PKGHANDLER in
33180       apt-get)
33181         apt_help     $MISSING_DEPENDENCY ;;
33182       yum)
33183         yum_help     $MISSING_DEPENDENCY ;;
33184       port)
33185         port_help    $MISSING_DEPENDENCY ;;
33186       pkgutil)
33187         pkgutil_help $MISSING_DEPENDENCY ;;
33188       pkgadd)
33189         pkgadd_help  $MISSING_DEPENDENCY ;;
33190     esac
33191 
33192     if test "x$PKGHANDLER_COMMAND" != x; then
33193       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33194     fi
33195   fi
33196 
33197       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33198     fi
33199   fi
33200 
33201   # Now we have a compiler binary in CXX. Make sure it's okay.
33202 
33203   # Only process if variable expands to non-empty
33204 
33205   if test "x$CXX" != x; then
33206     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33207 
33208   # First separate the path from the arguments. This will split at the first
33209   # space.
33210   complete="$CXX"
33211   path="${complete%% *}"
33212   tmp="$complete EOL"
33213   arguments="${tmp#* }"
33214 
33215   # Input might be given as Windows format, start by converting to
33216   # unix format.
33217   new_path=`$CYGPATH -u "$path"`
33218 
33219   # Now try to locate executable using which
33220   new_path=`$WHICH "$new_path" 2> /dev/null`
33221   # bat and cmd files are not always considered executable in cygwin causing which
33222   # to not find them
33223   if test "x$new_path" = x \
33224       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33225       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33226     new_path=`$CYGPATH -u "$path"`
33227   fi
33228   if test "x$new_path" = x; then
33229     # Oops. Which didn't find the executable.
33230     # The splitting of arguments from the executable at a space might have been incorrect,
33231     # since paths with space are more likely in Windows. Give it another try with the whole
33232     # argument.
33233     path="$complete"
33234     arguments="EOL"
33235     new_path=`$CYGPATH -u "$path"`
33236     new_path=`$WHICH "$new_path" 2> /dev/null`
33237     # bat and cmd files are not always considered executable in cygwin causing which
33238     # to not find them
33239     if test "x$new_path" = x \
33240         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33241         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33242       new_path=`$CYGPATH -u "$path"`
33243     fi
33244     if test "x$new_path" = x; then
33245       # It's still not found. Now this is an unrecoverable error.
33246       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33247 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33248       has_space=`$ECHO "$complete" | $GREP " "`
33249       if test "x$has_space" != x; then
33250         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33251 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33252       fi
33253       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33254     fi
33255   fi
33256 
33257   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33258   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33259   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33260   # "foo.exe" is OK but "foo" is an error.
33261   #
33262   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33263   # It is also a way to make sure we got the proper file name for the real test later on.
33264   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33265   if test "x$test_shortpath" = x; then
33266     # Short path failed, file does not exist as specified.
33267     # Try adding .exe or .cmd
33268     if test -f "${new_path}.exe"; then
33269       input_to_shortpath="${new_path}.exe"
33270     elif test -f "${new_path}.cmd"; then
33271       input_to_shortpath="${new_path}.cmd"
33272     else
33273       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
33274 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
33275       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33276 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33277       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33278     fi
33279   else
33280     input_to_shortpath="$new_path"
33281   fi
33282 
33283   # Call helper function which possibly converts this using DOS-style short mode.
33284   # If so, the updated path is stored in $new_path.
33285   new_path="$input_to_shortpath"
33286 
33287   input_path="$input_to_shortpath"
33288   # Check if we need to convert this using DOS-style short mode. If the path
33289   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33290   # take no chances and rewrite it.
33291   # Note: m4 eats our [], so we need to use [ and ] instead.
33292   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33293   if test "x$has_forbidden_chars" != x; then
33294     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33295     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33296     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33297     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33298       # Going to short mode and back again did indeed matter. Since short mode is
33299       # case insensitive, let's make it lowercase to improve readability.
33300       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33301       # Now convert it back to Unix-style (cygpath)
33302       input_path=`$CYGPATH -u "$shortmode_path"`
33303       new_path="$input_path"
33304     fi
33305   fi
33306 
33307   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33308   if test "x$test_cygdrive_prefix" = x; then
33309     # As a simple fix, exclude /usr/bin since it's not a real path.
33310     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33311       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33312       # a path prefixed by /cygdrive for fixpath to work.
33313       new_path="$CYGWIN_ROOT_PATH$input_path"
33314     fi
33315   fi
33316 
33317   # remove trailing .exe if any
33318   new_path="${new_path/%.exe/}"
33319 
33320     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33321 
33322   # First separate the path from the arguments. This will split at the first
33323   # space.
33324   complete="$CXX"
33325   path="${complete%% *}"
33326   tmp="$complete EOL"
33327   arguments="${tmp#* }"
33328 
33329   # Input might be given as Windows format, start by converting to
33330   # unix format.
33331   new_path="$path"
33332 
33333   windows_path="$new_path"
33334   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33335     unix_path=`$CYGPATH -u "$windows_path"`
33336     new_path="$unix_path"
33337   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33338     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33339     new_path="$unix_path"
33340   fi
33341 
33342 
33343   # Now try to locate executable using which
33344   new_path=`$WHICH "$new_path" 2> /dev/null`
33345 
33346   if test "x$new_path" = x; then
33347     # Oops. Which didn't find the executable.
33348     # The splitting of arguments from the executable at a space might have been incorrect,
33349     # since paths with space are more likely in Windows. Give it another try with the whole
33350     # argument.
33351     path="$complete"
33352     arguments="EOL"
33353     new_path="$path"
33354 
33355   windows_path="$new_path"
33356   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33357     unix_path=`$CYGPATH -u "$windows_path"`
33358     new_path="$unix_path"
33359   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33360     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33361     new_path="$unix_path"
33362   fi
33363 
33364 
33365     new_path=`$WHICH "$new_path" 2> /dev/null`
33366     # bat and cmd files are not always considered executable in MSYS causing which
33367     # to not find them
33368     if test "x$new_path" = x \
33369         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33370         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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     fi
33383 
33384     if test "x$new_path" = x; then
33385       # It's still not found. Now this is an unrecoverable error.
33386       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33387 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33388       has_space=`$ECHO "$complete" | $GREP " "`
33389       if test "x$has_space" != x; then
33390         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33391 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33392       fi
33393       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33394     fi
33395   fi
33396 
33397   # Now new_path has a complete unix path to the binary
33398   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33399     # Keep paths in /bin as-is, but remove trailing .exe if any
33400     new_path="${new_path/%.exe/}"
33401     # Do not save /bin paths to all_fixpath_prefixes!
33402   else
33403     # Not in mixed or Windows style, start by that.
33404     new_path=`cmd //c echo $new_path`
33405 
33406   input_path="$new_path"
33407   # Check if we need to convert this using DOS-style short mode. If the path
33408   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33409   # take no chances and rewrite it.
33410   # Note: m4 eats our [], so we need to use [ and ] instead.
33411   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33412   if test "x$has_forbidden_chars" != x; then
33413     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33414     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33415   fi
33416 
33417     # Output is in $new_path
33418 
33419   windows_path="$new_path"
33420   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33421     unix_path=`$CYGPATH -u "$windows_path"`
33422     new_path="$unix_path"
33423   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33424     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33425     new_path="$unix_path"
33426   fi
33427 
33428     # remove trailing .exe if any
33429     new_path="${new_path/%.exe/}"
33430 
33431     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33432     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33433   fi
33434 
33435     else
33436       # We're on a unix platform. Hooray! :)
33437       # First separate the path from the arguments. This will split at the first
33438       # space.
33439       complete="$CXX"
33440       path="${complete%% *}"
33441       tmp="$complete EOL"
33442       arguments="${tmp#* }"
33443 
33444       # Cannot rely on the command "which" here since it doesn't always work.
33445       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33446       if test -z "$is_absolute_path"; then
33447         # Path to executable is not absolute. Find it.
33448         IFS_save="$IFS"
33449         IFS=:
33450         for p in $PATH; do
33451           if test -f "$p/$path" && test -x "$p/$path"; then
33452             new_path="$p/$path"
33453             break
33454           fi
33455         done
33456         IFS="$IFS_save"
33457       else
33458         # This is an absolute path, we can use it without further modifications.
33459         new_path="$path"
33460       fi
33461 
33462       if test "x$new_path" = x; then
33463         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33464 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33465         has_space=`$ECHO "$complete" | $GREP " "`
33466         if test "x$has_space" != x; then
33467           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33468 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33469         fi
33470         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33471       fi
33472     fi
33473 
33474     # Now join together the path and the arguments once again
33475     if test "x$arguments" != xEOL; then
33476       new_complete="$new_path ${arguments% *}"
33477     else
33478       new_complete="$new_path"
33479     fi
33480 
33481     if test "x$complete" != "x$new_complete"; then
33482       CXX="$new_complete"
33483       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33484 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33485     fi
33486   fi
33487 
33488   TEST_COMPILER="$CXX"
33489   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
33490   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
33491   if test "x$OPENJDK_BUILD_OS" != xaix; then
33492     # FIXME: This test should not be needed anymore; we don't do that for any platform.
33493     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33494 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33495 
33496   if test "x$OPENJDK_BUILD_OS" != xwindows; then
33497     # Follow a chain of symbolic links. Use readlink
33498     # where it exists, else fall back to horribly
33499     # complicated shell code.
33500     if test "x$READLINK_TESTED" != yes; then
33501       # On MacOSX there is a readlink tool with a different
33502       # purpose than the GNU readlink tool. Check the found readlink.
33503       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33504       if test "x$ISGNU" = x; then
33505         # A readlink that we do not know how to use.
33506         # Are there other non-GNU readlinks out there?
33507         READLINK_TESTED=yes
33508         READLINK=
33509       fi
33510     fi
33511 
33512     if test "x$READLINK" != x; then
33513       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
33514     else
33515       # Save the current directory for restoring afterwards
33516       STARTDIR=$PWD
33517       COUNTER=0
33518       sym_link_dir=`$DIRNAME $TEST_COMPILER`
33519       sym_link_file=`$BASENAME $TEST_COMPILER`
33520       cd $sym_link_dir
33521       # Use -P flag to resolve symlinks in directories.
33522       cd `$THEPWDCMD -P`
33523       sym_link_dir=`$THEPWDCMD -P`
33524       # Resolve file symlinks
33525       while test $COUNTER -lt 20; do
33526         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33527         if test "x$ISLINK" == x; then
33528           # This is not a symbolic link! We are done!
33529           break
33530         fi
33531         # Again resolve directory symlinks since the target of the just found
33532         # link could be in a different directory
33533         cd `$DIRNAME $ISLINK`
33534         sym_link_dir=`$THEPWDCMD -P`
33535         sym_link_file=`$BASENAME $ISLINK`
33536         let COUNTER=COUNTER+1
33537       done
33538       cd $STARTDIR
33539       TEST_COMPILER=$sym_link_dir/$sym_link_file
33540     fi
33541   fi
33542 
33543     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
33544 $as_echo "$TEST_COMPILER" >&6; }
33545   fi
33546   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
33547 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
33548 
33549   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
33550   if test "x$COMPILER_BASENAME" = "xccache"; then
33551     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
33552 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
33553     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
33554     # We want to control ccache invocation ourselves, so ignore this cc and try
33555     # searching again.
33556 
33557     # Remove the path to the fake ccache cc from the PATH
33558     RETRY_COMPILER_SAVED_PATH="$PATH"
33559     COMPILER_DIRNAME=`$DIRNAME $CXX`
33560     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
33561 
33562     # Try again looking for our compiler
33563     if test -n "$ac_tool_prefix"; then
33564   for ac_prog in $TOOLCHAIN_CXX_BINARY
33565   do
33566     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33567 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33569 $as_echo_n "checking for $ac_word... " >&6; }
33570 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
33571   $as_echo_n "(cached) " >&6
33572 else
33573   if test -n "$PROPER_COMPILER_CXX"; then
33574   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
33575 else
33576 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33577 for as_dir in $PATH
33578 do
33579   IFS=$as_save_IFS
33580   test -z "$as_dir" && as_dir=.
33581     for ac_exec_ext in '' $ac_executable_extensions; do
33582   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33583     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
33584     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33585     break 2
33586   fi
33587 done
33588   done
33589 IFS=$as_save_IFS
33590 
33591 fi
33592 fi
33593 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
33594 if test -n "$PROPER_COMPILER_CXX"; then
33595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33596 $as_echo "$PROPER_COMPILER_CXX" >&6; }
33597 else
33598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33599 $as_echo "no" >&6; }
33600 fi
33601 
33602 
33603     test -n "$PROPER_COMPILER_CXX" && break
33604   done
33605 fi
33606 if test -z "$PROPER_COMPILER_CXX"; then
33607   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
33608   for ac_prog in $TOOLCHAIN_CXX_BINARY
33609 do
33610   # Extract the first word of "$ac_prog", so it can be a program name with args.
33611 set dummy $ac_prog; ac_word=$2
33612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33613 $as_echo_n "checking for $ac_word... " >&6; }
33614 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
33615   $as_echo_n "(cached) " >&6
33616 else
33617   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33618   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
33619 else
33620 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33621 for as_dir in $PATH
33622 do
33623   IFS=$as_save_IFS
33624   test -z "$as_dir" && as_dir=.
33625     for ac_exec_ext in '' $ac_executable_extensions; do
33626   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33627     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
33628     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33629     break 2
33630   fi
33631 done
33632   done
33633 IFS=$as_save_IFS
33634 
33635 fi
33636 fi
33637 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
33638 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
33640 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
33641 else
33642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33643 $as_echo "no" >&6; }
33644 fi
33645 
33646 
33647   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
33648 done
33649 
33650   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
33651     PROPER_COMPILER_CXX=""
33652   else
33653     case $cross_compiling:$ac_tool_warned in
33654 yes:)
33655 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33656 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33657 ac_tool_warned=yes ;;
33658 esac
33659     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
33660   fi
33661 fi
33662 
33663 
33664   # Only process if variable expands to non-empty
33665 
33666   if test "x$PROPER_COMPILER_CXX" != x; then
33667     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33668 
33669   # First separate the path from the arguments. This will split at the first
33670   # space.
33671   complete="$PROPER_COMPILER_CXX"
33672   path="${complete%% *}"
33673   tmp="$complete EOL"
33674   arguments="${tmp#* }"
33675 
33676   # Input might be given as Windows format, start by converting to
33677   # unix format.
33678   new_path=`$CYGPATH -u "$path"`
33679 
33680   # Now try to locate executable using which
33681   new_path=`$WHICH "$new_path" 2> /dev/null`
33682   # bat and cmd files are not always considered executable in cygwin causing which
33683   # to not find them
33684   if test "x$new_path" = x \
33685       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33686       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33687     new_path=`$CYGPATH -u "$path"`
33688   fi
33689   if test "x$new_path" = x; then
33690     # Oops. Which didn't find the executable.
33691     # The splitting of arguments from the executable at a space might have been incorrect,
33692     # since paths with space are more likely in Windows. Give it another try with the whole
33693     # argument.
33694     path="$complete"
33695     arguments="EOL"
33696     new_path=`$CYGPATH -u "$path"`
33697     new_path=`$WHICH "$new_path" 2> /dev/null`
33698     # bat and cmd files are not always considered executable in cygwin causing which
33699     # to not find them
33700     if test "x$new_path" = x \
33701         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33702         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33703       new_path=`$CYGPATH -u "$path"`
33704     fi
33705     if test "x$new_path" = x; then
33706       # It's still not found. Now this is an unrecoverable error.
33707       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33708 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33709       has_space=`$ECHO "$complete" | $GREP " "`
33710       if test "x$has_space" != x; then
33711         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33712 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33713       fi
33714       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33715     fi
33716   fi
33717 
33718   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33719   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33720   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33721   # "foo.exe" is OK but "foo" is an error.
33722   #
33723   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33724   # It is also a way to make sure we got the proper file name for the real test later on.
33725   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33726   if test "x$test_shortpath" = x; then
33727     # Short path failed, file does not exist as specified.
33728     # Try adding .exe or .cmd
33729     if test -f "${new_path}.exe"; then
33730       input_to_shortpath="${new_path}.exe"
33731     elif test -f "${new_path}.cmd"; then
33732       input_to_shortpath="${new_path}.cmd"
33733     else
33734       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
33735 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
33736       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33737 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33738       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33739     fi
33740   else
33741     input_to_shortpath="$new_path"
33742   fi
33743 
33744   # Call helper function which possibly converts this using DOS-style short mode.
33745   # If so, the updated path is stored in $new_path.
33746   new_path="$input_to_shortpath"
33747 
33748   input_path="$input_to_shortpath"
33749   # Check if we need to convert this using DOS-style short mode. If the path
33750   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33751   # take no chances and rewrite it.
33752   # Note: m4 eats our [], so we need to use [ and ] instead.
33753   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33754   if test "x$has_forbidden_chars" != x; then
33755     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33756     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33757     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33758     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33759       # Going to short mode and back again did indeed matter. Since short mode is
33760       # case insensitive, let's make it lowercase to improve readability.
33761       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33762       # Now convert it back to Unix-style (cygpath)
33763       input_path=`$CYGPATH -u "$shortmode_path"`
33764       new_path="$input_path"
33765     fi
33766   fi
33767 
33768   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33769   if test "x$test_cygdrive_prefix" = x; then
33770     # As a simple fix, exclude /usr/bin since it's not a real path.
33771     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33772       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33773       # a path prefixed by /cygdrive for fixpath to work.
33774       new_path="$CYGWIN_ROOT_PATH$input_path"
33775     fi
33776   fi
33777 
33778   # remove trailing .exe if any
33779   new_path="${new_path/%.exe/}"
33780 
33781     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33782 
33783   # First separate the path from the arguments. This will split at the first
33784   # space.
33785   complete="$PROPER_COMPILER_CXX"
33786   path="${complete%% *}"
33787   tmp="$complete EOL"
33788   arguments="${tmp#* }"
33789 
33790   # Input might be given as Windows format, start by converting to
33791   # unix format.
33792   new_path="$path"
33793 
33794   windows_path="$new_path"
33795   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33796     unix_path=`$CYGPATH -u "$windows_path"`
33797     new_path="$unix_path"
33798   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33799     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33800     new_path="$unix_path"
33801   fi
33802 
33803 
33804   # Now try to locate executable using which
33805   new_path=`$WHICH "$new_path" 2> /dev/null`
33806 
33807   if test "x$new_path" = x; then
33808     # Oops. Which didn't find the executable.
33809     # The splitting of arguments from the executable at a space might have been incorrect,
33810     # since paths with space are more likely in Windows. Give it another try with the whole
33811     # argument.
33812     path="$complete"
33813     arguments="EOL"
33814     new_path="$path"
33815 
33816   windows_path="$new_path"
33817   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33818     unix_path=`$CYGPATH -u "$windows_path"`
33819     new_path="$unix_path"
33820   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33821     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33822     new_path="$unix_path"
33823   fi
33824 
33825 
33826     new_path=`$WHICH "$new_path" 2> /dev/null`
33827     # bat and cmd files are not always considered executable in MSYS causing which
33828     # to not find them
33829     if test "x$new_path" = x \
33830         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33831         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33832       new_path="$path"
33833 
33834   windows_path="$new_path"
33835   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33836     unix_path=`$CYGPATH -u "$windows_path"`
33837     new_path="$unix_path"
33838   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33839     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33840     new_path="$unix_path"
33841   fi
33842 
33843     fi
33844 
33845     if test "x$new_path" = x; then
33846       # It's still not found. Now this is an unrecoverable error.
33847       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33848 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33849       has_space=`$ECHO "$complete" | $GREP " "`
33850       if test "x$has_space" != x; then
33851         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33852 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33853       fi
33854       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33855     fi
33856   fi
33857 
33858   # Now new_path has a complete unix path to the binary
33859   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33860     # Keep paths in /bin as-is, but remove trailing .exe if any
33861     new_path="${new_path/%.exe/}"
33862     # Do not save /bin paths to all_fixpath_prefixes!
33863   else
33864     # Not in mixed or Windows style, start by that.
33865     new_path=`cmd //c echo $new_path`
33866 
33867   input_path="$new_path"
33868   # Check if we need to convert this using DOS-style short mode. If the path
33869   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33870   # take no chances and rewrite it.
33871   # Note: m4 eats our [], so we need to use [ and ] instead.
33872   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33873   if test "x$has_forbidden_chars" != x; then
33874     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33875     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33876   fi
33877 
33878     # Output is in $new_path
33879 
33880   windows_path="$new_path"
33881   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33882     unix_path=`$CYGPATH -u "$windows_path"`
33883     new_path="$unix_path"
33884   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33885     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33886     new_path="$unix_path"
33887   fi
33888 
33889     # remove trailing .exe if any
33890     new_path="${new_path/%.exe/}"
33891 
33892     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33893     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33894   fi
33895 
33896     else
33897       # We're on a unix platform. Hooray! :)
33898       # First separate the path from the arguments. This will split at the first
33899       # space.
33900       complete="$PROPER_COMPILER_CXX"
33901       path="${complete%% *}"
33902       tmp="$complete EOL"
33903       arguments="${tmp#* }"
33904 
33905       # Cannot rely on the command "which" here since it doesn't always work.
33906       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33907       if test -z "$is_absolute_path"; then
33908         # Path to executable is not absolute. Find it.
33909         IFS_save="$IFS"
33910         IFS=:
33911         for p in $PATH; do
33912           if test -f "$p/$path" && test -x "$p/$path"; then
33913             new_path="$p/$path"
33914             break
33915           fi
33916         done
33917         IFS="$IFS_save"
33918       else
33919         # This is an absolute path, we can use it without further modifications.
33920         new_path="$path"
33921       fi
33922 
33923       if test "x$new_path" = x; then
33924         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33925 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33926         has_space=`$ECHO "$complete" | $GREP " "`
33927         if test "x$has_space" != x; then
33928           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33929 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33930         fi
33931         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33932       fi
33933     fi
33934 
33935     # Now join together the path and the arguments once again
33936     if test "x$arguments" != xEOL; then
33937       new_complete="$new_path ${arguments% *}"
33938     else
33939       new_complete="$new_path"
33940     fi
33941 
33942     if test "x$complete" != "x$new_complete"; then
33943       PROPER_COMPILER_CXX="$new_complete"
33944       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
33945 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
33946     fi
33947   fi
33948 
33949     PATH="$RETRY_COMPILER_SAVED_PATH"
33950 
33951     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
33952 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
33953 
33954   if test "x$OPENJDK_BUILD_OS" != xwindows; then
33955     # Follow a chain of symbolic links. Use readlink
33956     # where it exists, else fall back to horribly
33957     # complicated shell code.
33958     if test "x$READLINK_TESTED" != yes; then
33959       # On MacOSX there is a readlink tool with a different
33960       # purpose than the GNU readlink tool. Check the found readlink.
33961       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33962       if test "x$ISGNU" = x; then
33963         # A readlink that we do not know how to use.
33964         # Are there other non-GNU readlinks out there?
33965         READLINK_TESTED=yes
33966         READLINK=
33967       fi
33968     fi
33969 
33970     if test "x$READLINK" != x; then
33971       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
33972     else
33973       # Save the current directory for restoring afterwards
33974       STARTDIR=$PWD
33975       COUNTER=0
33976       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
33977       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
33978       cd $sym_link_dir
33979       # Use -P flag to resolve symlinks in directories.
33980       cd `$THEPWDCMD -P`
33981       sym_link_dir=`$THEPWDCMD -P`
33982       # Resolve file symlinks
33983       while test $COUNTER -lt 20; do
33984         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33985         if test "x$ISLINK" == x; then
33986           # This is not a symbolic link! We are done!
33987           break
33988         fi
33989         # Again resolve directory symlinks since the target of the just found
33990         # link could be in a different directory
33991         cd `$DIRNAME $ISLINK`
33992         sym_link_dir=`$THEPWDCMD -P`
33993         sym_link_file=`$BASENAME $ISLINK`
33994         let COUNTER=COUNTER+1
33995       done
33996       cd $STARTDIR
33997       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
33998     fi
33999   fi
34000 
34001     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
34002 $as_echo "$PROPER_COMPILER_CXX" >&6; }
34003     CXX="$PROPER_COMPILER_CXX"
34004   else
34005     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
34006 $as_echo "no, keeping CXX" >&6; }
34007   fi
34008 
34009 
34010   COMPILER=$CXX
34011   COMPILER_NAME=$COMPILER_NAME
34012 
34013   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34014     # cc -V output typically looks like
34015     #     cc: Sun C 5.12 Linux_i386 2011/11/16
34016     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34017     # Check that this is likely to be the Solaris Studio cc.
34018     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34019     if test $? -ne 0; then
34020       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34021       { $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
34022 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34023       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34024 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34025       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34026 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34027       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34028     fi
34029     # Remove usage instructions (if present), and
34030     # collapse compiler output into a single line
34031     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34032         $SED -e 's/ *[Uu]sage:.*//'`
34033     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34034         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34035   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34036     # xlc -qversion output typically looks like
34037     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34038     #     Version: 11.01.0000.0015
34039     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34040     # Check that this is likely to be the IBM XL C compiler.
34041     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34042     if test $? -ne 0; then
34043       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34044       { $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
34045 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34046       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34047 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34048       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34049 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34050       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34051     fi
34052     # Collapse compiler output into a single line
34053     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34054     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34055         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34056   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34057     # There is no specific version flag, but all output starts with a version string.
34058     # First line typically looks something like:
34059     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34060     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34061     # Check that this is likely to be Microsoft CL.EXE.
34062     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34063     if test $? -ne 0; then
34064       { $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
34065 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34066       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34067 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34068       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34069     fi
34070     # Collapse compiler output into a single line
34071     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34072     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34073         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34074   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34075     # gcc --version output typically looks like
34076     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34077     #     Copyright (C) 2013 Free Software Foundation, Inc.
34078     #     This is free software; see the source for copying conditions.  There is NO
34079     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34080     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34081     # Check that this is likely to be GCC.
34082     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34083     if test $? -ne 0; then
34084       { $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
34085 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34086       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34087 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34088       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34089     fi
34090     # Remove Copyright and legalese from version string, and
34091     # collapse into a single line
34092     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34093         $SED -e 's/ *Copyright .*//'`
34094     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34095         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
34096   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34097     # clang --version output typically looks like
34098     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34099     #    clang version 3.3 (tags/RELEASE_33/final)
34100     # or
34101     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34102     #    Target: x86_64-pc-linux-gnu
34103     #    Thread model: posix
34104     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34105     # Check that this is likely to be clang
34106     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34107     if test $? -ne 0; then
34108       { $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
34109 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34110       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34111 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34112       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34113     fi
34114     # Collapse compiler output into a single line
34115     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34116     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34117         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
34118   else
34119       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34120   fi
34121   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34122   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34123   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34124   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34125 
34126   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34127 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34128 
34129 
34130   # Now that we have resolved CXX ourself, let autoconf have its go at it
34131   ac_ext=cpp
34132 ac_cpp='$CXXCPP $CPPFLAGS'
34133 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34134 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34135 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34136 if test -z "$CXX"; then
34137   if test -n "$CCC"; then
34138     CXX=$CCC
34139   else
34140     if test -n "$ac_tool_prefix"; then
34141   for ac_prog in $CXX
34142   do
34143     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34144 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34146 $as_echo_n "checking for $ac_word... " >&6; }
34147 if ${ac_cv_prog_CXX+:} false; then :
34148   $as_echo_n "(cached) " >&6
34149 else
34150   if test -n "$CXX"; then
34151   ac_cv_prog_CXX="$CXX" # Let the user override the test.
34152 else
34153 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34154 for as_dir in $PATH
34155 do
34156   IFS=$as_save_IFS
34157   test -z "$as_dir" && as_dir=.
34158     for ac_exec_ext in '' $ac_executable_extensions; do
34159   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34160     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34161     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34162     break 2
34163   fi
34164 done
34165   done
34166 IFS=$as_save_IFS
34167 
34168 fi
34169 fi
34170 CXX=$ac_cv_prog_CXX
34171 if test -n "$CXX"; then
34172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34173 $as_echo "$CXX" >&6; }
34174 else
34175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34176 $as_echo "no" >&6; }
34177 fi
34178 
34179 
34180     test -n "$CXX" && break
34181   done
34182 fi
34183 if test -z "$CXX"; then
34184   ac_ct_CXX=$CXX
34185   for ac_prog in $CXX
34186 do
34187   # Extract the first word of "$ac_prog", so it can be a program name with args.
34188 set dummy $ac_prog; ac_word=$2
34189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34190 $as_echo_n "checking for $ac_word... " >&6; }
34191 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34192   $as_echo_n "(cached) " >&6
34193 else
34194   if test -n "$ac_ct_CXX"; then
34195   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34196 else
34197 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34198 for as_dir in $PATH
34199 do
34200   IFS=$as_save_IFS
34201   test -z "$as_dir" && as_dir=.
34202     for ac_exec_ext in '' $ac_executable_extensions; do
34203   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34204     ac_cv_prog_ac_ct_CXX="$ac_prog"
34205     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34206     break 2
34207   fi
34208 done
34209   done
34210 IFS=$as_save_IFS
34211 
34212 fi
34213 fi
34214 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34215 if test -n "$ac_ct_CXX"; then
34216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34217 $as_echo "$ac_ct_CXX" >&6; }
34218 else
34219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34220 $as_echo "no" >&6; }
34221 fi
34222 
34223 
34224   test -n "$ac_ct_CXX" && break
34225 done
34226 
34227   if test "x$ac_ct_CXX" = x; then
34228     CXX="g++"
34229   else
34230     case $cross_compiling:$ac_tool_warned in
34231 yes:)
34232 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34233 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34234 ac_tool_warned=yes ;;
34235 esac
34236     CXX=$ac_ct_CXX
34237   fi
34238 fi
34239 
34240   fi
34241 fi
34242 # Provide some information about the compiler.
34243 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34244 set X $ac_compile
34245 ac_compiler=$2
34246 for ac_option in --version -v -V -qversion; do
34247   { { ac_try="$ac_compiler $ac_option >&5"
34248 case "(($ac_try" in
34249   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34250   *) ac_try_echo=$ac_try;;
34251 esac
34252 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34253 $as_echo "$ac_try_echo"; } >&5
34254   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34255   ac_status=$?
34256   if test -s conftest.err; then
34257     sed '10a\
34258 ... rest of stderr output deleted ...
34259          10q' conftest.err >conftest.er1
34260     cat conftest.er1 >&5
34261   fi
34262   rm -f conftest.er1 conftest.err
34263   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34264   test $ac_status = 0; }
34265 done
34266 
34267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34268 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34269 if ${ac_cv_cxx_compiler_gnu+:} false; then :
34270   $as_echo_n "(cached) " >&6
34271 else
34272   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34273 /* end confdefs.h.  */
34274 
34275 int
34276 main ()
34277 {
34278 #ifndef __GNUC__
34279        choke me
34280 #endif
34281 
34282   ;
34283   return 0;
34284 }
34285 _ACEOF
34286 if ac_fn_cxx_try_compile "$LINENO"; then :
34287   ac_compiler_gnu=yes
34288 else
34289   ac_compiler_gnu=no
34290 fi
34291 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34292 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34293 
34294 fi
34295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34296 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34297 if test $ac_compiler_gnu = yes; then
34298   GXX=yes
34299 else
34300   GXX=
34301 fi
34302 ac_test_CXXFLAGS=${CXXFLAGS+set}
34303 ac_save_CXXFLAGS=$CXXFLAGS
34304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34305 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
34306 if ${ac_cv_prog_cxx_g+:} false; then :
34307   $as_echo_n "(cached) " >&6
34308 else
34309   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34310    ac_cxx_werror_flag=yes
34311    ac_cv_prog_cxx_g=no
34312    CXXFLAGS="-g"
34313    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34314 /* end confdefs.h.  */
34315 
34316 int
34317 main ()
34318 {
34319 
34320   ;
34321   return 0;
34322 }
34323 _ACEOF
34324 if ac_fn_cxx_try_compile "$LINENO"; then :
34325   ac_cv_prog_cxx_g=yes
34326 else
34327   CXXFLAGS=""
34328       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34329 /* end confdefs.h.  */
34330 
34331 int
34332 main ()
34333 {
34334 
34335   ;
34336   return 0;
34337 }
34338 _ACEOF
34339 if ac_fn_cxx_try_compile "$LINENO"; then :
34340 
34341 else
34342   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34343          CXXFLAGS="-g"
34344          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34345 /* end confdefs.h.  */
34346 
34347 int
34348 main ()
34349 {
34350 
34351   ;
34352   return 0;
34353 }
34354 _ACEOF
34355 if ac_fn_cxx_try_compile "$LINENO"; then :
34356   ac_cv_prog_cxx_g=yes
34357 fi
34358 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34359 fi
34360 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34361 fi
34362 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34363    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34364 fi
34365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34366 $as_echo "$ac_cv_prog_cxx_g" >&6; }
34367 if test "$ac_test_CXXFLAGS" = set; then
34368   CXXFLAGS=$ac_save_CXXFLAGS
34369 elif test $ac_cv_prog_cxx_g = yes; then
34370   if test "$GXX" = yes; then
34371     CXXFLAGS="-g -O2"
34372   else
34373     CXXFLAGS="-g"
34374   fi
34375 else
34376   if test "$GXX" = yes; then
34377     CXXFLAGS="-O2"
34378   else
34379     CXXFLAGS=
34380   fi
34381 fi
34382 ac_ext=cpp
34383 ac_cpp='$CXXCPP $CPPFLAGS'
34384 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34385 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34386 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34387 
34388 
34389   #
34390   # Setup the preprocessor (CPP and CXXCPP)
34391   #
34392   ac_ext=c
34393 ac_cpp='$CPP $CPPFLAGS'
34394 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34395 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34396 ac_compiler_gnu=$ac_cv_c_compiler_gnu
34397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34398 $as_echo_n "checking how to run the C preprocessor... " >&6; }
34399 # On Suns, sometimes $CPP names a directory.
34400 if test -n "$CPP" && test -d "$CPP"; then
34401   CPP=
34402 fi
34403 if test -z "$CPP"; then
34404   if ${ac_cv_prog_CPP+:} false; then :
34405   $as_echo_n "(cached) " >&6
34406 else
34407       # Double quotes because CPP needs to be expanded
34408     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34409     do
34410       ac_preproc_ok=false
34411 for ac_c_preproc_warn_flag in '' yes
34412 do
34413   # Use a header file that comes with gcc, so configuring glibc
34414   # with a fresh cross-compiler works.
34415   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34416   # <limits.h> exists even on freestanding compilers.
34417   # On the NeXT, cc -E runs the code through the compiler's parser,
34418   # not just through cpp. "Syntax error" is here to catch this case.
34419   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34420 /* end confdefs.h.  */
34421 #ifdef __STDC__
34422 # include <limits.h>
34423 #else
34424 # include <assert.h>
34425 #endif
34426                      Syntax error
34427 _ACEOF
34428 if ac_fn_c_try_cpp "$LINENO"; then :
34429 
34430 else
34431   # Broken: fails on valid input.
34432 continue
34433 fi
34434 rm -f conftest.err conftest.i conftest.$ac_ext
34435 
34436   # OK, works on sane cases.  Now check whether nonexistent headers
34437   # can be detected and how.
34438   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34439 /* end confdefs.h.  */
34440 #include <ac_nonexistent.h>
34441 _ACEOF
34442 if ac_fn_c_try_cpp "$LINENO"; then :
34443   # Broken: success on invalid input.
34444 continue
34445 else
34446   # Passes both tests.
34447 ac_preproc_ok=:
34448 break
34449 fi
34450 rm -f conftest.err conftest.i conftest.$ac_ext
34451 
34452 done
34453 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34454 rm -f conftest.i conftest.err conftest.$ac_ext
34455 if $ac_preproc_ok; then :
34456   break
34457 fi
34458 
34459     done
34460     ac_cv_prog_CPP=$CPP
34461 
34462 fi
34463   CPP=$ac_cv_prog_CPP
34464 else
34465   ac_cv_prog_CPP=$CPP
34466 fi
34467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34468 $as_echo "$CPP" >&6; }
34469 ac_preproc_ok=false
34470 for ac_c_preproc_warn_flag in '' yes
34471 do
34472   # Use a header file that comes with gcc, so configuring glibc
34473   # with a fresh cross-compiler works.
34474   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34475   # <limits.h> exists even on freestanding compilers.
34476   # On the NeXT, cc -E runs the code through the compiler's parser,
34477   # not just through cpp. "Syntax error" is here to catch this case.
34478   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34479 /* end confdefs.h.  */
34480 #ifdef __STDC__
34481 # include <limits.h>
34482 #else
34483 # include <assert.h>
34484 #endif
34485                      Syntax error
34486 _ACEOF
34487 if ac_fn_c_try_cpp "$LINENO"; then :
34488 
34489 else
34490   # Broken: fails on valid input.
34491 continue
34492 fi
34493 rm -f conftest.err conftest.i conftest.$ac_ext
34494 
34495   # OK, works on sane cases.  Now check whether nonexistent headers
34496   # can be detected and how.
34497   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34498 /* end confdefs.h.  */
34499 #include <ac_nonexistent.h>
34500 _ACEOF
34501 if ac_fn_c_try_cpp "$LINENO"; then :
34502   # Broken: success on invalid input.
34503 continue
34504 else
34505   # Passes both tests.
34506 ac_preproc_ok=:
34507 break
34508 fi
34509 rm -f conftest.err conftest.i conftest.$ac_ext
34510 
34511 done
34512 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34513 rm -f conftest.i conftest.err conftest.$ac_ext
34514 if $ac_preproc_ok; then :
34515 
34516 else
34517   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34518 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34519 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34520 See \`config.log' for more details" "$LINENO" 5; }
34521 fi
34522 
34523 ac_ext=cpp
34524 ac_cpp='$CXXCPP $CPPFLAGS'
34525 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34526 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34527 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34528 
34529 
34530   # Only process if variable expands to non-empty
34531 
34532   if test "x$CPP" != x; then
34533     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34534 
34535   # First separate the path from the arguments. This will split at the first
34536   # space.
34537   complete="$CPP"
34538   path="${complete%% *}"
34539   tmp="$complete EOL"
34540   arguments="${tmp#* }"
34541 
34542   # Input might be given as Windows format, start by converting to
34543   # unix format.
34544   new_path=`$CYGPATH -u "$path"`
34545 
34546   # Now try to locate executable using which
34547   new_path=`$WHICH "$new_path" 2> /dev/null`
34548   # bat and cmd files are not always considered executable in cygwin causing which
34549   # to not find them
34550   if test "x$new_path" = x \
34551       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34552       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34553     new_path=`$CYGPATH -u "$path"`
34554   fi
34555   if test "x$new_path" = x; then
34556     # Oops. Which didn't find the executable.
34557     # The splitting of arguments from the executable at a space might have been incorrect,
34558     # since paths with space are more likely in Windows. Give it another try with the whole
34559     # argument.
34560     path="$complete"
34561     arguments="EOL"
34562     new_path=`$CYGPATH -u "$path"`
34563     new_path=`$WHICH "$new_path" 2> /dev/null`
34564     # bat and cmd files are not always considered executable in cygwin causing which
34565     # to not find them
34566     if test "x$new_path" = x \
34567         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34568         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34569       new_path=`$CYGPATH -u "$path"`
34570     fi
34571     if test "x$new_path" = x; then
34572       # It's still not found. Now this is an unrecoverable error.
34573       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34574 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34575       has_space=`$ECHO "$complete" | $GREP " "`
34576       if test "x$has_space" != x; then
34577         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34578 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34579       fi
34580       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34581     fi
34582   fi
34583 
34584   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34585   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34586   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34587   # "foo.exe" is OK but "foo" is an error.
34588   #
34589   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34590   # It is also a way to make sure we got the proper file name for the real test later on.
34591   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34592   if test "x$test_shortpath" = x; then
34593     # Short path failed, file does not exist as specified.
34594     # Try adding .exe or .cmd
34595     if test -f "${new_path}.exe"; then
34596       input_to_shortpath="${new_path}.exe"
34597     elif test -f "${new_path}.cmd"; then
34598       input_to_shortpath="${new_path}.cmd"
34599     else
34600       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34601 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34602       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34603 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34604       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34605     fi
34606   else
34607     input_to_shortpath="$new_path"
34608   fi
34609 
34610   # Call helper function which possibly converts this using DOS-style short mode.
34611   # If so, the updated path is stored in $new_path.
34612   new_path="$input_to_shortpath"
34613 
34614   input_path="$input_to_shortpath"
34615   # Check if we need to convert this using DOS-style short mode. If the path
34616   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34617   # take no chances and rewrite it.
34618   # Note: m4 eats our [], so we need to use [ and ] instead.
34619   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34620   if test "x$has_forbidden_chars" != x; then
34621     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34622     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34623     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34624     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34625       # Going to short mode and back again did indeed matter. Since short mode is
34626       # case insensitive, let's make it lowercase to improve readability.
34627       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34628       # Now convert it back to Unix-style (cygpath)
34629       input_path=`$CYGPATH -u "$shortmode_path"`
34630       new_path="$input_path"
34631     fi
34632   fi
34633 
34634   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34635   if test "x$test_cygdrive_prefix" = x; then
34636     # As a simple fix, exclude /usr/bin since it's not a real path.
34637     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34638       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34639       # a path prefixed by /cygdrive for fixpath to work.
34640       new_path="$CYGWIN_ROOT_PATH$input_path"
34641     fi
34642   fi
34643 
34644   # remove trailing .exe if any
34645   new_path="${new_path/%.exe/}"
34646 
34647     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34648 
34649   # First separate the path from the arguments. This will split at the first
34650   # space.
34651   complete="$CPP"
34652   path="${complete%% *}"
34653   tmp="$complete EOL"
34654   arguments="${tmp#* }"
34655 
34656   # Input might be given as Windows format, start by converting to
34657   # unix format.
34658   new_path="$path"
34659 
34660   windows_path="$new_path"
34661   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34662     unix_path=`$CYGPATH -u "$windows_path"`
34663     new_path="$unix_path"
34664   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34665     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34666     new_path="$unix_path"
34667   fi
34668 
34669 
34670   # Now try to locate executable using which
34671   new_path=`$WHICH "$new_path" 2> /dev/null`
34672 
34673   if test "x$new_path" = x; then
34674     # Oops. Which didn't find the executable.
34675     # The splitting of arguments from the executable at a space might have been incorrect,
34676     # since paths with space are more likely in Windows. Give it another try with the whole
34677     # argument.
34678     path="$complete"
34679     arguments="EOL"
34680     new_path="$path"
34681 
34682   windows_path="$new_path"
34683   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34684     unix_path=`$CYGPATH -u "$windows_path"`
34685     new_path="$unix_path"
34686   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34687     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34688     new_path="$unix_path"
34689   fi
34690 
34691 
34692     new_path=`$WHICH "$new_path" 2> /dev/null`
34693     # bat and cmd files are not always considered executable in MSYS causing which
34694     # to not find them
34695     if test "x$new_path" = x \
34696         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34697         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34698       new_path="$path"
34699 
34700   windows_path="$new_path"
34701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34702     unix_path=`$CYGPATH -u "$windows_path"`
34703     new_path="$unix_path"
34704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34705     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34706     new_path="$unix_path"
34707   fi
34708 
34709     fi
34710 
34711     if test "x$new_path" = x; then
34712       # It's still not found. Now this is an unrecoverable error.
34713       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34714 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34715       has_space=`$ECHO "$complete" | $GREP " "`
34716       if test "x$has_space" != x; then
34717         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34718 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34719       fi
34720       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34721     fi
34722   fi
34723 
34724   # Now new_path has a complete unix path to the binary
34725   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34726     # Keep paths in /bin as-is, but remove trailing .exe if any
34727     new_path="${new_path/%.exe/}"
34728     # Do not save /bin paths to all_fixpath_prefixes!
34729   else
34730     # Not in mixed or Windows style, start by that.
34731     new_path=`cmd //c echo $new_path`
34732 
34733   input_path="$new_path"
34734   # Check if we need to convert this using DOS-style short mode. If the path
34735   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34736   # take no chances and rewrite it.
34737   # Note: m4 eats our [], so we need to use [ and ] instead.
34738   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34739   if test "x$has_forbidden_chars" != x; then
34740     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34741     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34742   fi
34743 
34744     # Output is in $new_path
34745 
34746   windows_path="$new_path"
34747   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34748     unix_path=`$CYGPATH -u "$windows_path"`
34749     new_path="$unix_path"
34750   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34751     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34752     new_path="$unix_path"
34753   fi
34754 
34755     # remove trailing .exe if any
34756     new_path="${new_path/%.exe/}"
34757 
34758     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34759     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34760   fi
34761 
34762     else
34763       # We're on a unix platform. Hooray! :)
34764       # First separate the path from the arguments. This will split at the first
34765       # space.
34766       complete="$CPP"
34767       path="${complete%% *}"
34768       tmp="$complete EOL"
34769       arguments="${tmp#* }"
34770 
34771       # Cannot rely on the command "which" here since it doesn't always work.
34772       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34773       if test -z "$is_absolute_path"; then
34774         # Path to executable is not absolute. Find it.
34775         IFS_save="$IFS"
34776         IFS=:
34777         for p in $PATH; do
34778           if test -f "$p/$path" && test -x "$p/$path"; then
34779             new_path="$p/$path"
34780             break
34781           fi
34782         done
34783         IFS="$IFS_save"
34784       else
34785         # This is an absolute path, we can use it without further modifications.
34786         new_path="$path"
34787       fi
34788 
34789       if test "x$new_path" = x; then
34790         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34791 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34792         has_space=`$ECHO "$complete" | $GREP " "`
34793         if test "x$has_space" != x; then
34794           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34795 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34796         fi
34797         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34798       fi
34799     fi
34800 
34801     # Now join together the path and the arguments once again
34802     if test "x$arguments" != xEOL; then
34803       new_complete="$new_path ${arguments% *}"
34804     else
34805       new_complete="$new_path"
34806     fi
34807 
34808     if test "x$complete" != "x$new_complete"; then
34809       CPP="$new_complete"
34810       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34811 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34812     fi
34813   fi
34814 
34815   ac_ext=cpp
34816 ac_cpp='$CXXCPP $CPPFLAGS'
34817 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34818 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34819 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34821 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34822 if test -z "$CXXCPP"; then
34823   if ${ac_cv_prog_CXXCPP+:} false; then :
34824   $as_echo_n "(cached) " >&6
34825 else
34826       # Double quotes because CXXCPP needs to be expanded
34827     for CXXCPP in "$CXX -E" "/lib/cpp"
34828     do
34829       ac_preproc_ok=false
34830 for ac_cxx_preproc_warn_flag in '' yes
34831 do
34832   # Use a header file that comes with gcc, so configuring glibc
34833   # with a fresh cross-compiler works.
34834   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34835   # <limits.h> exists even on freestanding compilers.
34836   # On the NeXT, cc -E runs the code through the compiler's parser,
34837   # not just through cpp. "Syntax error" is here to catch this case.
34838   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34839 /* end confdefs.h.  */
34840 #ifdef __STDC__
34841 # include <limits.h>
34842 #else
34843 # include <assert.h>
34844 #endif
34845                      Syntax error
34846 _ACEOF
34847 if ac_fn_cxx_try_cpp "$LINENO"; then :
34848 
34849 else
34850   # Broken: fails on valid input.
34851 continue
34852 fi
34853 rm -f conftest.err conftest.i conftest.$ac_ext
34854 
34855   # OK, works on sane cases.  Now check whether nonexistent headers
34856   # can be detected and how.
34857   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34858 /* end confdefs.h.  */
34859 #include <ac_nonexistent.h>
34860 _ACEOF
34861 if ac_fn_cxx_try_cpp "$LINENO"; then :
34862   # Broken: success on invalid input.
34863 continue
34864 else
34865   # Passes both tests.
34866 ac_preproc_ok=:
34867 break
34868 fi
34869 rm -f conftest.err conftest.i conftest.$ac_ext
34870 
34871 done
34872 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34873 rm -f conftest.i conftest.err conftest.$ac_ext
34874 if $ac_preproc_ok; then :
34875   break
34876 fi
34877 
34878     done
34879     ac_cv_prog_CXXCPP=$CXXCPP
34880 
34881 fi
34882   CXXCPP=$ac_cv_prog_CXXCPP
34883 else
34884   ac_cv_prog_CXXCPP=$CXXCPP
34885 fi
34886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34887 $as_echo "$CXXCPP" >&6; }
34888 ac_preproc_ok=false
34889 for ac_cxx_preproc_warn_flag in '' yes
34890 do
34891   # Use a header file that comes with gcc, so configuring glibc
34892   # with a fresh cross-compiler works.
34893   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34894   # <limits.h> exists even on freestanding compilers.
34895   # On the NeXT, cc -E runs the code through the compiler's parser,
34896   # not just through cpp. "Syntax error" is here to catch this case.
34897   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34898 /* end confdefs.h.  */
34899 #ifdef __STDC__
34900 # include <limits.h>
34901 #else
34902 # include <assert.h>
34903 #endif
34904                      Syntax error
34905 _ACEOF
34906 if ac_fn_cxx_try_cpp "$LINENO"; then :
34907 
34908 else
34909   # Broken: fails on valid input.
34910 continue
34911 fi
34912 rm -f conftest.err conftest.i conftest.$ac_ext
34913 
34914   # OK, works on sane cases.  Now check whether nonexistent headers
34915   # can be detected and how.
34916   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34917 /* end confdefs.h.  */
34918 #include <ac_nonexistent.h>
34919 _ACEOF
34920 if ac_fn_cxx_try_cpp "$LINENO"; then :
34921   # Broken: success on invalid input.
34922 continue
34923 else
34924   # Passes both tests.
34925 ac_preproc_ok=:
34926 break
34927 fi
34928 rm -f conftest.err conftest.i conftest.$ac_ext
34929 
34930 done
34931 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34932 rm -f conftest.i conftest.err conftest.$ac_ext
34933 if $ac_preproc_ok; then :
34934 
34935 else
34936   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34937 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34938 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
34939 See \`config.log' for more details" "$LINENO" 5; }
34940 fi
34941 
34942 ac_ext=cpp
34943 ac_cpp='$CXXCPP $CPPFLAGS'
34944 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34945 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34946 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34947 
34948 
34949   # Only process if variable expands to non-empty
34950 
34951   if test "x$CXXCPP" != x; then
34952     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34953 
34954   # First separate the path from the arguments. This will split at the first
34955   # space.
34956   complete="$CXXCPP"
34957   path="${complete%% *}"
34958   tmp="$complete EOL"
34959   arguments="${tmp#* }"
34960 
34961   # Input might be given as Windows format, start by converting to
34962   # unix format.
34963   new_path=`$CYGPATH -u "$path"`
34964 
34965   # Now try to locate executable using which
34966   new_path=`$WHICH "$new_path" 2> /dev/null`
34967   # bat and cmd files are not always considered executable in cygwin causing which
34968   # to not find them
34969   if test "x$new_path" = x \
34970       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34971       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34972     new_path=`$CYGPATH -u "$path"`
34973   fi
34974   if test "x$new_path" = x; then
34975     # Oops. Which didn't find the executable.
34976     # The splitting of arguments from the executable at a space might have been incorrect,
34977     # since paths with space are more likely in Windows. Give it another try with the whole
34978     # argument.
34979     path="$complete"
34980     arguments="EOL"
34981     new_path=`$CYGPATH -u "$path"`
34982     new_path=`$WHICH "$new_path" 2> /dev/null`
34983     # bat and cmd files are not always considered executable in cygwin causing which
34984     # to not find them
34985     if test "x$new_path" = x \
34986         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34987         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34988       new_path=`$CYGPATH -u "$path"`
34989     fi
34990     if test "x$new_path" = x; then
34991       # It's still not found. Now this is an unrecoverable error.
34992       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34993 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34994       has_space=`$ECHO "$complete" | $GREP " "`
34995       if test "x$has_space" != x; then
34996         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34997 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34998       fi
34999       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35000     fi
35001   fi
35002 
35003   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35004   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35005   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35006   # "foo.exe" is OK but "foo" is an error.
35007   #
35008   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35009   # It is also a way to make sure we got the proper file name for the real test later on.
35010   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35011   if test "x$test_shortpath" = x; then
35012     # Short path failed, file does not exist as specified.
35013     # Try adding .exe or .cmd
35014     if test -f "${new_path}.exe"; then
35015       input_to_shortpath="${new_path}.exe"
35016     elif test -f "${new_path}.cmd"; then
35017       input_to_shortpath="${new_path}.cmd"
35018     else
35019       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35020 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35021       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35022 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35023       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35024     fi
35025   else
35026     input_to_shortpath="$new_path"
35027   fi
35028 
35029   # Call helper function which possibly converts this using DOS-style short mode.
35030   # If so, the updated path is stored in $new_path.
35031   new_path="$input_to_shortpath"
35032 
35033   input_path="$input_to_shortpath"
35034   # Check if we need to convert this using DOS-style short mode. If the path
35035   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35036   # take no chances and rewrite it.
35037   # Note: m4 eats our [], so we need to use [ and ] instead.
35038   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35039   if test "x$has_forbidden_chars" != x; then
35040     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35041     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35042     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35043     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35044       # Going to short mode and back again did indeed matter. Since short mode is
35045       # case insensitive, let's make it lowercase to improve readability.
35046       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35047       # Now convert it back to Unix-style (cygpath)
35048       input_path=`$CYGPATH -u "$shortmode_path"`
35049       new_path="$input_path"
35050     fi
35051   fi
35052 
35053   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35054   if test "x$test_cygdrive_prefix" = x; then
35055     # As a simple fix, exclude /usr/bin since it's not a real path.
35056     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35057       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35058       # a path prefixed by /cygdrive for fixpath to work.
35059       new_path="$CYGWIN_ROOT_PATH$input_path"
35060     fi
35061   fi
35062 
35063   # remove trailing .exe if any
35064   new_path="${new_path/%.exe/}"
35065 
35066     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35067 
35068   # First separate the path from the arguments. This will split at the first
35069   # space.
35070   complete="$CXXCPP"
35071   path="${complete%% *}"
35072   tmp="$complete EOL"
35073   arguments="${tmp#* }"
35074 
35075   # Input might be given as Windows format, start by converting to
35076   # unix format.
35077   new_path="$path"
35078 
35079   windows_path="$new_path"
35080   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35081     unix_path=`$CYGPATH -u "$windows_path"`
35082     new_path="$unix_path"
35083   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35084     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35085     new_path="$unix_path"
35086   fi
35087 
35088 
35089   # Now try to locate executable using which
35090   new_path=`$WHICH "$new_path" 2> /dev/null`
35091 
35092   if test "x$new_path" = x; then
35093     # Oops. Which didn't find the executable.
35094     # The splitting of arguments from the executable at a space might have been incorrect,
35095     # since paths with space are more likely in Windows. Give it another try with the whole
35096     # argument.
35097     path="$complete"
35098     arguments="EOL"
35099     new_path="$path"
35100 
35101   windows_path="$new_path"
35102   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35103     unix_path=`$CYGPATH -u "$windows_path"`
35104     new_path="$unix_path"
35105   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35106     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35107     new_path="$unix_path"
35108   fi
35109 
35110 
35111     new_path=`$WHICH "$new_path" 2> /dev/null`
35112     # bat and cmd files are not always considered executable in MSYS causing which
35113     # to not find them
35114     if test "x$new_path" = x \
35115         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35116         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35117       new_path="$path"
35118 
35119   windows_path="$new_path"
35120   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35121     unix_path=`$CYGPATH -u "$windows_path"`
35122     new_path="$unix_path"
35123   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35124     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35125     new_path="$unix_path"
35126   fi
35127 
35128     fi
35129 
35130     if test "x$new_path" = x; then
35131       # It's still not found. Now this is an unrecoverable error.
35132       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35133 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35134       has_space=`$ECHO "$complete" | $GREP " "`
35135       if test "x$has_space" != x; then
35136         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35137 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35138       fi
35139       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35140     fi
35141   fi
35142 
35143   # Now new_path has a complete unix path to the binary
35144   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35145     # Keep paths in /bin as-is, but remove trailing .exe if any
35146     new_path="${new_path/%.exe/}"
35147     # Do not save /bin paths to all_fixpath_prefixes!
35148   else
35149     # Not in mixed or Windows style, start by that.
35150     new_path=`cmd //c echo $new_path`
35151 
35152   input_path="$new_path"
35153   # Check if we need to convert this using DOS-style short mode. If the path
35154   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35155   # take no chances and rewrite it.
35156   # Note: m4 eats our [], so we need to use [ and ] instead.
35157   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35158   if test "x$has_forbidden_chars" != x; then
35159     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35160     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35161   fi
35162 
35163     # Output is in $new_path
35164 
35165   windows_path="$new_path"
35166   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35167     unix_path=`$CYGPATH -u "$windows_path"`
35168     new_path="$unix_path"
35169   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35170     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35171     new_path="$unix_path"
35172   fi
35173 
35174     # remove trailing .exe if any
35175     new_path="${new_path/%.exe/}"
35176 
35177     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35178     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35179   fi
35180 
35181     else
35182       # We're on a unix platform. Hooray! :)
35183       # First separate the path from the arguments. This will split at the first
35184       # space.
35185       complete="$CXXCPP"
35186       path="${complete%% *}"
35187       tmp="$complete EOL"
35188       arguments="${tmp#* }"
35189 
35190       # Cannot rely on the command "which" here since it doesn't always work.
35191       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35192       if test -z "$is_absolute_path"; then
35193         # Path to executable is not absolute. Find it.
35194         IFS_save="$IFS"
35195         IFS=:
35196         for p in $PATH; do
35197           if test -f "$p/$path" && test -x "$p/$path"; then
35198             new_path="$p/$path"
35199             break
35200           fi
35201         done
35202         IFS="$IFS_save"
35203       else
35204         # This is an absolute path, we can use it without further modifications.
35205         new_path="$path"
35206       fi
35207 
35208       if test "x$new_path" = x; then
35209         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35210 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35211         has_space=`$ECHO "$complete" | $GREP " "`
35212         if test "x$has_space" != x; then
35213           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35214 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35215         fi
35216         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35217       fi
35218     fi
35219 
35220     # Now join together the path and the arguments once again
35221     if test "x$arguments" != xEOL; then
35222       new_complete="$new_path ${arguments% *}"
35223     else
35224       new_complete="$new_path"
35225     fi
35226 
35227     if test "x$complete" != "x$new_complete"; then
35228       CXXCPP="$new_complete"
35229       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35230 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35231     fi
35232   fi
35233 
35234 
35235   #
35236   # Setup the linker (LD)
35237   #
35238   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35239     # In the Microsoft toolchain we have a separate LD command "link".
35240     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35241     # a cygwin program for something completely different.
35242     # Extract the first word of "link", so it can be a program name with args.
35243 set dummy link; ac_word=$2
35244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35245 $as_echo_n "checking for $ac_word... " >&6; }
35246 if ${ac_cv_prog_LD+:} false; then :
35247   $as_echo_n "(cached) " >&6
35248 else
35249   if test -n "$LD"; then
35250   ac_cv_prog_LD="$LD" # Let the user override the test.
35251 else
35252   ac_prog_rejected=no
35253 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35254 for as_dir in $PATH
35255 do
35256   IFS=$as_save_IFS
35257   test -z "$as_dir" && as_dir=.
35258     for ac_exec_ext in '' $ac_executable_extensions; do
35259   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35260     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35261        ac_prog_rejected=yes
35262        continue
35263      fi
35264     ac_cv_prog_LD="link"
35265     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35266     break 2
35267   fi
35268 done
35269   done
35270 IFS=$as_save_IFS
35271 
35272 if test $ac_prog_rejected = yes; then
35273   # We found a bogon in the path, so make sure we never use it.
35274   set dummy $ac_cv_prog_LD
35275   shift
35276   if test $# != 0; then
35277     # We chose a different compiler from the bogus one.
35278     # However, it has the same basename, so the bogon will be chosen
35279     # first if we set LD to just the basename; use the full file name.
35280     shift
35281     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35282   fi
35283 fi
35284 fi
35285 fi
35286 LD=$ac_cv_prog_LD
35287 if test -n "$LD"; then
35288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35289 $as_echo "$LD" >&6; }
35290 else
35291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35292 $as_echo "no" >&6; }
35293 fi
35294 
35295 
35296 
35297   # Only process if variable expands to non-empty
35298 
35299   if test "x$LD" != x; then
35300     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35301 
35302   # First separate the path from the arguments. This will split at the first
35303   # space.
35304   complete="$LD"
35305   path="${complete%% *}"
35306   tmp="$complete EOL"
35307   arguments="${tmp#* }"
35308 
35309   # Input might be given as Windows format, start by converting to
35310   # unix format.
35311   new_path=`$CYGPATH -u "$path"`
35312 
35313   # Now try to locate executable using which
35314   new_path=`$WHICH "$new_path" 2> /dev/null`
35315   # bat and cmd files are not always considered executable in cygwin causing which
35316   # to not find them
35317   if test "x$new_path" = x \
35318       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35319       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35320     new_path=`$CYGPATH -u "$path"`
35321   fi
35322   if test "x$new_path" = x; then
35323     # Oops. Which didn't find the executable.
35324     # The splitting of arguments from the executable at a space might have been incorrect,
35325     # since paths with space are more likely in Windows. Give it another try with the whole
35326     # argument.
35327     path="$complete"
35328     arguments="EOL"
35329     new_path=`$CYGPATH -u "$path"`
35330     new_path=`$WHICH "$new_path" 2> /dev/null`
35331     # bat and cmd files are not always considered executable in cygwin causing which
35332     # to not find them
35333     if test "x$new_path" = x \
35334         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35335         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35336       new_path=`$CYGPATH -u "$path"`
35337     fi
35338     if test "x$new_path" = x; then
35339       # It's still not found. Now this is an unrecoverable error.
35340       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35341 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35342       has_space=`$ECHO "$complete" | $GREP " "`
35343       if test "x$has_space" != x; then
35344         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35345 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35346       fi
35347       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35348     fi
35349   fi
35350 
35351   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35352   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35353   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35354   # "foo.exe" is OK but "foo" is an error.
35355   #
35356   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35357   # It is also a way to make sure we got the proper file name for the real test later on.
35358   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35359   if test "x$test_shortpath" = x; then
35360     # Short path failed, file does not exist as specified.
35361     # Try adding .exe or .cmd
35362     if test -f "${new_path}.exe"; then
35363       input_to_shortpath="${new_path}.exe"
35364     elif test -f "${new_path}.cmd"; then
35365       input_to_shortpath="${new_path}.cmd"
35366     else
35367       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35368 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35369       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35370 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35371       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35372     fi
35373   else
35374     input_to_shortpath="$new_path"
35375   fi
35376 
35377   # Call helper function which possibly converts this using DOS-style short mode.
35378   # If so, the updated path is stored in $new_path.
35379   new_path="$input_to_shortpath"
35380 
35381   input_path="$input_to_shortpath"
35382   # Check if we need to convert this using DOS-style short mode. If the path
35383   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35384   # take no chances and rewrite it.
35385   # Note: m4 eats our [], so we need to use [ and ] instead.
35386   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35387   if test "x$has_forbidden_chars" != x; then
35388     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35389     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35390     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35391     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35392       # Going to short mode and back again did indeed matter. Since short mode is
35393       # case insensitive, let's make it lowercase to improve readability.
35394       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35395       # Now convert it back to Unix-style (cygpath)
35396       input_path=`$CYGPATH -u "$shortmode_path"`
35397       new_path="$input_path"
35398     fi
35399   fi
35400 
35401   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35402   if test "x$test_cygdrive_prefix" = x; then
35403     # As a simple fix, exclude /usr/bin since it's not a real path.
35404     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35405       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35406       # a path prefixed by /cygdrive for fixpath to work.
35407       new_path="$CYGWIN_ROOT_PATH$input_path"
35408     fi
35409   fi
35410 
35411   # remove trailing .exe if any
35412   new_path="${new_path/%.exe/}"
35413 
35414     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35415 
35416   # First separate the path from the arguments. This will split at the first
35417   # space.
35418   complete="$LD"
35419   path="${complete%% *}"
35420   tmp="$complete EOL"
35421   arguments="${tmp#* }"
35422 
35423   # Input might be given as Windows format, start by converting to
35424   # unix format.
35425   new_path="$path"
35426 
35427   windows_path="$new_path"
35428   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35429     unix_path=`$CYGPATH -u "$windows_path"`
35430     new_path="$unix_path"
35431   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35432     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35433     new_path="$unix_path"
35434   fi
35435 
35436 
35437   # Now try to locate executable using which
35438   new_path=`$WHICH "$new_path" 2> /dev/null`
35439 
35440   if test "x$new_path" = x; then
35441     # Oops. Which didn't find the executable.
35442     # The splitting of arguments from the executable at a space might have been incorrect,
35443     # since paths with space are more likely in Windows. Give it another try with the whole
35444     # argument.
35445     path="$complete"
35446     arguments="EOL"
35447     new_path="$path"
35448 
35449   windows_path="$new_path"
35450   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35451     unix_path=`$CYGPATH -u "$windows_path"`
35452     new_path="$unix_path"
35453   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35454     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35455     new_path="$unix_path"
35456   fi
35457 
35458 
35459     new_path=`$WHICH "$new_path" 2> /dev/null`
35460     # bat and cmd files are not always considered executable in MSYS causing which
35461     # to not find them
35462     if test "x$new_path" = x \
35463         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35464         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35465       new_path="$path"
35466 
35467   windows_path="$new_path"
35468   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35469     unix_path=`$CYGPATH -u "$windows_path"`
35470     new_path="$unix_path"
35471   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35472     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35473     new_path="$unix_path"
35474   fi
35475 
35476     fi
35477 
35478     if test "x$new_path" = x; then
35479       # It's still not found. Now this is an unrecoverable error.
35480       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35481 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35482       has_space=`$ECHO "$complete" | $GREP " "`
35483       if test "x$has_space" != x; then
35484         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35485 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35486       fi
35487       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35488     fi
35489   fi
35490 
35491   # Now new_path has a complete unix path to the binary
35492   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35493     # Keep paths in /bin as-is, but remove trailing .exe if any
35494     new_path="${new_path/%.exe/}"
35495     # Do not save /bin paths to all_fixpath_prefixes!
35496   else
35497     # Not in mixed or Windows style, start by that.
35498     new_path=`cmd //c echo $new_path`
35499 
35500   input_path="$new_path"
35501   # Check if we need to convert this using DOS-style short mode. If the path
35502   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35503   # take no chances and rewrite it.
35504   # Note: m4 eats our [], so we need to use [ and ] instead.
35505   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35506   if test "x$has_forbidden_chars" != x; then
35507     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35508     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35509   fi
35510 
35511     # Output is in $new_path
35512 
35513   windows_path="$new_path"
35514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35515     unix_path=`$CYGPATH -u "$windows_path"`
35516     new_path="$unix_path"
35517   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35518     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35519     new_path="$unix_path"
35520   fi
35521 
35522     # remove trailing .exe if any
35523     new_path="${new_path/%.exe/}"
35524 
35525     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35526     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35527   fi
35528 
35529     else
35530       # We're on a unix platform. Hooray! :)
35531       # First separate the path from the arguments. This will split at the first
35532       # space.
35533       complete="$LD"
35534       path="${complete%% *}"
35535       tmp="$complete EOL"
35536       arguments="${tmp#* }"
35537 
35538       # Cannot rely on the command "which" here since it doesn't always work.
35539       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35540       if test -z "$is_absolute_path"; then
35541         # Path to executable is not absolute. Find it.
35542         IFS_save="$IFS"
35543         IFS=:
35544         for p in $PATH; do
35545           if test -f "$p/$path" && test -x "$p/$path"; then
35546             new_path="$p/$path"
35547             break
35548           fi
35549         done
35550         IFS="$IFS_save"
35551       else
35552         # This is an absolute path, we can use it without further modifications.
35553         new_path="$path"
35554       fi
35555 
35556       if test "x$new_path" = x; then
35557         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35558 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35559         has_space=`$ECHO "$complete" | $GREP " "`
35560         if test "x$has_space" != x; then
35561           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35562 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35563         fi
35564         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35565       fi
35566     fi
35567 
35568     # Now join together the path and the arguments once again
35569     if test "x$arguments" != xEOL; then
35570       new_complete="$new_path ${arguments% *}"
35571     else
35572       new_complete="$new_path"
35573     fi
35574 
35575     if test "x$complete" != "x$new_complete"; then
35576       LD="$new_complete"
35577       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35578 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35579     fi
35580   fi
35581 
35582     # Verify that we indeed succeeded with this trick.
35583     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35584 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35585     "$LD" --version > /dev/null
35586     if test $? -eq 0 ; then
35587       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35588 $as_echo "no" >&6; }
35589       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35590     else
35591       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35592 $as_echo "yes" >&6; }
35593     fi
35594     LDCXX="$LD"
35595   else
35596     # All other toolchains use the compiler to link.
35597     LD="$CC"
35598     LDCXX="$CXX"
35599   fi
35600 
35601   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35602 
35603 
35604   #
35605   # Setup the assembler (AS)
35606   #
35607   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35608     # FIXME: should this really be solaris, or solstudio?
35609 
35610 
35611   # Publish this variable in the help.
35612 
35613 
35614   if [ -z "${AS+x}" ]; then
35615     # The variable is not set by user, try to locate tool using the code snippet
35616     for ac_prog in as
35617 do
35618   # Extract the first word of "$ac_prog", so it can be a program name with args.
35619 set dummy $ac_prog; ac_word=$2
35620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35621 $as_echo_n "checking for $ac_word... " >&6; }
35622 if ${ac_cv_path_AS+:} false; then :
35623   $as_echo_n "(cached) " >&6
35624 else
35625   case $AS in
35626   [\\/]* | ?:[\\/]*)
35627   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35628   ;;
35629   *)
35630   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35631 for as_dir in $PATH
35632 do
35633   IFS=$as_save_IFS
35634   test -z "$as_dir" && as_dir=.
35635     for ac_exec_ext in '' $ac_executable_extensions; do
35636   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35637     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35638     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35639     break 2
35640   fi
35641 done
35642   done
35643 IFS=$as_save_IFS
35644 
35645   ;;
35646 esac
35647 fi
35648 AS=$ac_cv_path_AS
35649 if test -n "$AS"; then
35650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35651 $as_echo "$AS" >&6; }
35652 else
35653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35654 $as_echo "no" >&6; }
35655 fi
35656 
35657 
35658   test -n "$AS" && break
35659 done
35660 
35661   else
35662     # The variable is set, but is it from the command line or the environment?
35663 
35664     # Try to remove the string !AS! from our list.
35665     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35666     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35667       # If it failed, the variable was not from the command line. Ignore it,
35668       # but warn the user (except for BASH, which is always set by the calling BASH).
35669       if test "xAS" != xBASH; then
35670         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35671 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35672       fi
35673       # Try to locate tool using the code snippet
35674       for ac_prog in as
35675 do
35676   # Extract the first word of "$ac_prog", so it can be a program name with args.
35677 set dummy $ac_prog; ac_word=$2
35678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35679 $as_echo_n "checking for $ac_word... " >&6; }
35680 if ${ac_cv_path_AS+:} false; then :
35681   $as_echo_n "(cached) " >&6
35682 else
35683   case $AS in
35684   [\\/]* | ?:[\\/]*)
35685   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35686   ;;
35687   *)
35688   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35689 for as_dir in $PATH
35690 do
35691   IFS=$as_save_IFS
35692   test -z "$as_dir" && as_dir=.
35693     for ac_exec_ext in '' $ac_executable_extensions; do
35694   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35695     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35696     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35697     break 2
35698   fi
35699 done
35700   done
35701 IFS=$as_save_IFS
35702 
35703   ;;
35704 esac
35705 fi
35706 AS=$ac_cv_path_AS
35707 if test -n "$AS"; then
35708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35709 $as_echo "$AS" >&6; }
35710 else
35711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35712 $as_echo "no" >&6; }
35713 fi
35714 
35715 
35716   test -n "$AS" && break
35717 done
35718 
35719     else
35720       # If it succeeded, then it was overridden by the user. We will use it
35721       # for the tool.
35722 
35723       # First remove it from the list of overridden variables, so we can test
35724       # for unknown variables in the end.
35725       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35726 
35727       # Check if we try to supply an empty value
35728       if test "x$AS" = x; then
35729         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35730 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35731         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35732 $as_echo_n "checking for AS... " >&6; }
35733         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35734 $as_echo "disabled" >&6; }
35735       else
35736         # Check if the provided tool contains a complete path.
35737         tool_specified="$AS"
35738         tool_basename="${tool_specified##*/}"
35739         if test "x$tool_basename" = "x$tool_specified"; then
35740           # A command without a complete path is provided, search $PATH.
35741           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35742 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35743           # Extract the first word of "$tool_basename", so it can be a program name with args.
35744 set dummy $tool_basename; ac_word=$2
35745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35746 $as_echo_n "checking for $ac_word... " >&6; }
35747 if ${ac_cv_path_AS+:} false; then :
35748   $as_echo_n "(cached) " >&6
35749 else
35750   case $AS in
35751   [\\/]* | ?:[\\/]*)
35752   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35753   ;;
35754   *)
35755   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35756 for as_dir in $PATH
35757 do
35758   IFS=$as_save_IFS
35759   test -z "$as_dir" && as_dir=.
35760     for ac_exec_ext in '' $ac_executable_extensions; do
35761   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35762     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35763     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35764     break 2
35765   fi
35766 done
35767   done
35768 IFS=$as_save_IFS
35769 
35770   ;;
35771 esac
35772 fi
35773 AS=$ac_cv_path_AS
35774 if test -n "$AS"; then
35775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35776 $as_echo "$AS" >&6; }
35777 else
35778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35779 $as_echo "no" >&6; }
35780 fi
35781 
35782 
35783           if test "x$AS" = x; then
35784             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35785           fi
35786         else
35787           # Otherwise we believe it is a complete path. Use it as it is.
35788           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35789 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35790           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35791 $as_echo_n "checking for AS... " >&6; }
35792           if test ! -x "$tool_specified"; then
35793             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35794 $as_echo "not found" >&6; }
35795             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35796           fi
35797           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35798 $as_echo "$tool_specified" >&6; }
35799         fi
35800       fi
35801     fi
35802 
35803   fi
35804 
35805 
35806 
35807   # Only process if variable expands to non-empty
35808 
35809   if test "x$AS" != x; then
35810     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35811 
35812   # First separate the path from the arguments. This will split at the first
35813   # space.
35814   complete="$AS"
35815   path="${complete%% *}"
35816   tmp="$complete EOL"
35817   arguments="${tmp#* }"
35818 
35819   # Input might be given as Windows format, start by converting to
35820   # unix format.
35821   new_path=`$CYGPATH -u "$path"`
35822 
35823   # Now try to locate executable using which
35824   new_path=`$WHICH "$new_path" 2> /dev/null`
35825   # bat and cmd files are not always considered executable in cygwin causing which
35826   # to not find them
35827   if test "x$new_path" = x \
35828       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35829       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35830     new_path=`$CYGPATH -u "$path"`
35831   fi
35832   if test "x$new_path" = x; then
35833     # Oops. Which didn't find the executable.
35834     # The splitting of arguments from the executable at a space might have been incorrect,
35835     # since paths with space are more likely in Windows. Give it another try with the whole
35836     # argument.
35837     path="$complete"
35838     arguments="EOL"
35839     new_path=`$CYGPATH -u "$path"`
35840     new_path=`$WHICH "$new_path" 2> /dev/null`
35841     # bat and cmd files are not always considered executable in cygwin causing which
35842     # to not find them
35843     if test "x$new_path" = x \
35844         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35845         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35846       new_path=`$CYGPATH -u "$path"`
35847     fi
35848     if test "x$new_path" = x; then
35849       # It's still not found. Now this is an unrecoverable error.
35850       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35851 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35852       has_space=`$ECHO "$complete" | $GREP " "`
35853       if test "x$has_space" != x; then
35854         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35855 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35856       fi
35857       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35858     fi
35859   fi
35860 
35861   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35862   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35863   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35864   # "foo.exe" is OK but "foo" is an error.
35865   #
35866   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35867   # It is also a way to make sure we got the proper file name for the real test later on.
35868   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35869   if test "x$test_shortpath" = x; then
35870     # Short path failed, file does not exist as specified.
35871     # Try adding .exe or .cmd
35872     if test -f "${new_path}.exe"; then
35873       input_to_shortpath="${new_path}.exe"
35874     elif test -f "${new_path}.cmd"; then
35875       input_to_shortpath="${new_path}.cmd"
35876     else
35877       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
35878 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
35879       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35880 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35881       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35882     fi
35883   else
35884     input_to_shortpath="$new_path"
35885   fi
35886 
35887   # Call helper function which possibly converts this using DOS-style short mode.
35888   # If so, the updated path is stored in $new_path.
35889   new_path="$input_to_shortpath"
35890 
35891   input_path="$input_to_shortpath"
35892   # Check if we need to convert this using DOS-style short mode. If the path
35893   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35894   # take no chances and rewrite it.
35895   # Note: m4 eats our [], so we need to use [ and ] instead.
35896   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35897   if test "x$has_forbidden_chars" != x; then
35898     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35899     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35900     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35901     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35902       # Going to short mode and back again did indeed matter. Since short mode is
35903       # case insensitive, let's make it lowercase to improve readability.
35904       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35905       # Now convert it back to Unix-style (cygpath)
35906       input_path=`$CYGPATH -u "$shortmode_path"`
35907       new_path="$input_path"
35908     fi
35909   fi
35910 
35911   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35912   if test "x$test_cygdrive_prefix" = x; then
35913     # As a simple fix, exclude /usr/bin since it's not a real path.
35914     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35915       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35916       # a path prefixed by /cygdrive for fixpath to work.
35917       new_path="$CYGWIN_ROOT_PATH$input_path"
35918     fi
35919   fi
35920 
35921   # remove trailing .exe if any
35922   new_path="${new_path/%.exe/}"
35923 
35924     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35925 
35926   # First separate the path from the arguments. This will split at the first
35927   # space.
35928   complete="$AS"
35929   path="${complete%% *}"
35930   tmp="$complete EOL"
35931   arguments="${tmp#* }"
35932 
35933   # Input might be given as Windows format, start by converting to
35934   # unix format.
35935   new_path="$path"
35936 
35937   windows_path="$new_path"
35938   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35939     unix_path=`$CYGPATH -u "$windows_path"`
35940     new_path="$unix_path"
35941   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35942     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35943     new_path="$unix_path"
35944   fi
35945 
35946 
35947   # Now try to locate executable using which
35948   new_path=`$WHICH "$new_path" 2> /dev/null`
35949 
35950   if test "x$new_path" = x; then
35951     # Oops. Which didn't find the executable.
35952     # The splitting of arguments from the executable at a space might have been incorrect,
35953     # since paths with space are more likely in Windows. Give it another try with the whole
35954     # argument.
35955     path="$complete"
35956     arguments="EOL"
35957     new_path="$path"
35958 
35959   windows_path="$new_path"
35960   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35961     unix_path=`$CYGPATH -u "$windows_path"`
35962     new_path="$unix_path"
35963   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35964     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35965     new_path="$unix_path"
35966   fi
35967 
35968 
35969     new_path=`$WHICH "$new_path" 2> /dev/null`
35970     # bat and cmd files are not always considered executable in MSYS causing which
35971     # to not find them
35972     if test "x$new_path" = x \
35973         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35974         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35975       new_path="$path"
35976 
35977   windows_path="$new_path"
35978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35979     unix_path=`$CYGPATH -u "$windows_path"`
35980     new_path="$unix_path"
35981   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35982     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35983     new_path="$unix_path"
35984   fi
35985 
35986     fi
35987 
35988     if test "x$new_path" = x; then
35989       # It's still not found. Now this is an unrecoverable error.
35990       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35991 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35992       has_space=`$ECHO "$complete" | $GREP " "`
35993       if test "x$has_space" != x; then
35994         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35995 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35996       fi
35997       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35998     fi
35999   fi
36000 
36001   # Now new_path has a complete unix path to the binary
36002   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36003     # Keep paths in /bin as-is, but remove trailing .exe if any
36004     new_path="${new_path/%.exe/}"
36005     # Do not save /bin paths to all_fixpath_prefixes!
36006   else
36007     # Not in mixed or Windows style, start by that.
36008     new_path=`cmd //c echo $new_path`
36009 
36010   input_path="$new_path"
36011   # Check if we need to convert this using DOS-style short mode. If the path
36012   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36013   # take no chances and rewrite it.
36014   # Note: m4 eats our [], so we need to use [ and ] instead.
36015   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36016   if test "x$has_forbidden_chars" != x; then
36017     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36018     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36019   fi
36020 
36021     # Output is in $new_path
36022 
36023   windows_path="$new_path"
36024   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36025     unix_path=`$CYGPATH -u "$windows_path"`
36026     new_path="$unix_path"
36027   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36028     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36029     new_path="$unix_path"
36030   fi
36031 
36032     # remove trailing .exe if any
36033     new_path="${new_path/%.exe/}"
36034 
36035     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36036     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36037   fi
36038 
36039     else
36040       # We're on a unix platform. Hooray! :)
36041       # First separate the path from the arguments. This will split at the first
36042       # space.
36043       complete="$AS"
36044       path="${complete%% *}"
36045       tmp="$complete EOL"
36046       arguments="${tmp#* }"
36047 
36048       # Cannot rely on the command "which" here since it doesn't always work.
36049       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36050       if test -z "$is_absolute_path"; then
36051         # Path to executable is not absolute. Find it.
36052         IFS_save="$IFS"
36053         IFS=:
36054         for p in $PATH; do
36055           if test -f "$p/$path" && test -x "$p/$path"; then
36056             new_path="$p/$path"
36057             break
36058           fi
36059         done
36060         IFS="$IFS_save"
36061       else
36062         # This is an absolute path, we can use it without further modifications.
36063         new_path="$path"
36064       fi
36065 
36066       if test "x$new_path" = x; then
36067         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36068 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36069         has_space=`$ECHO "$complete" | $GREP " "`
36070         if test "x$has_space" != x; then
36071           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36072 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36073         fi
36074         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36075       fi
36076     fi
36077 
36078     # Now join together the path and the arguments once again
36079     if test "x$arguments" != xEOL; then
36080       new_complete="$new_path ${arguments% *}"
36081     else
36082       new_complete="$new_path"
36083     fi
36084 
36085     if test "x$complete" != "x$new_complete"; then
36086       AS="$new_complete"
36087       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36088 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36089     fi
36090   fi
36091 
36092   else
36093     # FIXME: is this correct for microsoft?
36094     AS="$CC -c"
36095   fi
36096 
36097 
36098   #
36099   # Setup the archiver (AR)
36100   #
36101   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36102     # The corresponding ar tool is lib.exe (used to create static libraries)
36103     # Extract the first word of "lib", so it can be a program name with args.
36104 set dummy lib; ac_word=$2
36105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36106 $as_echo_n "checking for $ac_word... " >&6; }
36107 if ${ac_cv_prog_AR+:} false; then :
36108   $as_echo_n "(cached) " >&6
36109 else
36110   if test -n "$AR"; then
36111   ac_cv_prog_AR="$AR" # Let the user override the test.
36112 else
36113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36114 for as_dir in $PATH
36115 do
36116   IFS=$as_save_IFS
36117   test -z "$as_dir" && as_dir=.
36118     for ac_exec_ext in '' $ac_executable_extensions; do
36119   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36120     ac_cv_prog_AR="lib"
36121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36122     break 2
36123   fi
36124 done
36125   done
36126 IFS=$as_save_IFS
36127 
36128 fi
36129 fi
36130 AR=$ac_cv_prog_AR
36131 if test -n "$AR"; then
36132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36133 $as_echo "$AR" >&6; }
36134 else
36135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36136 $as_echo "no" >&6; }
36137 fi
36138 
36139 
36140   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36141 
36142 
36143   # Publish this variable in the help.
36144 
36145 
36146   if [ -z "${AR+x}" ]; then
36147     # The variable is not set by user, try to locate tool using the code snippet
36148     if test -n "$ac_tool_prefix"; then
36149   for ac_prog in ar gcc-ar
36150   do
36151     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36152 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36154 $as_echo_n "checking for $ac_word... " >&6; }
36155 if ${ac_cv_prog_AR+:} false; then :
36156   $as_echo_n "(cached) " >&6
36157 else
36158   if test -n "$AR"; then
36159   ac_cv_prog_AR="$AR" # Let the user override the test.
36160 else
36161 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36162 for as_dir in $PATH
36163 do
36164   IFS=$as_save_IFS
36165   test -z "$as_dir" && as_dir=.
36166     for ac_exec_ext in '' $ac_executable_extensions; do
36167   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36168     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36169     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36170     break 2
36171   fi
36172 done
36173   done
36174 IFS=$as_save_IFS
36175 
36176 fi
36177 fi
36178 AR=$ac_cv_prog_AR
36179 if test -n "$AR"; then
36180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36181 $as_echo "$AR" >&6; }
36182 else
36183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36184 $as_echo "no" >&6; }
36185 fi
36186 
36187 
36188     test -n "$AR" && break
36189   done
36190 fi
36191 if test -z "$AR"; then
36192   ac_ct_AR=$AR
36193   for ac_prog in ar gcc-ar
36194 do
36195   # Extract the first word of "$ac_prog", so it can be a program name with args.
36196 set dummy $ac_prog; ac_word=$2
36197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36198 $as_echo_n "checking for $ac_word... " >&6; }
36199 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36200   $as_echo_n "(cached) " >&6
36201 else
36202   if test -n "$ac_ct_AR"; then
36203   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36204 else
36205 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36206 for as_dir in $PATH
36207 do
36208   IFS=$as_save_IFS
36209   test -z "$as_dir" && as_dir=.
36210     for ac_exec_ext in '' $ac_executable_extensions; do
36211   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36212     ac_cv_prog_ac_ct_AR="$ac_prog"
36213     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36214     break 2
36215   fi
36216 done
36217   done
36218 IFS=$as_save_IFS
36219 
36220 fi
36221 fi
36222 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36223 if test -n "$ac_ct_AR"; then
36224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36225 $as_echo "$ac_ct_AR" >&6; }
36226 else
36227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36228 $as_echo "no" >&6; }
36229 fi
36230 
36231 
36232   test -n "$ac_ct_AR" && break
36233 done
36234 
36235   if test "x$ac_ct_AR" = x; then
36236     AR=""
36237   else
36238     case $cross_compiling:$ac_tool_warned in
36239 yes:)
36240 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36241 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36242 ac_tool_warned=yes ;;
36243 esac
36244     AR=$ac_ct_AR
36245   fi
36246 fi
36247 
36248   else
36249     # The variable is set, but is it from the command line or the environment?
36250 
36251     # Try to remove the string !AR! from our list.
36252     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36253     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36254       # If it failed, the variable was not from the command line. Ignore it,
36255       # but warn the user (except for BASH, which is always set by the calling BASH).
36256       if test "xAR" != xBASH; then
36257         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36258 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36259       fi
36260       # Try to locate tool using the code snippet
36261       if test -n "$ac_tool_prefix"; then
36262   for ac_prog in ar gcc-ar
36263   do
36264     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36265 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36267 $as_echo_n "checking for $ac_word... " >&6; }
36268 if ${ac_cv_prog_AR+:} false; then :
36269   $as_echo_n "(cached) " >&6
36270 else
36271   if test -n "$AR"; then
36272   ac_cv_prog_AR="$AR" # Let the user override the test.
36273 else
36274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36275 for as_dir in $PATH
36276 do
36277   IFS=$as_save_IFS
36278   test -z "$as_dir" && as_dir=.
36279     for ac_exec_ext in '' $ac_executable_extensions; do
36280   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36281     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36282     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36283     break 2
36284   fi
36285 done
36286   done
36287 IFS=$as_save_IFS
36288 
36289 fi
36290 fi
36291 AR=$ac_cv_prog_AR
36292 if test -n "$AR"; then
36293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36294 $as_echo "$AR" >&6; }
36295 else
36296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36297 $as_echo "no" >&6; }
36298 fi
36299 
36300 
36301     test -n "$AR" && break
36302   done
36303 fi
36304 if test -z "$AR"; then
36305   ac_ct_AR=$AR
36306   for ac_prog in ar gcc-ar
36307 do
36308   # Extract the first word of "$ac_prog", so it can be a program name with args.
36309 set dummy $ac_prog; ac_word=$2
36310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36311 $as_echo_n "checking for $ac_word... " >&6; }
36312 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36313   $as_echo_n "(cached) " >&6
36314 else
36315   if test -n "$ac_ct_AR"; then
36316   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36317 else
36318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36319 for as_dir in $PATH
36320 do
36321   IFS=$as_save_IFS
36322   test -z "$as_dir" && as_dir=.
36323     for ac_exec_ext in '' $ac_executable_extensions; do
36324   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36325     ac_cv_prog_ac_ct_AR="$ac_prog"
36326     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36327     break 2
36328   fi
36329 done
36330   done
36331 IFS=$as_save_IFS
36332 
36333 fi
36334 fi
36335 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36336 if test -n "$ac_ct_AR"; then
36337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36338 $as_echo "$ac_ct_AR" >&6; }
36339 else
36340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36341 $as_echo "no" >&6; }
36342 fi
36343 
36344 
36345   test -n "$ac_ct_AR" && break
36346 done
36347 
36348   if test "x$ac_ct_AR" = x; then
36349     AR=""
36350   else
36351     case $cross_compiling:$ac_tool_warned in
36352 yes:)
36353 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36354 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36355 ac_tool_warned=yes ;;
36356 esac
36357     AR=$ac_ct_AR
36358   fi
36359 fi
36360 
36361     else
36362       # If it succeeded, then it was overridden by the user. We will use it
36363       # for the tool.
36364 
36365       # First remove it from the list of overridden variables, so we can test
36366       # for unknown variables in the end.
36367       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36368 
36369       # Check if we try to supply an empty value
36370       if test "x$AR" = x; then
36371         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36372 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36373         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36374 $as_echo_n "checking for AR... " >&6; }
36375         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36376 $as_echo "disabled" >&6; }
36377       else
36378         # Check if the provided tool contains a complete path.
36379         tool_specified="$AR"
36380         tool_basename="${tool_specified##*/}"
36381         if test "x$tool_basename" = "x$tool_specified"; then
36382           # A command without a complete path is provided, search $PATH.
36383           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36384 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36385           # Extract the first word of "$tool_basename", so it can be a program name with args.
36386 set dummy $tool_basename; ac_word=$2
36387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36388 $as_echo_n "checking for $ac_word... " >&6; }
36389 if ${ac_cv_path_AR+:} false; then :
36390   $as_echo_n "(cached) " >&6
36391 else
36392   case $AR in
36393   [\\/]* | ?:[\\/]*)
36394   ac_cv_path_AR="$AR" # Let the user override the test with a path.
36395   ;;
36396   *)
36397   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36398 for as_dir in $PATH
36399 do
36400   IFS=$as_save_IFS
36401   test -z "$as_dir" && as_dir=.
36402     for ac_exec_ext in '' $ac_executable_extensions; do
36403   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36404     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36405     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36406     break 2
36407   fi
36408 done
36409   done
36410 IFS=$as_save_IFS
36411 
36412   ;;
36413 esac
36414 fi
36415 AR=$ac_cv_path_AR
36416 if test -n "$AR"; then
36417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36418 $as_echo "$AR" >&6; }
36419 else
36420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36421 $as_echo "no" >&6; }
36422 fi
36423 
36424 
36425           if test "x$AR" = x; then
36426             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36427           fi
36428         else
36429           # Otherwise we believe it is a complete path. Use it as it is.
36430           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36431 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36432           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36433 $as_echo_n "checking for AR... " >&6; }
36434           if test ! -x "$tool_specified"; then
36435             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36436 $as_echo "not found" >&6; }
36437             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36438           fi
36439           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36440 $as_echo "$tool_specified" >&6; }
36441         fi
36442       fi
36443     fi
36444 
36445   fi
36446 
36447 
36448   else
36449 
36450 
36451   # Publish this variable in the help.
36452 
36453 
36454   if [ -z "${AR+x}" ]; then
36455     # The variable is not set by user, try to locate tool using the code snippet
36456     if test -n "$ac_tool_prefix"; then
36457   for ac_prog in ar
36458   do
36459     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36460 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36462 $as_echo_n "checking for $ac_word... " >&6; }
36463 if ${ac_cv_prog_AR+:} false; then :
36464   $as_echo_n "(cached) " >&6
36465 else
36466   if test -n "$AR"; then
36467   ac_cv_prog_AR="$AR" # Let the user override the test.
36468 else
36469 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36470 for as_dir in $PATH
36471 do
36472   IFS=$as_save_IFS
36473   test -z "$as_dir" && as_dir=.
36474     for ac_exec_ext in '' $ac_executable_extensions; do
36475   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36476     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36477     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36478     break 2
36479   fi
36480 done
36481   done
36482 IFS=$as_save_IFS
36483 
36484 fi
36485 fi
36486 AR=$ac_cv_prog_AR
36487 if test -n "$AR"; then
36488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36489 $as_echo "$AR" >&6; }
36490 else
36491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36492 $as_echo "no" >&6; }
36493 fi
36494 
36495 
36496     test -n "$AR" && break
36497   done
36498 fi
36499 if test -z "$AR"; then
36500   ac_ct_AR=$AR
36501   for ac_prog in ar
36502 do
36503   # Extract the first word of "$ac_prog", so it can be a program name with args.
36504 set dummy $ac_prog; ac_word=$2
36505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36506 $as_echo_n "checking for $ac_word... " >&6; }
36507 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36508   $as_echo_n "(cached) " >&6
36509 else
36510   if test -n "$ac_ct_AR"; then
36511   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36512 else
36513 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36514 for as_dir in $PATH
36515 do
36516   IFS=$as_save_IFS
36517   test -z "$as_dir" && as_dir=.
36518     for ac_exec_ext in '' $ac_executable_extensions; do
36519   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36520     ac_cv_prog_ac_ct_AR="$ac_prog"
36521     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36522     break 2
36523   fi
36524 done
36525   done
36526 IFS=$as_save_IFS
36527 
36528 fi
36529 fi
36530 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36531 if test -n "$ac_ct_AR"; then
36532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36533 $as_echo "$ac_ct_AR" >&6; }
36534 else
36535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36536 $as_echo "no" >&6; }
36537 fi
36538 
36539 
36540   test -n "$ac_ct_AR" && break
36541 done
36542 
36543   if test "x$ac_ct_AR" = x; then
36544     AR=""
36545   else
36546     case $cross_compiling:$ac_tool_warned in
36547 yes:)
36548 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36549 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36550 ac_tool_warned=yes ;;
36551 esac
36552     AR=$ac_ct_AR
36553   fi
36554 fi
36555 
36556   else
36557     # The variable is set, but is it from the command line or the environment?
36558 
36559     # Try to remove the string !AR! from our list.
36560     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36561     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36562       # If it failed, the variable was not from the command line. Ignore it,
36563       # but warn the user (except for BASH, which is always set by the calling BASH).
36564       if test "xAR" != xBASH; then
36565         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36566 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36567       fi
36568       # Try to locate tool using the code snippet
36569       if test -n "$ac_tool_prefix"; then
36570   for ac_prog in ar
36571   do
36572     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36573 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36575 $as_echo_n "checking for $ac_word... " >&6; }
36576 if ${ac_cv_prog_AR+:} false; then :
36577   $as_echo_n "(cached) " >&6
36578 else
36579   if test -n "$AR"; then
36580   ac_cv_prog_AR="$AR" # Let the user override the test.
36581 else
36582 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36583 for as_dir in $PATH
36584 do
36585   IFS=$as_save_IFS
36586   test -z "$as_dir" && as_dir=.
36587     for ac_exec_ext in '' $ac_executable_extensions; do
36588   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36589     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36590     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36591     break 2
36592   fi
36593 done
36594   done
36595 IFS=$as_save_IFS
36596 
36597 fi
36598 fi
36599 AR=$ac_cv_prog_AR
36600 if test -n "$AR"; then
36601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36602 $as_echo "$AR" >&6; }
36603 else
36604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36605 $as_echo "no" >&6; }
36606 fi
36607 
36608 
36609     test -n "$AR" && break
36610   done
36611 fi
36612 if test -z "$AR"; then
36613   ac_ct_AR=$AR
36614   for ac_prog in ar
36615 do
36616   # Extract the first word of "$ac_prog", so it can be a program name with args.
36617 set dummy $ac_prog; ac_word=$2
36618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36619 $as_echo_n "checking for $ac_word... " >&6; }
36620 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36621   $as_echo_n "(cached) " >&6
36622 else
36623   if test -n "$ac_ct_AR"; then
36624   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36625 else
36626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36627 for as_dir in $PATH
36628 do
36629   IFS=$as_save_IFS
36630   test -z "$as_dir" && as_dir=.
36631     for ac_exec_ext in '' $ac_executable_extensions; do
36632   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36633     ac_cv_prog_ac_ct_AR="$ac_prog"
36634     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36635     break 2
36636   fi
36637 done
36638   done
36639 IFS=$as_save_IFS
36640 
36641 fi
36642 fi
36643 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36644 if test -n "$ac_ct_AR"; then
36645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36646 $as_echo "$ac_ct_AR" >&6; }
36647 else
36648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36649 $as_echo "no" >&6; }
36650 fi
36651 
36652 
36653   test -n "$ac_ct_AR" && break
36654 done
36655 
36656   if test "x$ac_ct_AR" = x; then
36657     AR=""
36658   else
36659     case $cross_compiling:$ac_tool_warned in
36660 yes:)
36661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36662 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36663 ac_tool_warned=yes ;;
36664 esac
36665     AR=$ac_ct_AR
36666   fi
36667 fi
36668 
36669     else
36670       # If it succeeded, then it was overridden by the user. We will use it
36671       # for the tool.
36672 
36673       # First remove it from the list of overridden variables, so we can test
36674       # for unknown variables in the end.
36675       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36676 
36677       # Check if we try to supply an empty value
36678       if test "x$AR" = x; then
36679         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36680 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36681         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36682 $as_echo_n "checking for AR... " >&6; }
36683         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36684 $as_echo "disabled" >&6; }
36685       else
36686         # Check if the provided tool contains a complete path.
36687         tool_specified="$AR"
36688         tool_basename="${tool_specified##*/}"
36689         if test "x$tool_basename" = "x$tool_specified"; then
36690           # A command without a complete path is provided, search $PATH.
36691           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36692 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36693           # Extract the first word of "$tool_basename", so it can be a program name with args.
36694 set dummy $tool_basename; ac_word=$2
36695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36696 $as_echo_n "checking for $ac_word... " >&6; }
36697 if ${ac_cv_path_AR+:} false; then :
36698   $as_echo_n "(cached) " >&6
36699 else
36700   case $AR in
36701   [\\/]* | ?:[\\/]*)
36702   ac_cv_path_AR="$AR" # Let the user override the test with a path.
36703   ;;
36704   *)
36705   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36706 for as_dir in $PATH
36707 do
36708   IFS=$as_save_IFS
36709   test -z "$as_dir" && as_dir=.
36710     for ac_exec_ext in '' $ac_executable_extensions; do
36711   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36712     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36713     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36714     break 2
36715   fi
36716 done
36717   done
36718 IFS=$as_save_IFS
36719 
36720   ;;
36721 esac
36722 fi
36723 AR=$ac_cv_path_AR
36724 if test -n "$AR"; then
36725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36726 $as_echo "$AR" >&6; }
36727 else
36728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36729 $as_echo "no" >&6; }
36730 fi
36731 
36732 
36733           if test "x$AR" = x; then
36734             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36735           fi
36736         else
36737           # Otherwise we believe it is a complete path. Use it as it is.
36738           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36739 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36740           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36741 $as_echo_n "checking for AR... " >&6; }
36742           if test ! -x "$tool_specified"; then
36743             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36744 $as_echo "not found" >&6; }
36745             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36746           fi
36747           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36748 $as_echo "$tool_specified" >&6; }
36749         fi
36750       fi
36751     fi
36752 
36753   fi
36754 
36755 
36756   fi
36757 
36758   # Only process if variable expands to non-empty
36759 
36760   if test "x$AR" != x; then
36761     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36762 
36763   # First separate the path from the arguments. This will split at the first
36764   # space.
36765   complete="$AR"
36766   path="${complete%% *}"
36767   tmp="$complete EOL"
36768   arguments="${tmp#* }"
36769 
36770   # Input might be given as Windows format, start by converting to
36771   # unix format.
36772   new_path=`$CYGPATH -u "$path"`
36773 
36774   # Now try to locate executable using which
36775   new_path=`$WHICH "$new_path" 2> /dev/null`
36776   # bat and cmd files are not always considered executable in cygwin causing which
36777   # to not find them
36778   if test "x$new_path" = x \
36779       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36780       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36781     new_path=`$CYGPATH -u "$path"`
36782   fi
36783   if test "x$new_path" = x; then
36784     # Oops. Which didn't find the executable.
36785     # The splitting of arguments from the executable at a space might have been incorrect,
36786     # since paths with space are more likely in Windows. Give it another try with the whole
36787     # argument.
36788     path="$complete"
36789     arguments="EOL"
36790     new_path=`$CYGPATH -u "$path"`
36791     new_path=`$WHICH "$new_path" 2> /dev/null`
36792     # bat and cmd files are not always considered executable in cygwin causing which
36793     # to not find them
36794     if test "x$new_path" = x \
36795         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36796         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36797       new_path=`$CYGPATH -u "$path"`
36798     fi
36799     if test "x$new_path" = x; then
36800       # It's still not found. Now this is an unrecoverable error.
36801       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36802 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36803       has_space=`$ECHO "$complete" | $GREP " "`
36804       if test "x$has_space" != x; then
36805         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36806 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36807       fi
36808       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36809     fi
36810   fi
36811 
36812   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36813   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36814   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36815   # "foo.exe" is OK but "foo" is an error.
36816   #
36817   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36818   # It is also a way to make sure we got the proper file name for the real test later on.
36819   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36820   if test "x$test_shortpath" = x; then
36821     # Short path failed, file does not exist as specified.
36822     # Try adding .exe or .cmd
36823     if test -f "${new_path}.exe"; then
36824       input_to_shortpath="${new_path}.exe"
36825     elif test -f "${new_path}.cmd"; then
36826       input_to_shortpath="${new_path}.cmd"
36827     else
36828       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36829 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36830       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36831 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36832       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36833     fi
36834   else
36835     input_to_shortpath="$new_path"
36836   fi
36837 
36838   # Call helper function which possibly converts this using DOS-style short mode.
36839   # If so, the updated path is stored in $new_path.
36840   new_path="$input_to_shortpath"
36841 
36842   input_path="$input_to_shortpath"
36843   # Check if we need to convert this using DOS-style short mode. If the path
36844   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36845   # take no chances and rewrite it.
36846   # Note: m4 eats our [], so we need to use [ and ] instead.
36847   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36848   if test "x$has_forbidden_chars" != x; then
36849     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36850     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36851     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36852     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36853       # Going to short mode and back again did indeed matter. Since short mode is
36854       # case insensitive, let's make it lowercase to improve readability.
36855       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36856       # Now convert it back to Unix-style (cygpath)
36857       input_path=`$CYGPATH -u "$shortmode_path"`
36858       new_path="$input_path"
36859     fi
36860   fi
36861 
36862   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36863   if test "x$test_cygdrive_prefix" = x; then
36864     # As a simple fix, exclude /usr/bin since it's not a real path.
36865     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36866       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36867       # a path prefixed by /cygdrive for fixpath to work.
36868       new_path="$CYGWIN_ROOT_PATH$input_path"
36869     fi
36870   fi
36871 
36872   # remove trailing .exe if any
36873   new_path="${new_path/%.exe/}"
36874 
36875     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36876 
36877   # First separate the path from the arguments. This will split at the first
36878   # space.
36879   complete="$AR"
36880   path="${complete%% *}"
36881   tmp="$complete EOL"
36882   arguments="${tmp#* }"
36883 
36884   # Input might be given as Windows format, start by converting to
36885   # unix format.
36886   new_path="$path"
36887 
36888   windows_path="$new_path"
36889   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36890     unix_path=`$CYGPATH -u "$windows_path"`
36891     new_path="$unix_path"
36892   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36893     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36894     new_path="$unix_path"
36895   fi
36896 
36897 
36898   # Now try to locate executable using which
36899   new_path=`$WHICH "$new_path" 2> /dev/null`
36900 
36901   if test "x$new_path" = x; then
36902     # Oops. Which didn't find the executable.
36903     # The splitting of arguments from the executable at a space might have been incorrect,
36904     # since paths with space are more likely in Windows. Give it another try with the whole
36905     # argument.
36906     path="$complete"
36907     arguments="EOL"
36908     new_path="$path"
36909 
36910   windows_path="$new_path"
36911   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36912     unix_path=`$CYGPATH -u "$windows_path"`
36913     new_path="$unix_path"
36914   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36915     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36916     new_path="$unix_path"
36917   fi
36918 
36919 
36920     new_path=`$WHICH "$new_path" 2> /dev/null`
36921     # bat and cmd files are not always considered executable in MSYS causing which
36922     # to not find them
36923     if test "x$new_path" = x \
36924         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36925         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36926       new_path="$path"
36927 
36928   windows_path="$new_path"
36929   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36930     unix_path=`$CYGPATH -u "$windows_path"`
36931     new_path="$unix_path"
36932   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36933     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36934     new_path="$unix_path"
36935   fi
36936 
36937     fi
36938 
36939     if test "x$new_path" = x; then
36940       # It's still not found. Now this is an unrecoverable error.
36941       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36942 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36943       has_space=`$ECHO "$complete" | $GREP " "`
36944       if test "x$has_space" != x; then
36945         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36946 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36947       fi
36948       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36949     fi
36950   fi
36951 
36952   # Now new_path has a complete unix path to the binary
36953   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36954     # Keep paths in /bin as-is, but remove trailing .exe if any
36955     new_path="${new_path/%.exe/}"
36956     # Do not save /bin paths to all_fixpath_prefixes!
36957   else
36958     # Not in mixed or Windows style, start by that.
36959     new_path=`cmd //c echo $new_path`
36960 
36961   input_path="$new_path"
36962   # Check if we need to convert this using DOS-style short mode. If the path
36963   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36964   # take no chances and rewrite it.
36965   # Note: m4 eats our [], so we need to use [ and ] instead.
36966   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36967   if test "x$has_forbidden_chars" != x; then
36968     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36969     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36970   fi
36971 
36972     # Output is in $new_path
36973 
36974   windows_path="$new_path"
36975   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36976     unix_path=`$CYGPATH -u "$windows_path"`
36977     new_path="$unix_path"
36978   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36979     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36980     new_path="$unix_path"
36981   fi
36982 
36983     # remove trailing .exe if any
36984     new_path="${new_path/%.exe/}"
36985 
36986     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36987     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36988   fi
36989 
36990     else
36991       # We're on a unix platform. Hooray! :)
36992       # First separate the path from the arguments. This will split at the first
36993       # space.
36994       complete="$AR"
36995       path="${complete%% *}"
36996       tmp="$complete EOL"
36997       arguments="${tmp#* }"
36998 
36999       # Cannot rely on the command "which" here since it doesn't always work.
37000       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37001       if test -z "$is_absolute_path"; then
37002         # Path to executable is not absolute. Find it.
37003         IFS_save="$IFS"
37004         IFS=:
37005         for p in $PATH; do
37006           if test -f "$p/$path" && test -x "$p/$path"; then
37007             new_path="$p/$path"
37008             break
37009           fi
37010         done
37011         IFS="$IFS_save"
37012       else
37013         # This is an absolute path, we can use it without further modifications.
37014         new_path="$path"
37015       fi
37016 
37017       if test "x$new_path" = x; then
37018         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37019 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37020         has_space=`$ECHO "$complete" | $GREP " "`
37021         if test "x$has_space" != x; then
37022           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37023 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37024         fi
37025         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37026       fi
37027     fi
37028 
37029     # Now join together the path and the arguments once again
37030     if test "x$arguments" != xEOL; then
37031       new_complete="$new_path ${arguments% *}"
37032     else
37033       new_complete="$new_path"
37034     fi
37035 
37036     if test "x$complete" != "x$new_complete"; then
37037       AR="$new_complete"
37038       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37039 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37040     fi
37041   fi
37042 
37043 
37044 
37045   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37046 
37047 
37048   # Publish this variable in the help.
37049 
37050 
37051   if [ -z "${LIPO+x}" ]; then
37052     # The variable is not set by user, try to locate tool using the code snippet
37053     for ac_prog in lipo
37054 do
37055   # Extract the first word of "$ac_prog", so it can be a program name with args.
37056 set dummy $ac_prog; ac_word=$2
37057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37058 $as_echo_n "checking for $ac_word... " >&6; }
37059 if ${ac_cv_path_LIPO+:} false; then :
37060   $as_echo_n "(cached) " >&6
37061 else
37062   case $LIPO in
37063   [\\/]* | ?:[\\/]*)
37064   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37065   ;;
37066   *)
37067   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37068 for as_dir in $PATH
37069 do
37070   IFS=$as_save_IFS
37071   test -z "$as_dir" && as_dir=.
37072     for ac_exec_ext in '' $ac_executable_extensions; do
37073   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37074     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37075     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37076     break 2
37077   fi
37078 done
37079   done
37080 IFS=$as_save_IFS
37081 
37082   ;;
37083 esac
37084 fi
37085 LIPO=$ac_cv_path_LIPO
37086 if test -n "$LIPO"; then
37087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37088 $as_echo "$LIPO" >&6; }
37089 else
37090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37091 $as_echo "no" >&6; }
37092 fi
37093 
37094 
37095   test -n "$LIPO" && break
37096 done
37097 
37098   else
37099     # The variable is set, but is it from the command line or the environment?
37100 
37101     # Try to remove the string !LIPO! from our list.
37102     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37103     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37104       # If it failed, the variable was not from the command line. Ignore it,
37105       # but warn the user (except for BASH, which is always set by the calling BASH).
37106       if test "xLIPO" != xBASH; then
37107         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37108 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37109       fi
37110       # Try to locate tool using the code snippet
37111       for ac_prog in lipo
37112 do
37113   # Extract the first word of "$ac_prog", so it can be a program name with args.
37114 set dummy $ac_prog; ac_word=$2
37115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37116 $as_echo_n "checking for $ac_word... " >&6; }
37117 if ${ac_cv_path_LIPO+:} false; then :
37118   $as_echo_n "(cached) " >&6
37119 else
37120   case $LIPO in
37121   [\\/]* | ?:[\\/]*)
37122   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37123   ;;
37124   *)
37125   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37126 for as_dir in $PATH
37127 do
37128   IFS=$as_save_IFS
37129   test -z "$as_dir" && as_dir=.
37130     for ac_exec_ext in '' $ac_executable_extensions; do
37131   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37132     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37133     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37134     break 2
37135   fi
37136 done
37137   done
37138 IFS=$as_save_IFS
37139 
37140   ;;
37141 esac
37142 fi
37143 LIPO=$ac_cv_path_LIPO
37144 if test -n "$LIPO"; then
37145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37146 $as_echo "$LIPO" >&6; }
37147 else
37148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37149 $as_echo "no" >&6; }
37150 fi
37151 
37152 
37153   test -n "$LIPO" && break
37154 done
37155 
37156     else
37157       # If it succeeded, then it was overridden by the user. We will use it
37158       # for the tool.
37159 
37160       # First remove it from the list of overridden variables, so we can test
37161       # for unknown variables in the end.
37162       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37163 
37164       # Check if we try to supply an empty value
37165       if test "x$LIPO" = x; then
37166         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37167 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37168         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37169 $as_echo_n "checking for LIPO... " >&6; }
37170         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37171 $as_echo "disabled" >&6; }
37172       else
37173         # Check if the provided tool contains a complete path.
37174         tool_specified="$LIPO"
37175         tool_basename="${tool_specified##*/}"
37176         if test "x$tool_basename" = "x$tool_specified"; then
37177           # A command without a complete path is provided, search $PATH.
37178           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37179 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37180           # Extract the first word of "$tool_basename", so it can be a program name with args.
37181 set dummy $tool_basename; ac_word=$2
37182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37183 $as_echo_n "checking for $ac_word... " >&6; }
37184 if ${ac_cv_path_LIPO+:} false; then :
37185   $as_echo_n "(cached) " >&6
37186 else
37187   case $LIPO in
37188   [\\/]* | ?:[\\/]*)
37189   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37190   ;;
37191   *)
37192   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37193 for as_dir in $PATH
37194 do
37195   IFS=$as_save_IFS
37196   test -z "$as_dir" && as_dir=.
37197     for ac_exec_ext in '' $ac_executable_extensions; do
37198   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37199     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37200     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37201     break 2
37202   fi
37203 done
37204   done
37205 IFS=$as_save_IFS
37206 
37207   ;;
37208 esac
37209 fi
37210 LIPO=$ac_cv_path_LIPO
37211 if test -n "$LIPO"; then
37212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37213 $as_echo "$LIPO" >&6; }
37214 else
37215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37216 $as_echo "no" >&6; }
37217 fi
37218 
37219 
37220           if test "x$LIPO" = x; then
37221             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37222           fi
37223         else
37224           # Otherwise we believe it is a complete path. Use it as it is.
37225           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37226 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37227           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37228 $as_echo_n "checking for LIPO... " >&6; }
37229           if test ! -x "$tool_specified"; then
37230             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37231 $as_echo "not found" >&6; }
37232             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37233           fi
37234           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37235 $as_echo "$tool_specified" >&6; }
37236         fi
37237       fi
37238     fi
37239 
37240   fi
37241 
37242 
37243 
37244   # Only process if variable expands to non-empty
37245 
37246   if test "x$LIPO" != x; then
37247     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37248 
37249   # First separate the path from the arguments. This will split at the first
37250   # space.
37251   complete="$LIPO"
37252   path="${complete%% *}"
37253   tmp="$complete EOL"
37254   arguments="${tmp#* }"
37255 
37256   # Input might be given as Windows format, start by converting to
37257   # unix format.
37258   new_path=`$CYGPATH -u "$path"`
37259 
37260   # Now try to locate executable using which
37261   new_path=`$WHICH "$new_path" 2> /dev/null`
37262   # bat and cmd files are not always considered executable in cygwin causing which
37263   # to not find them
37264   if test "x$new_path" = x \
37265       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37266       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37267     new_path=`$CYGPATH -u "$path"`
37268   fi
37269   if test "x$new_path" = x; then
37270     # Oops. Which didn't find the executable.
37271     # The splitting of arguments from the executable at a space might have been incorrect,
37272     # since paths with space are more likely in Windows. Give it another try with the whole
37273     # argument.
37274     path="$complete"
37275     arguments="EOL"
37276     new_path=`$CYGPATH -u "$path"`
37277     new_path=`$WHICH "$new_path" 2> /dev/null`
37278     # bat and cmd files are not always considered executable in cygwin causing which
37279     # to not find them
37280     if test "x$new_path" = x \
37281         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37282         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37283       new_path=`$CYGPATH -u "$path"`
37284     fi
37285     if test "x$new_path" = x; then
37286       # It's still not found. Now this is an unrecoverable error.
37287       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37288 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37289       has_space=`$ECHO "$complete" | $GREP " "`
37290       if test "x$has_space" != x; then
37291         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37292 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37293       fi
37294       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37295     fi
37296   fi
37297 
37298   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37299   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37300   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37301   # "foo.exe" is OK but "foo" is an error.
37302   #
37303   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37304   # It is also a way to make sure we got the proper file name for the real test later on.
37305   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37306   if test "x$test_shortpath" = x; then
37307     # Short path failed, file does not exist as specified.
37308     # Try adding .exe or .cmd
37309     if test -f "${new_path}.exe"; then
37310       input_to_shortpath="${new_path}.exe"
37311     elif test -f "${new_path}.cmd"; then
37312       input_to_shortpath="${new_path}.cmd"
37313     else
37314       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37315 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37316       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37317 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37318       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37319     fi
37320   else
37321     input_to_shortpath="$new_path"
37322   fi
37323 
37324   # Call helper function which possibly converts this using DOS-style short mode.
37325   # If so, the updated path is stored in $new_path.
37326   new_path="$input_to_shortpath"
37327 
37328   input_path="$input_to_shortpath"
37329   # Check if we need to convert this using DOS-style short mode. If the path
37330   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37331   # take no chances and rewrite it.
37332   # Note: m4 eats our [], so we need to use [ and ] instead.
37333   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37334   if test "x$has_forbidden_chars" != x; then
37335     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37336     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37337     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37338     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37339       # Going to short mode and back again did indeed matter. Since short mode is
37340       # case insensitive, let's make it lowercase to improve readability.
37341       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37342       # Now convert it back to Unix-style (cygpath)
37343       input_path=`$CYGPATH -u "$shortmode_path"`
37344       new_path="$input_path"
37345     fi
37346   fi
37347 
37348   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37349   if test "x$test_cygdrive_prefix" = x; then
37350     # As a simple fix, exclude /usr/bin since it's not a real path.
37351     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37352       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37353       # a path prefixed by /cygdrive for fixpath to work.
37354       new_path="$CYGWIN_ROOT_PATH$input_path"
37355     fi
37356   fi
37357 
37358   # remove trailing .exe if any
37359   new_path="${new_path/%.exe/}"
37360 
37361     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37362 
37363   # First separate the path from the arguments. This will split at the first
37364   # space.
37365   complete="$LIPO"
37366   path="${complete%% *}"
37367   tmp="$complete EOL"
37368   arguments="${tmp#* }"
37369 
37370   # Input might be given as Windows format, start by converting to
37371   # unix format.
37372   new_path="$path"
37373 
37374   windows_path="$new_path"
37375   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37376     unix_path=`$CYGPATH -u "$windows_path"`
37377     new_path="$unix_path"
37378   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37379     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37380     new_path="$unix_path"
37381   fi
37382 
37383 
37384   # Now try to locate executable using which
37385   new_path=`$WHICH "$new_path" 2> /dev/null`
37386 
37387   if test "x$new_path" = x; then
37388     # Oops. Which didn't find the executable.
37389     # The splitting of arguments from the executable at a space might have been incorrect,
37390     # since paths with space are more likely in Windows. Give it another try with the whole
37391     # argument.
37392     path="$complete"
37393     arguments="EOL"
37394     new_path="$path"
37395 
37396   windows_path="$new_path"
37397   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37398     unix_path=`$CYGPATH -u "$windows_path"`
37399     new_path="$unix_path"
37400   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37401     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37402     new_path="$unix_path"
37403   fi
37404 
37405 
37406     new_path=`$WHICH "$new_path" 2> /dev/null`
37407     # bat and cmd files are not always considered executable in MSYS causing which
37408     # to not find them
37409     if test "x$new_path" = x \
37410         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37411         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37412       new_path="$path"
37413 
37414   windows_path="$new_path"
37415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37416     unix_path=`$CYGPATH -u "$windows_path"`
37417     new_path="$unix_path"
37418   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37419     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37420     new_path="$unix_path"
37421   fi
37422 
37423     fi
37424 
37425     if test "x$new_path" = x; then
37426       # It's still not found. Now this is an unrecoverable error.
37427       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37428 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37429       has_space=`$ECHO "$complete" | $GREP " "`
37430       if test "x$has_space" != x; then
37431         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37432 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37433       fi
37434       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37435     fi
37436   fi
37437 
37438   # Now new_path has a complete unix path to the binary
37439   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37440     # Keep paths in /bin as-is, but remove trailing .exe if any
37441     new_path="${new_path/%.exe/}"
37442     # Do not save /bin paths to all_fixpath_prefixes!
37443   else
37444     # Not in mixed or Windows style, start by that.
37445     new_path=`cmd //c echo $new_path`
37446 
37447   input_path="$new_path"
37448   # Check if we need to convert this using DOS-style short mode. If the path
37449   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37450   # take no chances and rewrite it.
37451   # Note: m4 eats our [], so we need to use [ and ] instead.
37452   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37453   if test "x$has_forbidden_chars" != x; then
37454     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37455     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37456   fi
37457 
37458     # Output is in $new_path
37459 
37460   windows_path="$new_path"
37461   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37462     unix_path=`$CYGPATH -u "$windows_path"`
37463     new_path="$unix_path"
37464   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37465     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37466     new_path="$unix_path"
37467   fi
37468 
37469     # remove trailing .exe if any
37470     new_path="${new_path/%.exe/}"
37471 
37472     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37473     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37474   fi
37475 
37476     else
37477       # We're on a unix platform. Hooray! :)
37478       # First separate the path from the arguments. This will split at the first
37479       # space.
37480       complete="$LIPO"
37481       path="${complete%% *}"
37482       tmp="$complete EOL"
37483       arguments="${tmp#* }"
37484 
37485       # Cannot rely on the command "which" here since it doesn't always work.
37486       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37487       if test -z "$is_absolute_path"; then
37488         # Path to executable is not absolute. Find it.
37489         IFS_save="$IFS"
37490         IFS=:
37491         for p in $PATH; do
37492           if test -f "$p/$path" && test -x "$p/$path"; then
37493             new_path="$p/$path"
37494             break
37495           fi
37496         done
37497         IFS="$IFS_save"
37498       else
37499         # This is an absolute path, we can use it without further modifications.
37500         new_path="$path"
37501       fi
37502 
37503       if test "x$new_path" = x; then
37504         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37505 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37506         has_space=`$ECHO "$complete" | $GREP " "`
37507         if test "x$has_space" != x; then
37508           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37509 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37510         fi
37511         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37512       fi
37513     fi
37514 
37515     # Now join together the path and the arguments once again
37516     if test "x$arguments" != xEOL; then
37517       new_complete="$new_path ${arguments% *}"
37518     else
37519       new_complete="$new_path"
37520     fi
37521 
37522     if test "x$complete" != "x$new_complete"; then
37523       LIPO="$new_complete"
37524       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37525 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37526     fi
37527   fi
37528 
37529   fi
37530 
37531   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37532     # Extract the first word of "mt", so it can be a program name with args.
37533 set dummy mt; ac_word=$2
37534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37535 $as_echo_n "checking for $ac_word... " >&6; }
37536 if ${ac_cv_prog_MT+:} false; then :
37537   $as_echo_n "(cached) " >&6
37538 else
37539   if test -n "$MT"; then
37540   ac_cv_prog_MT="$MT" # Let the user override the test.
37541 else
37542   ac_prog_rejected=no
37543 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37544 for as_dir in $PATH
37545 do
37546   IFS=$as_save_IFS
37547   test -z "$as_dir" && as_dir=.
37548     for ac_exec_ext in '' $ac_executable_extensions; do
37549   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37550     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
37551        ac_prog_rejected=yes
37552        continue
37553      fi
37554     ac_cv_prog_MT="mt"
37555     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37556     break 2
37557   fi
37558 done
37559   done
37560 IFS=$as_save_IFS
37561 
37562 if test $ac_prog_rejected = yes; then
37563   # We found a bogon in the path, so make sure we never use it.
37564   set dummy $ac_cv_prog_MT
37565   shift
37566   if test $# != 0; then
37567     # We chose a different compiler from the bogus one.
37568     # However, it has the same basename, so the bogon will be chosen
37569     # first if we set MT to just the basename; use the full file name.
37570     shift
37571     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
37572   fi
37573 fi
37574 fi
37575 fi
37576 MT=$ac_cv_prog_MT
37577 if test -n "$MT"; then
37578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
37579 $as_echo "$MT" >&6; }
37580 else
37581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37582 $as_echo "no" >&6; }
37583 fi
37584 
37585 
37586 
37587   # Only process if variable expands to non-empty
37588 
37589   if test "x$MT" != x; then
37590     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37591 
37592   # First separate the path from the arguments. This will split at the first
37593   # space.
37594   complete="$MT"
37595   path="${complete%% *}"
37596   tmp="$complete EOL"
37597   arguments="${tmp#* }"
37598 
37599   # Input might be given as Windows format, start by converting to
37600   # unix format.
37601   new_path=`$CYGPATH -u "$path"`
37602 
37603   # Now try to locate executable using which
37604   new_path=`$WHICH "$new_path" 2> /dev/null`
37605   # bat and cmd files are not always considered executable in cygwin causing which
37606   # to not find them
37607   if test "x$new_path" = x \
37608       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37609       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37610     new_path=`$CYGPATH -u "$path"`
37611   fi
37612   if test "x$new_path" = x; then
37613     # Oops. Which didn't find the executable.
37614     # The splitting of arguments from the executable at a space might have been incorrect,
37615     # since paths with space are more likely in Windows. Give it another try with the whole
37616     # argument.
37617     path="$complete"
37618     arguments="EOL"
37619     new_path=`$CYGPATH -u "$path"`
37620     new_path=`$WHICH "$new_path" 2> /dev/null`
37621     # bat and cmd files are not always considered executable in cygwin causing which
37622     # to not find them
37623     if test "x$new_path" = x \
37624         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37625         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37626       new_path=`$CYGPATH -u "$path"`
37627     fi
37628     if test "x$new_path" = x; then
37629       # It's still not found. Now this is an unrecoverable error.
37630       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37631 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37632       has_space=`$ECHO "$complete" | $GREP " "`
37633       if test "x$has_space" != x; then
37634         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37635 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37636       fi
37637       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37638     fi
37639   fi
37640 
37641   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37642   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37643   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37644   # "foo.exe" is OK but "foo" is an error.
37645   #
37646   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37647   # It is also a way to make sure we got the proper file name for the real test later on.
37648   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37649   if test "x$test_shortpath" = x; then
37650     # Short path failed, file does not exist as specified.
37651     # Try adding .exe or .cmd
37652     if test -f "${new_path}.exe"; then
37653       input_to_shortpath="${new_path}.exe"
37654     elif test -f "${new_path}.cmd"; then
37655       input_to_shortpath="${new_path}.cmd"
37656     else
37657       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37658 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37659       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37660 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37661       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37662     fi
37663   else
37664     input_to_shortpath="$new_path"
37665   fi
37666 
37667   # Call helper function which possibly converts this using DOS-style short mode.
37668   # If so, the updated path is stored in $new_path.
37669   new_path="$input_to_shortpath"
37670 
37671   input_path="$input_to_shortpath"
37672   # Check if we need to convert this using DOS-style short mode. If the path
37673   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37674   # take no chances and rewrite it.
37675   # Note: m4 eats our [], so we need to use [ and ] instead.
37676   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37677   if test "x$has_forbidden_chars" != x; then
37678     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37679     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37680     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37681     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37682       # Going to short mode and back again did indeed matter. Since short mode is
37683       # case insensitive, let's make it lowercase to improve readability.
37684       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37685       # Now convert it back to Unix-style (cygpath)
37686       input_path=`$CYGPATH -u "$shortmode_path"`
37687       new_path="$input_path"
37688     fi
37689   fi
37690 
37691   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37692   if test "x$test_cygdrive_prefix" = x; then
37693     # As a simple fix, exclude /usr/bin since it's not a real path.
37694     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37695       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37696       # a path prefixed by /cygdrive for fixpath to work.
37697       new_path="$CYGWIN_ROOT_PATH$input_path"
37698     fi
37699   fi
37700 
37701   # remove trailing .exe if any
37702   new_path="${new_path/%.exe/}"
37703 
37704     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37705 
37706   # First separate the path from the arguments. This will split at the first
37707   # space.
37708   complete="$MT"
37709   path="${complete%% *}"
37710   tmp="$complete EOL"
37711   arguments="${tmp#* }"
37712 
37713   # Input might be given as Windows format, start by converting to
37714   # unix format.
37715   new_path="$path"
37716 
37717   windows_path="$new_path"
37718   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37719     unix_path=`$CYGPATH -u "$windows_path"`
37720     new_path="$unix_path"
37721   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37722     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37723     new_path="$unix_path"
37724   fi
37725 
37726 
37727   # Now try to locate executable using which
37728   new_path=`$WHICH "$new_path" 2> /dev/null`
37729 
37730   if test "x$new_path" = x; then
37731     # Oops. Which didn't find the executable.
37732     # The splitting of arguments from the executable at a space might have been incorrect,
37733     # since paths with space are more likely in Windows. Give it another try with the whole
37734     # argument.
37735     path="$complete"
37736     arguments="EOL"
37737     new_path="$path"
37738 
37739   windows_path="$new_path"
37740   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37741     unix_path=`$CYGPATH -u "$windows_path"`
37742     new_path="$unix_path"
37743   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37744     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37745     new_path="$unix_path"
37746   fi
37747 
37748 
37749     new_path=`$WHICH "$new_path" 2> /dev/null`
37750     # bat and cmd files are not always considered executable in MSYS causing which
37751     # to not find them
37752     if test "x$new_path" = x \
37753         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37754         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37755       new_path="$path"
37756 
37757   windows_path="$new_path"
37758   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37759     unix_path=`$CYGPATH -u "$windows_path"`
37760     new_path="$unix_path"
37761   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37762     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37763     new_path="$unix_path"
37764   fi
37765 
37766     fi
37767 
37768     if test "x$new_path" = x; then
37769       # It's still not found. Now this is an unrecoverable error.
37770       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37771 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37772       has_space=`$ECHO "$complete" | $GREP " "`
37773       if test "x$has_space" != x; then
37774         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37775 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37776       fi
37777       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37778     fi
37779   fi
37780 
37781   # Now new_path has a complete unix path to the binary
37782   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37783     # Keep paths in /bin as-is, but remove trailing .exe if any
37784     new_path="${new_path/%.exe/}"
37785     # Do not save /bin paths to all_fixpath_prefixes!
37786   else
37787     # Not in mixed or Windows style, start by that.
37788     new_path=`cmd //c echo $new_path`
37789 
37790   input_path="$new_path"
37791   # Check if we need to convert this using DOS-style short mode. If the path
37792   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37793   # take no chances and rewrite it.
37794   # Note: m4 eats our [], so we need to use [ and ] instead.
37795   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37796   if test "x$has_forbidden_chars" != x; then
37797     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37798     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37799   fi
37800 
37801     # Output is in $new_path
37802 
37803   windows_path="$new_path"
37804   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37805     unix_path=`$CYGPATH -u "$windows_path"`
37806     new_path="$unix_path"
37807   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37808     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37809     new_path="$unix_path"
37810   fi
37811 
37812     # remove trailing .exe if any
37813     new_path="${new_path/%.exe/}"
37814 
37815     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37816     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37817   fi
37818 
37819     else
37820       # We're on a unix platform. Hooray! :)
37821       # First separate the path from the arguments. This will split at the first
37822       # space.
37823       complete="$MT"
37824       path="${complete%% *}"
37825       tmp="$complete EOL"
37826       arguments="${tmp#* }"
37827 
37828       # Cannot rely on the command "which" here since it doesn't always work.
37829       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37830       if test -z "$is_absolute_path"; then
37831         # Path to executable is not absolute. Find it.
37832         IFS_save="$IFS"
37833         IFS=:
37834         for p in $PATH; do
37835           if test -f "$p/$path" && test -x "$p/$path"; then
37836             new_path="$p/$path"
37837             break
37838           fi
37839         done
37840         IFS="$IFS_save"
37841       else
37842         # This is an absolute path, we can use it without further modifications.
37843         new_path="$path"
37844       fi
37845 
37846       if test "x$new_path" = x; then
37847         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37848 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37849         has_space=`$ECHO "$complete" | $GREP " "`
37850         if test "x$has_space" != x; then
37851           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37852 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37853         fi
37854         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37855       fi
37856     fi
37857 
37858     # Now join together the path and the arguments once again
37859     if test "x$arguments" != xEOL; then
37860       new_complete="$new_path ${arguments% *}"
37861     else
37862       new_complete="$new_path"
37863     fi
37864 
37865     if test "x$complete" != "x$new_complete"; then
37866       MT="$new_complete"
37867       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
37868 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
37869     fi
37870   fi
37871 
37872     # Setup the resource compiler (RC)
37873     # Extract the first word of "rc", so it can be a program name with args.
37874 set dummy rc; ac_word=$2
37875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37876 $as_echo_n "checking for $ac_word... " >&6; }
37877 if ${ac_cv_prog_RC+:} false; then :
37878   $as_echo_n "(cached) " >&6
37879 else
37880   if test -n "$RC"; then
37881   ac_cv_prog_RC="$RC" # Let the user override the test.
37882 else
37883   ac_prog_rejected=no
37884 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37885 for as_dir in $PATH
37886 do
37887   IFS=$as_save_IFS
37888   test -z "$as_dir" && as_dir=.
37889     for ac_exec_ext in '' $ac_executable_extensions; do
37890   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37891     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
37892        ac_prog_rejected=yes
37893        continue
37894      fi
37895     ac_cv_prog_RC="rc"
37896     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37897     break 2
37898   fi
37899 done
37900   done
37901 IFS=$as_save_IFS
37902 
37903 if test $ac_prog_rejected = yes; then
37904   # We found a bogon in the path, so make sure we never use it.
37905   set dummy $ac_cv_prog_RC
37906   shift
37907   if test $# != 0; then
37908     # We chose a different compiler from the bogus one.
37909     # However, it has the same basename, so the bogon will be chosen
37910     # first if we set RC to just the basename; use the full file name.
37911     shift
37912     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
37913   fi
37914 fi
37915 fi
37916 fi
37917 RC=$ac_cv_prog_RC
37918 if test -n "$RC"; then
37919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
37920 $as_echo "$RC" >&6; }
37921 else
37922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37923 $as_echo "no" >&6; }
37924 fi
37925 
37926 
37927 
37928   # Only process if variable expands to non-empty
37929 
37930   if test "x$RC" != x; then
37931     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37932 
37933   # First separate the path from the arguments. This will split at the first
37934   # space.
37935   complete="$RC"
37936   path="${complete%% *}"
37937   tmp="$complete EOL"
37938   arguments="${tmp#* }"
37939 
37940   # Input might be given as Windows format, start by converting to
37941   # unix format.
37942   new_path=`$CYGPATH -u "$path"`
37943 
37944   # Now try to locate executable using which
37945   new_path=`$WHICH "$new_path" 2> /dev/null`
37946   # bat and cmd files are not always considered executable in cygwin causing which
37947   # to not find them
37948   if test "x$new_path" = x \
37949       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37950       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37951     new_path=`$CYGPATH -u "$path"`
37952   fi
37953   if test "x$new_path" = x; then
37954     # Oops. Which didn't find the executable.
37955     # The splitting of arguments from the executable at a space might have been incorrect,
37956     # since paths with space are more likely in Windows. Give it another try with the whole
37957     # argument.
37958     path="$complete"
37959     arguments="EOL"
37960     new_path=`$CYGPATH -u "$path"`
37961     new_path=`$WHICH "$new_path" 2> /dev/null`
37962     # bat and cmd files are not always considered executable in cygwin causing which
37963     # to not find them
37964     if test "x$new_path" = x \
37965         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37966         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37967       new_path=`$CYGPATH -u "$path"`
37968     fi
37969     if test "x$new_path" = x; then
37970       # It's still not found. Now this is an unrecoverable error.
37971       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37972 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37973       has_space=`$ECHO "$complete" | $GREP " "`
37974       if test "x$has_space" != x; then
37975         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37976 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37977       fi
37978       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37979     fi
37980   fi
37981 
37982   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37983   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37984   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37985   # "foo.exe" is OK but "foo" is an error.
37986   #
37987   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37988   # It is also a way to make sure we got the proper file name for the real test later on.
37989   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37990   if test "x$test_shortpath" = x; then
37991     # Short path failed, file does not exist as specified.
37992     # Try adding .exe or .cmd
37993     if test -f "${new_path}.exe"; then
37994       input_to_shortpath="${new_path}.exe"
37995     elif test -f "${new_path}.cmd"; then
37996       input_to_shortpath="${new_path}.cmd"
37997     else
37998       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
37999 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38000       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38001 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38002       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38003     fi
38004   else
38005     input_to_shortpath="$new_path"
38006   fi
38007 
38008   # Call helper function which possibly converts this using DOS-style short mode.
38009   # If so, the updated path is stored in $new_path.
38010   new_path="$input_to_shortpath"
38011 
38012   input_path="$input_to_shortpath"
38013   # Check if we need to convert this using DOS-style short mode. If the path
38014   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38015   # take no chances and rewrite it.
38016   # Note: m4 eats our [], so we need to use [ and ] instead.
38017   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38018   if test "x$has_forbidden_chars" != x; then
38019     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38020     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38021     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38022     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38023       # Going to short mode and back again did indeed matter. Since short mode is
38024       # case insensitive, let's make it lowercase to improve readability.
38025       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38026       # Now convert it back to Unix-style (cygpath)
38027       input_path=`$CYGPATH -u "$shortmode_path"`
38028       new_path="$input_path"
38029     fi
38030   fi
38031 
38032   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38033   if test "x$test_cygdrive_prefix" = x; then
38034     # As a simple fix, exclude /usr/bin since it's not a real path.
38035     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38036       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38037       # a path prefixed by /cygdrive for fixpath to work.
38038       new_path="$CYGWIN_ROOT_PATH$input_path"
38039     fi
38040   fi
38041 
38042   # remove trailing .exe if any
38043   new_path="${new_path/%.exe/}"
38044 
38045     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38046 
38047   # First separate the path from the arguments. This will split at the first
38048   # space.
38049   complete="$RC"
38050   path="${complete%% *}"
38051   tmp="$complete EOL"
38052   arguments="${tmp#* }"
38053 
38054   # Input might be given as Windows format, start by converting to
38055   # unix format.
38056   new_path="$path"
38057 
38058   windows_path="$new_path"
38059   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38060     unix_path=`$CYGPATH -u "$windows_path"`
38061     new_path="$unix_path"
38062   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38063     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38064     new_path="$unix_path"
38065   fi
38066 
38067 
38068   # Now try to locate executable using which
38069   new_path=`$WHICH "$new_path" 2> /dev/null`
38070 
38071   if test "x$new_path" = x; then
38072     # Oops. Which didn't find the executable.
38073     # The splitting of arguments from the executable at a space might have been incorrect,
38074     # since paths with space are more likely in Windows. Give it another try with the whole
38075     # argument.
38076     path="$complete"
38077     arguments="EOL"
38078     new_path="$path"
38079 
38080   windows_path="$new_path"
38081   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38082     unix_path=`$CYGPATH -u "$windows_path"`
38083     new_path="$unix_path"
38084   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38085     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38086     new_path="$unix_path"
38087   fi
38088 
38089 
38090     new_path=`$WHICH "$new_path" 2> /dev/null`
38091     # bat and cmd files are not always considered executable in MSYS causing which
38092     # to not find them
38093     if test "x$new_path" = x \
38094         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38095         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38096       new_path="$path"
38097 
38098   windows_path="$new_path"
38099   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38100     unix_path=`$CYGPATH -u "$windows_path"`
38101     new_path="$unix_path"
38102   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38103     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38104     new_path="$unix_path"
38105   fi
38106 
38107     fi
38108 
38109     if test "x$new_path" = x; then
38110       # It's still not found. Now this is an unrecoverable error.
38111       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38112 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38113       has_space=`$ECHO "$complete" | $GREP " "`
38114       if test "x$has_space" != x; then
38115         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38116 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38117       fi
38118       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38119     fi
38120   fi
38121 
38122   # Now new_path has a complete unix path to the binary
38123   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38124     # Keep paths in /bin as-is, but remove trailing .exe if any
38125     new_path="${new_path/%.exe/}"
38126     # Do not save /bin paths to all_fixpath_prefixes!
38127   else
38128     # Not in mixed or Windows style, start by that.
38129     new_path=`cmd //c echo $new_path`
38130 
38131   input_path="$new_path"
38132   # Check if we need to convert this using DOS-style short mode. If the path
38133   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38134   # take no chances and rewrite it.
38135   # Note: m4 eats our [], so we need to use [ and ] instead.
38136   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38137   if test "x$has_forbidden_chars" != x; then
38138     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38139     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38140   fi
38141 
38142     # Output is in $new_path
38143 
38144   windows_path="$new_path"
38145   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38146     unix_path=`$CYGPATH -u "$windows_path"`
38147     new_path="$unix_path"
38148   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38149     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38150     new_path="$unix_path"
38151   fi
38152 
38153     # remove trailing .exe if any
38154     new_path="${new_path/%.exe/}"
38155 
38156     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38157     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38158   fi
38159 
38160     else
38161       # We're on a unix platform. Hooray! :)
38162       # First separate the path from the arguments. This will split at the first
38163       # space.
38164       complete="$RC"
38165       path="${complete%% *}"
38166       tmp="$complete EOL"
38167       arguments="${tmp#* }"
38168 
38169       # Cannot rely on the command "which" here since it doesn't always work.
38170       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38171       if test -z "$is_absolute_path"; then
38172         # Path to executable is not absolute. Find it.
38173         IFS_save="$IFS"
38174         IFS=:
38175         for p in $PATH; do
38176           if test -f "$p/$path" && test -x "$p/$path"; then
38177             new_path="$p/$path"
38178             break
38179           fi
38180         done
38181         IFS="$IFS_save"
38182       else
38183         # This is an absolute path, we can use it without further modifications.
38184         new_path="$path"
38185       fi
38186 
38187       if test "x$new_path" = x; then
38188         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38189 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38190         has_space=`$ECHO "$complete" | $GREP " "`
38191         if test "x$has_space" != x; then
38192           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38193 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38194         fi
38195         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38196       fi
38197     fi
38198 
38199     # Now join together the path and the arguments once again
38200     if test "x$arguments" != xEOL; then
38201       new_complete="$new_path ${arguments% *}"
38202     else
38203       new_complete="$new_path"
38204     fi
38205 
38206     if test "x$complete" != "x$new_complete"; then
38207       RC="$new_complete"
38208       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38209 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38210     fi
38211   fi
38212 
38213     # Extract the first word of "dumpbin", so it can be a program name with args.
38214 set dummy dumpbin; ac_word=$2
38215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38216 $as_echo_n "checking for $ac_word... " >&6; }
38217 if ${ac_cv_prog_DUMPBIN+:} false; then :
38218   $as_echo_n "(cached) " >&6
38219 else
38220   if test -n "$DUMPBIN"; then
38221   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38222 else
38223 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38224 for as_dir in $PATH
38225 do
38226   IFS=$as_save_IFS
38227   test -z "$as_dir" && as_dir=.
38228     for ac_exec_ext in '' $ac_executable_extensions; do
38229   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38230     ac_cv_prog_DUMPBIN="dumpbin"
38231     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38232     break 2
38233   fi
38234 done
38235   done
38236 IFS=$as_save_IFS
38237 
38238 fi
38239 fi
38240 DUMPBIN=$ac_cv_prog_DUMPBIN
38241 if test -n "$DUMPBIN"; then
38242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38243 $as_echo "$DUMPBIN" >&6; }
38244 else
38245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38246 $as_echo "no" >&6; }
38247 fi
38248 
38249 
38250 
38251   # Only process if variable expands to non-empty
38252 
38253   if test "x$DUMPBIN" != x; then
38254     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38255 
38256   # First separate the path from the arguments. This will split at the first
38257   # space.
38258   complete="$DUMPBIN"
38259   path="${complete%% *}"
38260   tmp="$complete EOL"
38261   arguments="${tmp#* }"
38262 
38263   # Input might be given as Windows format, start by converting to
38264   # unix format.
38265   new_path=`$CYGPATH -u "$path"`
38266 
38267   # Now try to locate executable using which
38268   new_path=`$WHICH "$new_path" 2> /dev/null`
38269   # bat and cmd files are not always considered executable in cygwin causing which
38270   # to not find them
38271   if test "x$new_path" = x \
38272       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38273       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38274     new_path=`$CYGPATH -u "$path"`
38275   fi
38276   if test "x$new_path" = x; then
38277     # Oops. Which didn't find the executable.
38278     # The splitting of arguments from the executable at a space might have been incorrect,
38279     # since paths with space are more likely in Windows. Give it another try with the whole
38280     # argument.
38281     path="$complete"
38282     arguments="EOL"
38283     new_path=`$CYGPATH -u "$path"`
38284     new_path=`$WHICH "$new_path" 2> /dev/null`
38285     # bat and cmd files are not always considered executable in cygwin causing which
38286     # to not find them
38287     if test "x$new_path" = x \
38288         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38289         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38290       new_path=`$CYGPATH -u "$path"`
38291     fi
38292     if test "x$new_path" = x; then
38293       # It's still not found. Now this is an unrecoverable error.
38294       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38295 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38296       has_space=`$ECHO "$complete" | $GREP " "`
38297       if test "x$has_space" != x; then
38298         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38299 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38300       fi
38301       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38302     fi
38303   fi
38304 
38305   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38306   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38307   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38308   # "foo.exe" is OK but "foo" is an error.
38309   #
38310   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38311   # It is also a way to make sure we got the proper file name for the real test later on.
38312   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38313   if test "x$test_shortpath" = x; then
38314     # Short path failed, file does not exist as specified.
38315     # Try adding .exe or .cmd
38316     if test -f "${new_path}.exe"; then
38317       input_to_shortpath="${new_path}.exe"
38318     elif test -f "${new_path}.cmd"; then
38319       input_to_shortpath="${new_path}.cmd"
38320     else
38321       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38322 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38323       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38324 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38325       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38326     fi
38327   else
38328     input_to_shortpath="$new_path"
38329   fi
38330 
38331   # Call helper function which possibly converts this using DOS-style short mode.
38332   # If so, the updated path is stored in $new_path.
38333   new_path="$input_to_shortpath"
38334 
38335   input_path="$input_to_shortpath"
38336   # Check if we need to convert this using DOS-style short mode. If the path
38337   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38338   # take no chances and rewrite it.
38339   # Note: m4 eats our [], so we need to use [ and ] instead.
38340   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38341   if test "x$has_forbidden_chars" != x; then
38342     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38343     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38344     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38345     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38346       # Going to short mode and back again did indeed matter. Since short mode is
38347       # case insensitive, let's make it lowercase to improve readability.
38348       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38349       # Now convert it back to Unix-style (cygpath)
38350       input_path=`$CYGPATH -u "$shortmode_path"`
38351       new_path="$input_path"
38352     fi
38353   fi
38354 
38355   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38356   if test "x$test_cygdrive_prefix" = x; then
38357     # As a simple fix, exclude /usr/bin since it's not a real path.
38358     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38359       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38360       # a path prefixed by /cygdrive for fixpath to work.
38361       new_path="$CYGWIN_ROOT_PATH$input_path"
38362     fi
38363   fi
38364 
38365   # remove trailing .exe if any
38366   new_path="${new_path/%.exe/}"
38367 
38368     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38369 
38370   # First separate the path from the arguments. This will split at the first
38371   # space.
38372   complete="$DUMPBIN"
38373   path="${complete%% *}"
38374   tmp="$complete EOL"
38375   arguments="${tmp#* }"
38376 
38377   # Input might be given as Windows format, start by converting to
38378   # unix format.
38379   new_path="$path"
38380 
38381   windows_path="$new_path"
38382   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38383     unix_path=`$CYGPATH -u "$windows_path"`
38384     new_path="$unix_path"
38385   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38386     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38387     new_path="$unix_path"
38388   fi
38389 
38390 
38391   # Now try to locate executable using which
38392   new_path=`$WHICH "$new_path" 2> /dev/null`
38393 
38394   if test "x$new_path" = x; then
38395     # Oops. Which didn't find the executable.
38396     # The splitting of arguments from the executable at a space might have been incorrect,
38397     # since paths with space are more likely in Windows. Give it another try with the whole
38398     # argument.
38399     path="$complete"
38400     arguments="EOL"
38401     new_path="$path"
38402 
38403   windows_path="$new_path"
38404   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38405     unix_path=`$CYGPATH -u "$windows_path"`
38406     new_path="$unix_path"
38407   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38408     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38409     new_path="$unix_path"
38410   fi
38411 
38412 
38413     new_path=`$WHICH "$new_path" 2> /dev/null`
38414     # bat and cmd files are not always considered executable in MSYS causing which
38415     # to not find them
38416     if test "x$new_path" = x \
38417         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38418         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38419       new_path="$path"
38420 
38421   windows_path="$new_path"
38422   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38423     unix_path=`$CYGPATH -u "$windows_path"`
38424     new_path="$unix_path"
38425   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38426     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38427     new_path="$unix_path"
38428   fi
38429 
38430     fi
38431 
38432     if test "x$new_path" = x; then
38433       # It's still not found. Now this is an unrecoverable error.
38434       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38435 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38436       has_space=`$ECHO "$complete" | $GREP " "`
38437       if test "x$has_space" != x; then
38438         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38439 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38440       fi
38441       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38442     fi
38443   fi
38444 
38445   # Now new_path has a complete unix path to the binary
38446   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38447     # Keep paths in /bin as-is, but remove trailing .exe if any
38448     new_path="${new_path/%.exe/}"
38449     # Do not save /bin paths to all_fixpath_prefixes!
38450   else
38451     # Not in mixed or Windows style, start by that.
38452     new_path=`cmd //c echo $new_path`
38453 
38454   input_path="$new_path"
38455   # Check if we need to convert this using DOS-style short mode. If the path
38456   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38457   # take no chances and rewrite it.
38458   # Note: m4 eats our [], so we need to use [ and ] instead.
38459   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38460   if test "x$has_forbidden_chars" != x; then
38461     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38462     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38463   fi
38464 
38465     # Output is in $new_path
38466 
38467   windows_path="$new_path"
38468   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38469     unix_path=`$CYGPATH -u "$windows_path"`
38470     new_path="$unix_path"
38471   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38472     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38473     new_path="$unix_path"
38474   fi
38475 
38476     # remove trailing .exe if any
38477     new_path="${new_path/%.exe/}"
38478 
38479     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38480     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38481   fi
38482 
38483     else
38484       # We're on a unix platform. Hooray! :)
38485       # First separate the path from the arguments. This will split at the first
38486       # space.
38487       complete="$DUMPBIN"
38488       path="${complete%% *}"
38489       tmp="$complete EOL"
38490       arguments="${tmp#* }"
38491 
38492       # Cannot rely on the command "which" here since it doesn't always work.
38493       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38494       if test -z "$is_absolute_path"; then
38495         # Path to executable is not absolute. Find it.
38496         IFS_save="$IFS"
38497         IFS=:
38498         for p in $PATH; do
38499           if test -f "$p/$path" && test -x "$p/$path"; then
38500             new_path="$p/$path"
38501             break
38502           fi
38503         done
38504         IFS="$IFS_save"
38505       else
38506         # This is an absolute path, we can use it without further modifications.
38507         new_path="$path"
38508       fi
38509 
38510       if test "x$new_path" = x; then
38511         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38512 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38513         has_space=`$ECHO "$complete" | $GREP " "`
38514         if test "x$has_space" != x; then
38515           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38516 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38517         fi
38518         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38519       fi
38520     fi
38521 
38522     # Now join together the path and the arguments once again
38523     if test "x$arguments" != xEOL; then
38524       new_complete="$new_path ${arguments% *}"
38525     else
38526       new_complete="$new_path"
38527     fi
38528 
38529     if test "x$complete" != "x$new_complete"; then
38530       DUMPBIN="$new_complete"
38531       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
38532 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
38533     fi
38534   fi
38535 
38536     # We need to check for 'msbuild.exe' because at the place where we expect to
38537     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
38538     # won't find the 'msbuild.exe' executable in that case (and the
38539     # 'ac_executable_extensions' is unusable due to performance reasons).
38540     # Notice that we intentionally don't fix up the path to MSBUILD because we
38541     # will call it in a DOS shell during freetype detection on Windows (see
38542     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
38543     # Extract the first word of "msbuild.exe", so it can be a program name with args.
38544 set dummy msbuild.exe; ac_word=$2
38545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38546 $as_echo_n "checking for $ac_word... " >&6; }
38547 if ${ac_cv_prog_MSBUILD+:} false; then :
38548   $as_echo_n "(cached) " >&6
38549 else
38550   if test -n "$MSBUILD"; then
38551   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
38552 else
38553 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38554 for as_dir in $PATH
38555 do
38556   IFS=$as_save_IFS
38557   test -z "$as_dir" && as_dir=.
38558     for ac_exec_ext in '' $ac_executable_extensions; do
38559   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38560     ac_cv_prog_MSBUILD="msbuild.exe"
38561     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38562     break 2
38563   fi
38564 done
38565   done
38566 IFS=$as_save_IFS
38567 
38568 fi
38569 fi
38570 MSBUILD=$ac_cv_prog_MSBUILD
38571 if test -n "$MSBUILD"; then
38572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
38573 $as_echo "$MSBUILD" >&6; }
38574 else
38575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38576 $as_echo "no" >&6; }
38577 fi
38578 
38579 
38580   fi
38581 
38582   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
38583 
38584 
38585   # Publish this variable in the help.
38586 
38587 
38588   if [ -z "${STRIP+x}" ]; then
38589     # The variable is not set by user, try to locate tool using the code snippet
38590     for ac_prog in strip
38591 do
38592   # Extract the first word of "$ac_prog", so it can be a program name with args.
38593 set dummy $ac_prog; ac_word=$2
38594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38595 $as_echo_n "checking for $ac_word... " >&6; }
38596 if ${ac_cv_path_STRIP+:} false; then :
38597   $as_echo_n "(cached) " >&6
38598 else
38599   case $STRIP in
38600   [\\/]* | ?:[\\/]*)
38601   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38602   ;;
38603   *)
38604   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38605 for as_dir in $PATH
38606 do
38607   IFS=$as_save_IFS
38608   test -z "$as_dir" && as_dir=.
38609     for ac_exec_ext in '' $ac_executable_extensions; do
38610   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38611     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38612     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38613     break 2
38614   fi
38615 done
38616   done
38617 IFS=$as_save_IFS
38618 
38619   ;;
38620 esac
38621 fi
38622 STRIP=$ac_cv_path_STRIP
38623 if test -n "$STRIP"; then
38624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38625 $as_echo "$STRIP" >&6; }
38626 else
38627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38628 $as_echo "no" >&6; }
38629 fi
38630 
38631 
38632   test -n "$STRIP" && break
38633 done
38634 
38635   else
38636     # The variable is set, but is it from the command line or the environment?
38637 
38638     # Try to remove the string !STRIP! from our list.
38639     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38640     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38641       # If it failed, the variable was not from the command line. Ignore it,
38642       # but warn the user (except for BASH, which is always set by the calling BASH).
38643       if test "xSTRIP" != xBASH; then
38644         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38645 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38646       fi
38647       # Try to locate tool using the code snippet
38648       for ac_prog in strip
38649 do
38650   # Extract the first word of "$ac_prog", so it can be a program name with args.
38651 set dummy $ac_prog; ac_word=$2
38652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38653 $as_echo_n "checking for $ac_word... " >&6; }
38654 if ${ac_cv_path_STRIP+:} false; then :
38655   $as_echo_n "(cached) " >&6
38656 else
38657   case $STRIP in
38658   [\\/]* | ?:[\\/]*)
38659   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38660   ;;
38661   *)
38662   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38663 for as_dir in $PATH
38664 do
38665   IFS=$as_save_IFS
38666   test -z "$as_dir" && as_dir=.
38667     for ac_exec_ext in '' $ac_executable_extensions; do
38668   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38669     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38670     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38671     break 2
38672   fi
38673 done
38674   done
38675 IFS=$as_save_IFS
38676 
38677   ;;
38678 esac
38679 fi
38680 STRIP=$ac_cv_path_STRIP
38681 if test -n "$STRIP"; then
38682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38683 $as_echo "$STRIP" >&6; }
38684 else
38685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38686 $as_echo "no" >&6; }
38687 fi
38688 
38689 
38690   test -n "$STRIP" && break
38691 done
38692 
38693     else
38694       # If it succeeded, then it was overridden by the user. We will use it
38695       # for the tool.
38696 
38697       # First remove it from the list of overridden variables, so we can test
38698       # for unknown variables in the end.
38699       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38700 
38701       # Check if we try to supply an empty value
38702       if test "x$STRIP" = x; then
38703         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38704 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38705         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38706 $as_echo_n "checking for STRIP... " >&6; }
38707         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38708 $as_echo "disabled" >&6; }
38709       else
38710         # Check if the provided tool contains a complete path.
38711         tool_specified="$STRIP"
38712         tool_basename="${tool_specified##*/}"
38713         if test "x$tool_basename" = "x$tool_specified"; then
38714           # A command without a complete path is provided, search $PATH.
38715           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38716 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38717           # Extract the first word of "$tool_basename", so it can be a program name with args.
38718 set dummy $tool_basename; ac_word=$2
38719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38720 $as_echo_n "checking for $ac_word... " >&6; }
38721 if ${ac_cv_path_STRIP+:} false; then :
38722   $as_echo_n "(cached) " >&6
38723 else
38724   case $STRIP in
38725   [\\/]* | ?:[\\/]*)
38726   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38727   ;;
38728   *)
38729   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38730 for as_dir in $PATH
38731 do
38732   IFS=$as_save_IFS
38733   test -z "$as_dir" && as_dir=.
38734     for ac_exec_ext in '' $ac_executable_extensions; do
38735   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38736     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38737     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38738     break 2
38739   fi
38740 done
38741   done
38742 IFS=$as_save_IFS
38743 
38744   ;;
38745 esac
38746 fi
38747 STRIP=$ac_cv_path_STRIP
38748 if test -n "$STRIP"; then
38749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38750 $as_echo "$STRIP" >&6; }
38751 else
38752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38753 $as_echo "no" >&6; }
38754 fi
38755 
38756 
38757           if test "x$STRIP" = x; then
38758             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38759           fi
38760         else
38761           # Otherwise we believe it is a complete path. Use it as it is.
38762           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38763 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38764           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38765 $as_echo_n "checking for STRIP... " >&6; }
38766           if test ! -x "$tool_specified"; then
38767             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38768 $as_echo "not found" >&6; }
38769             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38770           fi
38771           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38772 $as_echo "$tool_specified" >&6; }
38773         fi
38774       fi
38775     fi
38776 
38777   fi
38778 
38779 
38780 
38781   # Only process if variable expands to non-empty
38782 
38783   if test "x$STRIP" != x; then
38784     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38785 
38786   # First separate the path from the arguments. This will split at the first
38787   # space.
38788   complete="$STRIP"
38789   path="${complete%% *}"
38790   tmp="$complete EOL"
38791   arguments="${tmp#* }"
38792 
38793   # Input might be given as Windows format, start by converting to
38794   # unix format.
38795   new_path=`$CYGPATH -u "$path"`
38796 
38797   # Now try to locate executable using which
38798   new_path=`$WHICH "$new_path" 2> /dev/null`
38799   # bat and cmd files are not always considered executable in cygwin causing which
38800   # to not find them
38801   if test "x$new_path" = x \
38802       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38803       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38804     new_path=`$CYGPATH -u "$path"`
38805   fi
38806   if test "x$new_path" = x; then
38807     # Oops. Which didn't find the executable.
38808     # The splitting of arguments from the executable at a space might have been incorrect,
38809     # since paths with space are more likely in Windows. Give it another try with the whole
38810     # argument.
38811     path="$complete"
38812     arguments="EOL"
38813     new_path=`$CYGPATH -u "$path"`
38814     new_path=`$WHICH "$new_path" 2> /dev/null`
38815     # bat and cmd files are not always considered executable in cygwin causing which
38816     # to not find them
38817     if test "x$new_path" = x \
38818         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38819         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38820       new_path=`$CYGPATH -u "$path"`
38821     fi
38822     if test "x$new_path" = x; then
38823       # It's still not found. Now this is an unrecoverable error.
38824       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38825 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38826       has_space=`$ECHO "$complete" | $GREP " "`
38827       if test "x$has_space" != x; then
38828         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38829 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38830       fi
38831       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38832     fi
38833   fi
38834 
38835   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38836   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38837   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38838   # "foo.exe" is OK but "foo" is an error.
38839   #
38840   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38841   # It is also a way to make sure we got the proper file name for the real test later on.
38842   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38843   if test "x$test_shortpath" = x; then
38844     # Short path failed, file does not exist as specified.
38845     # Try adding .exe or .cmd
38846     if test -f "${new_path}.exe"; then
38847       input_to_shortpath="${new_path}.exe"
38848     elif test -f "${new_path}.cmd"; then
38849       input_to_shortpath="${new_path}.cmd"
38850     else
38851       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38852 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38853       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38854 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38855       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38856     fi
38857   else
38858     input_to_shortpath="$new_path"
38859   fi
38860 
38861   # Call helper function which possibly converts this using DOS-style short mode.
38862   # If so, the updated path is stored in $new_path.
38863   new_path="$input_to_shortpath"
38864 
38865   input_path="$input_to_shortpath"
38866   # Check if we need to convert this using DOS-style short mode. If the path
38867   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38868   # take no chances and rewrite it.
38869   # Note: m4 eats our [], so we need to use [ and ] instead.
38870   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38871   if test "x$has_forbidden_chars" != x; then
38872     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38873     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38874     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38875     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38876       # Going to short mode and back again did indeed matter. Since short mode is
38877       # case insensitive, let's make it lowercase to improve readability.
38878       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38879       # Now convert it back to Unix-style (cygpath)
38880       input_path=`$CYGPATH -u "$shortmode_path"`
38881       new_path="$input_path"
38882     fi
38883   fi
38884 
38885   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38886   if test "x$test_cygdrive_prefix" = x; then
38887     # As a simple fix, exclude /usr/bin since it's not a real path.
38888     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38889       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38890       # a path prefixed by /cygdrive for fixpath to work.
38891       new_path="$CYGWIN_ROOT_PATH$input_path"
38892     fi
38893   fi
38894 
38895   # remove trailing .exe if any
38896   new_path="${new_path/%.exe/}"
38897 
38898     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38899 
38900   # First separate the path from the arguments. This will split at the first
38901   # space.
38902   complete="$STRIP"
38903   path="${complete%% *}"
38904   tmp="$complete EOL"
38905   arguments="${tmp#* }"
38906 
38907   # Input might be given as Windows format, start by converting to
38908   # unix format.
38909   new_path="$path"
38910 
38911   windows_path="$new_path"
38912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38913     unix_path=`$CYGPATH -u "$windows_path"`
38914     new_path="$unix_path"
38915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38916     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38917     new_path="$unix_path"
38918   fi
38919 
38920 
38921   # Now try to locate executable using which
38922   new_path=`$WHICH "$new_path" 2> /dev/null`
38923 
38924   if test "x$new_path" = x; then
38925     # Oops. Which didn't find the executable.
38926     # The splitting of arguments from the executable at a space might have been incorrect,
38927     # since paths with space are more likely in Windows. Give it another try with the whole
38928     # argument.
38929     path="$complete"
38930     arguments="EOL"
38931     new_path="$path"
38932 
38933   windows_path="$new_path"
38934   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38935     unix_path=`$CYGPATH -u "$windows_path"`
38936     new_path="$unix_path"
38937   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38938     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38939     new_path="$unix_path"
38940   fi
38941 
38942 
38943     new_path=`$WHICH "$new_path" 2> /dev/null`
38944     # bat and cmd files are not always considered executable in MSYS causing which
38945     # to not find them
38946     if test "x$new_path" = x \
38947         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38948         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38949       new_path="$path"
38950 
38951   windows_path="$new_path"
38952   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38953     unix_path=`$CYGPATH -u "$windows_path"`
38954     new_path="$unix_path"
38955   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38956     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38957     new_path="$unix_path"
38958   fi
38959 
38960     fi
38961 
38962     if test "x$new_path" = x; then
38963       # It's still not found. Now this is an unrecoverable error.
38964       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38965 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38966       has_space=`$ECHO "$complete" | $GREP " "`
38967       if test "x$has_space" != x; then
38968         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38969 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38970       fi
38971       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38972     fi
38973   fi
38974 
38975   # Now new_path has a complete unix path to the binary
38976   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38977     # Keep paths in /bin as-is, but remove trailing .exe if any
38978     new_path="${new_path/%.exe/}"
38979     # Do not save /bin paths to all_fixpath_prefixes!
38980   else
38981     # Not in mixed or Windows style, start by that.
38982     new_path=`cmd //c echo $new_path`
38983 
38984   input_path="$new_path"
38985   # Check if we need to convert this using DOS-style short mode. If the path
38986   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38987   # take no chances and rewrite it.
38988   # Note: m4 eats our [], so we need to use [ and ] instead.
38989   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38990   if test "x$has_forbidden_chars" != x; then
38991     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38992     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38993   fi
38994 
38995     # Output is in $new_path
38996 
38997   windows_path="$new_path"
38998   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38999     unix_path=`$CYGPATH -u "$windows_path"`
39000     new_path="$unix_path"
39001   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39002     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39003     new_path="$unix_path"
39004   fi
39005 
39006     # remove trailing .exe if any
39007     new_path="${new_path/%.exe/}"
39008 
39009     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39010     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39011   fi
39012 
39013     else
39014       # We're on a unix platform. Hooray! :)
39015       # First separate the path from the arguments. This will split at the first
39016       # space.
39017       complete="$STRIP"
39018       path="${complete%% *}"
39019       tmp="$complete EOL"
39020       arguments="${tmp#* }"
39021 
39022       # Cannot rely on the command "which" here since it doesn't always work.
39023       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39024       if test -z "$is_absolute_path"; then
39025         # Path to executable is not absolute. Find it.
39026         IFS_save="$IFS"
39027         IFS=:
39028         for p in $PATH; do
39029           if test -f "$p/$path" && test -x "$p/$path"; then
39030             new_path="$p/$path"
39031             break
39032           fi
39033         done
39034         IFS="$IFS_save"
39035       else
39036         # This is an absolute path, we can use it without further modifications.
39037         new_path="$path"
39038       fi
39039 
39040       if test "x$new_path" = x; then
39041         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39042 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39043         has_space=`$ECHO "$complete" | $GREP " "`
39044         if test "x$has_space" != x; then
39045           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39046 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39047         fi
39048         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39049       fi
39050     fi
39051 
39052     # Now join together the path and the arguments once again
39053     if test "x$arguments" != xEOL; then
39054       new_complete="$new_path ${arguments% *}"
39055     else
39056       new_complete="$new_path"
39057     fi
39058 
39059     if test "x$complete" != "x$new_complete"; then
39060       STRIP="$new_complete"
39061       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39062 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39063     fi
39064   fi
39065 
39066 
39067 
39068   # Publish this variable in the help.
39069 
39070 
39071   if [ -z "${NM+x}" ]; then
39072     # The variable is not set by user, try to locate tool using the code snippet
39073     for ac_prog in nm
39074 do
39075   # Extract the first word of "$ac_prog", so it can be a program name with args.
39076 set dummy $ac_prog; ac_word=$2
39077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39078 $as_echo_n "checking for $ac_word... " >&6; }
39079 if ${ac_cv_path_NM+:} false; then :
39080   $as_echo_n "(cached) " >&6
39081 else
39082   case $NM in
39083   [\\/]* | ?:[\\/]*)
39084   ac_cv_path_NM="$NM" # Let the user override the test with a path.
39085   ;;
39086   *)
39087   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39088 for as_dir in $PATH
39089 do
39090   IFS=$as_save_IFS
39091   test -z "$as_dir" && as_dir=.
39092     for ac_exec_ext in '' $ac_executable_extensions; do
39093   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39094     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39095     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39096     break 2
39097   fi
39098 done
39099   done
39100 IFS=$as_save_IFS
39101 
39102   ;;
39103 esac
39104 fi
39105 NM=$ac_cv_path_NM
39106 if test -n "$NM"; then
39107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39108 $as_echo "$NM" >&6; }
39109 else
39110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39111 $as_echo "no" >&6; }
39112 fi
39113 
39114 
39115   test -n "$NM" && break
39116 done
39117 
39118   else
39119     # The variable is set, but is it from the command line or the environment?
39120 
39121     # Try to remove the string !NM! from our list.
39122     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39123     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39124       # If it failed, the variable was not from the command line. Ignore it,
39125       # but warn the user (except for BASH, which is always set by the calling BASH).
39126       if test "xNM" != xBASH; then
39127         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39128 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39129       fi
39130       # Try to locate tool using the code snippet
39131       for ac_prog in nm
39132 do
39133   # Extract the first word of "$ac_prog", so it can be a program name with args.
39134 set dummy $ac_prog; ac_word=$2
39135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39136 $as_echo_n "checking for $ac_word... " >&6; }
39137 if ${ac_cv_path_NM+:} false; then :
39138   $as_echo_n "(cached) " >&6
39139 else
39140   case $NM in
39141   [\\/]* | ?:[\\/]*)
39142   ac_cv_path_NM="$NM" # Let the user override the test with a path.
39143   ;;
39144   *)
39145   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39146 for as_dir in $PATH
39147 do
39148   IFS=$as_save_IFS
39149   test -z "$as_dir" && as_dir=.
39150     for ac_exec_ext in '' $ac_executable_extensions; do
39151   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39152     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39153     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39154     break 2
39155   fi
39156 done
39157   done
39158 IFS=$as_save_IFS
39159 
39160   ;;
39161 esac
39162 fi
39163 NM=$ac_cv_path_NM
39164 if test -n "$NM"; then
39165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39166 $as_echo "$NM" >&6; }
39167 else
39168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39169 $as_echo "no" >&6; }
39170 fi
39171 
39172 
39173   test -n "$NM" && break
39174 done
39175 
39176     else
39177       # If it succeeded, then it was overridden by the user. We will use it
39178       # for the tool.
39179 
39180       # First remove it from the list of overridden variables, so we can test
39181       # for unknown variables in the end.
39182       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39183 
39184       # Check if we try to supply an empty value
39185       if test "x$NM" = x; then
39186         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39187 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39188         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39189 $as_echo_n "checking for NM... " >&6; }
39190         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39191 $as_echo "disabled" >&6; }
39192       else
39193         # Check if the provided tool contains a complete path.
39194         tool_specified="$NM"
39195         tool_basename="${tool_specified##*/}"
39196         if test "x$tool_basename" = "x$tool_specified"; then
39197           # A command without a complete path is provided, search $PATH.
39198           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39199 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39200           # Extract the first word of "$tool_basename", so it can be a program name with args.
39201 set dummy $tool_basename; ac_word=$2
39202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39203 $as_echo_n "checking for $ac_word... " >&6; }
39204 if ${ac_cv_path_NM+:} false; then :
39205   $as_echo_n "(cached) " >&6
39206 else
39207   case $NM in
39208   [\\/]* | ?:[\\/]*)
39209   ac_cv_path_NM="$NM" # Let the user override the test with a path.
39210   ;;
39211   *)
39212   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39213 for as_dir in $PATH
39214 do
39215   IFS=$as_save_IFS
39216   test -z "$as_dir" && as_dir=.
39217     for ac_exec_ext in '' $ac_executable_extensions; do
39218   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39219     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39220     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39221     break 2
39222   fi
39223 done
39224   done
39225 IFS=$as_save_IFS
39226 
39227   ;;
39228 esac
39229 fi
39230 NM=$ac_cv_path_NM
39231 if test -n "$NM"; then
39232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39233 $as_echo "$NM" >&6; }
39234 else
39235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39236 $as_echo "no" >&6; }
39237 fi
39238 
39239 
39240           if test "x$NM" = x; then
39241             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39242           fi
39243         else
39244           # Otherwise we believe it is a complete path. Use it as it is.
39245           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39246 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39247           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39248 $as_echo_n "checking for NM... " >&6; }
39249           if test ! -x "$tool_specified"; then
39250             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39251 $as_echo "not found" >&6; }
39252             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39253           fi
39254           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39255 $as_echo "$tool_specified" >&6; }
39256         fi
39257       fi
39258     fi
39259 
39260   fi
39261 
39262 
39263 
39264   # Only process if variable expands to non-empty
39265 
39266   if test "x$NM" != x; then
39267     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39268 
39269   # First separate the path from the arguments. This will split at the first
39270   # space.
39271   complete="$NM"
39272   path="${complete%% *}"
39273   tmp="$complete EOL"
39274   arguments="${tmp#* }"
39275 
39276   # Input might be given as Windows format, start by converting to
39277   # unix format.
39278   new_path=`$CYGPATH -u "$path"`
39279 
39280   # Now try to locate executable using which
39281   new_path=`$WHICH "$new_path" 2> /dev/null`
39282   # bat and cmd files are not always considered executable in cygwin causing which
39283   # to not find them
39284   if test "x$new_path" = x \
39285       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39286       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39287     new_path=`$CYGPATH -u "$path"`
39288   fi
39289   if test "x$new_path" = x; then
39290     # Oops. Which didn't find the executable.
39291     # The splitting of arguments from the executable at a space might have been incorrect,
39292     # since paths with space are more likely in Windows. Give it another try with the whole
39293     # argument.
39294     path="$complete"
39295     arguments="EOL"
39296     new_path=`$CYGPATH -u "$path"`
39297     new_path=`$WHICH "$new_path" 2> /dev/null`
39298     # bat and cmd files are not always considered executable in cygwin causing which
39299     # to not find them
39300     if test "x$new_path" = x \
39301         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39302         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39303       new_path=`$CYGPATH -u "$path"`
39304     fi
39305     if test "x$new_path" = x; then
39306       # It's still not found. Now this is an unrecoverable error.
39307       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39308 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39309       has_space=`$ECHO "$complete" | $GREP " "`
39310       if test "x$has_space" != x; then
39311         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39312 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39313       fi
39314       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39315     fi
39316   fi
39317 
39318   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39319   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39320   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39321   # "foo.exe" is OK but "foo" is an error.
39322   #
39323   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39324   # It is also a way to make sure we got the proper file name for the real test later on.
39325   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39326   if test "x$test_shortpath" = x; then
39327     # Short path failed, file does not exist as specified.
39328     # Try adding .exe or .cmd
39329     if test -f "${new_path}.exe"; then
39330       input_to_shortpath="${new_path}.exe"
39331     elif test -f "${new_path}.cmd"; then
39332       input_to_shortpath="${new_path}.cmd"
39333     else
39334       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39335 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39336       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39337 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39338       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39339     fi
39340   else
39341     input_to_shortpath="$new_path"
39342   fi
39343 
39344   # Call helper function which possibly converts this using DOS-style short mode.
39345   # If so, the updated path is stored in $new_path.
39346   new_path="$input_to_shortpath"
39347 
39348   input_path="$input_to_shortpath"
39349   # Check if we need to convert this using DOS-style short mode. If the path
39350   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39351   # take no chances and rewrite it.
39352   # Note: m4 eats our [], so we need to use [ and ] instead.
39353   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39354   if test "x$has_forbidden_chars" != x; then
39355     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39356     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39357     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39358     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39359       # Going to short mode and back again did indeed matter. Since short mode is
39360       # case insensitive, let's make it lowercase to improve readability.
39361       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39362       # Now convert it back to Unix-style (cygpath)
39363       input_path=`$CYGPATH -u "$shortmode_path"`
39364       new_path="$input_path"
39365     fi
39366   fi
39367 
39368   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39369   if test "x$test_cygdrive_prefix" = x; then
39370     # As a simple fix, exclude /usr/bin since it's not a real path.
39371     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39372       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39373       # a path prefixed by /cygdrive for fixpath to work.
39374       new_path="$CYGWIN_ROOT_PATH$input_path"
39375     fi
39376   fi
39377 
39378   # remove trailing .exe if any
39379   new_path="${new_path/%.exe/}"
39380 
39381     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39382 
39383   # First separate the path from the arguments. This will split at the first
39384   # space.
39385   complete="$NM"
39386   path="${complete%% *}"
39387   tmp="$complete EOL"
39388   arguments="${tmp#* }"
39389 
39390   # Input might be given as Windows format, start by converting to
39391   # unix format.
39392   new_path="$path"
39393 
39394   windows_path="$new_path"
39395   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39396     unix_path=`$CYGPATH -u "$windows_path"`
39397     new_path="$unix_path"
39398   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39399     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39400     new_path="$unix_path"
39401   fi
39402 
39403 
39404   # Now try to locate executable using which
39405   new_path=`$WHICH "$new_path" 2> /dev/null`
39406 
39407   if test "x$new_path" = x; then
39408     # Oops. Which didn't find the executable.
39409     # The splitting of arguments from the executable at a space might have been incorrect,
39410     # since paths with space are more likely in Windows. Give it another try with the whole
39411     # argument.
39412     path="$complete"
39413     arguments="EOL"
39414     new_path="$path"
39415 
39416   windows_path="$new_path"
39417   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39418     unix_path=`$CYGPATH -u "$windows_path"`
39419     new_path="$unix_path"
39420   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39421     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39422     new_path="$unix_path"
39423   fi
39424 
39425 
39426     new_path=`$WHICH "$new_path" 2> /dev/null`
39427     # bat and cmd files are not always considered executable in MSYS causing which
39428     # to not find them
39429     if test "x$new_path" = x \
39430         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39431         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39432       new_path="$path"
39433 
39434   windows_path="$new_path"
39435   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39436     unix_path=`$CYGPATH -u "$windows_path"`
39437     new_path="$unix_path"
39438   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39439     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39440     new_path="$unix_path"
39441   fi
39442 
39443     fi
39444 
39445     if test "x$new_path" = x; then
39446       # It's still not found. Now this is an unrecoverable error.
39447       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39448 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39449       has_space=`$ECHO "$complete" | $GREP " "`
39450       if test "x$has_space" != x; then
39451         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39452 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39453       fi
39454       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39455     fi
39456   fi
39457 
39458   # Now new_path has a complete unix path to the binary
39459   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39460     # Keep paths in /bin as-is, but remove trailing .exe if any
39461     new_path="${new_path/%.exe/}"
39462     # Do not save /bin paths to all_fixpath_prefixes!
39463   else
39464     # Not in mixed or Windows style, start by that.
39465     new_path=`cmd //c echo $new_path`
39466 
39467   input_path="$new_path"
39468   # Check if we need to convert this using DOS-style short mode. If the path
39469   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39470   # take no chances and rewrite it.
39471   # Note: m4 eats our [], so we need to use [ and ] instead.
39472   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39473   if test "x$has_forbidden_chars" != x; then
39474     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39475     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39476   fi
39477 
39478     # Output is in $new_path
39479 
39480   windows_path="$new_path"
39481   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39482     unix_path=`$CYGPATH -u "$windows_path"`
39483     new_path="$unix_path"
39484   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39485     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39486     new_path="$unix_path"
39487   fi
39488 
39489     # remove trailing .exe if any
39490     new_path="${new_path/%.exe/}"
39491 
39492     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39493     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39494   fi
39495 
39496     else
39497       # We're on a unix platform. Hooray! :)
39498       # First separate the path from the arguments. This will split at the first
39499       # space.
39500       complete="$NM"
39501       path="${complete%% *}"
39502       tmp="$complete EOL"
39503       arguments="${tmp#* }"
39504 
39505       # Cannot rely on the command "which" here since it doesn't always work.
39506       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39507       if test -z "$is_absolute_path"; then
39508         # Path to executable is not absolute. Find it.
39509         IFS_save="$IFS"
39510         IFS=:
39511         for p in $PATH; do
39512           if test -f "$p/$path" && test -x "$p/$path"; then
39513             new_path="$p/$path"
39514             break
39515           fi
39516         done
39517         IFS="$IFS_save"
39518       else
39519         # This is an absolute path, we can use it without further modifications.
39520         new_path="$path"
39521       fi
39522 
39523       if test "x$new_path" = x; then
39524         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39525 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39526         has_space=`$ECHO "$complete" | $GREP " "`
39527         if test "x$has_space" != x; then
39528           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39529 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39530         fi
39531         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39532       fi
39533     fi
39534 
39535     # Now join together the path and the arguments once again
39536     if test "x$arguments" != xEOL; then
39537       new_complete="$new_path ${arguments% *}"
39538     else
39539       new_complete="$new_path"
39540     fi
39541 
39542     if test "x$complete" != "x$new_complete"; then
39543       NM="$new_complete"
39544       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
39545 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
39546     fi
39547   fi
39548 
39549 
39550 
39551   # Publish this variable in the help.
39552 
39553 
39554   if [ -z "${GNM+x}" ]; then
39555     # The variable is not set by user, try to locate tool using the code snippet
39556     for ac_prog in gnm
39557 do
39558   # Extract the first word of "$ac_prog", so it can be a program name with args.
39559 set dummy $ac_prog; ac_word=$2
39560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39561 $as_echo_n "checking for $ac_word... " >&6; }
39562 if ${ac_cv_path_GNM+:} false; then :
39563   $as_echo_n "(cached) " >&6
39564 else
39565   case $GNM in
39566   [\\/]* | ?:[\\/]*)
39567   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39568   ;;
39569   *)
39570   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39571 for as_dir in $PATH
39572 do
39573   IFS=$as_save_IFS
39574   test -z "$as_dir" && as_dir=.
39575     for ac_exec_ext in '' $ac_executable_extensions; do
39576   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39577     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39578     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39579     break 2
39580   fi
39581 done
39582   done
39583 IFS=$as_save_IFS
39584 
39585   ;;
39586 esac
39587 fi
39588 GNM=$ac_cv_path_GNM
39589 if test -n "$GNM"; then
39590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39591 $as_echo "$GNM" >&6; }
39592 else
39593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39594 $as_echo "no" >&6; }
39595 fi
39596 
39597 
39598   test -n "$GNM" && break
39599 done
39600 
39601   else
39602     # The variable is set, but is it from the command line or the environment?
39603 
39604     # Try to remove the string !GNM! from our list.
39605     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39606     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39607       # If it failed, the variable was not from the command line. Ignore it,
39608       # but warn the user (except for BASH, which is always set by the calling BASH).
39609       if test "xGNM" != xBASH; then
39610         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39611 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39612       fi
39613       # Try to locate tool using the code snippet
39614       for ac_prog in gnm
39615 do
39616   # Extract the first word of "$ac_prog", so it can be a program name with args.
39617 set dummy $ac_prog; ac_word=$2
39618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39619 $as_echo_n "checking for $ac_word... " >&6; }
39620 if ${ac_cv_path_GNM+:} false; then :
39621   $as_echo_n "(cached) " >&6
39622 else
39623   case $GNM in
39624   [\\/]* | ?:[\\/]*)
39625   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39626   ;;
39627   *)
39628   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39629 for as_dir in $PATH
39630 do
39631   IFS=$as_save_IFS
39632   test -z "$as_dir" && as_dir=.
39633     for ac_exec_ext in '' $ac_executable_extensions; do
39634   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39635     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39636     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39637     break 2
39638   fi
39639 done
39640   done
39641 IFS=$as_save_IFS
39642 
39643   ;;
39644 esac
39645 fi
39646 GNM=$ac_cv_path_GNM
39647 if test -n "$GNM"; then
39648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39649 $as_echo "$GNM" >&6; }
39650 else
39651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39652 $as_echo "no" >&6; }
39653 fi
39654 
39655 
39656   test -n "$GNM" && break
39657 done
39658 
39659     else
39660       # If it succeeded, then it was overridden by the user. We will use it
39661       # for the tool.
39662 
39663       # First remove it from the list of overridden variables, so we can test
39664       # for unknown variables in the end.
39665       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39666 
39667       # Check if we try to supply an empty value
39668       if test "x$GNM" = x; then
39669         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39670 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39671         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39672 $as_echo_n "checking for GNM... " >&6; }
39673         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39674 $as_echo "disabled" >&6; }
39675       else
39676         # Check if the provided tool contains a complete path.
39677         tool_specified="$GNM"
39678         tool_basename="${tool_specified##*/}"
39679         if test "x$tool_basename" = "x$tool_specified"; then
39680           # A command without a complete path is provided, search $PATH.
39681           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39682 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39683           # Extract the first word of "$tool_basename", so it can be a program name with args.
39684 set dummy $tool_basename; ac_word=$2
39685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39686 $as_echo_n "checking for $ac_word... " >&6; }
39687 if ${ac_cv_path_GNM+:} false; then :
39688   $as_echo_n "(cached) " >&6
39689 else
39690   case $GNM in
39691   [\\/]* | ?:[\\/]*)
39692   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39693   ;;
39694   *)
39695   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39696 for as_dir in $PATH
39697 do
39698   IFS=$as_save_IFS
39699   test -z "$as_dir" && as_dir=.
39700     for ac_exec_ext in '' $ac_executable_extensions; do
39701   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39702     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39703     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39704     break 2
39705   fi
39706 done
39707   done
39708 IFS=$as_save_IFS
39709 
39710   ;;
39711 esac
39712 fi
39713 GNM=$ac_cv_path_GNM
39714 if test -n "$GNM"; then
39715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39716 $as_echo "$GNM" >&6; }
39717 else
39718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39719 $as_echo "no" >&6; }
39720 fi
39721 
39722 
39723           if test "x$GNM" = x; then
39724             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39725           fi
39726         else
39727           # Otherwise we believe it is a complete path. Use it as it is.
39728           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39729 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39730           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39731 $as_echo_n "checking for GNM... " >&6; }
39732           if test ! -x "$tool_specified"; then
39733             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39734 $as_echo "not found" >&6; }
39735             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39736           fi
39737           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39738 $as_echo "$tool_specified" >&6; }
39739         fi
39740       fi
39741     fi
39742 
39743   fi
39744 
39745 
39746 
39747   # Only process if variable expands to non-empty
39748 
39749   if test "x$GNM" != x; then
39750     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39751 
39752   # First separate the path from the arguments. This will split at the first
39753   # space.
39754   complete="$GNM"
39755   path="${complete%% *}"
39756   tmp="$complete EOL"
39757   arguments="${tmp#* }"
39758 
39759   # Input might be given as Windows format, start by converting to
39760   # unix format.
39761   new_path=`$CYGPATH -u "$path"`
39762 
39763   # Now try to locate executable using which
39764   new_path=`$WHICH "$new_path" 2> /dev/null`
39765   # bat and cmd files are not always considered executable in cygwin causing which
39766   # to not find them
39767   if test "x$new_path" = x \
39768       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39769       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39770     new_path=`$CYGPATH -u "$path"`
39771   fi
39772   if test "x$new_path" = x; then
39773     # Oops. Which didn't find the executable.
39774     # The splitting of arguments from the executable at a space might have been incorrect,
39775     # since paths with space are more likely in Windows. Give it another try with the whole
39776     # argument.
39777     path="$complete"
39778     arguments="EOL"
39779     new_path=`$CYGPATH -u "$path"`
39780     new_path=`$WHICH "$new_path" 2> /dev/null`
39781     # bat and cmd files are not always considered executable in cygwin causing which
39782     # to not find them
39783     if test "x$new_path" = x \
39784         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39785         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39786       new_path=`$CYGPATH -u "$path"`
39787     fi
39788     if test "x$new_path" = x; then
39789       # It's still not found. Now this is an unrecoverable error.
39790       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39791 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39792       has_space=`$ECHO "$complete" | $GREP " "`
39793       if test "x$has_space" != x; then
39794         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39795 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39796       fi
39797       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39798     fi
39799   fi
39800 
39801   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39802   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39803   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39804   # "foo.exe" is OK but "foo" is an error.
39805   #
39806   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39807   # It is also a way to make sure we got the proper file name for the real test later on.
39808   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39809   if test "x$test_shortpath" = x; then
39810     # Short path failed, file does not exist as specified.
39811     # Try adding .exe or .cmd
39812     if test -f "${new_path}.exe"; then
39813       input_to_shortpath="${new_path}.exe"
39814     elif test -f "${new_path}.cmd"; then
39815       input_to_shortpath="${new_path}.cmd"
39816     else
39817       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39818 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39819       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39820 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39821       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39822     fi
39823   else
39824     input_to_shortpath="$new_path"
39825   fi
39826 
39827   # Call helper function which possibly converts this using DOS-style short mode.
39828   # If so, the updated path is stored in $new_path.
39829   new_path="$input_to_shortpath"
39830 
39831   input_path="$input_to_shortpath"
39832   # Check if we need to convert this using DOS-style short mode. If the path
39833   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39834   # take no chances and rewrite it.
39835   # Note: m4 eats our [], so we need to use [ and ] instead.
39836   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39837   if test "x$has_forbidden_chars" != x; then
39838     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39839     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39840     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39841     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39842       # Going to short mode and back again did indeed matter. Since short mode is
39843       # case insensitive, let's make it lowercase to improve readability.
39844       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39845       # Now convert it back to Unix-style (cygpath)
39846       input_path=`$CYGPATH -u "$shortmode_path"`
39847       new_path="$input_path"
39848     fi
39849   fi
39850 
39851   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39852   if test "x$test_cygdrive_prefix" = x; then
39853     # As a simple fix, exclude /usr/bin since it's not a real path.
39854     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39855       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39856       # a path prefixed by /cygdrive for fixpath to work.
39857       new_path="$CYGWIN_ROOT_PATH$input_path"
39858     fi
39859   fi
39860 
39861   # remove trailing .exe if any
39862   new_path="${new_path/%.exe/}"
39863 
39864     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39865 
39866   # First separate the path from the arguments. This will split at the first
39867   # space.
39868   complete="$GNM"
39869   path="${complete%% *}"
39870   tmp="$complete EOL"
39871   arguments="${tmp#* }"
39872 
39873   # Input might be given as Windows format, start by converting to
39874   # unix format.
39875   new_path="$path"
39876 
39877   windows_path="$new_path"
39878   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39879     unix_path=`$CYGPATH -u "$windows_path"`
39880     new_path="$unix_path"
39881   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39882     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39883     new_path="$unix_path"
39884   fi
39885 
39886 
39887   # Now try to locate executable using which
39888   new_path=`$WHICH "$new_path" 2> /dev/null`
39889 
39890   if test "x$new_path" = x; then
39891     # Oops. Which didn't find the executable.
39892     # The splitting of arguments from the executable at a space might have been incorrect,
39893     # since paths with space are more likely in Windows. Give it another try with the whole
39894     # argument.
39895     path="$complete"
39896     arguments="EOL"
39897     new_path="$path"
39898 
39899   windows_path="$new_path"
39900   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39901     unix_path=`$CYGPATH -u "$windows_path"`
39902     new_path="$unix_path"
39903   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39904     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39905     new_path="$unix_path"
39906   fi
39907 
39908 
39909     new_path=`$WHICH "$new_path" 2> /dev/null`
39910     # bat and cmd files are not always considered executable in MSYS causing which
39911     # to not find them
39912     if test "x$new_path" = x \
39913         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39914         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39915       new_path="$path"
39916 
39917   windows_path="$new_path"
39918   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39919     unix_path=`$CYGPATH -u "$windows_path"`
39920     new_path="$unix_path"
39921   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39922     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39923     new_path="$unix_path"
39924   fi
39925 
39926     fi
39927 
39928     if test "x$new_path" = x; then
39929       # It's still not found. Now this is an unrecoverable error.
39930       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39931 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39932       has_space=`$ECHO "$complete" | $GREP " "`
39933       if test "x$has_space" != x; then
39934         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39935 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39936       fi
39937       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39938     fi
39939   fi
39940 
39941   # Now new_path has a complete unix path to the binary
39942   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39943     # Keep paths in /bin as-is, but remove trailing .exe if any
39944     new_path="${new_path/%.exe/}"
39945     # Do not save /bin paths to all_fixpath_prefixes!
39946   else
39947     # Not in mixed or Windows style, start by that.
39948     new_path=`cmd //c echo $new_path`
39949 
39950   input_path="$new_path"
39951   # Check if we need to convert this using DOS-style short mode. If the path
39952   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39953   # take no chances and rewrite it.
39954   # Note: m4 eats our [], so we need to use [ and ] instead.
39955   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39956   if test "x$has_forbidden_chars" != x; then
39957     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39958     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39959   fi
39960 
39961     # Output is in $new_path
39962 
39963   windows_path="$new_path"
39964   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39965     unix_path=`$CYGPATH -u "$windows_path"`
39966     new_path="$unix_path"
39967   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39968     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39969     new_path="$unix_path"
39970   fi
39971 
39972     # remove trailing .exe if any
39973     new_path="${new_path/%.exe/}"
39974 
39975     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39976     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39977   fi
39978 
39979     else
39980       # We're on a unix platform. Hooray! :)
39981       # First separate the path from the arguments. This will split at the first
39982       # space.
39983       complete="$GNM"
39984       path="${complete%% *}"
39985       tmp="$complete EOL"
39986       arguments="${tmp#* }"
39987 
39988       # Cannot rely on the command "which" here since it doesn't always work.
39989       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39990       if test -z "$is_absolute_path"; then
39991         # Path to executable is not absolute. Find it.
39992         IFS_save="$IFS"
39993         IFS=:
39994         for p in $PATH; do
39995           if test -f "$p/$path" && test -x "$p/$path"; then
39996             new_path="$p/$path"
39997             break
39998           fi
39999         done
40000         IFS="$IFS_save"
40001       else
40002         # This is an absolute path, we can use it without further modifications.
40003         new_path="$path"
40004       fi
40005 
40006       if test "x$new_path" = x; then
40007         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40008 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40009         has_space=`$ECHO "$complete" | $GREP " "`
40010         if test "x$has_space" != x; then
40011           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40012 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40013         fi
40014         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40015       fi
40016     fi
40017 
40018     # Now join together the path and the arguments once again
40019     if test "x$arguments" != xEOL; then
40020       new_complete="$new_path ${arguments% *}"
40021     else
40022       new_complete="$new_path"
40023     fi
40024 
40025     if test "x$complete" != "x$new_complete"; then
40026       GNM="$new_complete"
40027       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40028 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40029     fi
40030   fi
40031 
40032   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40033     # FIXME: we should unify this with the solaris case above.
40034 
40035 
40036   # Publish this variable in the help.
40037 
40038 
40039   if [ -z "${STRIP+x}" ]; then
40040     # The variable is not set by user, try to locate tool using the code snippet
40041     if test -n "$ac_tool_prefix"; then
40042   for ac_prog in strip
40043   do
40044     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40045 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40047 $as_echo_n "checking for $ac_word... " >&6; }
40048 if ${ac_cv_prog_STRIP+:} false; then :
40049   $as_echo_n "(cached) " >&6
40050 else
40051   if test -n "$STRIP"; then
40052   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40053 else
40054 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40055 for as_dir in $PATH
40056 do
40057   IFS=$as_save_IFS
40058   test -z "$as_dir" && as_dir=.
40059     for ac_exec_ext in '' $ac_executable_extensions; do
40060   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40061     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40062     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40063     break 2
40064   fi
40065 done
40066   done
40067 IFS=$as_save_IFS
40068 
40069 fi
40070 fi
40071 STRIP=$ac_cv_prog_STRIP
40072 if test -n "$STRIP"; then
40073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40074 $as_echo "$STRIP" >&6; }
40075 else
40076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40077 $as_echo "no" >&6; }
40078 fi
40079 
40080 
40081     test -n "$STRIP" && break
40082   done
40083 fi
40084 if test -z "$STRIP"; then
40085   ac_ct_STRIP=$STRIP
40086   for ac_prog in strip
40087 do
40088   # Extract the first word of "$ac_prog", so it can be a program name with args.
40089 set dummy $ac_prog; ac_word=$2
40090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40091 $as_echo_n "checking for $ac_word... " >&6; }
40092 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40093   $as_echo_n "(cached) " >&6
40094 else
40095   if test -n "$ac_ct_STRIP"; then
40096   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40097 else
40098 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40099 for as_dir in $PATH
40100 do
40101   IFS=$as_save_IFS
40102   test -z "$as_dir" && as_dir=.
40103     for ac_exec_ext in '' $ac_executable_extensions; do
40104   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40105     ac_cv_prog_ac_ct_STRIP="$ac_prog"
40106     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40107     break 2
40108   fi
40109 done
40110   done
40111 IFS=$as_save_IFS
40112 
40113 fi
40114 fi
40115 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40116 if test -n "$ac_ct_STRIP"; then
40117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40118 $as_echo "$ac_ct_STRIP" >&6; }
40119 else
40120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40121 $as_echo "no" >&6; }
40122 fi
40123 
40124 
40125   test -n "$ac_ct_STRIP" && break
40126 done
40127 
40128   if test "x$ac_ct_STRIP" = x; then
40129     STRIP=""
40130   else
40131     case $cross_compiling:$ac_tool_warned in
40132 yes:)
40133 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40134 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40135 ac_tool_warned=yes ;;
40136 esac
40137     STRIP=$ac_ct_STRIP
40138   fi
40139 fi
40140 
40141   else
40142     # The variable is set, but is it from the command line or the environment?
40143 
40144     # Try to remove the string !STRIP! from our list.
40145     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40146     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40147       # If it failed, the variable was not from the command line. Ignore it,
40148       # but warn the user (except for BASH, which is always set by the calling BASH).
40149       if test "xSTRIP" != xBASH; then
40150         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40151 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40152       fi
40153       # Try to locate tool using the code snippet
40154       if test -n "$ac_tool_prefix"; then
40155   for ac_prog in strip
40156   do
40157     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40158 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40160 $as_echo_n "checking for $ac_word... " >&6; }
40161 if ${ac_cv_prog_STRIP+:} false; then :
40162   $as_echo_n "(cached) " >&6
40163 else
40164   if test -n "$STRIP"; then
40165   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40166 else
40167 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40168 for as_dir in $PATH
40169 do
40170   IFS=$as_save_IFS
40171   test -z "$as_dir" && as_dir=.
40172     for ac_exec_ext in '' $ac_executable_extensions; do
40173   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40174     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40175     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40176     break 2
40177   fi
40178 done
40179   done
40180 IFS=$as_save_IFS
40181 
40182 fi
40183 fi
40184 STRIP=$ac_cv_prog_STRIP
40185 if test -n "$STRIP"; then
40186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40187 $as_echo "$STRIP" >&6; }
40188 else
40189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40190 $as_echo "no" >&6; }
40191 fi
40192 
40193 
40194     test -n "$STRIP" && break
40195   done
40196 fi
40197 if test -z "$STRIP"; then
40198   ac_ct_STRIP=$STRIP
40199   for ac_prog in strip
40200 do
40201   # Extract the first word of "$ac_prog", so it can be a program name with args.
40202 set dummy $ac_prog; ac_word=$2
40203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40204 $as_echo_n "checking for $ac_word... " >&6; }
40205 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40206   $as_echo_n "(cached) " >&6
40207 else
40208   if test -n "$ac_ct_STRIP"; then
40209   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40210 else
40211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40212 for as_dir in $PATH
40213 do
40214   IFS=$as_save_IFS
40215   test -z "$as_dir" && as_dir=.
40216     for ac_exec_ext in '' $ac_executable_extensions; do
40217   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40218     ac_cv_prog_ac_ct_STRIP="$ac_prog"
40219     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40220     break 2
40221   fi
40222 done
40223   done
40224 IFS=$as_save_IFS
40225 
40226 fi
40227 fi
40228 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40229 if test -n "$ac_ct_STRIP"; then
40230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40231 $as_echo "$ac_ct_STRIP" >&6; }
40232 else
40233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40234 $as_echo "no" >&6; }
40235 fi
40236 
40237 
40238   test -n "$ac_ct_STRIP" && break
40239 done
40240 
40241   if test "x$ac_ct_STRIP" = x; then
40242     STRIP=""
40243   else
40244     case $cross_compiling:$ac_tool_warned in
40245 yes:)
40246 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40247 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40248 ac_tool_warned=yes ;;
40249 esac
40250     STRIP=$ac_ct_STRIP
40251   fi
40252 fi
40253 
40254     else
40255       # If it succeeded, then it was overridden by the user. We will use it
40256       # for the tool.
40257 
40258       # First remove it from the list of overridden variables, so we can test
40259       # for unknown variables in the end.
40260       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40261 
40262       # Check if we try to supply an empty value
40263       if test "x$STRIP" = x; then
40264         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40265 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40266         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40267 $as_echo_n "checking for STRIP... " >&6; }
40268         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40269 $as_echo "disabled" >&6; }
40270       else
40271         # Check if the provided tool contains a complete path.
40272         tool_specified="$STRIP"
40273         tool_basename="${tool_specified##*/}"
40274         if test "x$tool_basename" = "x$tool_specified"; then
40275           # A command without a complete path is provided, search $PATH.
40276           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40277 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40278           # Extract the first word of "$tool_basename", so it can be a program name with args.
40279 set dummy $tool_basename; ac_word=$2
40280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40281 $as_echo_n "checking for $ac_word... " >&6; }
40282 if ${ac_cv_path_STRIP+:} false; then :
40283   $as_echo_n "(cached) " >&6
40284 else
40285   case $STRIP in
40286   [\\/]* | ?:[\\/]*)
40287   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40288   ;;
40289   *)
40290   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40291 for as_dir in $PATH
40292 do
40293   IFS=$as_save_IFS
40294   test -z "$as_dir" && as_dir=.
40295     for ac_exec_ext in '' $ac_executable_extensions; do
40296   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40297     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40298     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40299     break 2
40300   fi
40301 done
40302   done
40303 IFS=$as_save_IFS
40304 
40305   ;;
40306 esac
40307 fi
40308 STRIP=$ac_cv_path_STRIP
40309 if test -n "$STRIP"; then
40310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40311 $as_echo "$STRIP" >&6; }
40312 else
40313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40314 $as_echo "no" >&6; }
40315 fi
40316 
40317 
40318           if test "x$STRIP" = x; then
40319             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40320           fi
40321         else
40322           # Otherwise we believe it is a complete path. Use it as it is.
40323           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40324 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40325           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40326 $as_echo_n "checking for STRIP... " >&6; }
40327           if test ! -x "$tool_specified"; then
40328             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40329 $as_echo "not found" >&6; }
40330             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40331           fi
40332           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40333 $as_echo "$tool_specified" >&6; }
40334         fi
40335       fi
40336     fi
40337 
40338   fi
40339 
40340 
40341 
40342   # Only process if variable expands to non-empty
40343 
40344   if test "x$STRIP" != x; then
40345     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40346 
40347   # First separate the path from the arguments. This will split at the first
40348   # space.
40349   complete="$STRIP"
40350   path="${complete%% *}"
40351   tmp="$complete EOL"
40352   arguments="${tmp#* }"
40353 
40354   # Input might be given as Windows format, start by converting to
40355   # unix format.
40356   new_path=`$CYGPATH -u "$path"`
40357 
40358   # Now try to locate executable using which
40359   new_path=`$WHICH "$new_path" 2> /dev/null`
40360   # bat and cmd files are not always considered executable in cygwin causing which
40361   # to not find them
40362   if test "x$new_path" = x \
40363       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40364       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40365     new_path=`$CYGPATH -u "$path"`
40366   fi
40367   if test "x$new_path" = x; then
40368     # Oops. Which didn't find the executable.
40369     # The splitting of arguments from the executable at a space might have been incorrect,
40370     # since paths with space are more likely in Windows. Give it another try with the whole
40371     # argument.
40372     path="$complete"
40373     arguments="EOL"
40374     new_path=`$CYGPATH -u "$path"`
40375     new_path=`$WHICH "$new_path" 2> /dev/null`
40376     # bat and cmd files are not always considered executable in cygwin causing which
40377     # to not find them
40378     if test "x$new_path" = x \
40379         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40380         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40381       new_path=`$CYGPATH -u "$path"`
40382     fi
40383     if test "x$new_path" = x; then
40384       # It's still not found. Now this is an unrecoverable error.
40385       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40386 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40387       has_space=`$ECHO "$complete" | $GREP " "`
40388       if test "x$has_space" != x; then
40389         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40390 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40391       fi
40392       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40393     fi
40394   fi
40395 
40396   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40397   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40398   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40399   # "foo.exe" is OK but "foo" is an error.
40400   #
40401   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40402   # It is also a way to make sure we got the proper file name for the real test later on.
40403   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40404   if test "x$test_shortpath" = x; then
40405     # Short path failed, file does not exist as specified.
40406     # Try adding .exe or .cmd
40407     if test -f "${new_path}.exe"; then
40408       input_to_shortpath="${new_path}.exe"
40409     elif test -f "${new_path}.cmd"; then
40410       input_to_shortpath="${new_path}.cmd"
40411     else
40412       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40413 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40414       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40415 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40416       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40417     fi
40418   else
40419     input_to_shortpath="$new_path"
40420   fi
40421 
40422   # Call helper function which possibly converts this using DOS-style short mode.
40423   # If so, the updated path is stored in $new_path.
40424   new_path="$input_to_shortpath"
40425 
40426   input_path="$input_to_shortpath"
40427   # Check if we need to convert this using DOS-style short mode. If the path
40428   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40429   # take no chances and rewrite it.
40430   # Note: m4 eats our [], so we need to use [ and ] instead.
40431   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40432   if test "x$has_forbidden_chars" != x; then
40433     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40434     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40435     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40436     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40437       # Going to short mode and back again did indeed matter. Since short mode is
40438       # case insensitive, let's make it lowercase to improve readability.
40439       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40440       # Now convert it back to Unix-style (cygpath)
40441       input_path=`$CYGPATH -u "$shortmode_path"`
40442       new_path="$input_path"
40443     fi
40444   fi
40445 
40446   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40447   if test "x$test_cygdrive_prefix" = x; then
40448     # As a simple fix, exclude /usr/bin since it's not a real path.
40449     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40450       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40451       # a path prefixed by /cygdrive for fixpath to work.
40452       new_path="$CYGWIN_ROOT_PATH$input_path"
40453     fi
40454   fi
40455 
40456   # remove trailing .exe if any
40457   new_path="${new_path/%.exe/}"
40458 
40459     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40460 
40461   # First separate the path from the arguments. This will split at the first
40462   # space.
40463   complete="$STRIP"
40464   path="${complete%% *}"
40465   tmp="$complete EOL"
40466   arguments="${tmp#* }"
40467 
40468   # Input might be given as Windows format, start by converting to
40469   # unix format.
40470   new_path="$path"
40471 
40472   windows_path="$new_path"
40473   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40474     unix_path=`$CYGPATH -u "$windows_path"`
40475     new_path="$unix_path"
40476   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40477     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40478     new_path="$unix_path"
40479   fi
40480 
40481 
40482   # Now try to locate executable using which
40483   new_path=`$WHICH "$new_path" 2> /dev/null`
40484 
40485   if test "x$new_path" = x; then
40486     # Oops. Which didn't find the executable.
40487     # The splitting of arguments from the executable at a space might have been incorrect,
40488     # since paths with space are more likely in Windows. Give it another try with the whole
40489     # argument.
40490     path="$complete"
40491     arguments="EOL"
40492     new_path="$path"
40493 
40494   windows_path="$new_path"
40495   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40496     unix_path=`$CYGPATH -u "$windows_path"`
40497     new_path="$unix_path"
40498   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40499     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40500     new_path="$unix_path"
40501   fi
40502 
40503 
40504     new_path=`$WHICH "$new_path" 2> /dev/null`
40505     # bat and cmd files are not always considered executable in MSYS causing which
40506     # to not find them
40507     if test "x$new_path" = x \
40508         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40509         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40510       new_path="$path"
40511 
40512   windows_path="$new_path"
40513   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40514     unix_path=`$CYGPATH -u "$windows_path"`
40515     new_path="$unix_path"
40516   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40517     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40518     new_path="$unix_path"
40519   fi
40520 
40521     fi
40522 
40523     if test "x$new_path" = x; then
40524       # It's still not found. Now this is an unrecoverable error.
40525       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40526 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40527       has_space=`$ECHO "$complete" | $GREP " "`
40528       if test "x$has_space" != x; then
40529         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40530 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40531       fi
40532       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40533     fi
40534   fi
40535 
40536   # Now new_path has a complete unix path to the binary
40537   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40538     # Keep paths in /bin as-is, but remove trailing .exe if any
40539     new_path="${new_path/%.exe/}"
40540     # Do not save /bin paths to all_fixpath_prefixes!
40541   else
40542     # Not in mixed or Windows style, start by that.
40543     new_path=`cmd //c echo $new_path`
40544 
40545   input_path="$new_path"
40546   # Check if we need to convert this using DOS-style short mode. If the path
40547   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40548   # take no chances and rewrite it.
40549   # Note: m4 eats our [], so we need to use [ and ] instead.
40550   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40551   if test "x$has_forbidden_chars" != x; then
40552     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40553     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40554   fi
40555 
40556     # Output is in $new_path
40557 
40558   windows_path="$new_path"
40559   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40560     unix_path=`$CYGPATH -u "$windows_path"`
40561     new_path="$unix_path"
40562   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40563     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40564     new_path="$unix_path"
40565   fi
40566 
40567     # remove trailing .exe if any
40568     new_path="${new_path/%.exe/}"
40569 
40570     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40571     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40572   fi
40573 
40574     else
40575       # We're on a unix platform. Hooray! :)
40576       # First separate the path from the arguments. This will split at the first
40577       # space.
40578       complete="$STRIP"
40579       path="${complete%% *}"
40580       tmp="$complete EOL"
40581       arguments="${tmp#* }"
40582 
40583       # Cannot rely on the command "which" here since it doesn't always work.
40584       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40585       if test -z "$is_absolute_path"; then
40586         # Path to executable is not absolute. Find it.
40587         IFS_save="$IFS"
40588         IFS=:
40589         for p in $PATH; do
40590           if test -f "$p/$path" && test -x "$p/$path"; then
40591             new_path="$p/$path"
40592             break
40593           fi
40594         done
40595         IFS="$IFS_save"
40596       else
40597         # This is an absolute path, we can use it without further modifications.
40598         new_path="$path"
40599       fi
40600 
40601       if test "x$new_path" = x; then
40602         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40603 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40604         has_space=`$ECHO "$complete" | $GREP " "`
40605         if test "x$has_space" != x; then
40606           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40607 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40608         fi
40609         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40610       fi
40611     fi
40612 
40613     # Now join together the path and the arguments once again
40614     if test "x$arguments" != xEOL; then
40615       new_complete="$new_path ${arguments% *}"
40616     else
40617       new_complete="$new_path"
40618     fi
40619 
40620     if test "x$complete" != "x$new_complete"; then
40621       STRIP="$new_complete"
40622       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40623 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40624     fi
40625   fi
40626 
40627     if test "x$TOOLCHAIN_TYPE" = xgcc; then
40628 
40629 
40630   # Publish this variable in the help.
40631 
40632 
40633   if [ -z "${NM+x}" ]; then
40634     # The variable is not set by user, try to locate tool using the code snippet
40635     if test -n "$ac_tool_prefix"; then
40636   for ac_prog in nm gcc-nm
40637   do
40638     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40639 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40641 $as_echo_n "checking for $ac_word... " >&6; }
40642 if ${ac_cv_prog_NM+:} false; then :
40643   $as_echo_n "(cached) " >&6
40644 else
40645   if test -n "$NM"; then
40646   ac_cv_prog_NM="$NM" # Let the user override the test.
40647 else
40648 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40649 for as_dir in $PATH
40650 do
40651   IFS=$as_save_IFS
40652   test -z "$as_dir" && as_dir=.
40653     for ac_exec_ext in '' $ac_executable_extensions; do
40654   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40655     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40656     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40657     break 2
40658   fi
40659 done
40660   done
40661 IFS=$as_save_IFS
40662 
40663 fi
40664 fi
40665 NM=$ac_cv_prog_NM
40666 if test -n "$NM"; then
40667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40668 $as_echo "$NM" >&6; }
40669 else
40670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40671 $as_echo "no" >&6; }
40672 fi
40673 
40674 
40675     test -n "$NM" && break
40676   done
40677 fi
40678 if test -z "$NM"; then
40679   ac_ct_NM=$NM
40680   for ac_prog in nm gcc-nm
40681 do
40682   # Extract the first word of "$ac_prog", so it can be a program name with args.
40683 set dummy $ac_prog; ac_word=$2
40684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40685 $as_echo_n "checking for $ac_word... " >&6; }
40686 if ${ac_cv_prog_ac_ct_NM+:} false; then :
40687   $as_echo_n "(cached) " >&6
40688 else
40689   if test -n "$ac_ct_NM"; then
40690   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40691 else
40692 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40693 for as_dir in $PATH
40694 do
40695   IFS=$as_save_IFS
40696   test -z "$as_dir" && as_dir=.
40697     for ac_exec_ext in '' $ac_executable_extensions; do
40698   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40699     ac_cv_prog_ac_ct_NM="$ac_prog"
40700     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40701     break 2
40702   fi
40703 done
40704   done
40705 IFS=$as_save_IFS
40706 
40707 fi
40708 fi
40709 ac_ct_NM=$ac_cv_prog_ac_ct_NM
40710 if test -n "$ac_ct_NM"; then
40711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40712 $as_echo "$ac_ct_NM" >&6; }
40713 else
40714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40715 $as_echo "no" >&6; }
40716 fi
40717 
40718 
40719   test -n "$ac_ct_NM" && break
40720 done
40721 
40722   if test "x$ac_ct_NM" = x; then
40723     NM=""
40724   else
40725     case $cross_compiling:$ac_tool_warned in
40726 yes:)
40727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40728 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40729 ac_tool_warned=yes ;;
40730 esac
40731     NM=$ac_ct_NM
40732   fi
40733 fi
40734 
40735   else
40736     # The variable is set, but is it from the command line or the environment?
40737 
40738     # Try to remove the string !NM! from our list.
40739     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40740     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40741       # If it failed, the variable was not from the command line. Ignore it,
40742       # but warn the user (except for BASH, which is always set by the calling BASH).
40743       if test "xNM" != xBASH; then
40744         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40745 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40746       fi
40747       # Try to locate tool using the code snippet
40748       if test -n "$ac_tool_prefix"; then
40749   for ac_prog in nm gcc-nm
40750   do
40751     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40752 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40754 $as_echo_n "checking for $ac_word... " >&6; }
40755 if ${ac_cv_prog_NM+:} false; then :
40756   $as_echo_n "(cached) " >&6
40757 else
40758   if test -n "$NM"; then
40759   ac_cv_prog_NM="$NM" # Let the user override the test.
40760 else
40761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40762 for as_dir in $PATH
40763 do
40764   IFS=$as_save_IFS
40765   test -z "$as_dir" && as_dir=.
40766     for ac_exec_ext in '' $ac_executable_extensions; do
40767   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40768     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40769     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40770     break 2
40771   fi
40772 done
40773   done
40774 IFS=$as_save_IFS
40775 
40776 fi
40777 fi
40778 NM=$ac_cv_prog_NM
40779 if test -n "$NM"; then
40780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40781 $as_echo "$NM" >&6; }
40782 else
40783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40784 $as_echo "no" >&6; }
40785 fi
40786 
40787 
40788     test -n "$NM" && break
40789   done
40790 fi
40791 if test -z "$NM"; then
40792   ac_ct_NM=$NM
40793   for ac_prog in nm gcc-nm
40794 do
40795   # Extract the first word of "$ac_prog", so it can be a program name with args.
40796 set dummy $ac_prog; ac_word=$2
40797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40798 $as_echo_n "checking for $ac_word... " >&6; }
40799 if ${ac_cv_prog_ac_ct_NM+:} false; then :
40800   $as_echo_n "(cached) " >&6
40801 else
40802   if test -n "$ac_ct_NM"; then
40803   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40804 else
40805 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40806 for as_dir in $PATH
40807 do
40808   IFS=$as_save_IFS
40809   test -z "$as_dir" && as_dir=.
40810     for ac_exec_ext in '' $ac_executable_extensions; do
40811   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40812     ac_cv_prog_ac_ct_NM="$ac_prog"
40813     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40814     break 2
40815   fi
40816 done
40817   done
40818 IFS=$as_save_IFS
40819 
40820 fi
40821 fi
40822 ac_ct_NM=$ac_cv_prog_ac_ct_NM
40823 if test -n "$ac_ct_NM"; then
40824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40825 $as_echo "$ac_ct_NM" >&6; }
40826 else
40827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40828 $as_echo "no" >&6; }
40829 fi
40830 
40831 
40832   test -n "$ac_ct_NM" && break
40833 done
40834 
40835   if test "x$ac_ct_NM" = x; then
40836     NM=""
40837   else
40838     case $cross_compiling:$ac_tool_warned in
40839 yes:)
40840 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40841 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40842 ac_tool_warned=yes ;;
40843 esac
40844     NM=$ac_ct_NM
40845   fi
40846 fi
40847 
40848     else
40849       # If it succeeded, then it was overridden by the user. We will use it
40850       # for the tool.
40851 
40852       # First remove it from the list of overridden variables, so we can test
40853       # for unknown variables in the end.
40854       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40855 
40856       # Check if we try to supply an empty value
40857       if test "x$NM" = x; then
40858         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40859 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40860         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40861 $as_echo_n "checking for NM... " >&6; }
40862         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40863 $as_echo "disabled" >&6; }
40864       else
40865         # Check if the provided tool contains a complete path.
40866         tool_specified="$NM"
40867         tool_basename="${tool_specified##*/}"
40868         if test "x$tool_basename" = "x$tool_specified"; then
40869           # A command without a complete path is provided, search $PATH.
40870           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40871 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40872           # Extract the first word of "$tool_basename", so it can be a program name with args.
40873 set dummy $tool_basename; ac_word=$2
40874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40875 $as_echo_n "checking for $ac_word... " >&6; }
40876 if ${ac_cv_path_NM+:} false; then :
40877   $as_echo_n "(cached) " >&6
40878 else
40879   case $NM in
40880   [\\/]* | ?:[\\/]*)
40881   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40882   ;;
40883   *)
40884   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40885 for as_dir in $PATH
40886 do
40887   IFS=$as_save_IFS
40888   test -z "$as_dir" && as_dir=.
40889     for ac_exec_ext in '' $ac_executable_extensions; do
40890   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40891     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40892     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40893     break 2
40894   fi
40895 done
40896   done
40897 IFS=$as_save_IFS
40898 
40899   ;;
40900 esac
40901 fi
40902 NM=$ac_cv_path_NM
40903 if test -n "$NM"; then
40904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40905 $as_echo "$NM" >&6; }
40906 else
40907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40908 $as_echo "no" >&6; }
40909 fi
40910 
40911 
40912           if test "x$NM" = x; then
40913             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40914           fi
40915         else
40916           # Otherwise we believe it is a complete path. Use it as it is.
40917           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40918 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40919           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40920 $as_echo_n "checking for NM... " >&6; }
40921           if test ! -x "$tool_specified"; then
40922             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40923 $as_echo "not found" >&6; }
40924             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40925           fi
40926           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40927 $as_echo "$tool_specified" >&6; }
40928         fi
40929       fi
40930     fi
40931 
40932   fi
40933 
40934 
40935     else
40936 
40937 
40938   # Publish this variable in the help.
40939 
40940 
40941   if [ -z "${NM+x}" ]; then
40942     # The variable is not set by user, try to locate tool using the code snippet
40943     if test -n "$ac_tool_prefix"; then
40944   for ac_prog in nm
40945   do
40946     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40947 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40949 $as_echo_n "checking for $ac_word... " >&6; }
40950 if ${ac_cv_prog_NM+:} false; then :
40951   $as_echo_n "(cached) " >&6
40952 else
40953   if test -n "$NM"; then
40954   ac_cv_prog_NM="$NM" # Let the user override the test.
40955 else
40956 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40957 for as_dir in $PATH
40958 do
40959   IFS=$as_save_IFS
40960   test -z "$as_dir" && as_dir=.
40961     for ac_exec_ext in '' $ac_executable_extensions; do
40962   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40963     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40964     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40965     break 2
40966   fi
40967 done
40968   done
40969 IFS=$as_save_IFS
40970 
40971 fi
40972 fi
40973 NM=$ac_cv_prog_NM
40974 if test -n "$NM"; then
40975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40976 $as_echo "$NM" >&6; }
40977 else
40978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40979 $as_echo "no" >&6; }
40980 fi
40981 
40982 
40983     test -n "$NM" && break
40984   done
40985 fi
40986 if test -z "$NM"; then
40987   ac_ct_NM=$NM
40988   for ac_prog in nm
40989 do
40990   # Extract the first word of "$ac_prog", so it can be a program name with args.
40991 set dummy $ac_prog; ac_word=$2
40992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40993 $as_echo_n "checking for $ac_word... " >&6; }
40994 if ${ac_cv_prog_ac_ct_NM+:} false; then :
40995   $as_echo_n "(cached) " >&6
40996 else
40997   if test -n "$ac_ct_NM"; then
40998   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40999 else
41000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41001 for as_dir in $PATH
41002 do
41003   IFS=$as_save_IFS
41004   test -z "$as_dir" && as_dir=.
41005     for ac_exec_ext in '' $ac_executable_extensions; do
41006   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41007     ac_cv_prog_ac_ct_NM="$ac_prog"
41008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41009     break 2
41010   fi
41011 done
41012   done
41013 IFS=$as_save_IFS
41014 
41015 fi
41016 fi
41017 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41018 if test -n "$ac_ct_NM"; then
41019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41020 $as_echo "$ac_ct_NM" >&6; }
41021 else
41022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41023 $as_echo "no" >&6; }
41024 fi
41025 
41026 
41027   test -n "$ac_ct_NM" && break
41028 done
41029 
41030   if test "x$ac_ct_NM" = x; then
41031     NM=""
41032   else
41033     case $cross_compiling:$ac_tool_warned in
41034 yes:)
41035 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41036 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41037 ac_tool_warned=yes ;;
41038 esac
41039     NM=$ac_ct_NM
41040   fi
41041 fi
41042 
41043   else
41044     # The variable is set, but is it from the command line or the environment?
41045 
41046     # Try to remove the string !NM! from our list.
41047     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41048     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41049       # If it failed, the variable was not from the command line. Ignore it,
41050       # but warn the user (except for BASH, which is always set by the calling BASH).
41051       if test "xNM" != xBASH; then
41052         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41053 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41054       fi
41055       # Try to locate tool using the code snippet
41056       if test -n "$ac_tool_prefix"; then
41057   for ac_prog in nm
41058   do
41059     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41060 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41062 $as_echo_n "checking for $ac_word... " >&6; }
41063 if ${ac_cv_prog_NM+:} false; then :
41064   $as_echo_n "(cached) " >&6
41065 else
41066   if test -n "$NM"; then
41067   ac_cv_prog_NM="$NM" # Let the user override the test.
41068 else
41069 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41070 for as_dir in $PATH
41071 do
41072   IFS=$as_save_IFS
41073   test -z "$as_dir" && as_dir=.
41074     for ac_exec_ext in '' $ac_executable_extensions; do
41075   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41076     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41077     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41078     break 2
41079   fi
41080 done
41081   done
41082 IFS=$as_save_IFS
41083 
41084 fi
41085 fi
41086 NM=$ac_cv_prog_NM
41087 if test -n "$NM"; then
41088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41089 $as_echo "$NM" >&6; }
41090 else
41091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41092 $as_echo "no" >&6; }
41093 fi
41094 
41095 
41096     test -n "$NM" && break
41097   done
41098 fi
41099 if test -z "$NM"; then
41100   ac_ct_NM=$NM
41101   for ac_prog in nm
41102 do
41103   # Extract the first word of "$ac_prog", so it can be a program name with args.
41104 set dummy $ac_prog; ac_word=$2
41105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41106 $as_echo_n "checking for $ac_word... " >&6; }
41107 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41108   $as_echo_n "(cached) " >&6
41109 else
41110   if test -n "$ac_ct_NM"; then
41111   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41112 else
41113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41114 for as_dir in $PATH
41115 do
41116   IFS=$as_save_IFS
41117   test -z "$as_dir" && as_dir=.
41118     for ac_exec_ext in '' $ac_executable_extensions; do
41119   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41120     ac_cv_prog_ac_ct_NM="$ac_prog"
41121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41122     break 2
41123   fi
41124 done
41125   done
41126 IFS=$as_save_IFS
41127 
41128 fi
41129 fi
41130 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41131 if test -n "$ac_ct_NM"; then
41132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41133 $as_echo "$ac_ct_NM" >&6; }
41134 else
41135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41136 $as_echo "no" >&6; }
41137 fi
41138 
41139 
41140   test -n "$ac_ct_NM" && break
41141 done
41142 
41143   if test "x$ac_ct_NM" = x; then
41144     NM=""
41145   else
41146     case $cross_compiling:$ac_tool_warned in
41147 yes:)
41148 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41149 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41150 ac_tool_warned=yes ;;
41151 esac
41152     NM=$ac_ct_NM
41153   fi
41154 fi
41155 
41156     else
41157       # If it succeeded, then it was overridden by the user. We will use it
41158       # for the tool.
41159 
41160       # First remove it from the list of overridden variables, so we can test
41161       # for unknown variables in the end.
41162       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41163 
41164       # Check if we try to supply an empty value
41165       if test "x$NM" = x; then
41166         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41167 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41168         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41169 $as_echo_n "checking for NM... " >&6; }
41170         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41171 $as_echo "disabled" >&6; }
41172       else
41173         # Check if the provided tool contains a complete path.
41174         tool_specified="$NM"
41175         tool_basename="${tool_specified##*/}"
41176         if test "x$tool_basename" = "x$tool_specified"; then
41177           # A command without a complete path is provided, search $PATH.
41178           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41179 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41180           # Extract the first word of "$tool_basename", so it can be a program name with args.
41181 set dummy $tool_basename; ac_word=$2
41182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41183 $as_echo_n "checking for $ac_word... " >&6; }
41184 if ${ac_cv_path_NM+:} false; then :
41185   $as_echo_n "(cached) " >&6
41186 else
41187   case $NM in
41188   [\\/]* | ?:[\\/]*)
41189   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41190   ;;
41191   *)
41192   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41193 for as_dir in $PATH
41194 do
41195   IFS=$as_save_IFS
41196   test -z "$as_dir" && as_dir=.
41197     for ac_exec_ext in '' $ac_executable_extensions; do
41198   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41199     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41200     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41201     break 2
41202   fi
41203 done
41204   done
41205 IFS=$as_save_IFS
41206 
41207   ;;
41208 esac
41209 fi
41210 NM=$ac_cv_path_NM
41211 if test -n "$NM"; then
41212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41213 $as_echo "$NM" >&6; }
41214 else
41215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41216 $as_echo "no" >&6; }
41217 fi
41218 
41219 
41220           if test "x$NM" = x; then
41221             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41222           fi
41223         else
41224           # Otherwise we believe it is a complete path. Use it as it is.
41225           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41226 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41227           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41228 $as_echo_n "checking for NM... " >&6; }
41229           if test ! -x "$tool_specified"; then
41230             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41231 $as_echo "not found" >&6; }
41232             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41233           fi
41234           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41235 $as_echo "$tool_specified" >&6; }
41236         fi
41237       fi
41238     fi
41239 
41240   fi
41241 
41242 
41243     fi
41244 
41245   # Only process if variable expands to non-empty
41246 
41247   if test "x$NM" != x; then
41248     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41249 
41250   # First separate the path from the arguments. This will split at the first
41251   # space.
41252   complete="$NM"
41253   path="${complete%% *}"
41254   tmp="$complete EOL"
41255   arguments="${tmp#* }"
41256 
41257   # Input might be given as Windows format, start by converting to
41258   # unix format.
41259   new_path=`$CYGPATH -u "$path"`
41260 
41261   # Now try to locate executable using which
41262   new_path=`$WHICH "$new_path" 2> /dev/null`
41263   # bat and cmd files are not always considered executable in cygwin causing which
41264   # to not find them
41265   if test "x$new_path" = x \
41266       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41267       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41268     new_path=`$CYGPATH -u "$path"`
41269   fi
41270   if test "x$new_path" = x; then
41271     # Oops. Which didn't find the executable.
41272     # The splitting of arguments from the executable at a space might have been incorrect,
41273     # since paths with space are more likely in Windows. Give it another try with the whole
41274     # argument.
41275     path="$complete"
41276     arguments="EOL"
41277     new_path=`$CYGPATH -u "$path"`
41278     new_path=`$WHICH "$new_path" 2> /dev/null`
41279     # bat and cmd files are not always considered executable in cygwin causing which
41280     # to not find them
41281     if test "x$new_path" = x \
41282         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41283         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41284       new_path=`$CYGPATH -u "$path"`
41285     fi
41286     if test "x$new_path" = x; then
41287       # It's still not found. Now this is an unrecoverable error.
41288       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41289 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41290       has_space=`$ECHO "$complete" | $GREP " "`
41291       if test "x$has_space" != x; then
41292         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41293 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41294       fi
41295       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41296     fi
41297   fi
41298 
41299   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41300   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41301   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41302   # "foo.exe" is OK but "foo" is an error.
41303   #
41304   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41305   # It is also a way to make sure we got the proper file name for the real test later on.
41306   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41307   if test "x$test_shortpath" = x; then
41308     # Short path failed, file does not exist as specified.
41309     # Try adding .exe or .cmd
41310     if test -f "${new_path}.exe"; then
41311       input_to_shortpath="${new_path}.exe"
41312     elif test -f "${new_path}.cmd"; then
41313       input_to_shortpath="${new_path}.cmd"
41314     else
41315       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41316 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41317       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41318 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41319       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41320     fi
41321   else
41322     input_to_shortpath="$new_path"
41323   fi
41324 
41325   # Call helper function which possibly converts this using DOS-style short mode.
41326   # If so, the updated path is stored in $new_path.
41327   new_path="$input_to_shortpath"
41328 
41329   input_path="$input_to_shortpath"
41330   # Check if we need to convert this using DOS-style short mode. If the path
41331   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41332   # take no chances and rewrite it.
41333   # Note: m4 eats our [], so we need to use [ and ] instead.
41334   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41335   if test "x$has_forbidden_chars" != x; then
41336     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41337     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41338     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41339     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41340       # Going to short mode and back again did indeed matter. Since short mode is
41341       # case insensitive, let's make it lowercase to improve readability.
41342       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41343       # Now convert it back to Unix-style (cygpath)
41344       input_path=`$CYGPATH -u "$shortmode_path"`
41345       new_path="$input_path"
41346     fi
41347   fi
41348 
41349   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41350   if test "x$test_cygdrive_prefix" = x; then
41351     # As a simple fix, exclude /usr/bin since it's not a real path.
41352     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41353       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41354       # a path prefixed by /cygdrive for fixpath to work.
41355       new_path="$CYGWIN_ROOT_PATH$input_path"
41356     fi
41357   fi
41358 
41359   # remove trailing .exe if any
41360   new_path="${new_path/%.exe/}"
41361 
41362     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41363 
41364   # First separate the path from the arguments. This will split at the first
41365   # space.
41366   complete="$NM"
41367   path="${complete%% *}"
41368   tmp="$complete EOL"
41369   arguments="${tmp#* }"
41370 
41371   # Input might be given as Windows format, start by converting to
41372   # unix format.
41373   new_path="$path"
41374 
41375   windows_path="$new_path"
41376   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41377     unix_path=`$CYGPATH -u "$windows_path"`
41378     new_path="$unix_path"
41379   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41380     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41381     new_path="$unix_path"
41382   fi
41383 
41384 
41385   # Now try to locate executable using which
41386   new_path=`$WHICH "$new_path" 2> /dev/null`
41387 
41388   if test "x$new_path" = x; then
41389     # Oops. Which didn't find the executable.
41390     # The splitting of arguments from the executable at a space might have been incorrect,
41391     # since paths with space are more likely in Windows. Give it another try with the whole
41392     # argument.
41393     path="$complete"
41394     arguments="EOL"
41395     new_path="$path"
41396 
41397   windows_path="$new_path"
41398   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41399     unix_path=`$CYGPATH -u "$windows_path"`
41400     new_path="$unix_path"
41401   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41402     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41403     new_path="$unix_path"
41404   fi
41405 
41406 
41407     new_path=`$WHICH "$new_path" 2> /dev/null`
41408     # bat and cmd files are not always considered executable in MSYS causing which
41409     # to not find them
41410     if test "x$new_path" = x \
41411         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41412         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41413       new_path="$path"
41414 
41415   windows_path="$new_path"
41416   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41417     unix_path=`$CYGPATH -u "$windows_path"`
41418     new_path="$unix_path"
41419   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41420     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41421     new_path="$unix_path"
41422   fi
41423 
41424     fi
41425 
41426     if test "x$new_path" = x; then
41427       # It's still not found. Now this is an unrecoverable error.
41428       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41429 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41430       has_space=`$ECHO "$complete" | $GREP " "`
41431       if test "x$has_space" != x; then
41432         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41433 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41434       fi
41435       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41436     fi
41437   fi
41438 
41439   # Now new_path has a complete unix path to the binary
41440   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41441     # Keep paths in /bin as-is, but remove trailing .exe if any
41442     new_path="${new_path/%.exe/}"
41443     # Do not save /bin paths to all_fixpath_prefixes!
41444   else
41445     # Not in mixed or Windows style, start by that.
41446     new_path=`cmd //c echo $new_path`
41447 
41448   input_path="$new_path"
41449   # Check if we need to convert this using DOS-style short mode. If the path
41450   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41451   # take no chances and rewrite it.
41452   # Note: m4 eats our [], so we need to use [ and ] instead.
41453   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41454   if test "x$has_forbidden_chars" != x; then
41455     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41456     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41457   fi
41458 
41459     # Output is in $new_path
41460 
41461   windows_path="$new_path"
41462   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41463     unix_path=`$CYGPATH -u "$windows_path"`
41464     new_path="$unix_path"
41465   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41466     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41467     new_path="$unix_path"
41468   fi
41469 
41470     # remove trailing .exe if any
41471     new_path="${new_path/%.exe/}"
41472 
41473     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41474     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41475   fi
41476 
41477     else
41478       # We're on a unix platform. Hooray! :)
41479       # First separate the path from the arguments. This will split at the first
41480       # space.
41481       complete="$NM"
41482       path="${complete%% *}"
41483       tmp="$complete EOL"
41484       arguments="${tmp#* }"
41485 
41486       # Cannot rely on the command "which" here since it doesn't always work.
41487       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41488       if test -z "$is_absolute_path"; then
41489         # Path to executable is not absolute. Find it.
41490         IFS_save="$IFS"
41491         IFS=:
41492         for p in $PATH; do
41493           if test -f "$p/$path" && test -x "$p/$path"; then
41494             new_path="$p/$path"
41495             break
41496           fi
41497         done
41498         IFS="$IFS_save"
41499       else
41500         # This is an absolute path, we can use it without further modifications.
41501         new_path="$path"
41502       fi
41503 
41504       if test "x$new_path" = x; then
41505         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41506 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41507         has_space=`$ECHO "$complete" | $GREP " "`
41508         if test "x$has_space" != x; then
41509           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41510 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41511         fi
41512         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41513       fi
41514     fi
41515 
41516     # Now join together the path and the arguments once again
41517     if test "x$arguments" != xEOL; then
41518       new_complete="$new_path ${arguments% *}"
41519     else
41520       new_complete="$new_path"
41521     fi
41522 
41523     if test "x$complete" != "x$new_complete"; then
41524       NM="$new_complete"
41525       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41526 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41527     fi
41528   fi
41529 
41530     GNM="$NM"
41531 
41532   fi
41533 
41534   # objcopy is used for moving debug symbols to separate files when
41535   # full debug symbols are enabled.
41536   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
41537 
41538 
41539   # Publish this variable in the help.
41540 
41541 
41542   if [ -z "${OBJCOPY+x}" ]; then
41543     # The variable is not set by user, try to locate tool using the code snippet
41544     if test -n "$ac_tool_prefix"; then
41545   for ac_prog in gobjcopy objcopy
41546   do
41547     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41548 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41550 $as_echo_n "checking for $ac_word... " >&6; }
41551 if ${ac_cv_prog_OBJCOPY+:} false; then :
41552   $as_echo_n "(cached) " >&6
41553 else
41554   if test -n "$OBJCOPY"; then
41555   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41556 else
41557 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41558 for as_dir in $PATH
41559 do
41560   IFS=$as_save_IFS
41561   test -z "$as_dir" && as_dir=.
41562     for ac_exec_ext in '' $ac_executable_extensions; do
41563   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41564     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41565     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41566     break 2
41567   fi
41568 done
41569   done
41570 IFS=$as_save_IFS
41571 
41572 fi
41573 fi
41574 OBJCOPY=$ac_cv_prog_OBJCOPY
41575 if test -n "$OBJCOPY"; then
41576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41577 $as_echo "$OBJCOPY" >&6; }
41578 else
41579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41580 $as_echo "no" >&6; }
41581 fi
41582 
41583 
41584     test -n "$OBJCOPY" && break
41585   done
41586 fi
41587 if test -z "$OBJCOPY"; then
41588   ac_ct_OBJCOPY=$OBJCOPY
41589   for ac_prog in gobjcopy objcopy
41590 do
41591   # Extract the first word of "$ac_prog", so it can be a program name with args.
41592 set dummy $ac_prog; ac_word=$2
41593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41594 $as_echo_n "checking for $ac_word... " >&6; }
41595 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41596   $as_echo_n "(cached) " >&6
41597 else
41598   if test -n "$ac_ct_OBJCOPY"; then
41599   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41600 else
41601 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41602 for as_dir in $PATH
41603 do
41604   IFS=$as_save_IFS
41605   test -z "$as_dir" && as_dir=.
41606     for ac_exec_ext in '' $ac_executable_extensions; do
41607   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41608     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41610     break 2
41611   fi
41612 done
41613   done
41614 IFS=$as_save_IFS
41615 
41616 fi
41617 fi
41618 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41619 if test -n "$ac_ct_OBJCOPY"; then
41620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41621 $as_echo "$ac_ct_OBJCOPY" >&6; }
41622 else
41623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41624 $as_echo "no" >&6; }
41625 fi
41626 
41627 
41628   test -n "$ac_ct_OBJCOPY" && break
41629 done
41630 
41631   if test "x$ac_ct_OBJCOPY" = x; then
41632     OBJCOPY=""
41633   else
41634     case $cross_compiling:$ac_tool_warned in
41635 yes:)
41636 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41637 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41638 ac_tool_warned=yes ;;
41639 esac
41640     OBJCOPY=$ac_ct_OBJCOPY
41641   fi
41642 fi
41643 
41644   else
41645     # The variable is set, but is it from the command line or the environment?
41646 
41647     # Try to remove the string !OBJCOPY! from our list.
41648     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41649     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41650       # If it failed, the variable was not from the command line. Ignore it,
41651       # but warn the user (except for BASH, which is always set by the calling BASH).
41652       if test "xOBJCOPY" != xBASH; then
41653         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41654 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41655       fi
41656       # Try to locate tool using the code snippet
41657       if test -n "$ac_tool_prefix"; then
41658   for ac_prog in gobjcopy objcopy
41659   do
41660     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41661 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41663 $as_echo_n "checking for $ac_word... " >&6; }
41664 if ${ac_cv_prog_OBJCOPY+:} false; then :
41665   $as_echo_n "(cached) " >&6
41666 else
41667   if test -n "$OBJCOPY"; then
41668   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41669 else
41670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41671 for as_dir in $PATH
41672 do
41673   IFS=$as_save_IFS
41674   test -z "$as_dir" && as_dir=.
41675     for ac_exec_ext in '' $ac_executable_extensions; do
41676   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41677     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41678     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41679     break 2
41680   fi
41681 done
41682   done
41683 IFS=$as_save_IFS
41684 
41685 fi
41686 fi
41687 OBJCOPY=$ac_cv_prog_OBJCOPY
41688 if test -n "$OBJCOPY"; then
41689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41690 $as_echo "$OBJCOPY" >&6; }
41691 else
41692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41693 $as_echo "no" >&6; }
41694 fi
41695 
41696 
41697     test -n "$OBJCOPY" && break
41698   done
41699 fi
41700 if test -z "$OBJCOPY"; then
41701   ac_ct_OBJCOPY=$OBJCOPY
41702   for ac_prog in gobjcopy objcopy
41703 do
41704   # Extract the first word of "$ac_prog", so it can be a program name with args.
41705 set dummy $ac_prog; ac_word=$2
41706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41707 $as_echo_n "checking for $ac_word... " >&6; }
41708 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41709   $as_echo_n "(cached) " >&6
41710 else
41711   if test -n "$ac_ct_OBJCOPY"; then
41712   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41713 else
41714 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41715 for as_dir in $PATH
41716 do
41717   IFS=$as_save_IFS
41718   test -z "$as_dir" && as_dir=.
41719     for ac_exec_ext in '' $ac_executable_extensions; do
41720   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41721     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41723     break 2
41724   fi
41725 done
41726   done
41727 IFS=$as_save_IFS
41728 
41729 fi
41730 fi
41731 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41732 if test -n "$ac_ct_OBJCOPY"; then
41733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41734 $as_echo "$ac_ct_OBJCOPY" >&6; }
41735 else
41736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41737 $as_echo "no" >&6; }
41738 fi
41739 
41740 
41741   test -n "$ac_ct_OBJCOPY" && break
41742 done
41743 
41744   if test "x$ac_ct_OBJCOPY" = x; then
41745     OBJCOPY=""
41746   else
41747     case $cross_compiling:$ac_tool_warned in
41748 yes:)
41749 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41750 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41751 ac_tool_warned=yes ;;
41752 esac
41753     OBJCOPY=$ac_ct_OBJCOPY
41754   fi
41755 fi
41756 
41757     else
41758       # If it succeeded, then it was overridden by the user. We will use it
41759       # for the tool.
41760 
41761       # First remove it from the list of overridden variables, so we can test
41762       # for unknown variables in the end.
41763       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41764 
41765       # Check if we try to supply an empty value
41766       if test "x$OBJCOPY" = x; then
41767         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
41768 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
41769         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41770 $as_echo_n "checking for OBJCOPY... " >&6; }
41771         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41772 $as_echo "disabled" >&6; }
41773       else
41774         # Check if the provided tool contains a complete path.
41775         tool_specified="$OBJCOPY"
41776         tool_basename="${tool_specified##*/}"
41777         if test "x$tool_basename" = "x$tool_specified"; then
41778           # A command without a complete path is provided, search $PATH.
41779           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
41780 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
41781           # Extract the first word of "$tool_basename", so it can be a program name with args.
41782 set dummy $tool_basename; ac_word=$2
41783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41784 $as_echo_n "checking for $ac_word... " >&6; }
41785 if ${ac_cv_path_OBJCOPY+:} false; then :
41786   $as_echo_n "(cached) " >&6
41787 else
41788   case $OBJCOPY in
41789   [\\/]* | ?:[\\/]*)
41790   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
41791   ;;
41792   *)
41793   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41794 for as_dir in $PATH
41795 do
41796   IFS=$as_save_IFS
41797   test -z "$as_dir" && as_dir=.
41798     for ac_exec_ext in '' $ac_executable_extensions; do
41799   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41800     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
41801     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41802     break 2
41803   fi
41804 done
41805   done
41806 IFS=$as_save_IFS
41807 
41808   ;;
41809 esac
41810 fi
41811 OBJCOPY=$ac_cv_path_OBJCOPY
41812 if test -n "$OBJCOPY"; then
41813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41814 $as_echo "$OBJCOPY" >&6; }
41815 else
41816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41817 $as_echo "no" >&6; }
41818 fi
41819 
41820 
41821           if test "x$OBJCOPY" = x; then
41822             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41823           fi
41824         else
41825           # Otherwise we believe it is a complete path. Use it as it is.
41826           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
41827 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
41828           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41829 $as_echo_n "checking for OBJCOPY... " >&6; }
41830           if test ! -x "$tool_specified"; then
41831             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41832 $as_echo "not found" >&6; }
41833             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
41834           fi
41835           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41836 $as_echo "$tool_specified" >&6; }
41837         fi
41838       fi
41839     fi
41840 
41841   fi
41842 
41843 
41844     # Only call fixup if objcopy was found.
41845     if test -n "$OBJCOPY"; then
41846 
41847   # Only process if variable expands to non-empty
41848 
41849   if test "x$OBJCOPY" != x; then
41850     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41851 
41852   # First separate the path from the arguments. This will split at the first
41853   # space.
41854   complete="$OBJCOPY"
41855   path="${complete%% *}"
41856   tmp="$complete EOL"
41857   arguments="${tmp#* }"
41858 
41859   # Input might be given as Windows format, start by converting to
41860   # unix format.
41861   new_path=`$CYGPATH -u "$path"`
41862 
41863   # Now try to locate executable using which
41864   new_path=`$WHICH "$new_path" 2> /dev/null`
41865   # bat and cmd files are not always considered executable in cygwin causing which
41866   # to not find them
41867   if test "x$new_path" = x \
41868       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41869       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41870     new_path=`$CYGPATH -u "$path"`
41871   fi
41872   if test "x$new_path" = x; then
41873     # Oops. Which didn't find the executable.
41874     # The splitting of arguments from the executable at a space might have been incorrect,
41875     # since paths with space are more likely in Windows. Give it another try with the whole
41876     # argument.
41877     path="$complete"
41878     arguments="EOL"
41879     new_path=`$CYGPATH -u "$path"`
41880     new_path=`$WHICH "$new_path" 2> /dev/null`
41881     # bat and cmd files are not always considered executable in cygwin causing which
41882     # to not find them
41883     if test "x$new_path" = x \
41884         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41885         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41886       new_path=`$CYGPATH -u "$path"`
41887     fi
41888     if test "x$new_path" = x; then
41889       # It's still not found. Now this is an unrecoverable error.
41890       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41891 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41892       has_space=`$ECHO "$complete" | $GREP " "`
41893       if test "x$has_space" != x; then
41894         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41895 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41896       fi
41897       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41898     fi
41899   fi
41900 
41901   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41902   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41903   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41904   # "foo.exe" is OK but "foo" is an error.
41905   #
41906   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41907   # It is also a way to make sure we got the proper file name for the real test later on.
41908   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41909   if test "x$test_shortpath" = x; then
41910     # Short path failed, file does not exist as specified.
41911     # Try adding .exe or .cmd
41912     if test -f "${new_path}.exe"; then
41913       input_to_shortpath="${new_path}.exe"
41914     elif test -f "${new_path}.cmd"; then
41915       input_to_shortpath="${new_path}.cmd"
41916     else
41917       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
41918 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
41919       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41920 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41921       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41922     fi
41923   else
41924     input_to_shortpath="$new_path"
41925   fi
41926 
41927   # Call helper function which possibly converts this using DOS-style short mode.
41928   # If so, the updated path is stored in $new_path.
41929   new_path="$input_to_shortpath"
41930 
41931   input_path="$input_to_shortpath"
41932   # Check if we need to convert this using DOS-style short mode. If the path
41933   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41934   # take no chances and rewrite it.
41935   # Note: m4 eats our [], so we need to use [ and ] instead.
41936   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41937   if test "x$has_forbidden_chars" != x; then
41938     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41939     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41940     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41941     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41942       # Going to short mode and back again did indeed matter. Since short mode is
41943       # case insensitive, let's make it lowercase to improve readability.
41944       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41945       # Now convert it back to Unix-style (cygpath)
41946       input_path=`$CYGPATH -u "$shortmode_path"`
41947       new_path="$input_path"
41948     fi
41949   fi
41950 
41951   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41952   if test "x$test_cygdrive_prefix" = x; then
41953     # As a simple fix, exclude /usr/bin since it's not a real path.
41954     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41955       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41956       # a path prefixed by /cygdrive for fixpath to work.
41957       new_path="$CYGWIN_ROOT_PATH$input_path"
41958     fi
41959   fi
41960 
41961   # remove trailing .exe if any
41962   new_path="${new_path/%.exe/}"
41963 
41964     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41965 
41966   # First separate the path from the arguments. This will split at the first
41967   # space.
41968   complete="$OBJCOPY"
41969   path="${complete%% *}"
41970   tmp="$complete EOL"
41971   arguments="${tmp#* }"
41972 
41973   # Input might be given as Windows format, start by converting to
41974   # unix format.
41975   new_path="$path"
41976 
41977   windows_path="$new_path"
41978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41979     unix_path=`$CYGPATH -u "$windows_path"`
41980     new_path="$unix_path"
41981   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41982     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41983     new_path="$unix_path"
41984   fi
41985 
41986 
41987   # Now try to locate executable using which
41988   new_path=`$WHICH "$new_path" 2> /dev/null`
41989 
41990   if test "x$new_path" = x; then
41991     # Oops. Which didn't find the executable.
41992     # The splitting of arguments from the executable at a space might have been incorrect,
41993     # since paths with space are more likely in Windows. Give it another try with the whole
41994     # argument.
41995     path="$complete"
41996     arguments="EOL"
41997     new_path="$path"
41998 
41999   windows_path="$new_path"
42000   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42001     unix_path=`$CYGPATH -u "$windows_path"`
42002     new_path="$unix_path"
42003   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42004     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42005     new_path="$unix_path"
42006   fi
42007 
42008 
42009     new_path=`$WHICH "$new_path" 2> /dev/null`
42010     # bat and cmd files are not always considered executable in MSYS causing which
42011     # to not find them
42012     if test "x$new_path" = x \
42013         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42014         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42015       new_path="$path"
42016 
42017   windows_path="$new_path"
42018   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42019     unix_path=`$CYGPATH -u "$windows_path"`
42020     new_path="$unix_path"
42021   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42022     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42023     new_path="$unix_path"
42024   fi
42025 
42026     fi
42027 
42028     if test "x$new_path" = x; then
42029       # It's still not found. Now this is an unrecoverable error.
42030       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42031 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42032       has_space=`$ECHO "$complete" | $GREP " "`
42033       if test "x$has_space" != x; then
42034         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42035 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42036       fi
42037       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42038     fi
42039   fi
42040 
42041   # Now new_path has a complete unix path to the binary
42042   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42043     # Keep paths in /bin as-is, but remove trailing .exe if any
42044     new_path="${new_path/%.exe/}"
42045     # Do not save /bin paths to all_fixpath_prefixes!
42046   else
42047     # Not in mixed or Windows style, start by that.
42048     new_path=`cmd //c echo $new_path`
42049 
42050   input_path="$new_path"
42051   # Check if we need to convert this using DOS-style short mode. If the path
42052   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42053   # take no chances and rewrite it.
42054   # Note: m4 eats our [], so we need to use [ and ] instead.
42055   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42056   if test "x$has_forbidden_chars" != x; then
42057     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42058     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42059   fi
42060 
42061     # Output is in $new_path
42062 
42063   windows_path="$new_path"
42064   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42065     unix_path=`$CYGPATH -u "$windows_path"`
42066     new_path="$unix_path"
42067   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42068     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42069     new_path="$unix_path"
42070   fi
42071 
42072     # remove trailing .exe if any
42073     new_path="${new_path/%.exe/}"
42074 
42075     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42076     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42077   fi
42078 
42079     else
42080       # We're on a unix platform. Hooray! :)
42081       # First separate the path from the arguments. This will split at the first
42082       # space.
42083       complete="$OBJCOPY"
42084       path="${complete%% *}"
42085       tmp="$complete EOL"
42086       arguments="${tmp#* }"
42087 
42088       # Cannot rely on the command "which" here since it doesn't always work.
42089       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42090       if test -z "$is_absolute_path"; then
42091         # Path to executable is not absolute. Find it.
42092         IFS_save="$IFS"
42093         IFS=:
42094         for p in $PATH; do
42095           if test -f "$p/$path" && test -x "$p/$path"; then
42096             new_path="$p/$path"
42097             break
42098           fi
42099         done
42100         IFS="$IFS_save"
42101       else
42102         # This is an absolute path, we can use it without further modifications.
42103         new_path="$path"
42104       fi
42105 
42106       if test "x$new_path" = x; then
42107         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42108 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42109         has_space=`$ECHO "$complete" | $GREP " "`
42110         if test "x$has_space" != x; then
42111           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42112 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42113         fi
42114         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42115       fi
42116     fi
42117 
42118     # Now join together the path and the arguments once again
42119     if test "x$arguments" != xEOL; then
42120       new_complete="$new_path ${arguments% *}"
42121     else
42122       new_complete="$new_path"
42123     fi
42124 
42125     if test "x$complete" != "x$new_complete"; then
42126       OBJCOPY="$new_complete"
42127       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42128 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42129     fi
42130   fi
42131 
42132       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42133         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42134         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42135         # - version number is last blank separate word on first line
42136         # - version number formats that have been seen:
42137         #   - <major>.<minor>
42138         #   - <major>.<minor>.<micro>
42139         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42140         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42141          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42142               -e 's/.* //' \
42143               -e '/^[01]\./b bad' \
42144               -e '/^2\./{' \
42145               -e '  s/^2\.//' \
42146               -e '  /^[0-9]$/b bad' \
42147               -e '  /^[0-9]\./b bad' \
42148               -e '  /^1[0-9]$/b bad' \
42149               -e '  /^1[0-9]\./b bad' \
42150               -e '  /^20\./b bad' \
42151               -e '  /^21\.0$/b bad' \
42152               -e '  /^21\.0\./b bad' \
42153               -e '}' \
42154               -e ':good' \
42155               -e 's/.*/VALID_VERSION/p' \
42156               -e 'q' \
42157               -e ':bad' \
42158               -e 's/.*/BAD_VERSION/p' \
42159               -e 'q'`
42160         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42161           OBJCOPY=
42162           { $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
42163 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42164           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42165 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42166           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42167 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42168           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42169 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42170           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42171 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42172         fi
42173       fi
42174     fi
42175   fi
42176 
42177 
42178 
42179   # Publish this variable in the help.
42180 
42181 
42182   if [ -z "${OBJDUMP+x}" ]; then
42183     # The variable is not set by user, try to locate tool using the code snippet
42184     if test -n "$ac_tool_prefix"; then
42185   for ac_prog in gobjdump objdump
42186   do
42187     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42188 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42190 $as_echo_n "checking for $ac_word... " >&6; }
42191 if ${ac_cv_prog_OBJDUMP+:} false; then :
42192   $as_echo_n "(cached) " >&6
42193 else
42194   if test -n "$OBJDUMP"; then
42195   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42196 else
42197 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42198 for as_dir in $PATH
42199 do
42200   IFS=$as_save_IFS
42201   test -z "$as_dir" && as_dir=.
42202     for ac_exec_ext in '' $ac_executable_extensions; do
42203   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42204     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42205     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42206     break 2
42207   fi
42208 done
42209   done
42210 IFS=$as_save_IFS
42211 
42212 fi
42213 fi
42214 OBJDUMP=$ac_cv_prog_OBJDUMP
42215 if test -n "$OBJDUMP"; then
42216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42217 $as_echo "$OBJDUMP" >&6; }
42218 else
42219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42220 $as_echo "no" >&6; }
42221 fi
42222 
42223 
42224     test -n "$OBJDUMP" && break
42225   done
42226 fi
42227 if test -z "$OBJDUMP"; then
42228   ac_ct_OBJDUMP=$OBJDUMP
42229   for ac_prog in gobjdump objdump
42230 do
42231   # Extract the first word of "$ac_prog", so it can be a program name with args.
42232 set dummy $ac_prog; ac_word=$2
42233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42234 $as_echo_n "checking for $ac_word... " >&6; }
42235 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42236   $as_echo_n "(cached) " >&6
42237 else
42238   if test -n "$ac_ct_OBJDUMP"; then
42239   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42240 else
42241 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42242 for as_dir in $PATH
42243 do
42244   IFS=$as_save_IFS
42245   test -z "$as_dir" && as_dir=.
42246     for ac_exec_ext in '' $ac_executable_extensions; do
42247   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42248     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42249     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42250     break 2
42251   fi
42252 done
42253   done
42254 IFS=$as_save_IFS
42255 
42256 fi
42257 fi
42258 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42259 if test -n "$ac_ct_OBJDUMP"; then
42260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42261 $as_echo "$ac_ct_OBJDUMP" >&6; }
42262 else
42263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42264 $as_echo "no" >&6; }
42265 fi
42266 
42267 
42268   test -n "$ac_ct_OBJDUMP" && break
42269 done
42270 
42271   if test "x$ac_ct_OBJDUMP" = x; then
42272     OBJDUMP=""
42273   else
42274     case $cross_compiling:$ac_tool_warned in
42275 yes:)
42276 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42277 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42278 ac_tool_warned=yes ;;
42279 esac
42280     OBJDUMP=$ac_ct_OBJDUMP
42281   fi
42282 fi
42283 
42284   else
42285     # The variable is set, but is it from the command line or the environment?
42286 
42287     # Try to remove the string !OBJDUMP! from our list.
42288     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42289     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42290       # If it failed, the variable was not from the command line. Ignore it,
42291       # but warn the user (except for BASH, which is always set by the calling BASH).
42292       if test "xOBJDUMP" != xBASH; then
42293         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42294 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42295       fi
42296       # Try to locate tool using the code snippet
42297       if test -n "$ac_tool_prefix"; then
42298   for ac_prog in gobjdump objdump
42299   do
42300     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42301 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42303 $as_echo_n "checking for $ac_word... " >&6; }
42304 if ${ac_cv_prog_OBJDUMP+:} false; then :
42305   $as_echo_n "(cached) " >&6
42306 else
42307   if test -n "$OBJDUMP"; then
42308   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42309 else
42310 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42311 for as_dir in $PATH
42312 do
42313   IFS=$as_save_IFS
42314   test -z "$as_dir" && as_dir=.
42315     for ac_exec_ext in '' $ac_executable_extensions; do
42316   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42317     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42318     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42319     break 2
42320   fi
42321 done
42322   done
42323 IFS=$as_save_IFS
42324 
42325 fi
42326 fi
42327 OBJDUMP=$ac_cv_prog_OBJDUMP
42328 if test -n "$OBJDUMP"; then
42329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42330 $as_echo "$OBJDUMP" >&6; }
42331 else
42332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42333 $as_echo "no" >&6; }
42334 fi
42335 
42336 
42337     test -n "$OBJDUMP" && break
42338   done
42339 fi
42340 if test -z "$OBJDUMP"; then
42341   ac_ct_OBJDUMP=$OBJDUMP
42342   for ac_prog in gobjdump objdump
42343 do
42344   # Extract the first word of "$ac_prog", so it can be a program name with args.
42345 set dummy $ac_prog; ac_word=$2
42346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42347 $as_echo_n "checking for $ac_word... " >&6; }
42348 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42349   $as_echo_n "(cached) " >&6
42350 else
42351   if test -n "$ac_ct_OBJDUMP"; then
42352   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42353 else
42354 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42355 for as_dir in $PATH
42356 do
42357   IFS=$as_save_IFS
42358   test -z "$as_dir" && as_dir=.
42359     for ac_exec_ext in '' $ac_executable_extensions; do
42360   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42361     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42362     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42363     break 2
42364   fi
42365 done
42366   done
42367 IFS=$as_save_IFS
42368 
42369 fi
42370 fi
42371 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42372 if test -n "$ac_ct_OBJDUMP"; then
42373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42374 $as_echo "$ac_ct_OBJDUMP" >&6; }
42375 else
42376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42377 $as_echo "no" >&6; }
42378 fi
42379 
42380 
42381   test -n "$ac_ct_OBJDUMP" && break
42382 done
42383 
42384   if test "x$ac_ct_OBJDUMP" = x; then
42385     OBJDUMP=""
42386   else
42387     case $cross_compiling:$ac_tool_warned in
42388 yes:)
42389 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42390 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42391 ac_tool_warned=yes ;;
42392 esac
42393     OBJDUMP=$ac_ct_OBJDUMP
42394   fi
42395 fi
42396 
42397     else
42398       # If it succeeded, then it was overridden by the user. We will use it
42399       # for the tool.
42400 
42401       # First remove it from the list of overridden variables, so we can test
42402       # for unknown variables in the end.
42403       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42404 
42405       # Check if we try to supply an empty value
42406       if test "x$OBJDUMP" = x; then
42407         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42408 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42409         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42410 $as_echo_n "checking for OBJDUMP... " >&6; }
42411         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42412 $as_echo "disabled" >&6; }
42413       else
42414         # Check if the provided tool contains a complete path.
42415         tool_specified="$OBJDUMP"
42416         tool_basename="${tool_specified##*/}"
42417         if test "x$tool_basename" = "x$tool_specified"; then
42418           # A command without a complete path is provided, search $PATH.
42419           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42420 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42421           # Extract the first word of "$tool_basename", so it can be a program name with args.
42422 set dummy $tool_basename; ac_word=$2
42423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42424 $as_echo_n "checking for $ac_word... " >&6; }
42425 if ${ac_cv_path_OBJDUMP+:} false; then :
42426   $as_echo_n "(cached) " >&6
42427 else
42428   case $OBJDUMP in
42429   [\\/]* | ?:[\\/]*)
42430   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42431   ;;
42432   *)
42433   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42434 for as_dir in $PATH
42435 do
42436   IFS=$as_save_IFS
42437   test -z "$as_dir" && as_dir=.
42438     for ac_exec_ext in '' $ac_executable_extensions; do
42439   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42440     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42441     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42442     break 2
42443   fi
42444 done
42445   done
42446 IFS=$as_save_IFS
42447 
42448   ;;
42449 esac
42450 fi
42451 OBJDUMP=$ac_cv_path_OBJDUMP
42452 if test -n "$OBJDUMP"; then
42453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42454 $as_echo "$OBJDUMP" >&6; }
42455 else
42456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42457 $as_echo "no" >&6; }
42458 fi
42459 
42460 
42461           if test "x$OBJDUMP" = x; then
42462             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42463           fi
42464         else
42465           # Otherwise we believe it is a complete path. Use it as it is.
42466           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42467 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42468           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42469 $as_echo_n "checking for OBJDUMP... " >&6; }
42470           if test ! -x "$tool_specified"; then
42471             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42472 $as_echo "not found" >&6; }
42473             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42474           fi
42475           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42476 $as_echo "$tool_specified" >&6; }
42477         fi
42478       fi
42479     fi
42480 
42481   fi
42482 
42483 
42484   if test "x$OBJDUMP" != x; then
42485     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42486     # bails if argument is missing.
42487 
42488   # Only process if variable expands to non-empty
42489 
42490   if test "x$OBJDUMP" != x; then
42491     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42492 
42493   # First separate the path from the arguments. This will split at the first
42494   # space.
42495   complete="$OBJDUMP"
42496   path="${complete%% *}"
42497   tmp="$complete EOL"
42498   arguments="${tmp#* }"
42499 
42500   # Input might be given as Windows format, start by converting to
42501   # unix format.
42502   new_path=`$CYGPATH -u "$path"`
42503 
42504   # Now try to locate executable using which
42505   new_path=`$WHICH "$new_path" 2> /dev/null`
42506   # bat and cmd files are not always considered executable in cygwin causing which
42507   # to not find them
42508   if test "x$new_path" = x \
42509       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42510       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42511     new_path=`$CYGPATH -u "$path"`
42512   fi
42513   if test "x$new_path" = x; then
42514     # Oops. Which didn't find the executable.
42515     # The splitting of arguments from the executable at a space might have been incorrect,
42516     # since paths with space are more likely in Windows. Give it another try with the whole
42517     # argument.
42518     path="$complete"
42519     arguments="EOL"
42520     new_path=`$CYGPATH -u "$path"`
42521     new_path=`$WHICH "$new_path" 2> /dev/null`
42522     # bat and cmd files are not always considered executable in cygwin causing which
42523     # to not find them
42524     if test "x$new_path" = x \
42525         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42526         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42527       new_path=`$CYGPATH -u "$path"`
42528     fi
42529     if test "x$new_path" = x; then
42530       # It's still not found. Now this is an unrecoverable error.
42531       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42532 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42533       has_space=`$ECHO "$complete" | $GREP " "`
42534       if test "x$has_space" != x; then
42535         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42536 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42537       fi
42538       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42539     fi
42540   fi
42541 
42542   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42543   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42544   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42545   # "foo.exe" is OK but "foo" is an error.
42546   #
42547   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42548   # It is also a way to make sure we got the proper file name for the real test later on.
42549   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42550   if test "x$test_shortpath" = x; then
42551     # Short path failed, file does not exist as specified.
42552     # Try adding .exe or .cmd
42553     if test -f "${new_path}.exe"; then
42554       input_to_shortpath="${new_path}.exe"
42555     elif test -f "${new_path}.cmd"; then
42556       input_to_shortpath="${new_path}.cmd"
42557     else
42558       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
42559 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
42560       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42561 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42562       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42563     fi
42564   else
42565     input_to_shortpath="$new_path"
42566   fi
42567 
42568   # Call helper function which possibly converts this using DOS-style short mode.
42569   # If so, the updated path is stored in $new_path.
42570   new_path="$input_to_shortpath"
42571 
42572   input_path="$input_to_shortpath"
42573   # Check if we need to convert this using DOS-style short mode. If the path
42574   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42575   # take no chances and rewrite it.
42576   # Note: m4 eats our [], so we need to use [ and ] instead.
42577   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42578   if test "x$has_forbidden_chars" != x; then
42579     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42580     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42581     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42582     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42583       # Going to short mode and back again did indeed matter. Since short mode is
42584       # case insensitive, let's make it lowercase to improve readability.
42585       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42586       # Now convert it back to Unix-style (cygpath)
42587       input_path=`$CYGPATH -u "$shortmode_path"`
42588       new_path="$input_path"
42589     fi
42590   fi
42591 
42592   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42593   if test "x$test_cygdrive_prefix" = x; then
42594     # As a simple fix, exclude /usr/bin since it's not a real path.
42595     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42596       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42597       # a path prefixed by /cygdrive for fixpath to work.
42598       new_path="$CYGWIN_ROOT_PATH$input_path"
42599     fi
42600   fi
42601 
42602   # remove trailing .exe if any
42603   new_path="${new_path/%.exe/}"
42604 
42605     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42606 
42607   # First separate the path from the arguments. This will split at the first
42608   # space.
42609   complete="$OBJDUMP"
42610   path="${complete%% *}"
42611   tmp="$complete EOL"
42612   arguments="${tmp#* }"
42613 
42614   # Input might be given as Windows format, start by converting to
42615   # unix format.
42616   new_path="$path"
42617 
42618   windows_path="$new_path"
42619   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42620     unix_path=`$CYGPATH -u "$windows_path"`
42621     new_path="$unix_path"
42622   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42623     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42624     new_path="$unix_path"
42625   fi
42626 
42627 
42628   # Now try to locate executable using which
42629   new_path=`$WHICH "$new_path" 2> /dev/null`
42630 
42631   if test "x$new_path" = x; then
42632     # Oops. Which didn't find the executable.
42633     # The splitting of arguments from the executable at a space might have been incorrect,
42634     # since paths with space are more likely in Windows. Give it another try with the whole
42635     # argument.
42636     path="$complete"
42637     arguments="EOL"
42638     new_path="$path"
42639 
42640   windows_path="$new_path"
42641   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42642     unix_path=`$CYGPATH -u "$windows_path"`
42643     new_path="$unix_path"
42644   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42645     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42646     new_path="$unix_path"
42647   fi
42648 
42649 
42650     new_path=`$WHICH "$new_path" 2> /dev/null`
42651     # bat and cmd files are not always considered executable in MSYS causing which
42652     # to not find them
42653     if test "x$new_path" = x \
42654         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42655         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42656       new_path="$path"
42657 
42658   windows_path="$new_path"
42659   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42660     unix_path=`$CYGPATH -u "$windows_path"`
42661     new_path="$unix_path"
42662   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42663     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42664     new_path="$unix_path"
42665   fi
42666 
42667     fi
42668 
42669     if test "x$new_path" = x; then
42670       # It's still not found. Now this is an unrecoverable error.
42671       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42672 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42673       has_space=`$ECHO "$complete" | $GREP " "`
42674       if test "x$has_space" != x; then
42675         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42676 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42677       fi
42678       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42679     fi
42680   fi
42681 
42682   # Now new_path has a complete unix path to the binary
42683   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42684     # Keep paths in /bin as-is, but remove trailing .exe if any
42685     new_path="${new_path/%.exe/}"
42686     # Do not save /bin paths to all_fixpath_prefixes!
42687   else
42688     # Not in mixed or Windows style, start by that.
42689     new_path=`cmd //c echo $new_path`
42690 
42691   input_path="$new_path"
42692   # Check if we need to convert this using DOS-style short mode. If the path
42693   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42694   # take no chances and rewrite it.
42695   # Note: m4 eats our [], so we need to use [ and ] instead.
42696   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42697   if test "x$has_forbidden_chars" != x; then
42698     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42699     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42700   fi
42701 
42702     # Output is in $new_path
42703 
42704   windows_path="$new_path"
42705   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42706     unix_path=`$CYGPATH -u "$windows_path"`
42707     new_path="$unix_path"
42708   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42709     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42710     new_path="$unix_path"
42711   fi
42712 
42713     # remove trailing .exe if any
42714     new_path="${new_path/%.exe/}"
42715 
42716     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42717     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42718   fi
42719 
42720     else
42721       # We're on a unix platform. Hooray! :)
42722       # First separate the path from the arguments. This will split at the first
42723       # space.
42724       complete="$OBJDUMP"
42725       path="${complete%% *}"
42726       tmp="$complete EOL"
42727       arguments="${tmp#* }"
42728 
42729       # Cannot rely on the command "which" here since it doesn't always work.
42730       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42731       if test -z "$is_absolute_path"; then
42732         # Path to executable is not absolute. Find it.
42733         IFS_save="$IFS"
42734         IFS=:
42735         for p in $PATH; do
42736           if test -f "$p/$path" && test -x "$p/$path"; then
42737             new_path="$p/$path"
42738             break
42739           fi
42740         done
42741         IFS="$IFS_save"
42742       else
42743         # This is an absolute path, we can use it without further modifications.
42744         new_path="$path"
42745       fi
42746 
42747       if test "x$new_path" = x; then
42748         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42749 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42750         has_space=`$ECHO "$complete" | $GREP " "`
42751         if test "x$has_space" != x; then
42752           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42753 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42754         fi
42755         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42756       fi
42757     fi
42758 
42759     # Now join together the path and the arguments once again
42760     if test "x$arguments" != xEOL; then
42761       new_complete="$new_path ${arguments% *}"
42762     else
42763       new_complete="$new_path"
42764     fi
42765 
42766     if test "x$complete" != "x$new_complete"; then
42767       OBJDUMP="$new_complete"
42768       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
42769 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
42770     fi
42771   fi
42772 
42773   fi
42774 
42775 
42776   # Restore old path.
42777   PATH="$OLD_PATH"
42778 
42779   # Restore the flags to the user specified values.
42780   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
42781   CFLAGS="$ORG_CFLAGS"
42782   CXXFLAGS="$ORG_CXXFLAGS"
42783 
42784 
42785 # Finally do some processing after the detection phase
42786 
42787   if test "x$COMPILE_TYPE" = "xcross"; then
42788     # Now we need to find a C/C++ compiler that can build executables for the
42789     # build platform. We can't use the AC_PROG_CC macro, since it can only be
42790     # used once. Also, we need to do this without adding a tools dir to the
42791     # path, otherwise we might pick up cross-compilers which don't use standard
42792     # naming.
42793 
42794     OLDPATH="$PATH"
42795 
42796 
42797 # Check whether --with-build-devkit was given.
42798 if test "${with_build_devkit+set}" = set; then :
42799   withval=$with_build_devkit;
42800 fi
42801 
42802     if test "x$with_build_devkit" = "xyes"; then
42803       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
42804     elif test -n "$with_build_devkit"; then
42805       if test ! -d "$with_build_devkit"; then
42806         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
42807       else
42808 
42809   # Only process if variable expands to non-empty
42810 
42811   if test "x$with_build_devkit" != x; then
42812     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42813 
42814   # Input might be given as Windows format, start by converting to
42815   # unix format.
42816   path="$with_build_devkit"
42817   new_path=`$CYGPATH -u "$path"`
42818 
42819   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42820   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42821   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42822   # "foo.exe" is OK but "foo" is an error.
42823   #
42824   # This test is therefore slightly more accurate than "test -f" to check for file precense.
42825   # It is also a way to make sure we got the proper file name for the real test later on.
42826   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42827   if test "x$test_shortpath" = x; then
42828     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42829 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42830     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
42831   fi
42832 
42833   # Call helper function which possibly converts this using DOS-style short mode.
42834   # If so, the updated path is stored in $new_path.
42835 
42836   input_path="$new_path"
42837   # Check if we need to convert this using DOS-style short mode. If the path
42838   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42839   # take no chances and rewrite it.
42840   # Note: m4 eats our [], so we need to use [ and ] instead.
42841   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42842   if test "x$has_forbidden_chars" != x; then
42843     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42844     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42845     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42846     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42847       # Going to short mode and back again did indeed matter. Since short mode is
42848       # case insensitive, let's make it lowercase to improve readability.
42849       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42850       # Now convert it back to Unix-style (cygpath)
42851       input_path=`$CYGPATH -u "$shortmode_path"`
42852       new_path="$input_path"
42853     fi
42854   fi
42855 
42856   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42857   if test "x$test_cygdrive_prefix" = x; then
42858     # As a simple fix, exclude /usr/bin since it's not a real path.
42859     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
42860       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42861       # a path prefixed by /cygdrive for fixpath to work.
42862       new_path="$CYGWIN_ROOT_PATH$input_path"
42863     fi
42864   fi
42865 
42866 
42867   if test "x$path" != "x$new_path"; then
42868     with_build_devkit="$new_path"
42869     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42870 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42871   fi
42872 
42873     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42874 
42875   path="$with_build_devkit"
42876   has_colon=`$ECHO $path | $GREP ^.:`
42877   new_path="$path"
42878   if test "x$has_colon" = x; then
42879     # Not in mixed or Windows style, start by that.
42880     new_path=`cmd //c echo $path`
42881   fi
42882 
42883 
42884   input_path="$new_path"
42885   # Check if we need to convert this using DOS-style short mode. If the path
42886   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42887   # take no chances and rewrite it.
42888   # Note: m4 eats our [], so we need to use [ and ] instead.
42889   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42890   if test "x$has_forbidden_chars" != x; then
42891     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42892     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42893   fi
42894 
42895 
42896   windows_path="$new_path"
42897   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42898     unix_path=`$CYGPATH -u "$windows_path"`
42899     new_path="$unix_path"
42900   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42901     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42902     new_path="$unix_path"
42903   fi
42904 
42905   if test "x$path" != "x$new_path"; then
42906     with_build_devkit="$new_path"
42907     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42908 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42909   fi
42910 
42911   # Save the first 10 bytes of this path to the storage, so fixpath can work.
42912   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42913 
42914     else
42915       # We're on a unix platform. Hooray! :)
42916       path="$with_build_devkit"
42917       has_space=`$ECHO "$path" | $GREP " "`
42918       if test "x$has_space" != x; then
42919         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42920 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42921         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42922       fi
42923 
42924       # Use eval to expand a potential ~
42925       eval path="$path"
42926       if test ! -f "$path" && test ! -d "$path"; then
42927         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
42928       fi
42929 
42930       with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
42931     fi
42932   fi
42933 
42934         BUILD_DEVKIT_ROOT="$with_build_devkit"
42935         # Check for a meta data info file in the root of the devkit
42936         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
42937           # Process devkit.info so that existing devkit variables are not
42938           # modified by this
42939           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
42940               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
42941               -e "s/\$host/\$build/g" \
42942               $BUILD_DEVKIT_ROOT/devkit.info \
42943               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42944           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42945           # This potentially sets the following:
42946           # A descriptive name of the devkit
42947 
42948   if test "x$BUILD_DEVKIT_NAME" = x; then
42949     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
42950   fi
42951 
42952           # Corresponds to --with-extra-path
42953 
42954   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
42955     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
42956   fi
42957 
42958           # Corresponds to --with-toolchain-path
42959 
42960   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42961     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
42962   fi
42963 
42964           # Corresponds to --with-sysroot
42965 
42966   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
42967     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
42968   fi
42969 
42970           # Skip the Window specific parts
42971         fi
42972 
42973         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
42974 $as_echo_n "checking for build platform devkit... " >&6; }
42975         if test "x$BUILD_DEVKIT_NAME" != x; then
42976           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
42977 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
42978         else
42979           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
42980 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
42981         fi
42982 
42983         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
42984 
42985   if test "x$BUILD_SYSROOT" != "x"; then
42986     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42987       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42988         # Solaris Studio does not have a concept of sysroot. Instead we must
42989         # make sure the default include and lib dirs are appended to each
42990         # compile and link command line.
42991         BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
42992         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
42993             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
42994             -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
42995       fi
42996     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42997       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
42998       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
42999     elif test "x$TOOLCHAIN_TYPE" = xclang; then
43000       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43001       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43002     fi
43003     # Propagate the sysroot args to hotspot
43004     BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43005     BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43006     BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43007     # The global CFLAGS and LDFLAGS variables need these for configure to function
43008     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43009     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43010     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43011     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43012   fi
43013 
43014   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43015     # We also need -iframework<path>/System/Library/Frameworks
43016     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43017     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43018     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43019     # set this here so it doesn't have to be peppered throughout the forest
43020     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43021     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43022   fi
43023 
43024 
43025 
43026 
43027 
43028          # Fallback default of just /bin if DEVKIT_PATH is not defined
43029         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43030           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43031         fi
43032         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43033       fi
43034     fi
43035 
43036     # FIXME: we should list the discovered compilers as an exclude pattern!
43037     # If we do that, we can do this detection before POST_DETECTION, and still
43038     # find the build compilers in the tools dir, if needed.
43039 
43040 
43041 
43042   # Publish this variable in the help.
43043 
43044 
43045   if [ -z "${BUILD_CC+x}" ]; then
43046     # The variable is not set by user, try to locate tool using the code snippet
43047     for ac_prog in cl cc gcc
43048 do
43049   # Extract the first word of "$ac_prog", so it can be a program name with args.
43050 set dummy $ac_prog; ac_word=$2
43051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43052 $as_echo_n "checking for $ac_word... " >&6; }
43053 if ${ac_cv_path_BUILD_CC+:} false; then :
43054   $as_echo_n "(cached) " >&6
43055 else
43056   case $BUILD_CC in
43057   [\\/]* | ?:[\\/]*)
43058   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43059   ;;
43060   *)
43061   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43062 for as_dir in $PATH
43063 do
43064   IFS=$as_save_IFS
43065   test -z "$as_dir" && as_dir=.
43066     for ac_exec_ext in '' $ac_executable_extensions; do
43067   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43068     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43069     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43070     break 2
43071   fi
43072 done
43073   done
43074 IFS=$as_save_IFS
43075 
43076   ;;
43077 esac
43078 fi
43079 BUILD_CC=$ac_cv_path_BUILD_CC
43080 if test -n "$BUILD_CC"; then
43081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43082 $as_echo "$BUILD_CC" >&6; }
43083 else
43084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43085 $as_echo "no" >&6; }
43086 fi
43087 
43088 
43089   test -n "$BUILD_CC" && break
43090 done
43091 
43092   else
43093     # The variable is set, but is it from the command line or the environment?
43094 
43095     # Try to remove the string !BUILD_CC! from our list.
43096     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43097     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43098       # If it failed, the variable was not from the command line. Ignore it,
43099       # but warn the user (except for BASH, which is always set by the calling BASH).
43100       if test "xBUILD_CC" != xBASH; then
43101         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43102 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43103       fi
43104       # Try to locate tool using the code snippet
43105       for ac_prog in cl cc gcc
43106 do
43107   # Extract the first word of "$ac_prog", so it can be a program name with args.
43108 set dummy $ac_prog; ac_word=$2
43109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43110 $as_echo_n "checking for $ac_word... " >&6; }
43111 if ${ac_cv_path_BUILD_CC+:} false; then :
43112   $as_echo_n "(cached) " >&6
43113 else
43114   case $BUILD_CC in
43115   [\\/]* | ?:[\\/]*)
43116   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43117   ;;
43118   *)
43119   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43120 for as_dir in $PATH
43121 do
43122   IFS=$as_save_IFS
43123   test -z "$as_dir" && as_dir=.
43124     for ac_exec_ext in '' $ac_executable_extensions; do
43125   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43126     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43127     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43128     break 2
43129   fi
43130 done
43131   done
43132 IFS=$as_save_IFS
43133 
43134   ;;
43135 esac
43136 fi
43137 BUILD_CC=$ac_cv_path_BUILD_CC
43138 if test -n "$BUILD_CC"; then
43139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43140 $as_echo "$BUILD_CC" >&6; }
43141 else
43142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43143 $as_echo "no" >&6; }
43144 fi
43145 
43146 
43147   test -n "$BUILD_CC" && break
43148 done
43149 
43150     else
43151       # If it succeeded, then it was overridden by the user. We will use it
43152       # for the tool.
43153 
43154       # First remove it from the list of overridden variables, so we can test
43155       # for unknown variables in the end.
43156       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43157 
43158       # Check if we try to supply an empty value
43159       if test "x$BUILD_CC" = x; then
43160         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43161 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43162         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43163 $as_echo_n "checking for BUILD_CC... " >&6; }
43164         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43165 $as_echo "disabled" >&6; }
43166       else
43167         # Check if the provided tool contains a complete path.
43168         tool_specified="$BUILD_CC"
43169         tool_basename="${tool_specified##*/}"
43170         if test "x$tool_basename" = "x$tool_specified"; then
43171           # A command without a complete path is provided, search $PATH.
43172           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43173 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43174           # Extract the first word of "$tool_basename", so it can be a program name with args.
43175 set dummy $tool_basename; ac_word=$2
43176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43177 $as_echo_n "checking for $ac_word... " >&6; }
43178 if ${ac_cv_path_BUILD_CC+:} false; then :
43179   $as_echo_n "(cached) " >&6
43180 else
43181   case $BUILD_CC in
43182   [\\/]* | ?:[\\/]*)
43183   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43184   ;;
43185   *)
43186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43187 for as_dir in $PATH
43188 do
43189   IFS=$as_save_IFS
43190   test -z "$as_dir" && as_dir=.
43191     for ac_exec_ext in '' $ac_executable_extensions; do
43192   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43193     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43194     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43195     break 2
43196   fi
43197 done
43198   done
43199 IFS=$as_save_IFS
43200 
43201   ;;
43202 esac
43203 fi
43204 BUILD_CC=$ac_cv_path_BUILD_CC
43205 if test -n "$BUILD_CC"; then
43206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43207 $as_echo "$BUILD_CC" >&6; }
43208 else
43209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43210 $as_echo "no" >&6; }
43211 fi
43212 
43213 
43214           if test "x$BUILD_CC" = x; then
43215             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43216           fi
43217         else
43218           # Otherwise we believe it is a complete path. Use it as it is.
43219           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43220 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43221           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43222 $as_echo_n "checking for BUILD_CC... " >&6; }
43223           if test ! -x "$tool_specified"; then
43224             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43225 $as_echo "not found" >&6; }
43226             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43227           fi
43228           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43229 $as_echo "$tool_specified" >&6; }
43230         fi
43231       fi
43232     fi
43233 
43234   fi
43235 
43236 
43237 
43238   if test "x$BUILD_CC" = x; then
43239     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43240   fi
43241 
43242 
43243 
43244   # Only process if variable expands to non-empty
43245 
43246   if test "x$BUILD_CC" != x; then
43247     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43248 
43249   # First separate the path from the arguments. This will split at the first
43250   # space.
43251   complete="$BUILD_CC"
43252   path="${complete%% *}"
43253   tmp="$complete EOL"
43254   arguments="${tmp#* }"
43255 
43256   # Input might be given as Windows format, start by converting to
43257   # unix format.
43258   new_path=`$CYGPATH -u "$path"`
43259 
43260   # Now try to locate executable using which
43261   new_path=`$WHICH "$new_path" 2> /dev/null`
43262   # bat and cmd files are not always considered executable in cygwin causing which
43263   # to not find them
43264   if test "x$new_path" = x \
43265       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43266       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43267     new_path=`$CYGPATH -u "$path"`
43268   fi
43269   if test "x$new_path" = x; then
43270     # Oops. Which didn't find the executable.
43271     # The splitting of arguments from the executable at a space might have been incorrect,
43272     # since paths with space are more likely in Windows. Give it another try with the whole
43273     # argument.
43274     path="$complete"
43275     arguments="EOL"
43276     new_path=`$CYGPATH -u "$path"`
43277     new_path=`$WHICH "$new_path" 2> /dev/null`
43278     # bat and cmd files are not always considered executable in cygwin causing which
43279     # to not find them
43280     if test "x$new_path" = x \
43281         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43282         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43283       new_path=`$CYGPATH -u "$path"`
43284     fi
43285     if test "x$new_path" = x; then
43286       # It's still not found. Now this is an unrecoverable error.
43287       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43288 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43289       has_space=`$ECHO "$complete" | $GREP " "`
43290       if test "x$has_space" != x; then
43291         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43292 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43293       fi
43294       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43295     fi
43296   fi
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 presence.
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     # Short path failed, file does not exist as specified.
43308     # Try adding .exe or .cmd
43309     if test -f "${new_path}.exe"; then
43310       input_to_shortpath="${new_path}.exe"
43311     elif test -f "${new_path}.cmd"; then
43312       input_to_shortpath="${new_path}.cmd"
43313     else
43314       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43315 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43316       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43317 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43318       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43319     fi
43320   else
43321     input_to_shortpath="$new_path"
43322   fi
43323 
43324   # Call helper function which possibly converts this using DOS-style short mode.
43325   # If so, the updated path is stored in $new_path.
43326   new_path="$input_to_shortpath"
43327 
43328   input_path="$input_to_shortpath"
43329   # Check if we need to convert this using DOS-style short mode. If the path
43330   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43331   # take no chances and rewrite it.
43332   # Note: m4 eats our [], so we need to use [ and ] instead.
43333   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43334   if test "x$has_forbidden_chars" != x; then
43335     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43336     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43337     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43338     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43339       # Going to short mode and back again did indeed matter. Since short mode is
43340       # case insensitive, let's make it lowercase to improve readability.
43341       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43342       # Now convert it back to Unix-style (cygpath)
43343       input_path=`$CYGPATH -u "$shortmode_path"`
43344       new_path="$input_path"
43345     fi
43346   fi
43347 
43348   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43349   if test "x$test_cygdrive_prefix" = x; then
43350     # As a simple fix, exclude /usr/bin since it's not a real path.
43351     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43352       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43353       # a path prefixed by /cygdrive for fixpath to work.
43354       new_path="$CYGWIN_ROOT_PATH$input_path"
43355     fi
43356   fi
43357 
43358   # remove trailing .exe if any
43359   new_path="${new_path/%.exe/}"
43360 
43361     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43362 
43363   # First separate the path from the arguments. This will split at the first
43364   # space.
43365   complete="$BUILD_CC"
43366   path="${complete%% *}"
43367   tmp="$complete EOL"
43368   arguments="${tmp#* }"
43369 
43370   # Input might be given as Windows format, start by converting to
43371   # unix format.
43372   new_path="$path"
43373 
43374   windows_path="$new_path"
43375   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43376     unix_path=`$CYGPATH -u "$windows_path"`
43377     new_path="$unix_path"
43378   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43379     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43380     new_path="$unix_path"
43381   fi
43382 
43383 
43384   # Now try to locate executable using which
43385   new_path=`$WHICH "$new_path" 2> /dev/null`
43386 
43387   if test "x$new_path" = x; then
43388     # Oops. Which didn't find the executable.
43389     # The splitting of arguments from the executable at a space might have been incorrect,
43390     # since paths with space are more likely in Windows. Give it another try with the whole
43391     # argument.
43392     path="$complete"
43393     arguments="EOL"
43394     new_path="$path"
43395 
43396   windows_path="$new_path"
43397   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43398     unix_path=`$CYGPATH -u "$windows_path"`
43399     new_path="$unix_path"
43400   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43401     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43402     new_path="$unix_path"
43403   fi
43404 
43405 
43406     new_path=`$WHICH "$new_path" 2> /dev/null`
43407     # bat and cmd files are not always considered executable in MSYS causing which
43408     # to not find them
43409     if test "x$new_path" = x \
43410         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43411         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43412       new_path="$path"
43413 
43414   windows_path="$new_path"
43415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43416     unix_path=`$CYGPATH -u "$windows_path"`
43417     new_path="$unix_path"
43418   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43419     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43420     new_path="$unix_path"
43421   fi
43422 
43423     fi
43424 
43425     if test "x$new_path" = x; then
43426       # It's still not found. Now this is an unrecoverable error.
43427       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43428 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43429       has_space=`$ECHO "$complete" | $GREP " "`
43430       if test "x$has_space" != x; then
43431         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43432 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43433       fi
43434       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43435     fi
43436   fi
43437 
43438   # Now new_path has a complete unix path to the binary
43439   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43440     # Keep paths in /bin as-is, but remove trailing .exe if any
43441     new_path="${new_path/%.exe/}"
43442     # Do not save /bin paths to all_fixpath_prefixes!
43443   else
43444     # Not in mixed or Windows style, start by that.
43445     new_path=`cmd //c echo $new_path`
43446 
43447   input_path="$new_path"
43448   # Check if we need to convert this using DOS-style short mode. If the path
43449   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43450   # take no chances and rewrite it.
43451   # Note: m4 eats our [], so we need to use [ and ] instead.
43452   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43453   if test "x$has_forbidden_chars" != x; then
43454     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43455     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43456   fi
43457 
43458     # Output is in $new_path
43459 
43460   windows_path="$new_path"
43461   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43462     unix_path=`$CYGPATH -u "$windows_path"`
43463     new_path="$unix_path"
43464   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43465     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43466     new_path="$unix_path"
43467   fi
43468 
43469     # remove trailing .exe if any
43470     new_path="${new_path/%.exe/}"
43471 
43472     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43473     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43474   fi
43475 
43476     else
43477       # We're on a unix platform. Hooray! :)
43478       # First separate the path from the arguments. This will split at the first
43479       # space.
43480       complete="$BUILD_CC"
43481       path="${complete%% *}"
43482       tmp="$complete EOL"
43483       arguments="${tmp#* }"
43484 
43485       # Cannot rely on the command "which" here since it doesn't always work.
43486       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43487       if test -z "$is_absolute_path"; then
43488         # Path to executable is not absolute. Find it.
43489         IFS_save="$IFS"
43490         IFS=:
43491         for p in $PATH; do
43492           if test -f "$p/$path" && test -x "$p/$path"; then
43493             new_path="$p/$path"
43494             break
43495           fi
43496         done
43497         IFS="$IFS_save"
43498       else
43499         # This is an absolute path, we can use it without further modifications.
43500         new_path="$path"
43501       fi
43502 
43503       if test "x$new_path" = x; then
43504         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43505 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43506         has_space=`$ECHO "$complete" | $GREP " "`
43507         if test "x$has_space" != x; then
43508           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43509 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43510         fi
43511         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43512       fi
43513     fi
43514 
43515     # Now join together the path and the arguments once again
43516     if test "x$arguments" != xEOL; then
43517       new_complete="$new_path ${arguments% *}"
43518     else
43519       new_complete="$new_path"
43520     fi
43521 
43522     if test "x$complete" != "x$new_complete"; then
43523       BUILD_CC="$new_complete"
43524       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
43525 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
43526     fi
43527   fi
43528 
43529 
43530 
43531 
43532   # Publish this variable in the help.
43533 
43534 
43535   if [ -z "${BUILD_CXX+x}" ]; then
43536     # The variable is not set by user, try to locate tool using the code snippet
43537     for ac_prog in cl CC g++
43538 do
43539   # Extract the first word of "$ac_prog", so it can be a program name with args.
43540 set dummy $ac_prog; ac_word=$2
43541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43542 $as_echo_n "checking for $ac_word... " >&6; }
43543 if ${ac_cv_path_BUILD_CXX+:} false; then :
43544   $as_echo_n "(cached) " >&6
43545 else
43546   case $BUILD_CXX in
43547   [\\/]* | ?:[\\/]*)
43548   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43549   ;;
43550   *)
43551   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43552 for as_dir in $PATH
43553 do
43554   IFS=$as_save_IFS
43555   test -z "$as_dir" && as_dir=.
43556     for ac_exec_ext in '' $ac_executable_extensions; do
43557   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43558     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43559     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43560     break 2
43561   fi
43562 done
43563   done
43564 IFS=$as_save_IFS
43565 
43566   ;;
43567 esac
43568 fi
43569 BUILD_CXX=$ac_cv_path_BUILD_CXX
43570 if test -n "$BUILD_CXX"; then
43571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43572 $as_echo "$BUILD_CXX" >&6; }
43573 else
43574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43575 $as_echo "no" >&6; }
43576 fi
43577 
43578 
43579   test -n "$BUILD_CXX" && break
43580 done
43581 
43582   else
43583     # The variable is set, but is it from the command line or the environment?
43584 
43585     # Try to remove the string !BUILD_CXX! from our list.
43586     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
43587     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43588       # If it failed, the variable was not from the command line. Ignore it,
43589       # but warn the user (except for BASH, which is always set by the calling BASH).
43590       if test "xBUILD_CXX" != xBASH; then
43591         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
43592 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
43593       fi
43594       # Try to locate tool using the code snippet
43595       for ac_prog in cl CC g++
43596 do
43597   # Extract the first word of "$ac_prog", so it can be a program name with args.
43598 set dummy $ac_prog; ac_word=$2
43599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43600 $as_echo_n "checking for $ac_word... " >&6; }
43601 if ${ac_cv_path_BUILD_CXX+:} false; then :
43602   $as_echo_n "(cached) " >&6
43603 else
43604   case $BUILD_CXX in
43605   [\\/]* | ?:[\\/]*)
43606   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43607   ;;
43608   *)
43609   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43610 for as_dir in $PATH
43611 do
43612   IFS=$as_save_IFS
43613   test -z "$as_dir" && as_dir=.
43614     for ac_exec_ext in '' $ac_executable_extensions; do
43615   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43616     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43617     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43618     break 2
43619   fi
43620 done
43621   done
43622 IFS=$as_save_IFS
43623 
43624   ;;
43625 esac
43626 fi
43627 BUILD_CXX=$ac_cv_path_BUILD_CXX
43628 if test -n "$BUILD_CXX"; then
43629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43630 $as_echo "$BUILD_CXX" >&6; }
43631 else
43632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43633 $as_echo "no" >&6; }
43634 fi
43635 
43636 
43637   test -n "$BUILD_CXX" && break
43638 done
43639 
43640     else
43641       # If it succeeded, then it was overridden by the user. We will use it
43642       # for the tool.
43643 
43644       # First remove it from the list of overridden variables, so we can test
43645       # for unknown variables in the end.
43646       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43647 
43648       # Check if we try to supply an empty value
43649       if test "x$BUILD_CXX" = x; then
43650         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43651 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43652         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43653 $as_echo_n "checking for BUILD_CXX... " >&6; }
43654         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43655 $as_echo "disabled" >&6; }
43656       else
43657         # Check if the provided tool contains a complete path.
43658         tool_specified="$BUILD_CXX"
43659         tool_basename="${tool_specified##*/}"
43660         if test "x$tool_basename" = "x$tool_specified"; then
43661           # A command without a complete path is provided, search $PATH.
43662           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43663 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43664           # Extract the first word of "$tool_basename", so it can be a program name with args.
43665 set dummy $tool_basename; ac_word=$2
43666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43667 $as_echo_n "checking for $ac_word... " >&6; }
43668 if ${ac_cv_path_BUILD_CXX+:} false; then :
43669   $as_echo_n "(cached) " >&6
43670 else
43671   case $BUILD_CXX in
43672   [\\/]* | ?:[\\/]*)
43673   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43674   ;;
43675   *)
43676   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43677 for as_dir in $PATH
43678 do
43679   IFS=$as_save_IFS
43680   test -z "$as_dir" && as_dir=.
43681     for ac_exec_ext in '' $ac_executable_extensions; do
43682   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43683     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43684     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43685     break 2
43686   fi
43687 done
43688   done
43689 IFS=$as_save_IFS
43690 
43691   ;;
43692 esac
43693 fi
43694 BUILD_CXX=$ac_cv_path_BUILD_CXX
43695 if test -n "$BUILD_CXX"; then
43696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43697 $as_echo "$BUILD_CXX" >&6; }
43698 else
43699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43700 $as_echo "no" >&6; }
43701 fi
43702 
43703 
43704           if test "x$BUILD_CXX" = x; then
43705             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43706           fi
43707         else
43708           # Otherwise we believe it is a complete path. Use it as it is.
43709           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43710 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43711           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43712 $as_echo_n "checking for BUILD_CXX... " >&6; }
43713           if test ! -x "$tool_specified"; then
43714             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43715 $as_echo "not found" >&6; }
43716             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43717           fi
43718           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43719 $as_echo "$tool_specified" >&6; }
43720         fi
43721       fi
43722     fi
43723 
43724   fi
43725 
43726 
43727 
43728   if test "x$BUILD_CXX" = x; then
43729     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
43730   fi
43731 
43732 
43733 
43734   # Only process if variable expands to non-empty
43735 
43736   if test "x$BUILD_CXX" != x; then
43737     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43738 
43739   # First separate the path from the arguments. This will split at the first
43740   # space.
43741   complete="$BUILD_CXX"
43742   path="${complete%% *}"
43743   tmp="$complete EOL"
43744   arguments="${tmp#* }"
43745 
43746   # Input might be given as Windows format, start by converting to
43747   # unix format.
43748   new_path=`$CYGPATH -u "$path"`
43749 
43750   # Now try to locate executable using which
43751   new_path=`$WHICH "$new_path" 2> /dev/null`
43752   # bat and cmd files are not always considered executable in cygwin causing which
43753   # to not find them
43754   if test "x$new_path" = x \
43755       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43756       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43757     new_path=`$CYGPATH -u "$path"`
43758   fi
43759   if test "x$new_path" = x; then
43760     # Oops. Which didn't find the executable.
43761     # The splitting of arguments from the executable at a space might have been incorrect,
43762     # since paths with space are more likely in Windows. Give it another try with the whole
43763     # argument.
43764     path="$complete"
43765     arguments="EOL"
43766     new_path=`$CYGPATH -u "$path"`
43767     new_path=`$WHICH "$new_path" 2> /dev/null`
43768     # bat and cmd files are not always considered executable in cygwin causing which
43769     # to not find them
43770     if test "x$new_path" = x \
43771         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43772         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43773       new_path=`$CYGPATH -u "$path"`
43774     fi
43775     if test "x$new_path" = x; then
43776       # It's still not found. Now this is an unrecoverable error.
43777       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43778 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43779       has_space=`$ECHO "$complete" | $GREP " "`
43780       if test "x$has_space" != x; then
43781         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43782 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43783       fi
43784       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43785     fi
43786   fi
43787 
43788   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43789   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43790   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43791   # "foo.exe" is OK but "foo" is an error.
43792   #
43793   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43794   # It is also a way to make sure we got the proper file name for the real test later on.
43795   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43796   if test "x$test_shortpath" = x; then
43797     # Short path failed, file does not exist as specified.
43798     # Try adding .exe or .cmd
43799     if test -f "${new_path}.exe"; then
43800       input_to_shortpath="${new_path}.exe"
43801     elif test -f "${new_path}.cmd"; then
43802       input_to_shortpath="${new_path}.cmd"
43803     else
43804       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
43805 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
43806       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43807 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43808       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43809     fi
43810   else
43811     input_to_shortpath="$new_path"
43812   fi
43813 
43814   # Call helper function which possibly converts this using DOS-style short mode.
43815   # If so, the updated path is stored in $new_path.
43816   new_path="$input_to_shortpath"
43817 
43818   input_path="$input_to_shortpath"
43819   # Check if we need to convert this using DOS-style short mode. If the path
43820   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43821   # take no chances and rewrite it.
43822   # Note: m4 eats our [], so we need to use [ and ] instead.
43823   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43824   if test "x$has_forbidden_chars" != x; then
43825     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43826     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43827     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43828     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43829       # Going to short mode and back again did indeed matter. Since short mode is
43830       # case insensitive, let's make it lowercase to improve readability.
43831       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43832       # Now convert it back to Unix-style (cygpath)
43833       input_path=`$CYGPATH -u "$shortmode_path"`
43834       new_path="$input_path"
43835     fi
43836   fi
43837 
43838   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43839   if test "x$test_cygdrive_prefix" = x; then
43840     # As a simple fix, exclude /usr/bin since it's not a real path.
43841     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43842       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43843       # a path prefixed by /cygdrive for fixpath to work.
43844       new_path="$CYGWIN_ROOT_PATH$input_path"
43845     fi
43846   fi
43847 
43848   # remove trailing .exe if any
43849   new_path="${new_path/%.exe/}"
43850 
43851     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43852 
43853   # First separate the path from the arguments. This will split at the first
43854   # space.
43855   complete="$BUILD_CXX"
43856   path="${complete%% *}"
43857   tmp="$complete EOL"
43858   arguments="${tmp#* }"
43859 
43860   # Input might be given as Windows format, start by converting to
43861   # unix format.
43862   new_path="$path"
43863 
43864   windows_path="$new_path"
43865   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43866     unix_path=`$CYGPATH -u "$windows_path"`
43867     new_path="$unix_path"
43868   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43869     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43870     new_path="$unix_path"
43871   fi
43872 
43873 
43874   # Now try to locate executable using which
43875   new_path=`$WHICH "$new_path" 2> /dev/null`
43876 
43877   if test "x$new_path" = x; then
43878     # Oops. Which didn't find the executable.
43879     # The splitting of arguments from the executable at a space might have been incorrect,
43880     # since paths with space are more likely in Windows. Give it another try with the whole
43881     # argument.
43882     path="$complete"
43883     arguments="EOL"
43884     new_path="$path"
43885 
43886   windows_path="$new_path"
43887   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43888     unix_path=`$CYGPATH -u "$windows_path"`
43889     new_path="$unix_path"
43890   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43891     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43892     new_path="$unix_path"
43893   fi
43894 
43895 
43896     new_path=`$WHICH "$new_path" 2> /dev/null`
43897     # bat and cmd files are not always considered executable in MSYS causing which
43898     # to not find them
43899     if test "x$new_path" = x \
43900         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43901         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43902       new_path="$path"
43903 
43904   windows_path="$new_path"
43905   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43906     unix_path=`$CYGPATH -u "$windows_path"`
43907     new_path="$unix_path"
43908   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43909     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43910     new_path="$unix_path"
43911   fi
43912 
43913     fi
43914 
43915     if test "x$new_path" = x; then
43916       # It's still not found. Now this is an unrecoverable error.
43917       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43918 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43919       has_space=`$ECHO "$complete" | $GREP " "`
43920       if test "x$has_space" != x; then
43921         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43922 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43923       fi
43924       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43925     fi
43926   fi
43927 
43928   # Now new_path has a complete unix path to the binary
43929   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43930     # Keep paths in /bin as-is, but remove trailing .exe if any
43931     new_path="${new_path/%.exe/}"
43932     # Do not save /bin paths to all_fixpath_prefixes!
43933   else
43934     # Not in mixed or Windows style, start by that.
43935     new_path=`cmd //c echo $new_path`
43936 
43937   input_path="$new_path"
43938   # Check if we need to convert this using DOS-style short mode. If the path
43939   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43940   # take no chances and rewrite it.
43941   # Note: m4 eats our [], so we need to use [ and ] instead.
43942   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43943   if test "x$has_forbidden_chars" != x; then
43944     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43945     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43946   fi
43947 
43948     # Output is in $new_path
43949 
43950   windows_path="$new_path"
43951   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43952     unix_path=`$CYGPATH -u "$windows_path"`
43953     new_path="$unix_path"
43954   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43955     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43956     new_path="$unix_path"
43957   fi
43958 
43959     # remove trailing .exe if any
43960     new_path="${new_path/%.exe/}"
43961 
43962     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43963     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43964   fi
43965 
43966     else
43967       # We're on a unix platform. Hooray! :)
43968       # First separate the path from the arguments. This will split at the first
43969       # space.
43970       complete="$BUILD_CXX"
43971       path="${complete%% *}"
43972       tmp="$complete EOL"
43973       arguments="${tmp#* }"
43974 
43975       # Cannot rely on the command "which" here since it doesn't always work.
43976       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43977       if test -z "$is_absolute_path"; then
43978         # Path to executable is not absolute. Find it.
43979         IFS_save="$IFS"
43980         IFS=:
43981         for p in $PATH; do
43982           if test -f "$p/$path" && test -x "$p/$path"; then
43983             new_path="$p/$path"
43984             break
43985           fi
43986         done
43987         IFS="$IFS_save"
43988       else
43989         # This is an absolute path, we can use it without further modifications.
43990         new_path="$path"
43991       fi
43992 
43993       if test "x$new_path" = x; then
43994         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43995 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43996         has_space=`$ECHO "$complete" | $GREP " "`
43997         if test "x$has_space" != x; then
43998           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43999 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44000         fi
44001         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44002       fi
44003     fi
44004 
44005     # Now join together the path and the arguments once again
44006     if test "x$arguments" != xEOL; then
44007       new_complete="$new_path ${arguments% *}"
44008     else
44009       new_complete="$new_path"
44010     fi
44011 
44012     if test "x$complete" != "x$new_complete"; then
44013       BUILD_CXX="$new_complete"
44014       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44015 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44016     fi
44017   fi
44018 
44019 
44020 
44021   # Publish this variable in the help.
44022 
44023 
44024   if [ -z "${BUILD_NM+x}" ]; then
44025     # The variable is not set by user, try to locate tool using the code snippet
44026     for ac_prog in nm gcc-nm
44027 do
44028   # Extract the first word of "$ac_prog", so it can be a program name with args.
44029 set dummy $ac_prog; ac_word=$2
44030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44031 $as_echo_n "checking for $ac_word... " >&6; }
44032 if ${ac_cv_path_BUILD_NM+:} false; then :
44033   $as_echo_n "(cached) " >&6
44034 else
44035   case $BUILD_NM in
44036   [\\/]* | ?:[\\/]*)
44037   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44038   ;;
44039   *)
44040   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44041 for as_dir in $PATH
44042 do
44043   IFS=$as_save_IFS
44044   test -z "$as_dir" && as_dir=.
44045     for ac_exec_ext in '' $ac_executable_extensions; do
44046   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44047     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44048     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44049     break 2
44050   fi
44051 done
44052   done
44053 IFS=$as_save_IFS
44054 
44055   ;;
44056 esac
44057 fi
44058 BUILD_NM=$ac_cv_path_BUILD_NM
44059 if test -n "$BUILD_NM"; then
44060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44061 $as_echo "$BUILD_NM" >&6; }
44062 else
44063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44064 $as_echo "no" >&6; }
44065 fi
44066 
44067 
44068   test -n "$BUILD_NM" && break
44069 done
44070 
44071   else
44072     # The variable is set, but is it from the command line or the environment?
44073 
44074     # Try to remove the string !BUILD_NM! from our list.
44075     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44076     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44077       # If it failed, the variable was not from the command line. Ignore it,
44078       # but warn the user (except for BASH, which is always set by the calling BASH).
44079       if test "xBUILD_NM" != xBASH; then
44080         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44081 $as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44082       fi
44083       # Try to locate tool using the code snippet
44084       for ac_prog in nm gcc-nm
44085 do
44086   # Extract the first word of "$ac_prog", so it can be a program name with args.
44087 set dummy $ac_prog; ac_word=$2
44088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44089 $as_echo_n "checking for $ac_word... " >&6; }
44090 if ${ac_cv_path_BUILD_NM+:} false; then :
44091   $as_echo_n "(cached) " >&6
44092 else
44093   case $BUILD_NM in
44094   [\\/]* | ?:[\\/]*)
44095   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44096   ;;
44097   *)
44098   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44099 for as_dir in $PATH
44100 do
44101   IFS=$as_save_IFS
44102   test -z "$as_dir" && as_dir=.
44103     for ac_exec_ext in '' $ac_executable_extensions; do
44104   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44105     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44106     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44107     break 2
44108   fi
44109 done
44110   done
44111 IFS=$as_save_IFS
44112 
44113   ;;
44114 esac
44115 fi
44116 BUILD_NM=$ac_cv_path_BUILD_NM
44117 if test -n "$BUILD_NM"; then
44118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44119 $as_echo "$BUILD_NM" >&6; }
44120 else
44121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44122 $as_echo "no" >&6; }
44123 fi
44124 
44125 
44126   test -n "$BUILD_NM" && break
44127 done
44128 
44129     else
44130       # If it succeeded, then it was overridden by the user. We will use it
44131       # for the tool.
44132 
44133       # First remove it from the list of overridden variables, so we can test
44134       # for unknown variables in the end.
44135       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44136 
44137       # Check if we try to supply an empty value
44138       if test "x$BUILD_NM" = x; then
44139         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44140 $as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44141         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44142 $as_echo_n "checking for BUILD_NM... " >&6; }
44143         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44144 $as_echo "disabled" >&6; }
44145       else
44146         # Check if the provided tool contains a complete path.
44147         tool_specified="$BUILD_NM"
44148         tool_basename="${tool_specified##*/}"
44149         if test "x$tool_basename" = "x$tool_specified"; then
44150           # A command without a complete path is provided, search $PATH.
44151           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44152 $as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44153           # Extract the first word of "$tool_basename", so it can be a program name with args.
44154 set dummy $tool_basename; ac_word=$2
44155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44156 $as_echo_n "checking for $ac_word... " >&6; }
44157 if ${ac_cv_path_BUILD_NM+:} false; then :
44158   $as_echo_n "(cached) " >&6
44159 else
44160   case $BUILD_NM in
44161   [\\/]* | ?:[\\/]*)
44162   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44163   ;;
44164   *)
44165   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44166 for as_dir in $PATH
44167 do
44168   IFS=$as_save_IFS
44169   test -z "$as_dir" && as_dir=.
44170     for ac_exec_ext in '' $ac_executable_extensions; do
44171   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44172     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44173     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44174     break 2
44175   fi
44176 done
44177   done
44178 IFS=$as_save_IFS
44179 
44180   ;;
44181 esac
44182 fi
44183 BUILD_NM=$ac_cv_path_BUILD_NM
44184 if test -n "$BUILD_NM"; then
44185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44186 $as_echo "$BUILD_NM" >&6; }
44187 else
44188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44189 $as_echo "no" >&6; }
44190 fi
44191 
44192 
44193           if test "x$BUILD_NM" = x; then
44194             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44195           fi
44196         else
44197           # Otherwise we believe it is a complete path. Use it as it is.
44198           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44199 $as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44200           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44201 $as_echo_n "checking for BUILD_NM... " >&6; }
44202           if test ! -x "$tool_specified"; then
44203             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44204 $as_echo "not found" >&6; }
44205             as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44206           fi
44207           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44208 $as_echo "$tool_specified" >&6; }
44209         fi
44210       fi
44211     fi
44212 
44213   fi
44214 
44215 
44216 
44217   # Only process if variable expands to non-empty
44218 
44219   if test "x$BUILD_NM" != x; then
44220     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44221 
44222   # First separate the path from the arguments. This will split at the first
44223   # space.
44224   complete="$BUILD_NM"
44225   path="${complete%% *}"
44226   tmp="$complete EOL"
44227   arguments="${tmp#* }"
44228 
44229   # Input might be given as Windows format, start by converting to
44230   # unix format.
44231   new_path=`$CYGPATH -u "$path"`
44232 
44233   # Now try to locate executable using which
44234   new_path=`$WHICH "$new_path" 2> /dev/null`
44235   # bat and cmd files are not always considered executable in cygwin causing which
44236   # to not find them
44237   if test "x$new_path" = x \
44238       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44239       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44240     new_path=`$CYGPATH -u "$path"`
44241   fi
44242   if test "x$new_path" = x; then
44243     # Oops. Which didn't find the executable.
44244     # The splitting of arguments from the executable at a space might have been incorrect,
44245     # since paths with space are more likely in Windows. Give it another try with the whole
44246     # argument.
44247     path="$complete"
44248     arguments="EOL"
44249     new_path=`$CYGPATH -u "$path"`
44250     new_path=`$WHICH "$new_path" 2> /dev/null`
44251     # bat and cmd files are not always considered executable in cygwin causing which
44252     # to not find them
44253     if test "x$new_path" = x \
44254         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44255         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44256       new_path=`$CYGPATH -u "$path"`
44257     fi
44258     if test "x$new_path" = x; then
44259       # It's still not found. Now this is an unrecoverable error.
44260       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44261 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44262       has_space=`$ECHO "$complete" | $GREP " "`
44263       if test "x$has_space" != x; then
44264         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44265 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44266       fi
44267       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44268     fi
44269   fi
44270 
44271   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44272   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44273   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44274   # "foo.exe" is OK but "foo" is an error.
44275   #
44276   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44277   # It is also a way to make sure we got the proper file name for the real test later on.
44278   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44279   if test "x$test_shortpath" = x; then
44280     # Short path failed, file does not exist as specified.
44281     # Try adding .exe or .cmd
44282     if test -f "${new_path}.exe"; then
44283       input_to_shortpath="${new_path}.exe"
44284     elif test -f "${new_path}.cmd"; then
44285       input_to_shortpath="${new_path}.cmd"
44286     else
44287       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44288 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44289       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44290 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44291       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44292     fi
44293   else
44294     input_to_shortpath="$new_path"
44295   fi
44296 
44297   # Call helper function which possibly converts this using DOS-style short mode.
44298   # If so, the updated path is stored in $new_path.
44299   new_path="$input_to_shortpath"
44300 
44301   input_path="$input_to_shortpath"
44302   # Check if we need to convert this using DOS-style short mode. If the path
44303   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44304   # take no chances and rewrite it.
44305   # Note: m4 eats our [], so we need to use [ and ] instead.
44306   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44307   if test "x$has_forbidden_chars" != x; then
44308     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44309     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44310     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44311     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44312       # Going to short mode and back again did indeed matter. Since short mode is
44313       # case insensitive, let's make it lowercase to improve readability.
44314       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44315       # Now convert it back to Unix-style (cygpath)
44316       input_path=`$CYGPATH -u "$shortmode_path"`
44317       new_path="$input_path"
44318     fi
44319   fi
44320 
44321   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44322   if test "x$test_cygdrive_prefix" = x; then
44323     # As a simple fix, exclude /usr/bin since it's not a real path.
44324     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44325       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44326       # a path prefixed by /cygdrive for fixpath to work.
44327       new_path="$CYGWIN_ROOT_PATH$input_path"
44328     fi
44329   fi
44330 
44331   # remove trailing .exe if any
44332   new_path="${new_path/%.exe/}"
44333 
44334     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44335 
44336   # First separate the path from the arguments. This will split at the first
44337   # space.
44338   complete="$BUILD_NM"
44339   path="${complete%% *}"
44340   tmp="$complete EOL"
44341   arguments="${tmp#* }"
44342 
44343   # Input might be given as Windows format, start by converting to
44344   # unix format.
44345   new_path="$path"
44346 
44347   windows_path="$new_path"
44348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44349     unix_path=`$CYGPATH -u "$windows_path"`
44350     new_path="$unix_path"
44351   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44352     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44353     new_path="$unix_path"
44354   fi
44355 
44356 
44357   # Now try to locate executable using which
44358   new_path=`$WHICH "$new_path" 2> /dev/null`
44359 
44360   if test "x$new_path" = x; then
44361     # Oops. Which didn't find the executable.
44362     # The splitting of arguments from the executable at a space might have been incorrect,
44363     # since paths with space are more likely in Windows. Give it another try with the whole
44364     # argument.
44365     path="$complete"
44366     arguments="EOL"
44367     new_path="$path"
44368 
44369   windows_path="$new_path"
44370   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44371     unix_path=`$CYGPATH -u "$windows_path"`
44372     new_path="$unix_path"
44373   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44374     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44375     new_path="$unix_path"
44376   fi
44377 
44378 
44379     new_path=`$WHICH "$new_path" 2> /dev/null`
44380     # bat and cmd files are not always considered executable in MSYS causing which
44381     # to not find them
44382     if test "x$new_path" = x \
44383         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44384         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44385       new_path="$path"
44386 
44387   windows_path="$new_path"
44388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44389     unix_path=`$CYGPATH -u "$windows_path"`
44390     new_path="$unix_path"
44391   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44392     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44393     new_path="$unix_path"
44394   fi
44395 
44396     fi
44397 
44398     if test "x$new_path" = x; then
44399       # It's still not found. Now this is an unrecoverable error.
44400       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44401 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44402       has_space=`$ECHO "$complete" | $GREP " "`
44403       if test "x$has_space" != x; then
44404         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44405 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44406       fi
44407       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44408     fi
44409   fi
44410 
44411   # Now new_path has a complete unix path to the binary
44412   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44413     # Keep paths in /bin as-is, but remove trailing .exe if any
44414     new_path="${new_path/%.exe/}"
44415     # Do not save /bin paths to all_fixpath_prefixes!
44416   else
44417     # Not in mixed or Windows style, start by that.
44418     new_path=`cmd //c echo $new_path`
44419 
44420   input_path="$new_path"
44421   # Check if we need to convert this using DOS-style short mode. If the path
44422   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44423   # take no chances and rewrite it.
44424   # Note: m4 eats our [], so we need to use [ and ] instead.
44425   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44426   if test "x$has_forbidden_chars" != x; then
44427     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44428     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44429   fi
44430 
44431     # Output is in $new_path
44432 
44433   windows_path="$new_path"
44434   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44435     unix_path=`$CYGPATH -u "$windows_path"`
44436     new_path="$unix_path"
44437   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44438     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44439     new_path="$unix_path"
44440   fi
44441 
44442     # remove trailing .exe if any
44443     new_path="${new_path/%.exe/}"
44444 
44445     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44446     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44447   fi
44448 
44449     else
44450       # We're on a unix platform. Hooray! :)
44451       # First separate the path from the arguments. This will split at the first
44452       # space.
44453       complete="$BUILD_NM"
44454       path="${complete%% *}"
44455       tmp="$complete EOL"
44456       arguments="${tmp#* }"
44457 
44458       # Cannot rely on the command "which" here since it doesn't always work.
44459       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44460       if test -z "$is_absolute_path"; then
44461         # Path to executable is not absolute. Find it.
44462         IFS_save="$IFS"
44463         IFS=:
44464         for p in $PATH; do
44465           if test -f "$p/$path" && test -x "$p/$path"; then
44466             new_path="$p/$path"
44467             break
44468           fi
44469         done
44470         IFS="$IFS_save"
44471       else
44472         # This is an absolute path, we can use it without further modifications.
44473         new_path="$path"
44474       fi
44475 
44476       if test "x$new_path" = x; then
44477         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44478 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44479         has_space=`$ECHO "$complete" | $GREP " "`
44480         if test "x$has_space" != x; then
44481           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44482 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44483         fi
44484         as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44485       fi
44486     fi
44487 
44488     # Now join together the path and the arguments once again
44489     if test "x$arguments" != xEOL; then
44490       new_complete="$new_path ${arguments% *}"
44491     else
44492       new_complete="$new_path"
44493     fi
44494 
44495     if test "x$complete" != "x$new_complete"; then
44496       BUILD_NM="$new_complete"
44497       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44498 $as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44499     fi
44500   fi
44501 
44502 
44503 
44504   # Publish this variable in the help.
44505 
44506 
44507   if [ -z "${BUILD_AR+x}" ]; then
44508     # The variable is not set by user, try to locate tool using the code snippet
44509     for ac_prog in ar gcc-ar
44510 do
44511   # Extract the first word of "$ac_prog", so it can be a program name with args.
44512 set dummy $ac_prog; ac_word=$2
44513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44514 $as_echo_n "checking for $ac_word... " >&6; }
44515 if ${ac_cv_path_BUILD_AR+:} false; then :
44516   $as_echo_n "(cached) " >&6
44517 else
44518   case $BUILD_AR in
44519   [\\/]* | ?:[\\/]*)
44520   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44521   ;;
44522   *)
44523   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44524 for as_dir in $PATH
44525 do
44526   IFS=$as_save_IFS
44527   test -z "$as_dir" && as_dir=.
44528     for ac_exec_ext in '' $ac_executable_extensions; do
44529   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44530     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44531     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44532     break 2
44533   fi
44534 done
44535   done
44536 IFS=$as_save_IFS
44537 
44538   ;;
44539 esac
44540 fi
44541 BUILD_AR=$ac_cv_path_BUILD_AR
44542 if test -n "$BUILD_AR"; then
44543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44544 $as_echo "$BUILD_AR" >&6; }
44545 else
44546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44547 $as_echo "no" >&6; }
44548 fi
44549 
44550 
44551   test -n "$BUILD_AR" && break
44552 done
44553 
44554   else
44555     # The variable is set, but is it from the command line or the environment?
44556 
44557     # Try to remove the string !BUILD_AR! from our list.
44558     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
44559     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44560       # If it failed, the variable was not from the command line. Ignore it,
44561       # but warn the user (except for BASH, which is always set by the calling BASH).
44562       if test "xBUILD_AR" != xBASH; then
44563         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
44564 $as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
44565       fi
44566       # Try to locate tool using the code snippet
44567       for ac_prog in ar gcc-ar
44568 do
44569   # Extract the first word of "$ac_prog", so it can be a program name with args.
44570 set dummy $ac_prog; ac_word=$2
44571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44572 $as_echo_n "checking for $ac_word... " >&6; }
44573 if ${ac_cv_path_BUILD_AR+:} false; then :
44574   $as_echo_n "(cached) " >&6
44575 else
44576   case $BUILD_AR in
44577   [\\/]* | ?:[\\/]*)
44578   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44579   ;;
44580   *)
44581   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44582 for as_dir in $PATH
44583 do
44584   IFS=$as_save_IFS
44585   test -z "$as_dir" && as_dir=.
44586     for ac_exec_ext in '' $ac_executable_extensions; do
44587   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44588     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44590     break 2
44591   fi
44592 done
44593   done
44594 IFS=$as_save_IFS
44595 
44596   ;;
44597 esac
44598 fi
44599 BUILD_AR=$ac_cv_path_BUILD_AR
44600 if test -n "$BUILD_AR"; then
44601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44602 $as_echo "$BUILD_AR" >&6; }
44603 else
44604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44605 $as_echo "no" >&6; }
44606 fi
44607 
44608 
44609   test -n "$BUILD_AR" && break
44610 done
44611 
44612     else
44613       # If it succeeded, then it was overridden by the user. We will use it
44614       # for the tool.
44615 
44616       # First remove it from the list of overridden variables, so we can test
44617       # for unknown variables in the end.
44618       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44619 
44620       # Check if we try to supply an empty value
44621       if test "x$BUILD_AR" = x; then
44622         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
44623 $as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
44624         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44625 $as_echo_n "checking for BUILD_AR... " >&6; }
44626         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44627 $as_echo "disabled" >&6; }
44628       else
44629         # Check if the provided tool contains a complete path.
44630         tool_specified="$BUILD_AR"
44631         tool_basename="${tool_specified##*/}"
44632         if test "x$tool_basename" = "x$tool_specified"; then
44633           # A command without a complete path is provided, search $PATH.
44634           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
44635 $as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
44636           # Extract the first word of "$tool_basename", so it can be a program name with args.
44637 set dummy $tool_basename; ac_word=$2
44638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44639 $as_echo_n "checking for $ac_word... " >&6; }
44640 if ${ac_cv_path_BUILD_AR+:} false; then :
44641   $as_echo_n "(cached) " >&6
44642 else
44643   case $BUILD_AR in
44644   [\\/]* | ?:[\\/]*)
44645   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44646   ;;
44647   *)
44648   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44649 for as_dir in $PATH
44650 do
44651   IFS=$as_save_IFS
44652   test -z "$as_dir" && as_dir=.
44653     for ac_exec_ext in '' $ac_executable_extensions; do
44654   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44655     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44656     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44657     break 2
44658   fi
44659 done
44660   done
44661 IFS=$as_save_IFS
44662 
44663   ;;
44664 esac
44665 fi
44666 BUILD_AR=$ac_cv_path_BUILD_AR
44667 if test -n "$BUILD_AR"; then
44668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44669 $as_echo "$BUILD_AR" >&6; }
44670 else
44671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44672 $as_echo "no" >&6; }
44673 fi
44674 
44675 
44676           if test "x$BUILD_AR" = x; then
44677             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44678           fi
44679         else
44680           # Otherwise we believe it is a complete path. Use it as it is.
44681           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
44682 $as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
44683           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44684 $as_echo_n "checking for BUILD_AR... " >&6; }
44685           if test ! -x "$tool_specified"; then
44686             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44687 $as_echo "not found" >&6; }
44688             as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
44689           fi
44690           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44691 $as_echo "$tool_specified" >&6; }
44692         fi
44693       fi
44694     fi
44695 
44696   fi
44697 
44698 
44699 
44700   # Only process if variable expands to non-empty
44701 
44702   if test "x$BUILD_AR" != x; then
44703     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44704 
44705   # First separate the path from the arguments. This will split at the first
44706   # space.
44707   complete="$BUILD_AR"
44708   path="${complete%% *}"
44709   tmp="$complete EOL"
44710   arguments="${tmp#* }"
44711 
44712   # Input might be given as Windows format, start by converting to
44713   # unix format.
44714   new_path=`$CYGPATH -u "$path"`
44715 
44716   # Now try to locate executable using which
44717   new_path=`$WHICH "$new_path" 2> /dev/null`
44718   # bat and cmd files are not always considered executable in cygwin causing which
44719   # to not find them
44720   if test "x$new_path" = x \
44721       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44722       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44723     new_path=`$CYGPATH -u "$path"`
44724   fi
44725   if test "x$new_path" = x; then
44726     # Oops. Which didn't find the executable.
44727     # The splitting of arguments from the executable at a space might have been incorrect,
44728     # since paths with space are more likely in Windows. Give it another try with the whole
44729     # argument.
44730     path="$complete"
44731     arguments="EOL"
44732     new_path=`$CYGPATH -u "$path"`
44733     new_path=`$WHICH "$new_path" 2> /dev/null`
44734     # bat and cmd files are not always considered executable in cygwin causing which
44735     # to not find them
44736     if test "x$new_path" = x \
44737         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44738         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44739       new_path=`$CYGPATH -u "$path"`
44740     fi
44741     if test "x$new_path" = x; then
44742       # It's still not found. Now this is an unrecoverable error.
44743       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44744 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44745       has_space=`$ECHO "$complete" | $GREP " "`
44746       if test "x$has_space" != x; then
44747         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44748 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44749       fi
44750       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44751     fi
44752   fi
44753 
44754   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44755   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44756   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44757   # "foo.exe" is OK but "foo" is an error.
44758   #
44759   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44760   # It is also a way to make sure we got the proper file name for the real test later on.
44761   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44762   if test "x$test_shortpath" = x; then
44763     # Short path failed, file does not exist as specified.
44764     # Try adding .exe or .cmd
44765     if test -f "${new_path}.exe"; then
44766       input_to_shortpath="${new_path}.exe"
44767     elif test -f "${new_path}.cmd"; then
44768       input_to_shortpath="${new_path}.cmd"
44769     else
44770       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
44771 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
44772       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44773 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44774       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44775     fi
44776   else
44777     input_to_shortpath="$new_path"
44778   fi
44779 
44780   # Call helper function which possibly converts this using DOS-style short mode.
44781   # If so, the updated path is stored in $new_path.
44782   new_path="$input_to_shortpath"
44783 
44784   input_path="$input_to_shortpath"
44785   # Check if we need to convert this using DOS-style short mode. If the path
44786   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44787   # take no chances and rewrite it.
44788   # Note: m4 eats our [], so we need to use [ and ] instead.
44789   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44790   if test "x$has_forbidden_chars" != x; then
44791     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44792     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44793     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44794     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44795       # Going to short mode and back again did indeed matter. Since short mode is
44796       # case insensitive, let's make it lowercase to improve readability.
44797       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44798       # Now convert it back to Unix-style (cygpath)
44799       input_path=`$CYGPATH -u "$shortmode_path"`
44800       new_path="$input_path"
44801     fi
44802   fi
44803 
44804   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44805   if test "x$test_cygdrive_prefix" = x; then
44806     # As a simple fix, exclude /usr/bin since it's not a real path.
44807     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44808       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44809       # a path prefixed by /cygdrive for fixpath to work.
44810       new_path="$CYGWIN_ROOT_PATH$input_path"
44811     fi
44812   fi
44813 
44814   # remove trailing .exe if any
44815   new_path="${new_path/%.exe/}"
44816 
44817     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44818 
44819   # First separate the path from the arguments. This will split at the first
44820   # space.
44821   complete="$BUILD_AR"
44822   path="${complete%% *}"
44823   tmp="$complete EOL"
44824   arguments="${tmp#* }"
44825 
44826   # Input might be given as Windows format, start by converting to
44827   # unix format.
44828   new_path="$path"
44829 
44830   windows_path="$new_path"
44831   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44832     unix_path=`$CYGPATH -u "$windows_path"`
44833     new_path="$unix_path"
44834   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44835     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44836     new_path="$unix_path"
44837   fi
44838 
44839 
44840   # Now try to locate executable using which
44841   new_path=`$WHICH "$new_path" 2> /dev/null`
44842 
44843   if test "x$new_path" = x; then
44844     # Oops. Which didn't find the executable.
44845     # The splitting of arguments from the executable at a space might have been incorrect,
44846     # since paths with space are more likely in Windows. Give it another try with the whole
44847     # argument.
44848     path="$complete"
44849     arguments="EOL"
44850     new_path="$path"
44851 
44852   windows_path="$new_path"
44853   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44854     unix_path=`$CYGPATH -u "$windows_path"`
44855     new_path="$unix_path"
44856   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44857     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44858     new_path="$unix_path"
44859   fi
44860 
44861 
44862     new_path=`$WHICH "$new_path" 2> /dev/null`
44863     # bat and cmd files are not always considered executable in MSYS causing which
44864     # to not find them
44865     if test "x$new_path" = x \
44866         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44867         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44868       new_path="$path"
44869 
44870   windows_path="$new_path"
44871   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44872     unix_path=`$CYGPATH -u "$windows_path"`
44873     new_path="$unix_path"
44874   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44875     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44876     new_path="$unix_path"
44877   fi
44878 
44879     fi
44880 
44881     if test "x$new_path" = x; then
44882       # It's still not found. Now this is an unrecoverable error.
44883       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44884 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44885       has_space=`$ECHO "$complete" | $GREP " "`
44886       if test "x$has_space" != x; then
44887         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44888 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44889       fi
44890       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44891     fi
44892   fi
44893 
44894   # Now new_path has a complete unix path to the binary
44895   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44896     # Keep paths in /bin as-is, but remove trailing .exe if any
44897     new_path="${new_path/%.exe/}"
44898     # Do not save /bin paths to all_fixpath_prefixes!
44899   else
44900     # Not in mixed or Windows style, start by that.
44901     new_path=`cmd //c echo $new_path`
44902 
44903   input_path="$new_path"
44904   # Check if we need to convert this using DOS-style short mode. If the path
44905   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44906   # take no chances and rewrite it.
44907   # Note: m4 eats our [], so we need to use [ and ] instead.
44908   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44909   if test "x$has_forbidden_chars" != x; then
44910     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44911     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44912   fi
44913 
44914     # Output is in $new_path
44915 
44916   windows_path="$new_path"
44917   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44918     unix_path=`$CYGPATH -u "$windows_path"`
44919     new_path="$unix_path"
44920   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44921     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44922     new_path="$unix_path"
44923   fi
44924 
44925     # remove trailing .exe if any
44926     new_path="${new_path/%.exe/}"
44927 
44928     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44929     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44930   fi
44931 
44932     else
44933       # We're on a unix platform. Hooray! :)
44934       # First separate the path from the arguments. This will split at the first
44935       # space.
44936       complete="$BUILD_AR"
44937       path="${complete%% *}"
44938       tmp="$complete EOL"
44939       arguments="${tmp#* }"
44940 
44941       # Cannot rely on the command "which" here since it doesn't always work.
44942       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44943       if test -z "$is_absolute_path"; then
44944         # Path to executable is not absolute. Find it.
44945         IFS_save="$IFS"
44946         IFS=:
44947         for p in $PATH; do
44948           if test -f "$p/$path" && test -x "$p/$path"; then
44949             new_path="$p/$path"
44950             break
44951           fi
44952         done
44953         IFS="$IFS_save"
44954       else
44955         # This is an absolute path, we can use it without further modifications.
44956         new_path="$path"
44957       fi
44958 
44959       if test "x$new_path" = x; then
44960         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44961 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44962         has_space=`$ECHO "$complete" | $GREP " "`
44963         if test "x$has_space" != x; then
44964           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44965 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44966         fi
44967         as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44968       fi
44969     fi
44970 
44971     # Now join together the path and the arguments once again
44972     if test "x$arguments" != xEOL; then
44973       new_complete="$new_path ${arguments% *}"
44974     else
44975       new_complete="$new_path"
44976     fi
44977 
44978     if test "x$complete" != "x$new_complete"; then
44979       BUILD_AR="$new_complete"
44980       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
44981 $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
44982     fi
44983   fi
44984 
44985     # Assume the C compiler is the assembler
44986     BUILD_AS="$BUILD_CC -c"
44987     # Just like for the target compiler, use the compiler as linker
44988     BUILD_LD="$BUILD_CC"
44989 
44990     PATH="$OLDPATH"
44991   else
44992     # If we are not cross compiling, use the normal target compilers for
44993     # building the build platform executables.
44994     BUILD_CC="$CC"
44995     BUILD_CXX="$CXX"
44996     BUILD_LD="$LD"
44997     BUILD_NM="$NM"
44998     BUILD_AS="$AS"
44999     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
45000     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
45001     BUILD_AR="$AR"
45002   fi
45003 
45004 
45005 
45006 
45007 
45008 
45009 
45010 
45011 
45012 
45013 
45014   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45015     # For hotspot, we need these in Windows mixed path,
45016     # so rewrite them all. Need added .exe suffix.
45017     HOTSPOT_CXX="$CXX.exe"
45018     HOTSPOT_LD="$LD.exe"
45019     HOTSPOT_MT="$MT.exe"
45020     HOTSPOT_RC="$RC.exe"
45021 
45022   unix_path="$HOTSPOT_CXX"
45023   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45024     windows_path=`$CYGPATH -m "$unix_path"`
45025     HOTSPOT_CXX="$windows_path"
45026   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45027     windows_path=`cmd //c echo $unix_path`
45028     HOTSPOT_CXX="$windows_path"
45029   fi
45030 
45031 
45032   unix_path="$HOTSPOT_LD"
45033   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45034     windows_path=`$CYGPATH -m "$unix_path"`
45035     HOTSPOT_LD="$windows_path"
45036   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45037     windows_path=`cmd //c echo $unix_path`
45038     HOTSPOT_LD="$windows_path"
45039   fi
45040 
45041 
45042   unix_path="$HOTSPOT_MT"
45043   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45044     windows_path=`$CYGPATH -m "$unix_path"`
45045     HOTSPOT_MT="$windows_path"
45046   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45047     windows_path=`cmd //c echo $unix_path`
45048     HOTSPOT_MT="$windows_path"
45049   fi
45050 
45051 
45052   unix_path="$HOTSPOT_RC"
45053   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45054     windows_path=`$CYGPATH -m "$unix_path"`
45055     HOTSPOT_RC="$windows_path"
45056   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45057     windows_path=`cmd //c echo $unix_path`
45058     HOTSPOT_RC="$windows_path"
45059   fi
45060 
45061 
45062 
45063   else
45064     HOTSPOT_CXX="$CXX"
45065     HOTSPOT_LD="$LD"
45066   fi
45067 
45068 
45069 
45070   if test  "x$TOOLCHAIN_TYPE" = xclang; then
45071     USE_CLANG=true
45072   fi
45073 
45074 
45075 
45076 
45077 
45078   # The package path is used only on macosx?
45079   # FIXME: clean this up, and/or move it elsewhere.
45080   PACKAGE_PATH=/opt/local
45081 
45082 
45083   # Check for extra potential brokenness.
45084   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45085     # On Windows, double-check that we got the right compiler.
45086     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
45087     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
45088     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
45089       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
45090         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
45091       fi
45092     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
45093       if test "x$COMPILER_CPU_TEST" != "xx64"; then
45094         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
45095       fi
45096     fi
45097   fi
45098 
45099   if test "x$TOOLCHAIN_TYPE" = xgcc; then
45100     # If this is a --hash-style=gnu system, use --hash-style=both, why?
45101     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
45102     # This is later checked when setting flags.
45103 
45104     # "-Og" suppported for GCC 4.8 and later
45105     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
45106 
45107   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
45108 $as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
45109   supports=yes
45110 
45111   saved_cflags="$CFLAGS"
45112   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
45113   ac_ext=c
45114 ac_cpp='$CPP $CPPFLAGS'
45115 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45116 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45117 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45118 
45119   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45120 /* end confdefs.h.  */
45121 int i;
45122 _ACEOF
45123 if ac_fn_c_try_compile "$LINENO"; then :
45124 
45125 else
45126   supports=no
45127 fi
45128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45129   ac_ext=cpp
45130 ac_cpp='$CXXCPP $CPPFLAGS'
45131 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45132 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45133 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45134 
45135   CFLAGS="$saved_cflags"
45136 
45137   saved_cxxflags="$CXXFLAGS"
45138   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
45139   ac_ext=cpp
45140 ac_cpp='$CXXCPP $CPPFLAGS'
45141 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45142 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45143 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45144 
45145   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45146 /* end confdefs.h.  */
45147 int i;
45148 _ACEOF
45149 if ac_fn_cxx_try_compile "$LINENO"; then :
45150 
45151 else
45152   supports=no
45153 fi
45154 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45155   ac_ext=cpp
45156 ac_cpp='$CXXCPP $CPPFLAGS'
45157 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45158 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45159 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45160 
45161   CXXFLAGS="$saved_cxxflags"
45162 
45163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45164 $as_echo "$supports" >&6; }
45165   if test "x$supports" = "xyes" ; then
45166     HAS_CFLAG_OPTIMIZE_DEBUG=true
45167   else
45168     HAS_CFLAG_OPTIMIZE_DEBUG=false
45169   fi
45170 
45171 
45172     # "-z relro" supported in GNU binutils 2.17 and later
45173     LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
45174 
45175   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
45176 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
45177   supports=yes
45178 
45179   saved_ldflags="$LDFLAGS"
45180   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
45181   ac_ext=c
45182 ac_cpp='$CPP $CPPFLAGS'
45183 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45184 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45185 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45186 
45187   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45188 /* end confdefs.h.  */
45189 
45190 int
45191 main ()
45192 {
45193 
45194   ;
45195   return 0;
45196 }
45197 _ACEOF
45198 if ac_fn_c_try_link "$LINENO"; then :
45199 
45200 else
45201   supports=no
45202 fi
45203 rm -f core conftest.err conftest.$ac_objext \
45204     conftest$ac_exeext conftest.$ac_ext
45205   ac_ext=cpp
45206 ac_cpp='$CXXCPP $CPPFLAGS'
45207 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45208 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45209 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45210 
45211   LDFLAGS="$saved_ldflags"
45212 
45213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45214 $as_echo "$supports" >&6; }
45215   if test "x$supports" = "xyes" ; then
45216     HAS_LINKER_RELRO=true
45217   else
45218     HAS_LINKER_RELRO=false
45219   fi
45220 
45221 
45222     # "-z now" supported in GNU binutils 2.11 and later
45223     LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
45224 
45225   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
45226 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
45227   supports=yes
45228 
45229   saved_ldflags="$LDFLAGS"
45230   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
45231   ac_ext=c
45232 ac_cpp='$CPP $CPPFLAGS'
45233 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45234 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45235 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45236 
45237   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45238 /* end confdefs.h.  */
45239 
45240 int
45241 main ()
45242 {
45243 
45244   ;
45245   return 0;
45246 }
45247 _ACEOF
45248 if ac_fn_c_try_link "$LINENO"; then :
45249 
45250 else
45251   supports=no
45252 fi
45253 rm -f core conftest.err conftest.$ac_objext \
45254     conftest$ac_exeext conftest.$ac_ext
45255   ac_ext=cpp
45256 ac_cpp='$CXXCPP $CPPFLAGS'
45257 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45258 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45259 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45260 
45261   LDFLAGS="$saved_ldflags"
45262 
45263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45264 $as_echo "$supports" >&6; }
45265   if test "x$supports" = "xyes" ; then
45266     HAS_LINKER_NOW=true
45267   else
45268     HAS_LINKER_NOW=false
45269   fi
45270 
45271   fi
45272 
45273   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
45274   # in executable.'
45275   USING_BROKEN_SUSE_LD=no
45276   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
45277     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
45278 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
45279     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
45280     $ECHO "int main() { }" > main.c
45281     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
45282       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45283 $as_echo "no" >&6; }
45284       USING_BROKEN_SUSE_LD=no
45285     else
45286       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45287 $as_echo "yes" >&6; }
45288       USING_BROKEN_SUSE_LD=yes
45289     fi
45290     rm -rf version-script.map main.c a.out
45291   fi
45292 
45293 
45294 
45295 # Setup the JTReg Regression Test Harness.
45296 
45297 
45298 # Check whether --with-jtreg was given.
45299 if test "${with_jtreg+set}" = set; then :
45300   withval=$with_jtreg;
45301 else
45302   with_jtreg=no
45303 fi
45304 
45305 
45306   if test "x$with_jtreg" = xno; then
45307     # jtreg disabled
45308     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45309 $as_echo_n "checking for jtreg... " >&6; }
45310     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45311 $as_echo "no" >&6; }
45312   else
45313     if test "x$with_jtreg" != xyes; then
45314       # with path specified.
45315       JT_HOME="$with_jtreg"
45316     fi
45317 
45318     if test "x$JT_HOME" != x; then
45319       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45320 $as_echo_n "checking for jtreg... " >&6; }
45321 
45322       # use JT_HOME enviroment var.
45323 
45324   # Only process if variable expands to non-empty
45325 
45326   if test "x$JT_HOME" != x; then
45327     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45328 
45329   # Input might be given as Windows format, start by converting to
45330   # unix format.
45331   path="$JT_HOME"
45332   new_path=`$CYGPATH -u "$path"`
45333 
45334   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45335   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45336   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45337   # "foo.exe" is OK but "foo" is an error.
45338   #
45339   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45340   # It is also a way to make sure we got the proper file name for the real test later on.
45341   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45342   if test "x$test_shortpath" = x; then
45343     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45344 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45345     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
45346   fi
45347 
45348   # Call helper function which possibly converts this using DOS-style short mode.
45349   # If so, the updated path is stored in $new_path.
45350 
45351   input_path="$new_path"
45352   # Check if we need to convert this using DOS-style short mode. If the path
45353   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45354   # take no chances and rewrite it.
45355   # Note: m4 eats our [], so we need to use [ and ] instead.
45356   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45357   if test "x$has_forbidden_chars" != x; then
45358     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45359     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45360     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45361     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45362       # Going to short mode and back again did indeed matter. Since short mode is
45363       # case insensitive, let's make it lowercase to improve readability.
45364       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45365       # Now convert it back to Unix-style (cygpath)
45366       input_path=`$CYGPATH -u "$shortmode_path"`
45367       new_path="$input_path"
45368     fi
45369   fi
45370 
45371   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45372   if test "x$test_cygdrive_prefix" = x; then
45373     # As a simple fix, exclude /usr/bin since it's not a real path.
45374     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45375       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45376       # a path prefixed by /cygdrive for fixpath to work.
45377       new_path="$CYGWIN_ROOT_PATH$input_path"
45378     fi
45379   fi
45380 
45381 
45382   if test "x$path" != "x$new_path"; then
45383     JT_HOME="$new_path"
45384     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45385 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45386   fi
45387 
45388     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45389 
45390   path="$JT_HOME"
45391   has_colon=`$ECHO $path | $GREP ^.:`
45392   new_path="$path"
45393   if test "x$has_colon" = x; then
45394     # Not in mixed or Windows style, start by that.
45395     new_path=`cmd //c echo $path`
45396   fi
45397 
45398 
45399   input_path="$new_path"
45400   # Check if we need to convert this using DOS-style short mode. If the path
45401   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45402   # take no chances and rewrite it.
45403   # Note: m4 eats our [], so we need to use [ and ] instead.
45404   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45405   if test "x$has_forbidden_chars" != x; then
45406     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45407     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45408   fi
45409 
45410 
45411   windows_path="$new_path"
45412   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45413     unix_path=`$CYGPATH -u "$windows_path"`
45414     new_path="$unix_path"
45415   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45416     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45417     new_path="$unix_path"
45418   fi
45419 
45420   if test "x$path" != "x$new_path"; then
45421     JT_HOME="$new_path"
45422     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45423 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45424   fi
45425 
45426   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45427   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45428 
45429     else
45430       # We're on a unix platform. Hooray! :)
45431       path="$JT_HOME"
45432       has_space=`$ECHO "$path" | $GREP " "`
45433       if test "x$has_space" != x; then
45434         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45435 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45436         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45437       fi
45438 
45439       # Use eval to expand a potential ~
45440       eval path="$path"
45441       if test ! -f "$path" && test ! -d "$path"; then
45442         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
45443       fi
45444 
45445       JT_HOME="`cd "$path"; $THEPWDCMD -L`"
45446     fi
45447   fi
45448 
45449 
45450       # jtreg win32 script works for everybody
45451       JTREGEXE="$JT_HOME/bin/jtreg"
45452 
45453       if test ! -f "$JTREGEXE"; then
45454         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
45455       fi
45456 
45457       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45458 $as_echo "$JTREGEXE" >&6; }
45459     else
45460       # try to find jtreg on path
45461 
45462 
45463 
45464   # Publish this variable in the help.
45465 
45466 
45467   if [ -z "${JTREGEXE+x}" ]; then
45468     # The variable is not set by user, try to locate tool using the code snippet
45469     for ac_prog in jtreg
45470 do
45471   # Extract the first word of "$ac_prog", so it can be a program name with args.
45472 set dummy $ac_prog; ac_word=$2
45473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45474 $as_echo_n "checking for $ac_word... " >&6; }
45475 if ${ac_cv_path_JTREGEXE+:} false; then :
45476   $as_echo_n "(cached) " >&6
45477 else
45478   case $JTREGEXE in
45479   [\\/]* | ?:[\\/]*)
45480   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45481   ;;
45482   *)
45483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45484 for as_dir in $PATH
45485 do
45486   IFS=$as_save_IFS
45487   test -z "$as_dir" && as_dir=.
45488     for ac_exec_ext in '' $ac_executable_extensions; do
45489   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45490     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45492     break 2
45493   fi
45494 done
45495   done
45496 IFS=$as_save_IFS
45497 
45498   ;;
45499 esac
45500 fi
45501 JTREGEXE=$ac_cv_path_JTREGEXE
45502 if test -n "$JTREGEXE"; then
45503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45504 $as_echo "$JTREGEXE" >&6; }
45505 else
45506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45507 $as_echo "no" >&6; }
45508 fi
45509 
45510 
45511   test -n "$JTREGEXE" && break
45512 done
45513 
45514   else
45515     # The variable is set, but is it from the command line or the environment?
45516 
45517     # Try to remove the string !JTREGEXE! from our list.
45518     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
45519     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45520       # If it failed, the variable was not from the command line. Ignore it,
45521       # but warn the user (except for BASH, which is always set by the calling BASH).
45522       if test "xJTREGEXE" != xBASH; then
45523         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
45524 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
45525       fi
45526       # Try to locate tool using the code snippet
45527       for ac_prog in jtreg
45528 do
45529   # Extract the first word of "$ac_prog", so it can be a program name with args.
45530 set dummy $ac_prog; ac_word=$2
45531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45532 $as_echo_n "checking for $ac_word... " >&6; }
45533 if ${ac_cv_path_JTREGEXE+:} false; then :
45534   $as_echo_n "(cached) " >&6
45535 else
45536   case $JTREGEXE in
45537   [\\/]* | ?:[\\/]*)
45538   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45539   ;;
45540   *)
45541   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45542 for as_dir in $PATH
45543 do
45544   IFS=$as_save_IFS
45545   test -z "$as_dir" && as_dir=.
45546     for ac_exec_ext in '' $ac_executable_extensions; do
45547   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45548     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45549     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45550     break 2
45551   fi
45552 done
45553   done
45554 IFS=$as_save_IFS
45555 
45556   ;;
45557 esac
45558 fi
45559 JTREGEXE=$ac_cv_path_JTREGEXE
45560 if test -n "$JTREGEXE"; then
45561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45562 $as_echo "$JTREGEXE" >&6; }
45563 else
45564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45565 $as_echo "no" >&6; }
45566 fi
45567 
45568 
45569   test -n "$JTREGEXE" && break
45570 done
45571 
45572     else
45573       # If it succeeded, then it was overridden by the user. We will use it
45574       # for the tool.
45575 
45576       # First remove it from the list of overridden variables, so we can test
45577       # for unknown variables in the end.
45578       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45579 
45580       # Check if we try to supply an empty value
45581       if test "x$JTREGEXE" = x; then
45582         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
45583 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
45584         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45585 $as_echo_n "checking for JTREGEXE... " >&6; }
45586         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45587 $as_echo "disabled" >&6; }
45588       else
45589         # Check if the provided tool contains a complete path.
45590         tool_specified="$JTREGEXE"
45591         tool_basename="${tool_specified##*/}"
45592         if test "x$tool_basename" = "x$tool_specified"; then
45593           # A command without a complete path is provided, search $PATH.
45594           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
45595 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
45596           # Extract the first word of "$tool_basename", so it can be a program name with args.
45597 set dummy $tool_basename; ac_word=$2
45598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45599 $as_echo_n "checking for $ac_word... " >&6; }
45600 if ${ac_cv_path_JTREGEXE+:} false; then :
45601   $as_echo_n "(cached) " >&6
45602 else
45603   case $JTREGEXE in
45604   [\\/]* | ?:[\\/]*)
45605   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45606   ;;
45607   *)
45608   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45609 for as_dir in $PATH
45610 do
45611   IFS=$as_save_IFS
45612   test -z "$as_dir" && as_dir=.
45613     for ac_exec_ext in '' $ac_executable_extensions; do
45614   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45615     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45616     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45617     break 2
45618   fi
45619 done
45620   done
45621 IFS=$as_save_IFS
45622 
45623   ;;
45624 esac
45625 fi
45626 JTREGEXE=$ac_cv_path_JTREGEXE
45627 if test -n "$JTREGEXE"; then
45628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45629 $as_echo "$JTREGEXE" >&6; }
45630 else
45631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45632 $as_echo "no" >&6; }
45633 fi
45634 
45635 
45636           if test "x$JTREGEXE" = x; then
45637             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45638           fi
45639         else
45640           # Otherwise we believe it is a complete path. Use it as it is.
45641           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
45642 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
45643           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45644 $as_echo_n "checking for JTREGEXE... " >&6; }
45645           if test ! -x "$tool_specified"; then
45646             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45647 $as_echo "not found" >&6; }
45648             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
45649           fi
45650           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45651 $as_echo "$tool_specified" >&6; }
45652         fi
45653       fi
45654     fi
45655 
45656   fi
45657 
45658 
45659 
45660   if test "x$JTREGEXE" = x; then
45661     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
45662   fi
45663 
45664 
45665       JT_HOME="`$DIRNAME $JTREGEXE`"
45666     fi
45667   fi
45668 
45669 
45670 
45671 
45672 
45673 
45674   # Option used to tell the compiler whether to create 32- or 64-bit executables
45675   if test "x$TOOLCHAIN_TYPE" = xxlc; then
45676     COMPILER_TARGET_BITS_FLAG="-q"
45677   else
45678     COMPILER_TARGET_BITS_FLAG="-m"
45679   fi
45680 
45681 
45682   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
45683   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45684     ARFLAGS="-r"
45685   elif test "x$OPENJDK_TARGET_OS" = xaix; then
45686     ARFLAGS="-X64"
45687   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
45688     # lib.exe is used as AR to create static libraries.
45689     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
45690   else
45691     ARFLAGS=""
45692   fi
45693 
45694 
45695   ## Setup strip.
45696   # FIXME: should this really be per platform, or should it be per toolchain type?
45697   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
45698   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
45699   if test "x$OPENJDK_TARGET_OS" = xlinux; then
45700     STRIPFLAGS="-g"
45701   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
45702     STRIPFLAGS="-x"
45703   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
45704     STRIPFLAGS="-S"
45705   elif test "x$OPENJDK_TARGET_OS" = xaix; then
45706     STRIPFLAGS="-X32_64"
45707   fi
45708 
45709 
45710 
45711   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45712     CC_OUT_OPTION=-Fo
45713     EXE_OUT_OPTION=-out:
45714     LD_OUT_OPTION=-out:
45715     AR_OUT_OPTION=-out:
45716   else
45717     # The option used to specify the target .o,.a or .so file.
45718     # When compiling, how to specify the to be created object file.
45719     CC_OUT_OPTION='-o$(SPACE)'
45720     # When linking, how to specify the to be created executable.
45721     EXE_OUT_OPTION='-o$(SPACE)'
45722     # When linking, how to specify the to be created dynamically linkable library.
45723     LD_OUT_OPTION='-o$(SPACE)'
45724     # When archiving, how to specify the to be create static archive for object files.
45725     AR_OUT_OPTION='rcs$(SPACE)'
45726   fi
45727 
45728 
45729 
45730 
45731 
45732   # On Windows, we need to set RC flags.
45733   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45734     RC_FLAGS="-nologo -l0x409"
45735     if test "x$VARIANT" = xOPT; then
45736       RC_FLAGS="$RC_FLAGS -DNDEBUG"
45737     fi
45738 
45739     # The version variables used to create RC_FLAGS may be overridden
45740     # in a custom configure script, or possibly the command line.
45741     # Let those variables be expanded at make time in spec.gmk.
45742     # The \$ are escaped to the shell, and the $(...) variables
45743     # are evaluated by make.
45744     RC_FLAGS="$RC_FLAGS \
45745         -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
45746         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
45747         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
45748         -D\"JDK_VER=\$(VERSION_NUMBER)\" \
45749         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
45750         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
45751         -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
45752   fi
45753 
45754 
45755   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45756     # silence copyright notice and other headers.
45757     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
45758   fi
45759 
45760 
45761 # FIXME: Currently we must test this after toolchain but before flags. Fix!
45762 
45763 # Now we can test some aspects on the target using configure macros.
45764 
45765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
45766 $as_echo_n "checking for ANSI C header files... " >&6; }
45767 if ${ac_cv_header_stdc+:} false; then :
45768   $as_echo_n "(cached) " >&6
45769 else
45770   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45771 /* end confdefs.h.  */
45772 #include <stdlib.h>
45773 #include <stdarg.h>
45774 #include <string.h>
45775 #include <float.h>
45776 
45777 int
45778 main ()
45779 {
45780 
45781   ;
45782   return 0;
45783 }
45784 _ACEOF
45785 if ac_fn_cxx_try_compile "$LINENO"; then :
45786   ac_cv_header_stdc=yes
45787 else
45788   ac_cv_header_stdc=no
45789 fi
45790 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45791 
45792 if test $ac_cv_header_stdc = yes; then
45793   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
45794   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45795 /* end confdefs.h.  */
45796 #include <string.h>
45797 
45798 _ACEOF
45799 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45800   $EGREP "memchr" >/dev/null 2>&1; then :
45801 
45802 else
45803   ac_cv_header_stdc=no
45804 fi
45805 rm -f conftest*
45806 
45807 fi
45808 
45809 if test $ac_cv_header_stdc = yes; then
45810   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
45811   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45812 /* end confdefs.h.  */
45813 #include <stdlib.h>
45814 
45815 _ACEOF
45816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45817   $EGREP "free" >/dev/null 2>&1; then :
45818 
45819 else
45820   ac_cv_header_stdc=no
45821 fi
45822 rm -f conftest*
45823 
45824 fi
45825 
45826 if test $ac_cv_header_stdc = yes; then
45827   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
45828   if test "$cross_compiling" = yes; then :
45829   :
45830 else
45831   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45832 /* end confdefs.h.  */
45833 #include <ctype.h>
45834 #include <stdlib.h>
45835 #if ((' ' & 0x0FF) == 0x020)
45836 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
45837 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
45838 #else
45839 # define ISLOWER(c) \
45840                    (('a' <= (c) && (c) <= 'i') \
45841                      || ('j' <= (c) && (c) <= 'r') \
45842                      || ('s' <= (c) && (c) <= 'z'))
45843 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
45844 #endif
45845 
45846 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
45847 int
45848 main ()
45849 {
45850   int i;
45851   for (i = 0; i < 256; i++)
45852     if (XOR (islower (i), ISLOWER (i))
45853         || toupper (i) != TOUPPER (i))
45854       return 2;
45855   return 0;
45856 }
45857 _ACEOF
45858 if ac_fn_cxx_try_run "$LINENO"; then :
45859 
45860 else
45861   ac_cv_header_stdc=no
45862 fi
45863 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45864   conftest.$ac_objext conftest.beam conftest.$ac_ext
45865 fi
45866 
45867 fi
45868 fi
45869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
45870 $as_echo "$ac_cv_header_stdc" >&6; }
45871 if test $ac_cv_header_stdc = yes; then
45872 
45873 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
45874 
45875 fi
45876 
45877 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
45878 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
45879                   inttypes.h stdint.h unistd.h
45880 do :
45881   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
45882 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
45883 "
45884 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
45885   cat >>confdefs.h <<_ACEOF
45886 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
45887 _ACEOF
45888 
45889 fi
45890 
45891 done
45892 
45893 
45894 
45895   ###############################################################################
45896   #
45897   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
45898   # (The JVM can use 32 or 64 bit Java pointers but that decision
45899   # is made at runtime.)
45900   #
45901 
45902   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
45903     # Always specify -m flag on Solaris
45904     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
45905 
45906   # When we add flags to the "official" CFLAGS etc, we need to
45907   # keep track of these additions in ADDED_CFLAGS etc. These
45908   # will later be checked to make sure only controlled additions
45909   # have been made to CFLAGS etc.
45910   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45911   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45912   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45913 
45914   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45915   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45916   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45917 
45918   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45919   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45920   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45921 
45922   elif test "x$COMPILE_TYPE" = xreduced; then
45923     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
45924       # Specify -m if running reduced on unix platforms
45925 
45926   # When we add flags to the "official" CFLAGS etc, we need to
45927   # keep track of these additions in ADDED_CFLAGS etc. These
45928   # will later be checked to make sure only controlled additions
45929   # have been made to CFLAGS etc.
45930   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45931   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45932   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45933 
45934   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45935   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45936   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45937 
45938   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45939   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45940   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45941 
45942     fi
45943   fi
45944 
45945   # Make compilation sanity check
45946   for ac_header in stdio.h
45947 do :
45948   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
45949 if test "x$ac_cv_header_stdio_h" = xyes; then :
45950   cat >>confdefs.h <<_ACEOF
45951 #define HAVE_STDIO_H 1
45952 _ACEOF
45953 
45954 else
45955 
45956     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
45957 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
45958     if test "x$COMPILE_TYPE" = xreduced; then
45959 
45960   # Print a helpful message on how to acquire the necessary build dependency.
45961   # reduced is the help tag: freetype, cups, alsa etc
45962   MISSING_DEPENDENCY=reduced
45963 
45964   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45965     cygwin_help $MISSING_DEPENDENCY
45966   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45967     msys_help $MISSING_DEPENDENCY
45968   else
45969     PKGHANDLER_COMMAND=
45970 
45971     case $PKGHANDLER in
45972       apt-get)
45973         apt_help     $MISSING_DEPENDENCY ;;
45974       yum)
45975         yum_help     $MISSING_DEPENDENCY ;;
45976       port)
45977         port_help    $MISSING_DEPENDENCY ;;
45978       pkgutil)
45979         pkgutil_help $MISSING_DEPENDENCY ;;
45980       pkgadd)
45981         pkgadd_help  $MISSING_DEPENDENCY ;;
45982     esac
45983 
45984     if test "x$PKGHANDLER_COMMAND" != x; then
45985       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45986     fi
45987   fi
45988 
45989       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
45990 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
45991     elif test "x$COMPILE_TYPE" = xcross; then
45992       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
45993 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
45994     fi
45995     as_fn_error $? "Cannot continue." "$LINENO" 5
45996 
45997 fi
45998 
45999 done
46000 
46001 
46002   # The cast to long int works around a bug in the HP C Compiler
46003 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
46004 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
46005 # This bug is HP SR number 8606223364.
46006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
46007 $as_echo_n "checking size of int *... " >&6; }
46008 if ${ac_cv_sizeof_int_p+:} false; then :
46009   $as_echo_n "(cached) " >&6
46010 else
46011   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
46012 
46013 else
46014   if test "$ac_cv_type_int_p" = yes; then
46015      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
46016 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
46017 as_fn_error 77 "cannot compute sizeof (int *)
46018 See \`config.log' for more details" "$LINENO" 5; }
46019    else
46020      ac_cv_sizeof_int_p=0
46021    fi
46022 fi
46023 
46024 fi
46025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
46026 $as_echo "$ac_cv_sizeof_int_p" >&6; }
46027 
46028 
46029 
46030 cat >>confdefs.h <<_ACEOF
46031 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
46032 _ACEOF
46033 
46034 
46035 
46036   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
46037   if test "x$ac_cv_sizeof_int_p" = x; then
46038     # The test failed, lets stick to the assumed value.
46039     { $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
46040 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
46041   else
46042     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
46043 
46044     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
46045       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
46046       # Let's try to implicitely set the compilers target architecture and retry the test
46047       { $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
46048 $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;}
46049       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
46050 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
46051 
46052   # When we add flags to the "official" CFLAGS etc, we need to
46053   # keep track of these additions in ADDED_CFLAGS etc. These
46054   # will later be checked to make sure only controlled additions
46055   # have been made to CFLAGS etc.
46056   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46057   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46058   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46059 
46060   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46061   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46062   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46063 
46064   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46065   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46066   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46067 
46068 
46069       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
46070       unset ac_cv_sizeof_int_p
46071       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
46072       cat >>confdefs.h <<_ACEOF
46073 #undef SIZEOF_INT_P
46074 _ACEOF
46075 
46076       # The cast to long int works around a bug in the HP C Compiler
46077 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
46078 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
46079 # This bug is HP SR number 8606223364.
46080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
46081 $as_echo_n "checking size of int *... " >&6; }
46082 if ${ac_cv_sizeof_int_p+:} false; then :
46083   $as_echo_n "(cached) " >&6
46084 else
46085   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
46086 
46087 else
46088   if test "$ac_cv_type_int_p" = yes; then
46089      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
46090 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
46091 as_fn_error 77 "cannot compute sizeof (int *)
46092 See \`config.log' for more details" "$LINENO" 5; }
46093    else
46094      ac_cv_sizeof_int_p=0
46095    fi
46096 fi
46097 
46098 fi
46099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
46100 $as_echo "$ac_cv_sizeof_int_p" >&6; }
46101 
46102 
46103 
46104 cat >>confdefs.h <<_ACEOF
46105 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
46106 _ACEOF
46107 
46108 
46109 
46110       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
46111 
46112       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
46113         { $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
46114 $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;}
46115         if test "x$COMPILE_TYPE" = xreduced; then
46116 
46117   # Print a helpful message on how to acquire the necessary build dependency.
46118   # reduced is the help tag: freetype, cups, alsa etc
46119   MISSING_DEPENDENCY=reduced
46120 
46121   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46122     cygwin_help $MISSING_DEPENDENCY
46123   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46124     msys_help $MISSING_DEPENDENCY
46125   else
46126     PKGHANDLER_COMMAND=
46127 
46128     case $PKGHANDLER in
46129       apt-get)
46130         apt_help     $MISSING_DEPENDENCY ;;
46131       yum)
46132         yum_help     $MISSING_DEPENDENCY ;;
46133       port)
46134         port_help    $MISSING_DEPENDENCY ;;
46135       pkgutil)
46136         pkgutil_help $MISSING_DEPENDENCY ;;
46137       pkgadd)
46138         pkgadd_help  $MISSING_DEPENDENCY ;;
46139     esac
46140 
46141     if test "x$PKGHANDLER_COMMAND" != x; then
46142       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46143     fi
46144   fi
46145 
46146           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
46147 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
46148         elif test "x$COMPILE_TYPE" = xcross; then
46149           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
46150 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
46151         fi
46152         as_fn_error $? "Cannot continue." "$LINENO" 5
46153       fi
46154     fi
46155   fi
46156 
46157   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
46158 $as_echo_n "checking for target address size... " >&6; }
46159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
46160 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
46161 
46162 
46163   ###############################################################################
46164   #
46165   # Is the target little of big endian?
46166   #
46167    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
46168 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
46169 if ${ac_cv_c_bigendian+:} false; then :
46170   $as_echo_n "(cached) " >&6
46171 else
46172   ac_cv_c_bigendian=unknown
46173     # See if we're dealing with a universal compiler.
46174     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46175 /* end confdefs.h.  */
46176 #ifndef __APPLE_CC__
46177                not a universal capable compiler
46178              #endif
46179              typedef int dummy;
46180 
46181 _ACEOF
46182 if ac_fn_cxx_try_compile "$LINENO"; then :
46183 
46184         # Check for potential -arch flags.  It is not universal unless
46185         # there are at least two -arch flags with different values.
46186         ac_arch=
46187         ac_prev=
46188         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
46189          if test -n "$ac_prev"; then
46190            case $ac_word in
46191              i?86 | x86_64 | ppc | ppc64)
46192                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
46193                  ac_arch=$ac_word
46194                else
46195                  ac_cv_c_bigendian=universal
46196                  break
46197                fi
46198                ;;
46199            esac
46200            ac_prev=
46201          elif test "x$ac_word" = "x-arch"; then
46202            ac_prev=arch
46203          fi
46204        done
46205 fi
46206 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46207     if test $ac_cv_c_bigendian = unknown; then
46208       # See if sys/param.h defines the BYTE_ORDER macro.
46209       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46210 /* end confdefs.h.  */
46211 #include <sys/types.h>
46212              #include <sys/param.h>
46213 
46214 int
46215 main ()
46216 {
46217 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
46218                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
46219                      && LITTLE_ENDIAN)
46220               bogus endian macros
46221              #endif
46222 
46223   ;
46224   return 0;
46225 }
46226 _ACEOF
46227 if ac_fn_cxx_try_compile "$LINENO"; then :
46228   # It does; now see whether it defined to BIG_ENDIAN or not.
46229          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46230 /* end confdefs.h.  */
46231 #include <sys/types.h>
46232                 #include <sys/param.h>
46233 
46234 int
46235 main ()
46236 {
46237 #if BYTE_ORDER != BIG_ENDIAN
46238                  not big endian
46239                 #endif
46240 
46241   ;
46242   return 0;
46243 }
46244 _ACEOF
46245 if ac_fn_cxx_try_compile "$LINENO"; then :
46246   ac_cv_c_bigendian=yes
46247 else
46248   ac_cv_c_bigendian=no
46249 fi
46250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46251 fi
46252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46253     fi
46254     if test $ac_cv_c_bigendian = unknown; then
46255       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
46256       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46257 /* end confdefs.h.  */
46258 #include <limits.h>
46259 
46260 int
46261 main ()
46262 {
46263 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
46264               bogus endian macros
46265              #endif
46266 
46267   ;
46268   return 0;
46269 }
46270 _ACEOF
46271 if ac_fn_cxx_try_compile "$LINENO"; then :
46272   # It does; now see whether it defined to _BIG_ENDIAN or not.
46273          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46274 /* end confdefs.h.  */
46275 #include <limits.h>
46276 
46277 int
46278 main ()
46279 {
46280 #ifndef _BIG_ENDIAN
46281                  not big endian
46282                 #endif
46283 
46284   ;
46285   return 0;
46286 }
46287 _ACEOF
46288 if ac_fn_cxx_try_compile "$LINENO"; then :
46289   ac_cv_c_bigendian=yes
46290 else
46291   ac_cv_c_bigendian=no
46292 fi
46293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46294 fi
46295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46296     fi
46297     if test $ac_cv_c_bigendian = unknown; then
46298       # Compile a test program.
46299       if test "$cross_compiling" = yes; then :
46300   # Try to guess by grepping values from an object file.
46301          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46302 /* end confdefs.h.  */
46303 short int ascii_mm[] =
46304                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
46305                 short int ascii_ii[] =
46306                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
46307                 int use_ascii (int i) {
46308                   return ascii_mm[i] + ascii_ii[i];
46309                 }
46310                 short int ebcdic_ii[] =
46311                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
46312                 short int ebcdic_mm[] =
46313                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
46314                 int use_ebcdic (int i) {
46315                   return ebcdic_mm[i] + ebcdic_ii[i];
46316                 }
46317                 extern int foo;
46318 
46319 int
46320 main ()
46321 {
46322 return use_ascii (foo) == use_ebcdic (foo);
46323   ;
46324   return 0;
46325 }
46326 _ACEOF
46327 if ac_fn_cxx_try_compile "$LINENO"; then :
46328   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
46329               ac_cv_c_bigendian=yes
46330             fi
46331             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
46332               if test "$ac_cv_c_bigendian" = unknown; then
46333                 ac_cv_c_bigendian=no
46334               else
46335                 # finding both strings is unlikely to happen, but who knows?
46336                 ac_cv_c_bigendian=unknown
46337               fi
46338             fi
46339 fi
46340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46341 else
46342   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46343 /* end confdefs.h.  */
46344 $ac_includes_default
46345 int
46346 main ()
46347 {
46348 
46349              /* Are we little or big endian?  From Harbison&Steele.  */
46350              union
46351              {
46352                long int l;
46353                char c[sizeof (long int)];
46354              } u;
46355              u.l = 1;
46356              return u.c[sizeof (long int) - 1] == 1;
46357 
46358   ;
46359   return 0;
46360 }
46361 _ACEOF
46362 if ac_fn_cxx_try_run "$LINENO"; then :
46363   ac_cv_c_bigendian=no
46364 else
46365   ac_cv_c_bigendian=yes
46366 fi
46367 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46368   conftest.$ac_objext conftest.beam conftest.$ac_ext
46369 fi
46370 
46371     fi
46372 fi
46373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
46374 $as_echo "$ac_cv_c_bigendian" >&6; }
46375  case $ac_cv_c_bigendian in #(
46376    yes)
46377      ENDIAN="big";; #(
46378    no)
46379      ENDIAN="little" ;; #(
46380    universal)
46381      ENDIAN="universal_endianness"
46382      ;; #(
46383    *)
46384      ENDIAN="unknown" ;;
46385  esac
46386 
46387 
46388   if test "x$ENDIAN" = xuniversal_endianness; then
46389     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
46390   fi
46391   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
46392     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
46393   fi
46394 
46395 
46396 # Configure flags for the tools
46397 
46398   ###############################################################################
46399   #
46400   # How to compile shared libraries.
46401   #
46402 
46403   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46404     PICFLAG="-fPIC"
46405     C_FLAG_REORDER=''
46406     CXX_FLAG_REORDER=''
46407 
46408     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46409       # Linking is different on MacOSX
46410       if test "x$STATIC_BUILD" = xtrue; then
46411         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
46412       else
46413         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46414       fi
46415       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
46416       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46417       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
46418       SET_SHARED_LIBRARY_MAPFILE=''
46419     else
46420       # Default works for linux, might work on other platforms as well.
46421       SHARED_LIBRARY_FLAGS='-shared'
46422       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
46423       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
46424       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
46425       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
46426     fi
46427   elif test "x$TOOLCHAIN_TYPE" = xclang; then
46428     PICFLAG=''
46429     C_FLAG_REORDER=''
46430     CXX_FLAG_REORDER=''
46431 
46432     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46433       # Linking is different on MacOSX
46434       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46435       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
46436       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46437       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
46438       SET_SHARED_LIBRARY_MAPFILE=''
46439     else
46440       # Default works for linux, might work on other platforms as well.
46441       SHARED_LIBRARY_FLAGS='-shared'
46442       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
46443       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
46444       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
46445       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
46446     fi
46447   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46448     PICFLAG="-KPIC"
46449     C_FLAG_REORDER='-xF'
46450     CXX_FLAG_REORDER='-xF'
46451     SHARED_LIBRARY_FLAGS="-G"
46452     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
46453     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46454     SET_SHARED_LIBRARY_NAME=''
46455     SET_SHARED_LIBRARY_MAPFILE='-M$1'
46456   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46457     PICFLAG="-qpic=large"
46458     C_FLAG_REORDER=''
46459     CXX_FLAG_REORDER=''
46460     SHARED_LIBRARY_FLAGS="-qmkshrobj"
46461     SET_EXECUTABLE_ORIGIN=""
46462     SET_SHARED_LIBRARY_ORIGIN=''
46463     SET_SHARED_LIBRARY_NAME=''
46464     SET_SHARED_LIBRARY_MAPFILE=''
46465   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46466     PICFLAG=""
46467     C_FLAG_REORDER=''
46468     CXX_FLAG_REORDER=''
46469     SHARED_LIBRARY_FLAGS="-LD"
46470     SET_EXECUTABLE_ORIGIN=''
46471     SET_SHARED_LIBRARY_ORIGIN=''
46472     SET_SHARED_LIBRARY_NAME=''
46473     SET_SHARED_LIBRARY_MAPFILE=''
46474   fi
46475 
46476 
46477 
46478 
46479 
46480 
46481 
46482 
46483   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46484     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
46485     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
46486     CFLAGS_JDKLIB_EXTRA='-xstrconst'
46487   fi
46488   # The (cross) compiler is now configured, we can now test capabilities
46489   # of the target platform.
46490 
46491 
46492 
46493   ###############################################################################
46494   #
46495   # Setup the opt flags for different compilers
46496   # and different operating systems.
46497   #
46498 
46499   # FIXME: this was indirectly the old default, but just inherited.
46500   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46501   #   C_FLAG_DEPS="-MMD -MF"
46502   # fi
46503 
46504   # Generate make dependency files
46505   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46506     C_FLAG_DEPS="-MMD -MF"
46507   elif test "x$TOOLCHAIN_TYPE" = xclang; then
46508     C_FLAG_DEPS="-MMD -MF"
46509   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46510     C_FLAG_DEPS="-xMMD -xMF"
46511   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46512     C_FLAG_DEPS="-qmakedep=gcc -MF"
46513   fi
46514   CXX_FLAG_DEPS="$C_FLAG_DEPS"
46515 
46516 
46517 
46518   # Debug symbols
46519   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46520     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
46521       # reduce from default "-g2" option to save space
46522       CFLAGS_DEBUG_SYMBOLS="-g1"
46523       CXXFLAGS_DEBUG_SYMBOLS="-g1"
46524     else
46525       CFLAGS_DEBUG_SYMBOLS="-g"
46526       CXXFLAGS_DEBUG_SYMBOLS="-g"
46527     fi
46528   elif test "x$TOOLCHAIN_TYPE" = xclang; then
46529     CFLAGS_DEBUG_SYMBOLS="-g"
46530     CXXFLAGS_DEBUG_SYMBOLS="-g"
46531   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46532     CFLAGS_DEBUG_SYMBOLS="-g -xs"
46533     # FIXME: likely a bug, this disables debug symbols rather than enables them
46534     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
46535   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46536     CFLAGS_DEBUG_SYMBOLS="-g"
46537     CXXFLAGS_DEBUG_SYMBOLS="-g"
46538   fi
46539 
46540 
46541 
46542   # bounds, memory and behavior checking options
46543   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46544     case $DEBUG_LEVEL in
46545     release )
46546       # no adjustment
46547       ;;
46548     fastdebug )
46549       # no adjustment
46550       ;;
46551     slowdebug )
46552       # Add runtime stack smashing and undefined behavior checks.
46553       # Not all versions of gcc support -fstack-protector
46554       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
46555 
46556   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
46557 $as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
46558   supports=yes
46559 
46560   saved_cflags="$CFLAGS"
46561   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
46562   ac_ext=c
46563 ac_cpp='$CPP $CPPFLAGS'
46564 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46565 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46566 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46567 
46568   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46569 /* end confdefs.h.  */
46570 int i;
46571 _ACEOF
46572 if ac_fn_c_try_compile "$LINENO"; then :
46573 
46574 else
46575   supports=no
46576 fi
46577 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46578   ac_ext=cpp
46579 ac_cpp='$CXXCPP $CPPFLAGS'
46580 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46581 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46582 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46583 
46584   CFLAGS="$saved_cflags"
46585 
46586   saved_cxxflags="$CXXFLAGS"
46587   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
46588   ac_ext=cpp
46589 ac_cpp='$CXXCPP $CPPFLAGS'
46590 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46591 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46592 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46593 
46594   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46595 /* end confdefs.h.  */
46596 int i;
46597 _ACEOF
46598 if ac_fn_cxx_try_compile "$LINENO"; then :
46599 
46600 else
46601   supports=no
46602 fi
46603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46604   ac_ext=cpp
46605 ac_cpp='$CXXCPP $CPPFLAGS'
46606 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46607 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46608 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46609 
46610   CXXFLAGS="$saved_cxxflags"
46611 
46612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46613 $as_echo "$supports" >&6; }
46614   if test "x$supports" = "xyes" ; then
46615     :
46616   else
46617     STACK_PROTECTOR_CFLAG=""
46618   fi
46619 
46620 
46621       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46622       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46623       ;;
46624     esac
46625   fi
46626 
46627   # Optimization levels
46628   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46629     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
46630 
46631     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
46632       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
46633       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
46634       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
46635       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
46636       C_O_FLAG_DEBUG="-xregs=no%frameptr"
46637       C_O_FLAG_NONE="-xregs=no%frameptr"
46638       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
46639       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
46640       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
46641       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
46642       CXX_O_FLAG_NONE="-xregs=no%frameptr"
46643       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46644         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
46645         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
46646       fi
46647     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46648       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
46649       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46650       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46651       C_O_FLAG_DEBUG=""
46652       C_O_FLAG_NONE=""
46653       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
46654       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46655       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46656       C_O_FLAG_DEBUG=""
46657       CXX_O_FLAG_NONE=""
46658     fi
46659   else
46660     # The remaining toolchains share opt flags between CC and CXX;
46661     # setup for C and duplicate afterwards.
46662     if test "x$TOOLCHAIN_TYPE" = xgcc; then
46663       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46664         # On MacOSX we optimize for size, something
46665         # we should do for all platforms?
46666         C_O_FLAG_HIGHEST="-Os"
46667         C_O_FLAG_HI="-Os"
46668         C_O_FLAG_NORM="-Os"
46669       else
46670         C_O_FLAG_HIGHEST="-O3"
46671         C_O_FLAG_HI="-O3"
46672         C_O_FLAG_NORM="-O2"
46673       fi
46674       C_O_FLAG_DEBUG="-O0"
46675       C_O_FLAG_NONE="-O0"
46676     elif test "x$TOOLCHAIN_TYPE" = xclang; then
46677       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46678         # On MacOSX we optimize for size, something
46679         # we should do for all platforms?
46680         C_O_FLAG_HIGHEST="-Os"
46681         C_O_FLAG_HI="-Os"
46682         C_O_FLAG_NORM="-Os"
46683       else
46684         C_O_FLAG_HIGHEST="-O3"
46685         C_O_FLAG_HI="-O3"
46686         C_O_FLAG_NORM="-O2"
46687       fi
46688       C_O_FLAG_DEBUG="-O0"
46689       C_O_FLAG_NONE="-O0"
46690     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46691       C_O_FLAG_HIGHEST="-O3"
46692       C_O_FLAG_HI="-O3 -qstrict"
46693       C_O_FLAG_NORM="-O2"
46694       C_O_FLAG_DEBUG="-qnoopt"
46695       C_O_FLAG_NONE="-qnoop"
46696     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46697       C_O_FLAG_HIGHEST="-O2"
46698       C_O_FLAG_HI="-O1"
46699       C_O_FLAG_NORM="-O1"
46700       C_O_FLAG_DEBUG="-Od"
46701       C_O_FLAG_NONE="-Od"
46702     fi
46703     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
46704     CXX_O_FLAG_HI="$C_O_FLAG_HI"
46705     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
46706     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
46707     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
46708   fi
46709 
46710   # Adjust optimization flags according to debug level.
46711   case $DEBUG_LEVEL in
46712     release )
46713       # no adjustment
46714       ;;
46715     fastdebug )
46716       # Not quite so much optimization
46717       C_O_FLAG_HI="$C_O_FLAG_NORM"
46718       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
46719       ;;
46720     slowdebug )
46721       # Disable optimization
46722       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
46723       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
46724       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
46725       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
46726       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
46727       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
46728       ;;
46729   esac
46730 
46731 
46732 
46733 
46734 
46735 
46736 
46737 
46738 
46739 
46740 
46741 
46742 
46743   # Special extras...
46744   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46745     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46746       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46747       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46748     fi
46749     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46750     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46751   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46752     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46753     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46754   fi
46755 
46756   CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
46757   CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
46758   LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
46759 
46760   ###############################################################################
46761   #
46762   # Now setup the CFLAGS and LDFLAGS for the JDK build.
46763   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
46764   #
46765 
46766   # Setup compiler/platform specific flags into
46767   #    CFLAGS_JDK    - C Compiler flags
46768   #    CXXFLAGS_JDK  - C++ Compiler flags
46769   #    COMMON_CCXXFLAGS_JDK - common to C and C++
46770   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46771     if test "x$OPENJDK_TARGET_CPU" = xx86; then
46772       # Force compatibility with i586 on 32 bit intel platforms.
46773       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
46774     fi
46775     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
46776         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
46777     case $OPENJDK_TARGET_CPU_ARCH in
46778       arm )
46779         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46780         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46781         ;;
46782       ppc )
46783         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46784         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46785         ;;
46786       * )
46787         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
46788         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46789         ;;
46790     esac
46791   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46792     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
46793     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
46794       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
46795     fi
46796 
46797     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
46798     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
46799   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46800     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
46801     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
46802   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46803     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
46804         -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
46805         -DWIN32_LEAN_AND_MEAN \
46806         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
46807         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
46808         -DWIN32 -DIAL"
46809     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
46810       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
46811     else
46812       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
46813     fi
46814     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
46815     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
46816     # studio.
46817     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
46818       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
46819           -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
46820     fi
46821   fi
46822 
46823   ###############################################################################
46824 
46825   # Adjust flags according to debug level.
46826   case $DEBUG_LEVEL in
46827     fastdebug | slowdebug )
46828       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
46829       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
46830       JAVAC_FLAGS="$JAVAC_FLAGS -g"
46831       ;;
46832     release )
46833       ;;
46834     * )
46835       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
46836       ;;
46837   esac
46838 
46839   # Setup LP64
46840   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
46841 
46842   # Set some common defines. These works for all compilers, but assume
46843   # -D is universally accepted.
46844 
46845   # Setup endianness
46846   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
46847     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
46848     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
46849     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
46850     #   Note: -Dmacro         is the same as    #define macro 1
46851     #         -Dmacro=        is the same as    #define macro
46852     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46853       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
46854     else
46855       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
46856     fi
46857   else
46858     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
46859     # are defined in the system?
46860     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46861       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
46862     else
46863       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
46864     fi
46865   fi
46866 
46867   # Setup target OS define. Use OS target name but in upper case.
46868   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
46869   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
46870 
46871   # Setup target CPU
46872   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
46873 
46874   # Setup debug/release defines
46875   if test "x$DEBUG_LEVEL" = xrelease; then
46876     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
46877     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46878       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
46879     fi
46880   else
46881     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
46882   fi
46883 
46884   # Set some additional per-OS defines.
46885   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46886     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
46887   elif test "x$OPENJDK_TARGET_OS" = xaix; then
46888     # FIXME: PPC64 should not be here.
46889     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
46890   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
46891     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
46892   fi
46893 
46894   # Additional macosx handling
46895   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46896     # Setting these parameters makes it an error to link to macosx APIs that are
46897     # newer than the given OS version and makes the linked binaries compatible
46898     # even if built on a newer version of the OS.
46899     # The expected format is X.Y.Z
46900     MACOSX_VERSION_MIN=10.7.0
46901 
46902 
46903     # The macro takes the version with no dots, ex: 1070
46904     # Let the flags variables get resolved in make for easier override on make
46905     # command line.
46906     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
46907     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
46908   fi
46909 
46910   # Setup some hard coded includes
46911   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
46912       -I${JDK_TOPDIR}/src/java.base/share/native/include \
46913       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
46914       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
46915       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
46916       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
46917 
46918   # The shared libraries are compiled using the picflag.
46919   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
46920   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
46921 
46922   # Executable flags
46923   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
46924   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
46925 
46926 
46927 
46928 
46929 
46930 
46931   # Flags for compiling test libraries
46932   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
46933   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
46934 
46935   # Flags for compiling test executables
46936   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
46937   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
46938 
46939 
46940 
46941 
46942 
46943 
46944   # Setup LDFLAGS et al.
46945   #
46946 
46947   # Now this is odd. The JDK native libraries have to link against libjvm.so
46948   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
46949   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
46950   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
46951   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
46952   # libraries will link to whatever is in memory. Yuck.
46953   #
46954   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
46955   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46956     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
46957     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46958       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
46959     fi
46960     # TODO: make -debug optional "--disable-full-debug-symbols"
46961     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
46962   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
46963     # If this is a --hash-style=gnu system, use --hash-style=both, why?
46964     # We have previously set HAS_GNU_HASH if this is the case
46965     if test -n "$HAS_GNU_HASH"; then
46966       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
46967     fi
46968     if test "x$OPENJDK_TARGET_OS" = xlinux; then
46969       # And since we now know that the linker is gnu, then add -z defs, to forbid
46970       # undefined symbols in object files.
46971       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
46972       case $DEBUG_LEVEL in
46973         release )
46974           # tell linker to optimize libraries.
46975           # Should this be supplied to the OSS linker as well?
46976           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
46977           ;;
46978         slowdebug )
46979           if test "x$HAS_LINKER_NOW" = "xtrue"; then
46980             # do relocations at load
46981             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
46982             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
46983           fi
46984           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
46985             # mark relocations read only
46986             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
46987             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
46988           fi
46989           ;;
46990         fastdebug )
46991           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
46992             # mark relocations read only
46993             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
46994             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
46995           fi
46996           ;;
46997         * )
46998           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
46999           ;;
47000         esac
47001     fi
47002   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47003     LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
47004     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
47005   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47006     LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
47007   fi
47008 
47009   # Customize LDFLAGS for executables
47010 
47011   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
47012 
47013   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47014     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
47015       LDFLAGS_STACK_SIZE=1048576
47016     else
47017       LDFLAGS_STACK_SIZE=327680
47018     fi
47019     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
47020   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
47021     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
47022   fi
47023 
47024   # Customize LDFLAGS for libs
47025   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
47026 
47027   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47028     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
47029     JDKLIB_LIBS=""
47030   else
47031     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
47032         -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
47033 
47034     # On some platforms (mac) the linker warns about non existing -L dirs.
47035     # Add server first if available. Linking aginst client does not always produce the same results.
47036     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
47037     # Default to server for other variants.
47038     if test "x$JVM_VARIANT_SERVER" = xtrue; then
47039       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
47040     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
47041       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
47042     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
47043       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
47044     else
47045       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
47046     fi
47047 
47048     JDKLIB_LIBS="-ljava -ljvm"
47049     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47050       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
47051     fi
47052   fi
47053 
47054 
47055 
47056 
47057 
47058 
47059 
47060   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
47061   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
47062 
47063 
47064 
47065 
47066 
47067   # Some Zero and Shark settings.
47068   # ZERO_ARCHFLAG tells the compiler which mode to build for
47069   case "${OPENJDK_TARGET_CPU}" in
47070     s390)
47071       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
47072       ;;
47073     *)
47074       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47075   esac
47076 
47077   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
47078 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
47079   supports=yes
47080 
47081   saved_cflags="$CFLAGS"
47082   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
47083   ac_ext=c
47084 ac_cpp='$CPP $CPPFLAGS'
47085 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47086 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47087 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47088 
47089   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47090 /* end confdefs.h.  */
47091 int i;
47092 _ACEOF
47093 if ac_fn_c_try_compile "$LINENO"; then :
47094 
47095 else
47096   supports=no
47097 fi
47098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47099   ac_ext=cpp
47100 ac_cpp='$CXXCPP $CPPFLAGS'
47101 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47102 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47103 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47104 
47105   CFLAGS="$saved_cflags"
47106 
47107   saved_cxxflags="$CXXFLAGS"
47108   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
47109   ac_ext=cpp
47110 ac_cpp='$CXXCPP $CPPFLAGS'
47111 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47112 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47113 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47114 
47115   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47116 /* end confdefs.h.  */
47117 int i;
47118 _ACEOF
47119 if ac_fn_cxx_try_compile "$LINENO"; then :
47120 
47121 else
47122   supports=no
47123 fi
47124 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47125   ac_ext=cpp
47126 ac_cpp='$CXXCPP $CPPFLAGS'
47127 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47128 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47129 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47130 
47131   CXXFLAGS="$saved_cxxflags"
47132 
47133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47134 $as_echo "$supports" >&6; }
47135   if test "x$supports" = "xyes" ; then
47136     :
47137   else
47138     ZERO_ARCHFLAG=""
47139   fi
47140 
47141 
47142 
47143   # Check that the compiler supports -mX (or -qX on AIX) flags
47144   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
47145 
47146   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
47147 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
47148   supports=yes
47149 
47150   saved_cflags="$CFLAGS"
47151   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47152   ac_ext=c
47153 ac_cpp='$CPP $CPPFLAGS'
47154 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47155 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47156 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47157 
47158   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47159 /* end confdefs.h.  */
47160 int i;
47161 _ACEOF
47162 if ac_fn_c_try_compile "$LINENO"; then :
47163 
47164 else
47165   supports=no
47166 fi
47167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47168   ac_ext=cpp
47169 ac_cpp='$CXXCPP $CPPFLAGS'
47170 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47171 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47172 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47173 
47174   CFLAGS="$saved_cflags"
47175 
47176   saved_cxxflags="$CXXFLAGS"
47177   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47178   ac_ext=cpp
47179 ac_cpp='$CXXCPP $CPPFLAGS'
47180 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47181 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47182 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47183 
47184   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47185 /* end confdefs.h.  */
47186 int i;
47187 _ACEOF
47188 if ac_fn_cxx_try_compile "$LINENO"; then :
47189 
47190 else
47191   supports=no
47192 fi
47193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47194   ac_ext=cpp
47195 ac_cpp='$CXXCPP $CPPFLAGS'
47196 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47197 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47198 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47199 
47200   CXXFLAGS="$saved_cxxflags"
47201 
47202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47203 $as_echo "$supports" >&6; }
47204   if test "x$supports" = "xyes" ; then
47205     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
47206   else
47207     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
47208   fi
47209 
47210 
47211 
47212   # Check whether --enable-warnings-as-errors was given.
47213 if test "${enable_warnings_as_errors+set}" = set; then :
47214   enableval=$enable_warnings_as_errors;
47215 fi
47216 
47217 
47218   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
47219 $as_echo_n "checking if native warnings are errors... " >&6; }
47220   if test "x$enable_warnings_as_errors" = "xyes"; then
47221     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
47222 $as_echo "yes (explicitely set)" >&6; }
47223     WARNINGS_AS_ERRORS=true
47224   elif test "x$enable_warnings_as_errors" = "xno"; then
47225     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47226 $as_echo "no" >&6; }
47227     WARNINGS_AS_ERRORS=false
47228   elif test "x$enable_warnings_as_errors" = "x"; then
47229     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
47230 $as_echo "yes (default)" >&6; }
47231     WARNINGS_AS_ERRORS=true
47232   else
47233     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
47234   fi
47235 
47236   if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
47237     # Set legacy hotspot variable
47238     HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
47239   else
47240     HOTSPOT_SET_WARNINGS_AS_ERRORS=""
47241   fi
47242 
47243 
47244 
47245 
47246   case "${TOOLCHAIN_TYPE}" in
47247     microsoft)
47248       DISABLE_WARNING_PREFIX="-wd"
47249       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
47250       ;;
47251     solstudio)
47252       DISABLE_WARNING_PREFIX="-erroff="
47253       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
47254       ;;
47255     gcc)
47256       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
47257 
47258   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
47259 $as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
47260   supports=yes
47261 
47262   saved_cflags="$CFLAGS"
47263   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
47264   ac_ext=c
47265 ac_cpp='$CPP $CPPFLAGS'
47266 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47267 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47268 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47269 
47270   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47271 /* end confdefs.h.  */
47272 int i;
47273 _ACEOF
47274 if ac_fn_c_try_compile "$LINENO"; then :
47275 
47276 else
47277   supports=no
47278 fi
47279 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47280   ac_ext=cpp
47281 ac_cpp='$CXXCPP $CPPFLAGS'
47282 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47283 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47284 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47285 
47286   CFLAGS="$saved_cflags"
47287 
47288   saved_cxxflags="$CXXFLAGS"
47289   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
47290   ac_ext=cpp
47291 ac_cpp='$CXXCPP $CPPFLAGS'
47292 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47293 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47294 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47295 
47296   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47297 /* end confdefs.h.  */
47298 int i;
47299 _ACEOF
47300 if ac_fn_cxx_try_compile "$LINENO"; then :
47301 
47302 else
47303   supports=no
47304 fi
47305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47306   ac_ext=cpp
47307 ac_cpp='$CXXCPP $CPPFLAGS'
47308 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47309 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47310 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47311 
47312   CXXFLAGS="$saved_cxxflags"
47313 
47314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47315 $as_echo "$supports" >&6; }
47316   if test "x$supports" = "xyes" ; then
47317     GCC_CAN_DISABLE_WARNINGS=true
47318   else
47319     GCC_CAN_DISABLE_WARNINGS=false
47320 
47321   fi
47322 
47323       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47324         DISABLE_WARNING_PREFIX="-Wno-"
47325       else
47326         DISABLE_WARNING_PREFIX=
47327       fi
47328       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47329       # Repeate the check for the BUILD_CC
47330       CC_OLD="$CC"
47331       CC="$BUILD_CC"
47332 
47333   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
47334 $as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
47335   supports=yes
47336 
47337   saved_cflags="$CFLAGS"
47338   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
47339   ac_ext=c
47340 ac_cpp='$CPP $CPPFLAGS'
47341 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47342 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47343 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47344 
47345   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47346 /* end confdefs.h.  */
47347 int i;
47348 _ACEOF
47349 if ac_fn_c_try_compile "$LINENO"; then :
47350 
47351 else
47352   supports=no
47353 fi
47354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47355   ac_ext=cpp
47356 ac_cpp='$CXXCPP $CPPFLAGS'
47357 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47358 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47359 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47360 
47361   CFLAGS="$saved_cflags"
47362 
47363   saved_cxxflags="$CXXFLAGS"
47364   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
47365   ac_ext=cpp
47366 ac_cpp='$CXXCPP $CPPFLAGS'
47367 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47368 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47369 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47370 
47371   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47372 /* end confdefs.h.  */
47373 int i;
47374 _ACEOF
47375 if ac_fn_cxx_try_compile "$LINENO"; then :
47376 
47377 else
47378   supports=no
47379 fi
47380 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47381   ac_ext=cpp
47382 ac_cpp='$CXXCPP $CPPFLAGS'
47383 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47384 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47385 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47386 
47387   CXXFLAGS="$saved_cxxflags"
47388 
47389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47390 $as_echo "$supports" >&6; }
47391   if test "x$supports" = "xyes" ; then
47392     BUILD_CC_CAN_DISABLE_WARNINGS=true
47393   else
47394     BUILD_CC_CAN_DISABLE_WARNINGS=false
47395 
47396   fi
47397 
47398       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47399         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
47400       else
47401         BUILD_CC_DISABLE_WARNING_PREFIX=
47402       fi
47403       CC="$CC_OLD"
47404       ;;
47405     clang)
47406       DISABLE_WARNING_PREFIX="-Wno-"
47407       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47408       ;;
47409   esac
47410 
47411 
47412 
47413 
47414 # Setup debug symbols (need objcopy from the toolchain for that)
47415 
47416   #
47417   # NATIVE_DEBUG_SYMBOLS
47418   # This must be done after the toolchain is setup, since we're looking at objcopy.
47419   #
47420   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
47421 $as_echo_n "checking what type of native debug symbols to use... " >&6; }
47422 
47423 # Check whether --with-native-debug-symbols was given.
47424 if test "${with_native_debug_symbols+set}" = set; then :
47425   withval=$with_native_debug_symbols;
47426 else
47427   with_native_debug_symbols="zipped"
47428 fi
47429 
47430   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
47431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
47432 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
47433 
47434   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
47435 
47436     if test "x$OBJCOPY" = x; then
47437       # explicit enabling of enable-debug-symbols and can't find objcopy
47438       # this is an error
47439       as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
47440     fi
47441 
47442     ENABLE_DEBUG_SYMBOLS=true
47443     ZIP_DEBUGINFO_FILES=true
47444     DEBUG_BINARIES=true
47445     STRIP_POLICY=min_strip
47446   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
47447     ENABLE_DEBUG_SYMBOLS=false
47448     ZIP_DEBUGINFO_FILES=false
47449     DEBUG_BINARIES=false
47450     STRIP_POLICY=no_strip
47451   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
47452     ENABLE_DEBUG_SYMBOLS=false  # -g option only
47453     ZIP_DEBUGINFO_FILES=false
47454     DEBUG_BINARIES=true
47455     STRIP_POLICY=no_strip
47456     STRIP=""
47457   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
47458 
47459     if test "x$OBJCOPY" = x; then
47460       # explicit enabling of enable-debug-symbols and can't find objcopy
47461       # this is an error
47462       as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
47463     fi
47464 
47465     ENABLE_DEBUG_SYMBOLS=true
47466     ZIP_DEBUGINFO_FILES=false
47467     DEBUG_BINARIES=true
47468     STRIP_POLICY=min_strip
47469   else
47470     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
47471   fi
47472 
47473   # --enable-debug-symbols is deprecated.
47474   # Please use --with-debug-symbols=[internal,external,zipped] .
47475 
47476   # Check whether --enable-debug-symbols was given.
47477 if test "${enable_debug_symbols+set}" = set; then :
47478   enableval=$enable_debug_symbols;
47479 fi
47480 
47481   if test "x$enable_debug_symbols" != x; then
47482     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
47483 $as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
47484 
47485     if test "xPlease use --with-debug-symbols=[internal,external,zipped] ." != x; then
47486       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-debug-symbols=[internal,external,zipped] ." >&5
47487 $as_echo "$as_me: WARNING: Please use --with-debug-symbols=[internal,external,zipped] ." >&2;}
47488     fi
47489 
47490   fi
47491 
47492 
47493   # --enable-zip-debug-info is deprecated.
47494   # Please use --with-debug-symbols=zipped .
47495 
47496   # Check whether --enable-zip-debug-info was given.
47497 if test "${enable_zip_debug_info+set}" = set; then :
47498   enableval=$enable_zip_debug_info;
47499 fi
47500 
47501   if test "x$enable_zip_debug_info" != x; then
47502     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
47503 $as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
47504 
47505     if test "xPlease use --with-debug-symbols=zipped ." != x; then
47506       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-debug-symbols=zipped ." >&5
47507 $as_echo "$as_me: WARNING: Please use --with-debug-symbols=zipped ." >&2;}
47508     fi
47509 
47510   fi
47511 
47512 
47513 
47514 
47515 
47516 
47517 
47518 
47519 
47520   # Check whether --enable-native-coverage was given.
47521 if test "${enable_native_coverage+set}" = set; then :
47522   enableval=$enable_native_coverage;
47523 fi
47524 
47525   GCOV_ENABLED="false"
47526   if test "x$enable_native_coverage" = "xyes"; then
47527     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
47528       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47529 $as_echo_n "checking if native coverage is enabled... " >&6; }
47530       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47531 $as_echo "yes" >&6; }
47532       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
47533       GCOV_LDFLAGS="-fprofile-arcs"
47534       LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
47535       LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
47536       LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
47537       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
47538       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
47539       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
47540       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
47541       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
47542       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
47543       GCOV_ENABLED="true"
47544     else
47545       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
47546     fi
47547   elif test "x$enable_native_coverage" = "xno"; then
47548     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47549 $as_echo_n "checking if native coverage is enabled... " >&6; }
47550     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47551 $as_echo "no" >&6; }
47552   elif test "x$enable_native_coverage" != "x"; then
47553     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
47554   fi
47555 
47556 
47557 
47558 
47559 ###############################################################################
47560 #
47561 # Check dependencies for external and internal libraries.
47562 #
47563 ###############################################################################
47564 
47565 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
47566 
47567   # When using cygwin or msys, we need a wrapper binary that renames
47568   # /cygdrive/c/ arguments into c:/ arguments and peeks into
47569   # @files and rewrites these too! This wrapper binary is
47570   # called fixpath.
47571   FIXPATH=
47572   if test "x$OPENJDK_BUILD_OS" = xwindows; then
47573     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
47574 $as_echo_n "checking if fixpath can be created... " >&6; }
47575     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
47576     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
47577     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
47578     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
47579       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
47580       FIXPATH="$FIXPATH_BIN -c"
47581     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
47582       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
47583       # @ was chosen as separator to minimize risk of other tools messing around with it
47584       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
47585           | tr ' ' '\n' | grep '^/./' | sort | uniq`
47586       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
47587       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
47588     fi
47589     FIXPATH_SRC_W="$FIXPATH_SRC"
47590     FIXPATH_BIN_W="$FIXPATH_BIN"
47591 
47592   unix_path="$FIXPATH_SRC_W"
47593   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47594     windows_path=`$CYGPATH -m "$unix_path"`
47595     FIXPATH_SRC_W="$windows_path"
47596   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47597     windows_path=`cmd //c echo $unix_path`
47598     FIXPATH_SRC_W="$windows_path"
47599   fi
47600 
47601 
47602   unix_path="$FIXPATH_BIN_W"
47603   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47604     windows_path=`$CYGPATH -m "$unix_path"`
47605     FIXPATH_BIN_W="$windows_path"
47606   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47607     windows_path=`cmd //c echo $unix_path`
47608     FIXPATH_BIN_W="$windows_path"
47609   fi
47610 
47611     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
47612     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
47613     cd $FIXPATH_DIR
47614     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
47615     cd $CURDIR
47616 
47617     if test ! -x $FIXPATH_BIN; then
47618       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47619 $as_echo "no" >&6; }
47620       cat $FIXPATH_DIR/fixpath1.log
47621       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
47622     fi
47623     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47624 $as_echo "yes" >&6; }
47625     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
47626 $as_echo_n "checking if fixpath.exe works... " >&6; }
47627     cd $FIXPATH_DIR
47628     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
47629         > $FIXPATH_DIR/fixpath2.log 2>&1
47630     cd $CURDIR
47631     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
47632       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47633 $as_echo "no" >&6; }
47634       cat $FIXPATH_DIR/fixpath2.log
47635       as_fn_error $? "fixpath did not work!" "$LINENO" 5
47636     fi
47637     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47638 $as_echo "yes" >&6; }
47639 
47640     FIXPATH_DETACH_FLAG="--detach"
47641   fi
47642 
47643 
47644 
47645 
47646 
47647 
47648   # Check if X11 is needed
47649   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
47650     # No X11 support on windows or macosx
47651     NEEDS_LIB_X11=false
47652   else
47653     if test "x$SUPPORT_HEADFUL" = xno; then
47654       # No X11 support if building headless-only
47655       NEEDS_LIB_X11=false
47656     else
47657       # All other instances need X11
47658       NEEDS_LIB_X11=true
47659     fi
47660   fi
47661 
47662   # Check if cups is needed
47663   if test "x$OPENJDK_TARGET_OS" = xwindows; then
47664     # Windows have a separate print system
47665     NEEDS_LIB_CUPS=false
47666   else
47667     NEEDS_LIB_CUPS=true
47668   fi
47669 
47670   # Check if freetype is needed
47671   if test "x$OPENJDK" = "xtrue"; then
47672     NEEDS_LIB_FREETYPE=true
47673   else
47674     NEEDS_LIB_FREETYPE=false
47675   fi
47676 
47677   # Check if alsa is needed
47678   if test "x$OPENJDK_TARGET_OS" = xlinux; then
47679     NEEDS_LIB_ALSA=true
47680   else
47681     NEEDS_LIB_ALSA=false
47682   fi
47683 
47684   # Check if ffi is needed
47685   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47686     NEEDS_LIB_FFI=true
47687   else
47688     NEEDS_LIB_FFI=false
47689   fi
47690 
47691 
47692   # statically link libstdc++ before C++ ABI is stablized on Linux unless
47693   # dynamic build is configured on command line.
47694 
47695 # Check whether --with-stdc++lib was given.
47696 if test "${with_stdc__lib+set}" = set; then :
47697   withval=$with_stdc__lib;
47698         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47699                 && test "x$with_stdc__lib" != xdefault; then
47700           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47701         fi
47702 
47703 else
47704   with_stdc__lib=default
47705 
47706 fi
47707 
47708 
47709   if test "x$OPENJDK_TARGET_OS" = xlinux; then
47710     # Test if -lstdc++ works.
47711     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47712 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47713     ac_ext=cpp
47714 ac_cpp='$CXXCPP $CPPFLAGS'
47715 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47716 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47717 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47718 
47719     OLD_CXXFLAGS="$CXXFLAGS"
47720     CXXFLAGS="$CXXFLAGS -lstdc++"
47721     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47722 /* end confdefs.h.  */
47723 
47724 int
47725 main ()
47726 {
47727 return 0;
47728   ;
47729   return 0;
47730 }
47731 _ACEOF
47732 if ac_fn_cxx_try_link "$LINENO"; then :
47733   has_dynamic_libstdcxx=yes
47734 else
47735   has_dynamic_libstdcxx=no
47736 fi
47737 rm -f core conftest.err conftest.$ac_objext \
47738     conftest$ac_exeext conftest.$ac_ext
47739     CXXFLAGS="$OLD_CXXFLAGS"
47740     ac_ext=cpp
47741 ac_cpp='$CXXCPP $CPPFLAGS'
47742 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47743 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47744 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47745 
47746     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47747 $as_echo "$has_dynamic_libstdcxx" >&6; }
47748 
47749     # Test if stdc++ can be linked statically.
47750     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47751 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47752     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47753     ac_ext=cpp
47754 ac_cpp='$CXXCPP $CPPFLAGS'
47755 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47756 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47757 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47758 
47759     OLD_LIBS="$LIBS"
47760     OLD_CXX="$CXX"
47761     LIBS="$STATIC_STDCXX_FLAGS"
47762     CXX="$CC"
47763     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47764 /* end confdefs.h.  */
47765 
47766 int
47767 main ()
47768 {
47769 return 0;
47770   ;
47771   return 0;
47772 }
47773 _ACEOF
47774 if ac_fn_cxx_try_link "$LINENO"; then :
47775   has_static_libstdcxx=yes
47776 else
47777   has_static_libstdcxx=no
47778 fi
47779 rm -f core conftest.err conftest.$ac_objext \
47780     conftest$ac_exeext conftest.$ac_ext
47781     LIBS="$OLD_LIBS"
47782     CXX="$OLD_CXX"
47783     ac_ext=cpp
47784 ac_cpp='$CXXCPP $CPPFLAGS'
47785 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47786 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47787 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47788 
47789     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47790 $as_echo "$has_static_libstdcxx" >&6; }
47791 
47792     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47793       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47794     fi
47795 
47796     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47797       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47798     fi
47799 
47800     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47801       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47802     fi
47803 
47804     # If dynamic was requested, it's available since it would fail above otherwise.
47805     # If dynamic wasn't requested, go with static unless it isn't available.
47806     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47807 $as_echo_n "checking how to link with libstdc++... " >&6; }
47808     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47809       LIBCXX="$LIBCXX -lstdc++"
47810       LDCXX="$CXX"
47811       STATIC_CXX_SETTING="STATIC_CXX=false"
47812       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47813 $as_echo "dynamic" >&6; }
47814     else
47815       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47816       LDCXX="$CC"
47817       STATIC_CXX_SETTING="STATIC_CXX=true"
47818       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47819 $as_echo "static" >&6; }
47820     fi
47821   fi
47822 
47823 
47824   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47825   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47826     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47827   fi
47828 
47829   # TODO better (platform agnostic) test
47830   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47831     LIBCXX="-lstdc++"
47832   fi
47833 
47834 
47835   # Setup Windows runtime dlls
47836   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47837 
47838 
47839 # Check whether --with-msvcr-dll was given.
47840 if test "${with_msvcr_dll+set}" = set; then :
47841   withval=$with_msvcr_dll;
47842 fi
47843 
47844 
47845   if test "x$with_msvcr_dll" != x; then
47846     # If given explicitely by user, do not probe. If not present, fail directly.
47847 
47848   DLL_NAME="$MSVCR_NAME"
47849   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
47850   METHOD="--with-msvcr-dll"
47851   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47852     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47853 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47854 
47855     # Need to check if the found msvcr is correct architecture
47856     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47857 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47858     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47859     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47860       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47861       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47862       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47863         CORRECT_MSVCR_ARCH="PE32 executable"
47864       else
47865         CORRECT_MSVCR_ARCH="PE32+ executable"
47866       fi
47867     else
47868       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47869         CORRECT_MSVCR_ARCH=386
47870       else
47871         CORRECT_MSVCR_ARCH=x86-64
47872       fi
47873     fi
47874     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47875       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47876 $as_echo "ok" >&6; }
47877       MSVC_DLL="$POSSIBLE_MSVC_DLL"
47878 
47879   # Only process if variable expands to non-empty
47880 
47881   if test "x$MSVC_DLL" != x; then
47882     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47883 
47884   # Input might be given as Windows format, start by converting to
47885   # unix format.
47886   path="$MSVC_DLL"
47887   new_path=`$CYGPATH -u "$path"`
47888 
47889   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47890   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47891   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47892   # "foo.exe" is OK but "foo" is an error.
47893   #
47894   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47895   # It is also a way to make sure we got the proper file name for the real test later on.
47896   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47897   if test "x$test_shortpath" = x; then
47898     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47899 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47900     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47901   fi
47902 
47903   # Call helper function which possibly converts this using DOS-style short mode.
47904   # If so, the updated path is stored in $new_path.
47905 
47906   input_path="$new_path"
47907   # Check if we need to convert this using DOS-style short mode. If the path
47908   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47909   # take no chances and rewrite it.
47910   # Note: m4 eats our [], so we need to use [ and ] instead.
47911   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47912   if test "x$has_forbidden_chars" != x; then
47913     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47914     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47915     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47916     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47917       # Going to short mode and back again did indeed matter. Since short mode is
47918       # case insensitive, let's make it lowercase to improve readability.
47919       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47920       # Now convert it back to Unix-style (cygpath)
47921       input_path=`$CYGPATH -u "$shortmode_path"`
47922       new_path="$input_path"
47923     fi
47924   fi
47925 
47926   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47927   if test "x$test_cygdrive_prefix" = x; then
47928     # As a simple fix, exclude /usr/bin since it's not a real path.
47929     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47930       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47931       # a path prefixed by /cygdrive for fixpath to work.
47932       new_path="$CYGWIN_ROOT_PATH$input_path"
47933     fi
47934   fi
47935 
47936 
47937   if test "x$path" != "x$new_path"; then
47938     MSVC_DLL="$new_path"
47939     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47940 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47941   fi
47942 
47943     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47944 
47945   path="$MSVC_DLL"
47946   has_colon=`$ECHO $path | $GREP ^.:`
47947   new_path="$path"
47948   if test "x$has_colon" = x; then
47949     # Not in mixed or Windows style, start by that.
47950     new_path=`cmd //c echo $path`
47951   fi
47952 
47953 
47954   input_path="$new_path"
47955   # Check if we need to convert this using DOS-style short mode. If the path
47956   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47957   # take no chances and rewrite it.
47958   # Note: m4 eats our [], so we need to use [ and ] instead.
47959   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47960   if test "x$has_forbidden_chars" != x; then
47961     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47962     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47963   fi
47964 
47965 
47966   windows_path="$new_path"
47967   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47968     unix_path=`$CYGPATH -u "$windows_path"`
47969     new_path="$unix_path"
47970   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47971     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47972     new_path="$unix_path"
47973   fi
47974 
47975   if test "x$path" != "x$new_path"; then
47976     MSVC_DLL="$new_path"
47977     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47978 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47979   fi
47980 
47981   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47982   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47983 
47984     else
47985       # We're on a unix platform. Hooray! :)
47986       path="$MSVC_DLL"
47987       has_space=`$ECHO "$path" | $GREP " "`
47988       if test "x$has_space" != x; then
47989         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47990 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47991         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47992       fi
47993 
47994       # Use eval to expand a potential ~
47995       eval path="$path"
47996       if test ! -f "$path" && test ! -d "$path"; then
47997         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47998       fi
47999 
48000       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48001     fi
48002   fi
48003 
48004       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48005 $as_echo_n "checking for $DLL_NAME... " >&6; }
48006       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48007 $as_echo "$MSVC_DLL" >&6; }
48008     else
48009       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48010 $as_echo "incorrect, ignoring" >&6; }
48011       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48012 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48013     fi
48014   fi
48015 
48016     if test "x$MSVC_DLL" = x; then
48017       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
48018     fi
48019     MSVCR_DLL="$MSVC_DLL"
48020   elif test "x$DEVKIT_MSVCR_DLL" != x; then
48021 
48022   DLL_NAME="$MSVCR_NAME"
48023   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
48024   METHOD="devkit"
48025   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48026     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48027 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48028 
48029     # Need to check if the found msvcr is correct architecture
48030     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48031 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48032     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48033     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48034       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48035       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48036       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48037         CORRECT_MSVCR_ARCH="PE32 executable"
48038       else
48039         CORRECT_MSVCR_ARCH="PE32+ executable"
48040       fi
48041     else
48042       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48043         CORRECT_MSVCR_ARCH=386
48044       else
48045         CORRECT_MSVCR_ARCH=x86-64
48046       fi
48047     fi
48048     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48049       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48050 $as_echo "ok" >&6; }
48051       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48052 
48053   # Only process if variable expands to non-empty
48054 
48055   if test "x$MSVC_DLL" != x; then
48056     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48057 
48058   # Input might be given as Windows format, start by converting to
48059   # unix format.
48060   path="$MSVC_DLL"
48061   new_path=`$CYGPATH -u "$path"`
48062 
48063   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48064   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48065   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48066   # "foo.exe" is OK but "foo" is an error.
48067   #
48068   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48069   # It is also a way to make sure we got the proper file name for the real test later on.
48070   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48071   if test "x$test_shortpath" = x; then
48072     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48073 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48074     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48075   fi
48076 
48077   # Call helper function which possibly converts this using DOS-style short mode.
48078   # If so, the updated path is stored in $new_path.
48079 
48080   input_path="$new_path"
48081   # Check if we need to convert this using DOS-style short mode. If the path
48082   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48083   # take no chances and rewrite it.
48084   # Note: m4 eats our [], so we need to use [ and ] instead.
48085   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48086   if test "x$has_forbidden_chars" != x; then
48087     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48088     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48089     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48090     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48091       # Going to short mode and back again did indeed matter. Since short mode is
48092       # case insensitive, let's make it lowercase to improve readability.
48093       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48094       # Now convert it back to Unix-style (cygpath)
48095       input_path=`$CYGPATH -u "$shortmode_path"`
48096       new_path="$input_path"
48097     fi
48098   fi
48099 
48100   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48101   if test "x$test_cygdrive_prefix" = x; then
48102     # As a simple fix, exclude /usr/bin since it's not a real path.
48103     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48104       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48105       # a path prefixed by /cygdrive for fixpath to work.
48106       new_path="$CYGWIN_ROOT_PATH$input_path"
48107     fi
48108   fi
48109 
48110 
48111   if test "x$path" != "x$new_path"; then
48112     MSVC_DLL="$new_path"
48113     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48114 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48115   fi
48116 
48117     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48118 
48119   path="$MSVC_DLL"
48120   has_colon=`$ECHO $path | $GREP ^.:`
48121   new_path="$path"
48122   if test "x$has_colon" = x; then
48123     # Not in mixed or Windows style, start by that.
48124     new_path=`cmd //c echo $path`
48125   fi
48126 
48127 
48128   input_path="$new_path"
48129   # Check if we need to convert this using DOS-style short mode. If the path
48130   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48131   # take no chances and rewrite it.
48132   # Note: m4 eats our [], so we need to use [ and ] instead.
48133   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48134   if test "x$has_forbidden_chars" != x; then
48135     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48136     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48137   fi
48138 
48139 
48140   windows_path="$new_path"
48141   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48142     unix_path=`$CYGPATH -u "$windows_path"`
48143     new_path="$unix_path"
48144   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48145     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48146     new_path="$unix_path"
48147   fi
48148 
48149   if test "x$path" != "x$new_path"; then
48150     MSVC_DLL="$new_path"
48151     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48152 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48153   fi
48154 
48155   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48156   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48157 
48158     else
48159       # We're on a unix platform. Hooray! :)
48160       path="$MSVC_DLL"
48161       has_space=`$ECHO "$path" | $GREP " "`
48162       if test "x$has_space" != x; then
48163         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48164 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48165         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48166       fi
48167 
48168       # Use eval to expand a potential ~
48169       eval path="$path"
48170       if test ! -f "$path" && test ! -d "$path"; then
48171         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48172       fi
48173 
48174       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48175     fi
48176   fi
48177 
48178       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48179 $as_echo_n "checking for $DLL_NAME... " >&6; }
48180       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48181 $as_echo "$MSVC_DLL" >&6; }
48182     else
48183       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48184 $as_echo "incorrect, ignoring" >&6; }
48185       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48186 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48187     fi
48188   fi
48189 
48190     if test "x$MSVC_DLL" = x; then
48191       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
48192     fi
48193     MSVCR_DLL="$MSVC_DLL"
48194   else
48195 
48196   DLL_NAME="${MSVCR_NAME}"
48197   MSVC_DLL=
48198 
48199   if test "x$MSVC_DLL" = x; then
48200     # Probe: Using well-known location from Visual Studio 10.0
48201     if test "x$VCINSTALLDIR" != x; then
48202       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
48203 
48204   windows_path="$CYGWIN_VC_INSTALL_DIR"
48205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48206     unix_path=`$CYGPATH -u "$windows_path"`
48207     CYGWIN_VC_INSTALL_DIR="$unix_path"
48208   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48209     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48210     CYGWIN_VC_INSTALL_DIR="$unix_path"
48211   fi
48212 
48213       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48214         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48215       else
48216         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48217       fi
48218       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
48219 
48220   DLL_NAME="$DLL_NAME"
48221   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48222   METHOD="well-known location in VCINSTALLDIR"
48223   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48224     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48225 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48226 
48227     # Need to check if the found msvcr is correct architecture
48228     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48229 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48230     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48231     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48232       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48233       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48234       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48235         CORRECT_MSVCR_ARCH="PE32 executable"
48236       else
48237         CORRECT_MSVCR_ARCH="PE32+ executable"
48238       fi
48239     else
48240       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48241         CORRECT_MSVCR_ARCH=386
48242       else
48243         CORRECT_MSVCR_ARCH=x86-64
48244       fi
48245     fi
48246     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48247       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48248 $as_echo "ok" >&6; }
48249       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48250 
48251   # Only process if variable expands to non-empty
48252 
48253   if test "x$MSVC_DLL" != x; then
48254     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48255 
48256   # Input might be given as Windows format, start by converting to
48257   # unix format.
48258   path="$MSVC_DLL"
48259   new_path=`$CYGPATH -u "$path"`
48260 
48261   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48262   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48263   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48264   # "foo.exe" is OK but "foo" is an error.
48265   #
48266   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48267   # It is also a way to make sure we got the proper file name for the real test later on.
48268   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48269   if test "x$test_shortpath" = x; then
48270     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48271 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48272     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48273   fi
48274 
48275   # Call helper function which possibly converts this using DOS-style short mode.
48276   # If so, the updated path is stored in $new_path.
48277 
48278   input_path="$new_path"
48279   # Check if we need to convert this using DOS-style short mode. If the path
48280   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48281   # take no chances and rewrite it.
48282   # Note: m4 eats our [], so we need to use [ and ] instead.
48283   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48284   if test "x$has_forbidden_chars" != x; then
48285     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48286     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48287     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48288     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48289       # Going to short mode and back again did indeed matter. Since short mode is
48290       # case insensitive, let's make it lowercase to improve readability.
48291       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48292       # Now convert it back to Unix-style (cygpath)
48293       input_path=`$CYGPATH -u "$shortmode_path"`
48294       new_path="$input_path"
48295     fi
48296   fi
48297 
48298   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48299   if test "x$test_cygdrive_prefix" = x; then
48300     # As a simple fix, exclude /usr/bin since it's not a real path.
48301     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48302       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48303       # a path prefixed by /cygdrive for fixpath to work.
48304       new_path="$CYGWIN_ROOT_PATH$input_path"
48305     fi
48306   fi
48307 
48308 
48309   if test "x$path" != "x$new_path"; then
48310     MSVC_DLL="$new_path"
48311     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48312 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48313   fi
48314 
48315     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48316 
48317   path="$MSVC_DLL"
48318   has_colon=`$ECHO $path | $GREP ^.:`
48319   new_path="$path"
48320   if test "x$has_colon" = x; then
48321     # Not in mixed or Windows style, start by that.
48322     new_path=`cmd //c echo $path`
48323   fi
48324 
48325 
48326   input_path="$new_path"
48327   # Check if we need to convert this using DOS-style short mode. If the path
48328   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48329   # take no chances and rewrite it.
48330   # Note: m4 eats our [], so we need to use [ and ] instead.
48331   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48332   if test "x$has_forbidden_chars" != x; then
48333     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48334     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48335   fi
48336 
48337 
48338   windows_path="$new_path"
48339   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48340     unix_path=`$CYGPATH -u "$windows_path"`
48341     new_path="$unix_path"
48342   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48343     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48344     new_path="$unix_path"
48345   fi
48346 
48347   if test "x$path" != "x$new_path"; then
48348     MSVC_DLL="$new_path"
48349     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48350 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48351   fi
48352 
48353   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48354   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48355 
48356     else
48357       # We're on a unix platform. Hooray! :)
48358       path="$MSVC_DLL"
48359       has_space=`$ECHO "$path" | $GREP " "`
48360       if test "x$has_space" != x; then
48361         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48362 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48363         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48364       fi
48365 
48366       # Use eval to expand a potential ~
48367       eval path="$path"
48368       if test ! -f "$path" && test ! -d "$path"; then
48369         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48370       fi
48371 
48372       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48373     fi
48374   fi
48375 
48376       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48377 $as_echo_n "checking for $DLL_NAME... " >&6; }
48378       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48379 $as_echo "$MSVC_DLL" >&6; }
48380     else
48381       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48382 $as_echo "incorrect, ignoring" >&6; }
48383       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48384 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48385     fi
48386   fi
48387 
48388     fi
48389   fi
48390 
48391   if test "x$MSVC_DLL" = x; then
48392     # Probe: Check in the Boot JDK directory.
48393     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
48394 
48395   DLL_NAME="$DLL_NAME"
48396   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48397   METHOD="well-known location in Boot JDK"
48398   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48399     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48400 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48401 
48402     # Need to check if the found msvcr is correct architecture
48403     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48404 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48405     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48406     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48407       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48408       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48409       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48410         CORRECT_MSVCR_ARCH="PE32 executable"
48411       else
48412         CORRECT_MSVCR_ARCH="PE32+ executable"
48413       fi
48414     else
48415       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48416         CORRECT_MSVCR_ARCH=386
48417       else
48418         CORRECT_MSVCR_ARCH=x86-64
48419       fi
48420     fi
48421     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48422       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48423 $as_echo "ok" >&6; }
48424       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48425 
48426   # Only process if variable expands to non-empty
48427 
48428   if test "x$MSVC_DLL" != x; then
48429     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48430 
48431   # Input might be given as Windows format, start by converting to
48432   # unix format.
48433   path="$MSVC_DLL"
48434   new_path=`$CYGPATH -u "$path"`
48435 
48436   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48437   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48438   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48439   # "foo.exe" is OK but "foo" is an error.
48440   #
48441   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48442   # It is also a way to make sure we got the proper file name for the real test later on.
48443   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48444   if test "x$test_shortpath" = x; then
48445     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48446 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48447     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48448   fi
48449 
48450   # Call helper function which possibly converts this using DOS-style short mode.
48451   # If so, the updated path is stored in $new_path.
48452 
48453   input_path="$new_path"
48454   # Check if we need to convert this using DOS-style short mode. If the path
48455   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48456   # take no chances and rewrite it.
48457   # Note: m4 eats our [], so we need to use [ and ] instead.
48458   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48459   if test "x$has_forbidden_chars" != x; then
48460     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48461     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48462     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48463     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48464       # Going to short mode and back again did indeed matter. Since short mode is
48465       # case insensitive, let's make it lowercase to improve readability.
48466       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48467       # Now convert it back to Unix-style (cygpath)
48468       input_path=`$CYGPATH -u "$shortmode_path"`
48469       new_path="$input_path"
48470     fi
48471   fi
48472 
48473   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48474   if test "x$test_cygdrive_prefix" = x; then
48475     # As a simple fix, exclude /usr/bin since it's not a real path.
48476     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48477       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48478       # a path prefixed by /cygdrive for fixpath to work.
48479       new_path="$CYGWIN_ROOT_PATH$input_path"
48480     fi
48481   fi
48482 
48483 
48484   if test "x$path" != "x$new_path"; then
48485     MSVC_DLL="$new_path"
48486     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48487 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48488   fi
48489 
48490     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48491 
48492   path="$MSVC_DLL"
48493   has_colon=`$ECHO $path | $GREP ^.:`
48494   new_path="$path"
48495   if test "x$has_colon" = x; then
48496     # Not in mixed or Windows style, start by that.
48497     new_path=`cmd //c echo $path`
48498   fi
48499 
48500 
48501   input_path="$new_path"
48502   # Check if we need to convert this using DOS-style short mode. If the path
48503   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48504   # take no chances and rewrite it.
48505   # Note: m4 eats our [], so we need to use [ and ] instead.
48506   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48507   if test "x$has_forbidden_chars" != x; then
48508     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48509     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48510   fi
48511 
48512 
48513   windows_path="$new_path"
48514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48515     unix_path=`$CYGPATH -u "$windows_path"`
48516     new_path="$unix_path"
48517   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48518     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48519     new_path="$unix_path"
48520   fi
48521 
48522   if test "x$path" != "x$new_path"; then
48523     MSVC_DLL="$new_path"
48524     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48525 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48526   fi
48527 
48528   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48529   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48530 
48531     else
48532       # We're on a unix platform. Hooray! :)
48533       path="$MSVC_DLL"
48534       has_space=`$ECHO "$path" | $GREP " "`
48535       if test "x$has_space" != x; then
48536         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48537 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48538         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48539       fi
48540 
48541       # Use eval to expand a potential ~
48542       eval path="$path"
48543       if test ! -f "$path" && test ! -d "$path"; then
48544         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48545       fi
48546 
48547       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48548     fi
48549   fi
48550 
48551       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48552 $as_echo_n "checking for $DLL_NAME... " >&6; }
48553       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48554 $as_echo "$MSVC_DLL" >&6; }
48555     else
48556       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48557 $as_echo "incorrect, ignoring" >&6; }
48558       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48559 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48560     fi
48561   fi
48562 
48563   fi
48564 
48565   if test "x$MSVC_DLL" = x; then
48566     # Probe: Look in the Windows system32 directory
48567     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48568 
48569   windows_path="$CYGWIN_SYSTEMROOT"
48570   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48571     unix_path=`$CYGPATH -u "$windows_path"`
48572     CYGWIN_SYSTEMROOT="$unix_path"
48573   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48574     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48575     CYGWIN_SYSTEMROOT="$unix_path"
48576   fi
48577 
48578     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
48579 
48580   DLL_NAME="$DLL_NAME"
48581   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48582   METHOD="well-known location in SYSTEMROOT"
48583   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48584     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48585 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48586 
48587     # Need to check if the found msvcr is correct architecture
48588     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48589 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48590     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48591     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48592       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48593       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48594       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48595         CORRECT_MSVCR_ARCH="PE32 executable"
48596       else
48597         CORRECT_MSVCR_ARCH="PE32+ executable"
48598       fi
48599     else
48600       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48601         CORRECT_MSVCR_ARCH=386
48602       else
48603         CORRECT_MSVCR_ARCH=x86-64
48604       fi
48605     fi
48606     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48607       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48608 $as_echo "ok" >&6; }
48609       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48610 
48611   # Only process if variable expands to non-empty
48612 
48613   if test "x$MSVC_DLL" != x; then
48614     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48615 
48616   # Input might be given as Windows format, start by converting to
48617   # unix format.
48618   path="$MSVC_DLL"
48619   new_path=`$CYGPATH -u "$path"`
48620 
48621   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48622   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48623   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48624   # "foo.exe" is OK but "foo" is an error.
48625   #
48626   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48627   # It is also a way to make sure we got the proper file name for the real test later on.
48628   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48629   if test "x$test_shortpath" = x; then
48630     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48631 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48632     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48633   fi
48634 
48635   # Call helper function which possibly converts this using DOS-style short mode.
48636   # If so, the updated path is stored in $new_path.
48637 
48638   input_path="$new_path"
48639   # Check if we need to convert this using DOS-style short mode. If the path
48640   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48641   # take no chances and rewrite it.
48642   # Note: m4 eats our [], so we need to use [ and ] instead.
48643   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48644   if test "x$has_forbidden_chars" != x; then
48645     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48646     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48647     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48648     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48649       # Going to short mode and back again did indeed matter. Since short mode is
48650       # case insensitive, let's make it lowercase to improve readability.
48651       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48652       # Now convert it back to Unix-style (cygpath)
48653       input_path=`$CYGPATH -u "$shortmode_path"`
48654       new_path="$input_path"
48655     fi
48656   fi
48657 
48658   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48659   if test "x$test_cygdrive_prefix" = x; then
48660     # As a simple fix, exclude /usr/bin since it's not a real path.
48661     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48662       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48663       # a path prefixed by /cygdrive for fixpath to work.
48664       new_path="$CYGWIN_ROOT_PATH$input_path"
48665     fi
48666   fi
48667 
48668 
48669   if test "x$path" != "x$new_path"; then
48670     MSVC_DLL="$new_path"
48671     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48672 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48673   fi
48674 
48675     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48676 
48677   path="$MSVC_DLL"
48678   has_colon=`$ECHO $path | $GREP ^.:`
48679   new_path="$path"
48680   if test "x$has_colon" = x; then
48681     # Not in mixed or Windows style, start by that.
48682     new_path=`cmd //c echo $path`
48683   fi
48684 
48685 
48686   input_path="$new_path"
48687   # Check if we need to convert this using DOS-style short mode. If the path
48688   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48689   # take no chances and rewrite it.
48690   # Note: m4 eats our [], so we need to use [ and ] instead.
48691   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48692   if test "x$has_forbidden_chars" != x; then
48693     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48694     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48695   fi
48696 
48697 
48698   windows_path="$new_path"
48699   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48700     unix_path=`$CYGPATH -u "$windows_path"`
48701     new_path="$unix_path"
48702   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48703     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48704     new_path="$unix_path"
48705   fi
48706 
48707   if test "x$path" != "x$new_path"; then
48708     MSVC_DLL="$new_path"
48709     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48710 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48711   fi
48712 
48713   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48714   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48715 
48716     else
48717       # We're on a unix platform. Hooray! :)
48718       path="$MSVC_DLL"
48719       has_space=`$ECHO "$path" | $GREP " "`
48720       if test "x$has_space" != x; then
48721         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48722 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48723         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48724       fi
48725 
48726       # Use eval to expand a potential ~
48727       eval path="$path"
48728       if test ! -f "$path" && test ! -d "$path"; then
48729         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48730       fi
48731 
48732       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48733     fi
48734   fi
48735 
48736       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48737 $as_echo_n "checking for $DLL_NAME... " >&6; }
48738       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48739 $as_echo "$MSVC_DLL" >&6; }
48740     else
48741       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48742 $as_echo "incorrect, ignoring" >&6; }
48743       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48744 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48745     fi
48746   fi
48747 
48748   fi
48749 
48750   if test "x$MSVC_DLL" = x; then
48751     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48752     if test "x$VS100COMNTOOLS" != x; then
48753       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48754 
48755   windows_path="$CYGWIN_VS_TOOLS_DIR"
48756   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48757     unix_path=`$CYGPATH -u "$windows_path"`
48758     CYGWIN_VS_TOOLS_DIR="$unix_path"
48759   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48760     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48761     CYGWIN_VS_TOOLS_DIR="$unix_path"
48762   fi
48763 
48764       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48765         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48766             | $GREP -i /x64/ | $HEAD --lines 1`
48767       else
48768         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48769             | $GREP -i /x86/ | $HEAD --lines 1`
48770       fi
48771 
48772   DLL_NAME="$DLL_NAME"
48773   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48774   METHOD="search of VS100COMNTOOLS"
48775   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48776     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48777 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48778 
48779     # Need to check if the found msvcr is correct architecture
48780     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48781 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48782     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48783     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48784       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48785       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48786       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48787         CORRECT_MSVCR_ARCH="PE32 executable"
48788       else
48789         CORRECT_MSVCR_ARCH="PE32+ executable"
48790       fi
48791     else
48792       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48793         CORRECT_MSVCR_ARCH=386
48794       else
48795         CORRECT_MSVCR_ARCH=x86-64
48796       fi
48797     fi
48798     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48799       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48800 $as_echo "ok" >&6; }
48801       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48802 
48803   # Only process if variable expands to non-empty
48804 
48805   if test "x$MSVC_DLL" != x; then
48806     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48807 
48808   # Input might be given as Windows format, start by converting to
48809   # unix format.
48810   path="$MSVC_DLL"
48811   new_path=`$CYGPATH -u "$path"`
48812 
48813   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48814   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48815   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48816   # "foo.exe" is OK but "foo" is an error.
48817   #
48818   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48819   # It is also a way to make sure we got the proper file name for the real test later on.
48820   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48821   if test "x$test_shortpath" = x; then
48822     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48823 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48824     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48825   fi
48826 
48827   # Call helper function which possibly converts this using DOS-style short mode.
48828   # If so, the updated path is stored in $new_path.
48829 
48830   input_path="$new_path"
48831   # Check if we need to convert this using DOS-style short mode. If the path
48832   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48833   # take no chances and rewrite it.
48834   # Note: m4 eats our [], so we need to use [ and ] instead.
48835   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48836   if test "x$has_forbidden_chars" != x; then
48837     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48838     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48839     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48840     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48841       # Going to short mode and back again did indeed matter. Since short mode is
48842       # case insensitive, let's make it lowercase to improve readability.
48843       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48844       # Now convert it back to Unix-style (cygpath)
48845       input_path=`$CYGPATH -u "$shortmode_path"`
48846       new_path="$input_path"
48847     fi
48848   fi
48849 
48850   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48851   if test "x$test_cygdrive_prefix" = x; then
48852     # As a simple fix, exclude /usr/bin since it's not a real path.
48853     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48854       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48855       # a path prefixed by /cygdrive for fixpath to work.
48856       new_path="$CYGWIN_ROOT_PATH$input_path"
48857     fi
48858   fi
48859 
48860 
48861   if test "x$path" != "x$new_path"; then
48862     MSVC_DLL="$new_path"
48863     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48864 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48865   fi
48866 
48867     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48868 
48869   path="$MSVC_DLL"
48870   has_colon=`$ECHO $path | $GREP ^.:`
48871   new_path="$path"
48872   if test "x$has_colon" = x; then
48873     # Not in mixed or Windows style, start by that.
48874     new_path=`cmd //c echo $path`
48875   fi
48876 
48877 
48878   input_path="$new_path"
48879   # Check if we need to convert this using DOS-style short mode. If the path
48880   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48881   # take no chances and rewrite it.
48882   # Note: m4 eats our [], so we need to use [ and ] instead.
48883   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48884   if test "x$has_forbidden_chars" != x; then
48885     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48886     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48887   fi
48888 
48889 
48890   windows_path="$new_path"
48891   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48892     unix_path=`$CYGPATH -u "$windows_path"`
48893     new_path="$unix_path"
48894   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48895     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48896     new_path="$unix_path"
48897   fi
48898 
48899   if test "x$path" != "x$new_path"; then
48900     MSVC_DLL="$new_path"
48901     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48902 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48903   fi
48904 
48905   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48906   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48907 
48908     else
48909       # We're on a unix platform. Hooray! :)
48910       path="$MSVC_DLL"
48911       has_space=`$ECHO "$path" | $GREP " "`
48912       if test "x$has_space" != x; then
48913         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48914 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48915         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48916       fi
48917 
48918       # Use eval to expand a potential ~
48919       eval path="$path"
48920       if test ! -f "$path" && test ! -d "$path"; then
48921         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48922       fi
48923 
48924       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48925     fi
48926   fi
48927 
48928       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48929 $as_echo_n "checking for $DLL_NAME... " >&6; }
48930       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48931 $as_echo "$MSVC_DLL" >&6; }
48932     else
48933       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48934 $as_echo "incorrect, ignoring" >&6; }
48935       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48936 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48937     fi
48938   fi
48939 
48940     fi
48941   fi
48942 
48943   if test "x$MSVC_DLL" = x; then
48944     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48945     # (This was the original behaviour; kept since it might turn something up)
48946     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48947       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48948         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48949             | $GREP x64 | $HEAD --lines 1`
48950       else
48951         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48952             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48953         if test "x$POSSIBLE_MSVC_DLL" = x; then
48954           # We're grasping at straws now...
48955           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48956               | $HEAD --lines 1`
48957         fi
48958       fi
48959 
48960 
48961   DLL_NAME="$DLL_NAME"
48962   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48963   METHOD="search of VCINSTALLDIR"
48964   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48965     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48966 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48967 
48968     # Need to check if the found msvcr is correct architecture
48969     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48970 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48971     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48972     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48973       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48974       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48975       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48976         CORRECT_MSVCR_ARCH="PE32 executable"
48977       else
48978         CORRECT_MSVCR_ARCH="PE32+ executable"
48979       fi
48980     else
48981       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48982         CORRECT_MSVCR_ARCH=386
48983       else
48984         CORRECT_MSVCR_ARCH=x86-64
48985       fi
48986     fi
48987     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48988       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48989 $as_echo "ok" >&6; }
48990       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48991 
48992   # Only process if variable expands to non-empty
48993 
48994   if test "x$MSVC_DLL" != x; then
48995     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48996 
48997   # Input might be given as Windows format, start by converting to
48998   # unix format.
48999   path="$MSVC_DLL"
49000   new_path=`$CYGPATH -u "$path"`
49001 
49002   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49003   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49004   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49005   # "foo.exe" is OK but "foo" is an error.
49006   #
49007   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49008   # It is also a way to make sure we got the proper file name for the real test later on.
49009   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49010   if test "x$test_shortpath" = x; then
49011     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49012 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49013     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49014   fi
49015 
49016   # Call helper function which possibly converts this using DOS-style short mode.
49017   # If so, the updated path is stored in $new_path.
49018 
49019   input_path="$new_path"
49020   # Check if we need to convert this using DOS-style short mode. If the path
49021   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49022   # take no chances and rewrite it.
49023   # Note: m4 eats our [], so we need to use [ and ] instead.
49024   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49025   if test "x$has_forbidden_chars" != x; then
49026     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49027     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49028     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49029     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49030       # Going to short mode and back again did indeed matter. Since short mode is
49031       # case insensitive, let's make it lowercase to improve readability.
49032       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49033       # Now convert it back to Unix-style (cygpath)
49034       input_path=`$CYGPATH -u "$shortmode_path"`
49035       new_path="$input_path"
49036     fi
49037   fi
49038 
49039   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49040   if test "x$test_cygdrive_prefix" = x; then
49041     # As a simple fix, exclude /usr/bin since it's not a real path.
49042     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49043       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49044       # a path prefixed by /cygdrive for fixpath to work.
49045       new_path="$CYGWIN_ROOT_PATH$input_path"
49046     fi
49047   fi
49048 
49049 
49050   if test "x$path" != "x$new_path"; then
49051     MSVC_DLL="$new_path"
49052     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49053 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49054   fi
49055 
49056     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49057 
49058   path="$MSVC_DLL"
49059   has_colon=`$ECHO $path | $GREP ^.:`
49060   new_path="$path"
49061   if test "x$has_colon" = x; then
49062     # Not in mixed or Windows style, start by that.
49063     new_path=`cmd //c echo $path`
49064   fi
49065 
49066 
49067   input_path="$new_path"
49068   # Check if we need to convert this using DOS-style short mode. If the path
49069   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49070   # take no chances and rewrite it.
49071   # Note: m4 eats our [], so we need to use [ and ] instead.
49072   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49073   if test "x$has_forbidden_chars" != x; then
49074     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49075     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49076   fi
49077 
49078 
49079   windows_path="$new_path"
49080   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49081     unix_path=`$CYGPATH -u "$windows_path"`
49082     new_path="$unix_path"
49083   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49084     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49085     new_path="$unix_path"
49086   fi
49087 
49088   if test "x$path" != "x$new_path"; then
49089     MSVC_DLL="$new_path"
49090     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49091 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49092   fi
49093 
49094   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49095   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49096 
49097     else
49098       # We're on a unix platform. Hooray! :)
49099       path="$MSVC_DLL"
49100       has_space=`$ECHO "$path" | $GREP " "`
49101       if test "x$has_space" != x; then
49102         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49103 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49104         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49105       fi
49106 
49107       # Use eval to expand a potential ~
49108       eval path="$path"
49109       if test ! -f "$path" && test ! -d "$path"; then
49110         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49111       fi
49112 
49113       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49114     fi
49115   fi
49116 
49117       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49118 $as_echo_n "checking for $DLL_NAME... " >&6; }
49119       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49120 $as_echo "$MSVC_DLL" >&6; }
49121     else
49122       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49123 $as_echo "incorrect, ignoring" >&6; }
49124       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49125 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49126     fi
49127   fi
49128 
49129     fi
49130   fi
49131 
49132   if test "x$MSVC_DLL" = x; then
49133     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49134 $as_echo_n "checking for $DLL_NAME... " >&6; }
49135     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49136 $as_echo "no" >&6; }
49137     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
49138   fi
49139 
49140     MSVCR_DLL="$MSVC_DLL"
49141   fi
49142 
49143 
49144 
49145 # Check whether --with-msvcp-dll was given.
49146 if test "${with_msvcp_dll+set}" = set; then :
49147   withval=$with_msvcp_dll;
49148 fi
49149 
49150 
49151   if test "x$MSVCP_NAME" != "x"; then
49152     if test "x$with_msvcp_dll" != x; then
49153       # If given explicitely by user, do not probe. If not present, fail directly.
49154 
49155   DLL_NAME="$MSVCP_NAME"
49156   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
49157   METHOD="--with-msvcp-dll"
49158   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49159     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49160 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49161 
49162     # Need to check if the found msvcr is correct architecture
49163     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49164 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49165     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49166     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49167       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49168       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49169       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49170         CORRECT_MSVCR_ARCH="PE32 executable"
49171       else
49172         CORRECT_MSVCR_ARCH="PE32+ executable"
49173       fi
49174     else
49175       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49176         CORRECT_MSVCR_ARCH=386
49177       else
49178         CORRECT_MSVCR_ARCH=x86-64
49179       fi
49180     fi
49181     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49182       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49183 $as_echo "ok" >&6; }
49184       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49185 
49186   # Only process if variable expands to non-empty
49187 
49188   if test "x$MSVC_DLL" != x; then
49189     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49190 
49191   # Input might be given as Windows format, start by converting to
49192   # unix format.
49193   path="$MSVC_DLL"
49194   new_path=`$CYGPATH -u "$path"`
49195 
49196   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49197   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49198   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49199   # "foo.exe" is OK but "foo" is an error.
49200   #
49201   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49202   # It is also a way to make sure we got the proper file name for the real test later on.
49203   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49204   if test "x$test_shortpath" = x; then
49205     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49206 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49207     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49208   fi
49209 
49210   # Call helper function which possibly converts this using DOS-style short mode.
49211   # If so, the updated path is stored in $new_path.
49212 
49213   input_path="$new_path"
49214   # Check if we need to convert this using DOS-style short mode. If the path
49215   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49216   # take no chances and rewrite it.
49217   # Note: m4 eats our [], so we need to use [ and ] instead.
49218   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49219   if test "x$has_forbidden_chars" != x; then
49220     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49221     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49222     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49223     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49224       # Going to short mode and back again did indeed matter. Since short mode is
49225       # case insensitive, let's make it lowercase to improve readability.
49226       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49227       # Now convert it back to Unix-style (cygpath)
49228       input_path=`$CYGPATH -u "$shortmode_path"`
49229       new_path="$input_path"
49230     fi
49231   fi
49232 
49233   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49234   if test "x$test_cygdrive_prefix" = x; then
49235     # As a simple fix, exclude /usr/bin since it's not a real path.
49236     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49237       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49238       # a path prefixed by /cygdrive for fixpath to work.
49239       new_path="$CYGWIN_ROOT_PATH$input_path"
49240     fi
49241   fi
49242 
49243 
49244   if test "x$path" != "x$new_path"; then
49245     MSVC_DLL="$new_path"
49246     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49247 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49248   fi
49249 
49250     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49251 
49252   path="$MSVC_DLL"
49253   has_colon=`$ECHO $path | $GREP ^.:`
49254   new_path="$path"
49255   if test "x$has_colon" = x; then
49256     # Not in mixed or Windows style, start by that.
49257     new_path=`cmd //c echo $path`
49258   fi
49259 
49260 
49261   input_path="$new_path"
49262   # Check if we need to convert this using DOS-style short mode. If the path
49263   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49264   # take no chances and rewrite it.
49265   # Note: m4 eats our [], so we need to use [ and ] instead.
49266   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49267   if test "x$has_forbidden_chars" != x; then
49268     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49269     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49270   fi
49271 
49272 
49273   windows_path="$new_path"
49274   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49275     unix_path=`$CYGPATH -u "$windows_path"`
49276     new_path="$unix_path"
49277   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49278     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49279     new_path="$unix_path"
49280   fi
49281 
49282   if test "x$path" != "x$new_path"; then
49283     MSVC_DLL="$new_path"
49284     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49285 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49286   fi
49287 
49288   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49289   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49290 
49291     else
49292       # We're on a unix platform. Hooray! :)
49293       path="$MSVC_DLL"
49294       has_space=`$ECHO "$path" | $GREP " "`
49295       if test "x$has_space" != x; then
49296         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49297 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49298         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49299       fi
49300 
49301       # Use eval to expand a potential ~
49302       eval path="$path"
49303       if test ! -f "$path" && test ! -d "$path"; then
49304         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49305       fi
49306 
49307       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49308     fi
49309   fi
49310 
49311       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49312 $as_echo_n "checking for $DLL_NAME... " >&6; }
49313       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49314 $as_echo "$MSVC_DLL" >&6; }
49315     else
49316       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49317 $as_echo "incorrect, ignoring" >&6; }
49318       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49319 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49320     fi
49321   fi
49322 
49323       if test "x$MSVC_DLL" = x; then
49324         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
49325       fi
49326       MSVCP_DLL="$MSVC_DLL"
49327     elif test "x$DEVKIT_MSVCP_DLL" != x; then
49328 
49329   DLL_NAME="$MSVCP_NAME"
49330   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
49331   METHOD="devkit"
49332   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49333     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49334 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49335 
49336     # Need to check if the found msvcr is correct architecture
49337     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49338 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49339     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49340     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49341       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49342       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49343       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49344         CORRECT_MSVCR_ARCH="PE32 executable"
49345       else
49346         CORRECT_MSVCR_ARCH="PE32+ executable"
49347       fi
49348     else
49349       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49350         CORRECT_MSVCR_ARCH=386
49351       else
49352         CORRECT_MSVCR_ARCH=x86-64
49353       fi
49354     fi
49355     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49356       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49357 $as_echo "ok" >&6; }
49358       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49359 
49360   # Only process if variable expands to non-empty
49361 
49362   if test "x$MSVC_DLL" != x; then
49363     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49364 
49365   # Input might be given as Windows format, start by converting to
49366   # unix format.
49367   path="$MSVC_DLL"
49368   new_path=`$CYGPATH -u "$path"`
49369 
49370   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49371   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49372   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49373   # "foo.exe" is OK but "foo" is an error.
49374   #
49375   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49376   # It is also a way to make sure we got the proper file name for the real test later on.
49377   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49378   if test "x$test_shortpath" = x; then
49379     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49380 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49381     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49382   fi
49383 
49384   # Call helper function which possibly converts this using DOS-style short mode.
49385   # If so, the updated path is stored in $new_path.
49386 
49387   input_path="$new_path"
49388   # Check if we need to convert this using DOS-style short mode. If the path
49389   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49390   # take no chances and rewrite it.
49391   # Note: m4 eats our [], so we need to use [ and ] instead.
49392   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49393   if test "x$has_forbidden_chars" != x; then
49394     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49395     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49396     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49397     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49398       # Going to short mode and back again did indeed matter. Since short mode is
49399       # case insensitive, let's make it lowercase to improve readability.
49400       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49401       # Now convert it back to Unix-style (cygpath)
49402       input_path=`$CYGPATH -u "$shortmode_path"`
49403       new_path="$input_path"
49404     fi
49405   fi
49406 
49407   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49408   if test "x$test_cygdrive_prefix" = x; then
49409     # As a simple fix, exclude /usr/bin since it's not a real path.
49410     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49411       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49412       # a path prefixed by /cygdrive for fixpath to work.
49413       new_path="$CYGWIN_ROOT_PATH$input_path"
49414     fi
49415   fi
49416 
49417 
49418   if test "x$path" != "x$new_path"; then
49419     MSVC_DLL="$new_path"
49420     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49421 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49422   fi
49423 
49424     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49425 
49426   path="$MSVC_DLL"
49427   has_colon=`$ECHO $path | $GREP ^.:`
49428   new_path="$path"
49429   if test "x$has_colon" = x; then
49430     # Not in mixed or Windows style, start by that.
49431     new_path=`cmd //c echo $path`
49432   fi
49433 
49434 
49435   input_path="$new_path"
49436   # Check if we need to convert this using DOS-style short mode. If the path
49437   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49438   # take no chances and rewrite it.
49439   # Note: m4 eats our [], so we need to use [ and ] instead.
49440   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49441   if test "x$has_forbidden_chars" != x; then
49442     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49443     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49444   fi
49445 
49446 
49447   windows_path="$new_path"
49448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49449     unix_path=`$CYGPATH -u "$windows_path"`
49450     new_path="$unix_path"
49451   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49452     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49453     new_path="$unix_path"
49454   fi
49455 
49456   if test "x$path" != "x$new_path"; then
49457     MSVC_DLL="$new_path"
49458     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49459 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49460   fi
49461 
49462   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49463   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49464 
49465     else
49466       # We're on a unix platform. Hooray! :)
49467       path="$MSVC_DLL"
49468       has_space=`$ECHO "$path" | $GREP " "`
49469       if test "x$has_space" != x; then
49470         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49471 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49472         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49473       fi
49474 
49475       # Use eval to expand a potential ~
49476       eval path="$path"
49477       if test ! -f "$path" && test ! -d "$path"; then
49478         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49479       fi
49480 
49481       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49482     fi
49483   fi
49484 
49485       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49486 $as_echo_n "checking for $DLL_NAME... " >&6; }
49487       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49488 $as_echo "$MSVC_DLL" >&6; }
49489     else
49490       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49491 $as_echo "incorrect, ignoring" >&6; }
49492       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49493 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49494     fi
49495   fi
49496 
49497       if test "x$MSVC_DLL" = x; then
49498         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
49499       fi
49500       MSVCP_DLL="$MSVC_DLL"
49501     else
49502 
49503   DLL_NAME="${MSVCP_NAME}"
49504   MSVC_DLL=
49505 
49506   if test "x$MSVC_DLL" = x; then
49507     # Probe: Using well-known location from Visual Studio 10.0
49508     if test "x$VCINSTALLDIR" != x; then
49509       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49510 
49511   windows_path="$CYGWIN_VC_INSTALL_DIR"
49512   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49513     unix_path=`$CYGPATH -u "$windows_path"`
49514     CYGWIN_VC_INSTALL_DIR="$unix_path"
49515   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49516     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49517     CYGWIN_VC_INSTALL_DIR="$unix_path"
49518   fi
49519 
49520       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49521         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49522       else
49523         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49524       fi
49525       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49526 
49527   DLL_NAME="$DLL_NAME"
49528   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49529   METHOD="well-known location in VCINSTALLDIR"
49530   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49531     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49532 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49533 
49534     # Need to check if the found msvcr is correct architecture
49535     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49536 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49537     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49538     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49539       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49540       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49541       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49542         CORRECT_MSVCR_ARCH="PE32 executable"
49543       else
49544         CORRECT_MSVCR_ARCH="PE32+ executable"
49545       fi
49546     else
49547       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49548         CORRECT_MSVCR_ARCH=386
49549       else
49550         CORRECT_MSVCR_ARCH=x86-64
49551       fi
49552     fi
49553     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49554       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49555 $as_echo "ok" >&6; }
49556       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49557 
49558   # Only process if variable expands to non-empty
49559 
49560   if test "x$MSVC_DLL" != x; then
49561     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49562 
49563   # Input might be given as Windows format, start by converting to
49564   # unix format.
49565   path="$MSVC_DLL"
49566   new_path=`$CYGPATH -u "$path"`
49567 
49568   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49569   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49570   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49571   # "foo.exe" is OK but "foo" is an error.
49572   #
49573   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49574   # It is also a way to make sure we got the proper file name for the real test later on.
49575   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49576   if test "x$test_shortpath" = x; then
49577     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49578 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49579     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49580   fi
49581 
49582   # Call helper function which possibly converts this using DOS-style short mode.
49583   # If so, the updated path is stored in $new_path.
49584 
49585   input_path="$new_path"
49586   # Check if we need to convert this using DOS-style short mode. If the path
49587   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49588   # take no chances and rewrite it.
49589   # Note: m4 eats our [], so we need to use [ and ] instead.
49590   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49591   if test "x$has_forbidden_chars" != x; then
49592     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49593     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49594     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49595     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49596       # Going to short mode and back again did indeed matter. Since short mode is
49597       # case insensitive, let's make it lowercase to improve readability.
49598       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49599       # Now convert it back to Unix-style (cygpath)
49600       input_path=`$CYGPATH -u "$shortmode_path"`
49601       new_path="$input_path"
49602     fi
49603   fi
49604 
49605   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49606   if test "x$test_cygdrive_prefix" = x; then
49607     # As a simple fix, exclude /usr/bin since it's not a real path.
49608     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49609       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49610       # a path prefixed by /cygdrive for fixpath to work.
49611       new_path="$CYGWIN_ROOT_PATH$input_path"
49612     fi
49613   fi
49614 
49615 
49616   if test "x$path" != "x$new_path"; then
49617     MSVC_DLL="$new_path"
49618     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49619 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49620   fi
49621 
49622     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49623 
49624   path="$MSVC_DLL"
49625   has_colon=`$ECHO $path | $GREP ^.:`
49626   new_path="$path"
49627   if test "x$has_colon" = x; then
49628     # Not in mixed or Windows style, start by that.
49629     new_path=`cmd //c echo $path`
49630   fi
49631 
49632 
49633   input_path="$new_path"
49634   # Check if we need to convert this using DOS-style short mode. If the path
49635   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49636   # take no chances and rewrite it.
49637   # Note: m4 eats our [], so we need to use [ and ] instead.
49638   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49639   if test "x$has_forbidden_chars" != x; then
49640     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49641     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49642   fi
49643 
49644 
49645   windows_path="$new_path"
49646   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49647     unix_path=`$CYGPATH -u "$windows_path"`
49648     new_path="$unix_path"
49649   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49650     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49651     new_path="$unix_path"
49652   fi
49653 
49654   if test "x$path" != "x$new_path"; then
49655     MSVC_DLL="$new_path"
49656     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49657 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49658   fi
49659 
49660   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49661   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49662 
49663     else
49664       # We're on a unix platform. Hooray! :)
49665       path="$MSVC_DLL"
49666       has_space=`$ECHO "$path" | $GREP " "`
49667       if test "x$has_space" != x; then
49668         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49669 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49670         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49671       fi
49672 
49673       # Use eval to expand a potential ~
49674       eval path="$path"
49675       if test ! -f "$path" && test ! -d "$path"; then
49676         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49677       fi
49678 
49679       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49680     fi
49681   fi
49682 
49683       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49684 $as_echo_n "checking for $DLL_NAME... " >&6; }
49685       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49686 $as_echo "$MSVC_DLL" >&6; }
49687     else
49688       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49689 $as_echo "incorrect, ignoring" >&6; }
49690       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49691 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49692     fi
49693   fi
49694 
49695     fi
49696   fi
49697 
49698   if test "x$MSVC_DLL" = x; then
49699     # Probe: Check in the Boot JDK directory.
49700     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49701 
49702   DLL_NAME="$DLL_NAME"
49703   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49704   METHOD="well-known location in Boot JDK"
49705   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49706     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49707 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49708 
49709     # Need to check if the found msvcr is correct architecture
49710     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49711 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49712     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49713     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49714       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49715       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49716       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49717         CORRECT_MSVCR_ARCH="PE32 executable"
49718       else
49719         CORRECT_MSVCR_ARCH="PE32+ executable"
49720       fi
49721     else
49722       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49723         CORRECT_MSVCR_ARCH=386
49724       else
49725         CORRECT_MSVCR_ARCH=x86-64
49726       fi
49727     fi
49728     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49729       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49730 $as_echo "ok" >&6; }
49731       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49732 
49733   # Only process if variable expands to non-empty
49734 
49735   if test "x$MSVC_DLL" != x; then
49736     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49737 
49738   # Input might be given as Windows format, start by converting to
49739   # unix format.
49740   path="$MSVC_DLL"
49741   new_path=`$CYGPATH -u "$path"`
49742 
49743   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49744   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49745   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49746   # "foo.exe" is OK but "foo" is an error.
49747   #
49748   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49749   # It is also a way to make sure we got the proper file name for the real test later on.
49750   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49751   if test "x$test_shortpath" = x; then
49752     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49753 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49754     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49755   fi
49756 
49757   # Call helper function which possibly converts this using DOS-style short mode.
49758   # If so, the updated path is stored in $new_path.
49759 
49760   input_path="$new_path"
49761   # Check if we need to convert this using DOS-style short mode. If the path
49762   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49763   # take no chances and rewrite it.
49764   # Note: m4 eats our [], so we need to use [ and ] instead.
49765   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49766   if test "x$has_forbidden_chars" != x; then
49767     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49768     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49769     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49770     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49771       # Going to short mode and back again did indeed matter. Since short mode is
49772       # case insensitive, let's make it lowercase to improve readability.
49773       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49774       # Now convert it back to Unix-style (cygpath)
49775       input_path=`$CYGPATH -u "$shortmode_path"`
49776       new_path="$input_path"
49777     fi
49778   fi
49779 
49780   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49781   if test "x$test_cygdrive_prefix" = x; then
49782     # As a simple fix, exclude /usr/bin since it's not a real path.
49783     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49784       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49785       # a path prefixed by /cygdrive for fixpath to work.
49786       new_path="$CYGWIN_ROOT_PATH$input_path"
49787     fi
49788   fi
49789 
49790 
49791   if test "x$path" != "x$new_path"; then
49792     MSVC_DLL="$new_path"
49793     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49794 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49795   fi
49796 
49797     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49798 
49799   path="$MSVC_DLL"
49800   has_colon=`$ECHO $path | $GREP ^.:`
49801   new_path="$path"
49802   if test "x$has_colon" = x; then
49803     # Not in mixed or Windows style, start by that.
49804     new_path=`cmd //c echo $path`
49805   fi
49806 
49807 
49808   input_path="$new_path"
49809   # Check if we need to convert this using DOS-style short mode. If the path
49810   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49811   # take no chances and rewrite it.
49812   # Note: m4 eats our [], so we need to use [ and ] instead.
49813   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49814   if test "x$has_forbidden_chars" != x; then
49815     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49816     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49817   fi
49818 
49819 
49820   windows_path="$new_path"
49821   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49822     unix_path=`$CYGPATH -u "$windows_path"`
49823     new_path="$unix_path"
49824   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49825     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49826     new_path="$unix_path"
49827   fi
49828 
49829   if test "x$path" != "x$new_path"; then
49830     MSVC_DLL="$new_path"
49831     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49832 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49833   fi
49834 
49835   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49836   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49837 
49838     else
49839       # We're on a unix platform. Hooray! :)
49840       path="$MSVC_DLL"
49841       has_space=`$ECHO "$path" | $GREP " "`
49842       if test "x$has_space" != x; then
49843         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49844 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49845         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49846       fi
49847 
49848       # Use eval to expand a potential ~
49849       eval path="$path"
49850       if test ! -f "$path" && test ! -d "$path"; then
49851         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49852       fi
49853 
49854       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49855     fi
49856   fi
49857 
49858       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49859 $as_echo_n "checking for $DLL_NAME... " >&6; }
49860       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49861 $as_echo "$MSVC_DLL" >&6; }
49862     else
49863       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49864 $as_echo "incorrect, ignoring" >&6; }
49865       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49866 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49867     fi
49868   fi
49869 
49870   fi
49871 
49872   if test "x$MSVC_DLL" = x; then
49873     # Probe: Look in the Windows system32 directory
49874     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49875 
49876   windows_path="$CYGWIN_SYSTEMROOT"
49877   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49878     unix_path=`$CYGPATH -u "$windows_path"`
49879     CYGWIN_SYSTEMROOT="$unix_path"
49880   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49881     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49882     CYGWIN_SYSTEMROOT="$unix_path"
49883   fi
49884 
49885     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
49886 
49887   DLL_NAME="$DLL_NAME"
49888   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49889   METHOD="well-known location in SYSTEMROOT"
49890   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49891     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49892 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49893 
49894     # Need to check if the found msvcr is correct architecture
49895     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49896 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49897     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49898     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49899       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49900       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49901       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49902         CORRECT_MSVCR_ARCH="PE32 executable"
49903       else
49904         CORRECT_MSVCR_ARCH="PE32+ executable"
49905       fi
49906     else
49907       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49908         CORRECT_MSVCR_ARCH=386
49909       else
49910         CORRECT_MSVCR_ARCH=x86-64
49911       fi
49912     fi
49913     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49914       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49915 $as_echo "ok" >&6; }
49916       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49917 
49918   # Only process if variable expands to non-empty
49919 
49920   if test "x$MSVC_DLL" != x; then
49921     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49922 
49923   # Input might be given as Windows format, start by converting to
49924   # unix format.
49925   path="$MSVC_DLL"
49926   new_path=`$CYGPATH -u "$path"`
49927 
49928   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49929   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49930   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49931   # "foo.exe" is OK but "foo" is an error.
49932   #
49933   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49934   # It is also a way to make sure we got the proper file name for the real test later on.
49935   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49936   if test "x$test_shortpath" = x; then
49937     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49938 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49939     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49940   fi
49941 
49942   # Call helper function which possibly converts this using DOS-style short mode.
49943   # If so, the updated path is stored in $new_path.
49944 
49945   input_path="$new_path"
49946   # Check if we need to convert this using DOS-style short mode. If the path
49947   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49948   # take no chances and rewrite it.
49949   # Note: m4 eats our [], so we need to use [ and ] instead.
49950   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49951   if test "x$has_forbidden_chars" != x; then
49952     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49953     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49954     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49955     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49956       # Going to short mode and back again did indeed matter. Since short mode is
49957       # case insensitive, let's make it lowercase to improve readability.
49958       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49959       # Now convert it back to Unix-style (cygpath)
49960       input_path=`$CYGPATH -u "$shortmode_path"`
49961       new_path="$input_path"
49962     fi
49963   fi
49964 
49965   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49966   if test "x$test_cygdrive_prefix" = x; then
49967     # As a simple fix, exclude /usr/bin since it's not a real path.
49968     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49969       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49970       # a path prefixed by /cygdrive for fixpath to work.
49971       new_path="$CYGWIN_ROOT_PATH$input_path"
49972     fi
49973   fi
49974 
49975 
49976   if test "x$path" != "x$new_path"; then
49977     MSVC_DLL="$new_path"
49978     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49979 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49980   fi
49981 
49982     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49983 
49984   path="$MSVC_DLL"
49985   has_colon=`$ECHO $path | $GREP ^.:`
49986   new_path="$path"
49987   if test "x$has_colon" = x; then
49988     # Not in mixed or Windows style, start by that.
49989     new_path=`cmd //c echo $path`
49990   fi
49991 
49992 
49993   input_path="$new_path"
49994   # Check if we need to convert this using DOS-style short mode. If the path
49995   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49996   # take no chances and rewrite it.
49997   # Note: m4 eats our [], so we need to use [ and ] instead.
49998   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49999   if test "x$has_forbidden_chars" != x; then
50000     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50001     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50002   fi
50003 
50004 
50005   windows_path="$new_path"
50006   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50007     unix_path=`$CYGPATH -u "$windows_path"`
50008     new_path="$unix_path"
50009   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50010     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50011     new_path="$unix_path"
50012   fi
50013 
50014   if test "x$path" != "x$new_path"; then
50015     MSVC_DLL="$new_path"
50016     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50017 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50018   fi
50019 
50020   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50021   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50022 
50023     else
50024       # We're on a unix platform. Hooray! :)
50025       path="$MSVC_DLL"
50026       has_space=`$ECHO "$path" | $GREP " "`
50027       if test "x$has_space" != x; then
50028         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50029 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50030         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50031       fi
50032 
50033       # Use eval to expand a potential ~
50034       eval path="$path"
50035       if test ! -f "$path" && test ! -d "$path"; then
50036         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50037       fi
50038 
50039       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50040     fi
50041   fi
50042 
50043       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50044 $as_echo_n "checking for $DLL_NAME... " >&6; }
50045       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50046 $as_echo "$MSVC_DLL" >&6; }
50047     else
50048       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50049 $as_echo "incorrect, ignoring" >&6; }
50050       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50051 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50052     fi
50053   fi
50054 
50055   fi
50056 
50057   if test "x$MSVC_DLL" = x; then
50058     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50059     if test "x$VS100COMNTOOLS" != x; then
50060       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50061 
50062   windows_path="$CYGWIN_VS_TOOLS_DIR"
50063   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50064     unix_path=`$CYGPATH -u "$windows_path"`
50065     CYGWIN_VS_TOOLS_DIR="$unix_path"
50066   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50067     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50068     CYGWIN_VS_TOOLS_DIR="$unix_path"
50069   fi
50070 
50071       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50072         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50073             | $GREP -i /x64/ | $HEAD --lines 1`
50074       else
50075         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50076             | $GREP -i /x86/ | $HEAD --lines 1`
50077       fi
50078 
50079   DLL_NAME="$DLL_NAME"
50080   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50081   METHOD="search of VS100COMNTOOLS"
50082   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50083     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50084 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50085 
50086     # Need to check if the found msvcr is correct architecture
50087     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50088 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50089     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50090     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50091       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50092       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50093       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50094         CORRECT_MSVCR_ARCH="PE32 executable"
50095       else
50096         CORRECT_MSVCR_ARCH="PE32+ executable"
50097       fi
50098     else
50099       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50100         CORRECT_MSVCR_ARCH=386
50101       else
50102         CORRECT_MSVCR_ARCH=x86-64
50103       fi
50104     fi
50105     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50106       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50107 $as_echo "ok" >&6; }
50108       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50109 
50110   # Only process if variable expands to non-empty
50111 
50112   if test "x$MSVC_DLL" != x; then
50113     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50114 
50115   # Input might be given as Windows format, start by converting to
50116   # unix format.
50117   path="$MSVC_DLL"
50118   new_path=`$CYGPATH -u "$path"`
50119 
50120   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50121   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50122   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50123   # "foo.exe" is OK but "foo" is an error.
50124   #
50125   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50126   # It is also a way to make sure we got the proper file name for the real test later on.
50127   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50128   if test "x$test_shortpath" = x; then
50129     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50130 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50131     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50132   fi
50133 
50134   # Call helper function which possibly converts this using DOS-style short mode.
50135   # If so, the updated path is stored in $new_path.
50136 
50137   input_path="$new_path"
50138   # Check if we need to convert this using DOS-style short mode. If the path
50139   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50140   # take no chances and rewrite it.
50141   # Note: m4 eats our [], so we need to use [ and ] instead.
50142   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50143   if test "x$has_forbidden_chars" != x; then
50144     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50145     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50146     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50147     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50148       # Going to short mode and back again did indeed matter. Since short mode is
50149       # case insensitive, let's make it lowercase to improve readability.
50150       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50151       # Now convert it back to Unix-style (cygpath)
50152       input_path=`$CYGPATH -u "$shortmode_path"`
50153       new_path="$input_path"
50154     fi
50155   fi
50156 
50157   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50158   if test "x$test_cygdrive_prefix" = x; then
50159     # As a simple fix, exclude /usr/bin since it's not a real path.
50160     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50161       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50162       # a path prefixed by /cygdrive for fixpath to work.
50163       new_path="$CYGWIN_ROOT_PATH$input_path"
50164     fi
50165   fi
50166 
50167 
50168   if test "x$path" != "x$new_path"; then
50169     MSVC_DLL="$new_path"
50170     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50171 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50172   fi
50173 
50174     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50175 
50176   path="$MSVC_DLL"
50177   has_colon=`$ECHO $path | $GREP ^.:`
50178   new_path="$path"
50179   if test "x$has_colon" = x; then
50180     # Not in mixed or Windows style, start by that.
50181     new_path=`cmd //c echo $path`
50182   fi
50183 
50184 
50185   input_path="$new_path"
50186   # Check if we need to convert this using DOS-style short mode. If the path
50187   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50188   # take no chances and rewrite it.
50189   # Note: m4 eats our [], so we need to use [ and ] instead.
50190   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50191   if test "x$has_forbidden_chars" != x; then
50192     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50193     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50194   fi
50195 
50196 
50197   windows_path="$new_path"
50198   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50199     unix_path=`$CYGPATH -u "$windows_path"`
50200     new_path="$unix_path"
50201   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50202     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50203     new_path="$unix_path"
50204   fi
50205 
50206   if test "x$path" != "x$new_path"; then
50207     MSVC_DLL="$new_path"
50208     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50209 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50210   fi
50211 
50212   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50213   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50214 
50215     else
50216       # We're on a unix platform. Hooray! :)
50217       path="$MSVC_DLL"
50218       has_space=`$ECHO "$path" | $GREP " "`
50219       if test "x$has_space" != x; then
50220         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50221 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50222         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50223       fi
50224 
50225       # Use eval to expand a potential ~
50226       eval path="$path"
50227       if test ! -f "$path" && test ! -d "$path"; then
50228         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50229       fi
50230 
50231       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50232     fi
50233   fi
50234 
50235       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50236 $as_echo_n "checking for $DLL_NAME... " >&6; }
50237       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50238 $as_echo "$MSVC_DLL" >&6; }
50239     else
50240       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50241 $as_echo "incorrect, ignoring" >&6; }
50242       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50243 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50244     fi
50245   fi
50246 
50247     fi
50248   fi
50249 
50250   if test "x$MSVC_DLL" = x; then
50251     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50252     # (This was the original behaviour; kept since it might turn something up)
50253     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50254       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50255         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50256             | $GREP x64 | $HEAD --lines 1`
50257       else
50258         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50259             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50260         if test "x$POSSIBLE_MSVC_DLL" = x; then
50261           # We're grasping at straws now...
50262           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50263               | $HEAD --lines 1`
50264         fi
50265       fi
50266 
50267 
50268   DLL_NAME="$DLL_NAME"
50269   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50270   METHOD="search of VCINSTALLDIR"
50271   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50272     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50273 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50274 
50275     # Need to check if the found msvcr is correct architecture
50276     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50277 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50278     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50279     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50280       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50281       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50282       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50283         CORRECT_MSVCR_ARCH="PE32 executable"
50284       else
50285         CORRECT_MSVCR_ARCH="PE32+ executable"
50286       fi
50287     else
50288       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50289         CORRECT_MSVCR_ARCH=386
50290       else
50291         CORRECT_MSVCR_ARCH=x86-64
50292       fi
50293     fi
50294     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50295       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50296 $as_echo "ok" >&6; }
50297       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50298 
50299   # Only process if variable expands to non-empty
50300 
50301   if test "x$MSVC_DLL" != x; then
50302     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50303 
50304   # Input might be given as Windows format, start by converting to
50305   # unix format.
50306   path="$MSVC_DLL"
50307   new_path=`$CYGPATH -u "$path"`
50308 
50309   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50310   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50311   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50312   # "foo.exe" is OK but "foo" is an error.
50313   #
50314   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50315   # It is also a way to make sure we got the proper file name for the real test later on.
50316   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50317   if test "x$test_shortpath" = x; then
50318     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50319 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50320     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50321   fi
50322 
50323   # Call helper function which possibly converts this using DOS-style short mode.
50324   # If so, the updated path is stored in $new_path.
50325 
50326   input_path="$new_path"
50327   # Check if we need to convert this using DOS-style short mode. If the path
50328   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50329   # take no chances and rewrite it.
50330   # Note: m4 eats our [], so we need to use [ and ] instead.
50331   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50332   if test "x$has_forbidden_chars" != x; then
50333     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50334     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50335     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50336     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50337       # Going to short mode and back again did indeed matter. Since short mode is
50338       # case insensitive, let's make it lowercase to improve readability.
50339       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50340       # Now convert it back to Unix-style (cygpath)
50341       input_path=`$CYGPATH -u "$shortmode_path"`
50342       new_path="$input_path"
50343     fi
50344   fi
50345 
50346   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50347   if test "x$test_cygdrive_prefix" = x; then
50348     # As a simple fix, exclude /usr/bin since it's not a real path.
50349     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50350       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50351       # a path prefixed by /cygdrive for fixpath to work.
50352       new_path="$CYGWIN_ROOT_PATH$input_path"
50353     fi
50354   fi
50355 
50356 
50357   if test "x$path" != "x$new_path"; then
50358     MSVC_DLL="$new_path"
50359     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50360 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50361   fi
50362 
50363     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50364 
50365   path="$MSVC_DLL"
50366   has_colon=`$ECHO $path | $GREP ^.:`
50367   new_path="$path"
50368   if test "x$has_colon" = x; then
50369     # Not in mixed or Windows style, start by that.
50370     new_path=`cmd //c echo $path`
50371   fi
50372 
50373 
50374   input_path="$new_path"
50375   # Check if we need to convert this using DOS-style short mode. If the path
50376   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50377   # take no chances and rewrite it.
50378   # Note: m4 eats our [], so we need to use [ and ] instead.
50379   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50380   if test "x$has_forbidden_chars" != x; then
50381     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50382     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50383   fi
50384 
50385 
50386   windows_path="$new_path"
50387   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50388     unix_path=`$CYGPATH -u "$windows_path"`
50389     new_path="$unix_path"
50390   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50391     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50392     new_path="$unix_path"
50393   fi
50394 
50395   if test "x$path" != "x$new_path"; then
50396     MSVC_DLL="$new_path"
50397     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50398 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50399   fi
50400 
50401   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50402   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50403 
50404     else
50405       # We're on a unix platform. Hooray! :)
50406       path="$MSVC_DLL"
50407       has_space=`$ECHO "$path" | $GREP " "`
50408       if test "x$has_space" != x; then
50409         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50410 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50411         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50412       fi
50413 
50414       # Use eval to expand a potential ~
50415       eval path="$path"
50416       if test ! -f "$path" && test ! -d "$path"; then
50417         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50418       fi
50419 
50420       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50421     fi
50422   fi
50423 
50424       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50425 $as_echo_n "checking for $DLL_NAME... " >&6; }
50426       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50427 $as_echo "$MSVC_DLL" >&6; }
50428     else
50429       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50430 $as_echo "incorrect, ignoring" >&6; }
50431       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50432 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50433     fi
50434   fi
50435 
50436     fi
50437   fi
50438 
50439   if test "x$MSVC_DLL" = x; then
50440     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50441 $as_echo_n "checking for $DLL_NAME... " >&6; }
50442     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50443 $as_echo "no" >&6; }
50444     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50445   fi
50446 
50447       MSVCP_DLL="$MSVC_DLL"
50448     fi
50449 
50450   fi
50451 
50452   fi
50453 
50454 
50455   if test "x$NEEDS_LIB_X11" = xfalse; then
50456     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
50457       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
50458 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
50459     fi
50460     X_CFLAGS=
50461     X_LIBS=
50462   else
50463 
50464     if test "x${with_x}" = xno; then
50465       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
50466     fi
50467 
50468     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
50469       # The user has specified a X11 base directory. Use it for includes and
50470       # libraries, unless explicitely overridden.
50471       if test "x$x_includes" = xNONE; then
50472         x_includes="${with_x}/include"
50473       fi
50474       if test "x$x_libraries" = xNONE; then
50475         x_libraries="${with_x}/lib"
50476       fi
50477     else
50478       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
50479       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
50480       # --x-libraries for the sysroot, if that seems to be correct.
50481       if test "x$SYSROOT" != "x"; then
50482         if test "x$x_includes" = xNONE; then
50483           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
50484             x_includes="$SYSROOT/usr/X11R6/include"
50485           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
50486             x_includes="$SYSROOT/usr/include"
50487           fi
50488         fi
50489         if test "x$x_libraries" = xNONE; then
50490           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
50491             x_libraries="$SYSROOT/usr/X11R6/lib"
50492           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50493             x_libraries="$SYSROOT/usr/lib64"
50494           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
50495             x_libraries="$SYSROOT/usr/lib"
50496           fi
50497         fi
50498       fi
50499     fi
50500 
50501     # Now let autoconf do it's magic
50502     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
50503 $as_echo_n "checking for X... " >&6; }
50504 
50505 
50506 # Check whether --with-x was given.
50507 if test "${with_x+set}" = set; then :
50508   withval=$with_x;
50509 fi
50510 
50511 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
50512 if test "x$with_x" = xno; then
50513   # The user explicitly disabled X.
50514   have_x=disabled
50515 else
50516   case $x_includes,$x_libraries in #(
50517     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
50518     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
50519   $as_echo_n "(cached) " >&6
50520 else
50521   # One or both of the vars are not set, and there is no cached value.
50522 ac_x_includes=no ac_x_libraries=no
50523 rm -f -r conftest.dir
50524 if mkdir conftest.dir; then
50525   cd conftest.dir
50526   cat >Imakefile <<'_ACEOF'
50527 incroot:
50528         @echo incroot='${INCROOT}'
50529 usrlibdir:
50530         @echo usrlibdir='${USRLIBDIR}'
50531 libdir:
50532         @echo libdir='${LIBDIR}'
50533 _ACEOF
50534   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
50535     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
50536     for ac_var in incroot usrlibdir libdir; do
50537       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
50538     done
50539     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
50540     for ac_extension in a so sl dylib la dll; do
50541       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
50542          test -f "$ac_im_libdir/libX11.$ac_extension"; then
50543         ac_im_usrlibdir=$ac_im_libdir; break
50544       fi
50545     done
50546     # Screen out bogus values from the imake configuration.  They are
50547     # bogus both because they are the default anyway, and because
50548     # using them would break gcc on systems where it needs fixed includes.
50549     case $ac_im_incroot in
50550         /usr/include) ac_x_includes= ;;
50551         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
50552     esac
50553     case $ac_im_usrlibdir in
50554         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
50555         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
50556     esac
50557   fi
50558   cd ..
50559   rm -f -r conftest.dir
50560 fi
50561 
50562 # Standard set of common directories for X headers.
50563 # Check X11 before X11Rn because it is often a symlink to the current release.
50564 ac_x_header_dirs='
50565 /usr/X11/include
50566 /usr/X11R7/include
50567 /usr/X11R6/include
50568 /usr/X11R5/include
50569 /usr/X11R4/include
50570 
50571 /usr/include/X11
50572 /usr/include/X11R7
50573 /usr/include/X11R6
50574 /usr/include/X11R5
50575 /usr/include/X11R4
50576 
50577 /usr/local/X11/include
50578 /usr/local/X11R7/include
50579 /usr/local/X11R6/include
50580 /usr/local/X11R5/include
50581 /usr/local/X11R4/include
50582 
50583 /usr/local/include/X11
50584 /usr/local/include/X11R7
50585 /usr/local/include/X11R6
50586 /usr/local/include/X11R5
50587 /usr/local/include/X11R4
50588 
50589 /usr/X386/include
50590 /usr/x386/include
50591 /usr/XFree86/include/X11
50592 
50593 /usr/include
50594 /usr/local/include
50595 /usr/unsupported/include
50596 /usr/athena/include
50597 /usr/local/x11r5/include
50598 /usr/lpp/Xamples/include
50599 
50600 /usr/openwin/include
50601 /usr/openwin/share/include'
50602 
50603 if test "$ac_x_includes" = no; then
50604   # Guess where to find include files, by looking for Xlib.h.
50605   # First, try using that file with no special directory specified.
50606   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50607 /* end confdefs.h.  */
50608 #include <X11/Xlib.h>
50609 _ACEOF
50610 if ac_fn_cxx_try_cpp "$LINENO"; then :
50611   # We can compile using X headers with no special include directory.
50612 ac_x_includes=
50613 else
50614   for ac_dir in $ac_x_header_dirs; do
50615   if test -r "$ac_dir/X11/Xlib.h"; then
50616     ac_x_includes=$ac_dir
50617     break
50618   fi
50619 done
50620 fi
50621 rm -f conftest.err conftest.i conftest.$ac_ext
50622 fi # $ac_x_includes = no
50623 
50624 if test "$ac_x_libraries" = no; then
50625   # Check for the libraries.
50626   # See if we find them without any special options.
50627   # Don't add to $LIBS permanently.
50628   ac_save_LIBS=$LIBS
50629   LIBS="-lX11 $LIBS"
50630   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50631 /* end confdefs.h.  */
50632 #include <X11/Xlib.h>
50633 int
50634 main ()
50635 {
50636 XrmInitialize ()
50637   ;
50638   return 0;
50639 }
50640 _ACEOF
50641 if ac_fn_cxx_try_link "$LINENO"; then :
50642   LIBS=$ac_save_LIBS
50643 # We can link X programs with no special library path.
50644 ac_x_libraries=
50645 else
50646   LIBS=$ac_save_LIBS
50647 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
50648 do
50649   # Don't even attempt the hair of trying to link an X program!
50650   for ac_extension in a so sl dylib la dll; do
50651     if test -r "$ac_dir/libX11.$ac_extension"; then
50652       ac_x_libraries=$ac_dir
50653       break 2
50654     fi
50655   done
50656 done
50657 fi
50658 rm -f core conftest.err conftest.$ac_objext \
50659     conftest$ac_exeext conftest.$ac_ext
50660 fi # $ac_x_libraries = no
50661 
50662 case $ac_x_includes,$ac_x_libraries in #(
50663   no,* | *,no | *\'*)
50664     # Didn't find X, or a directory has "'" in its name.
50665     ac_cv_have_x="have_x=no";; #(
50666   *)
50667     # Record where we found X for the cache.
50668     ac_cv_have_x="have_x=yes\
50669         ac_x_includes='$ac_x_includes'\
50670         ac_x_libraries='$ac_x_libraries'"
50671 esac
50672 fi
50673 ;; #(
50674     *) have_x=yes;;
50675   esac
50676   eval "$ac_cv_have_x"
50677 fi # $with_x != no
50678 
50679 if test "$have_x" != yes; then
50680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
50681 $as_echo "$have_x" >&6; }
50682   no_x=yes
50683 else
50684   # If each of the values was on the command line, it overrides each guess.
50685   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
50686   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
50687   # Update the cache value to reflect the command line values.
50688   ac_cv_have_x="have_x=yes\
50689         ac_x_includes='$x_includes'\
50690         ac_x_libraries='$x_libraries'"
50691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
50692 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
50693 fi
50694 
50695     if test "$no_x" = yes; then
50696   # Not all programs may use this symbol, but it does not hurt to define it.
50697 
50698 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
50699 
50700   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
50701 else
50702   if test -n "$x_includes"; then
50703     X_CFLAGS="$X_CFLAGS -I$x_includes"
50704   fi
50705 
50706   # It would also be nice to do this for all -L options, not just this one.
50707   if test -n "$x_libraries"; then
50708     X_LIBS="$X_LIBS -L$x_libraries"
50709     # For Solaris; some versions of Sun CC require a space after -R and
50710     # others require no space.  Words are not sufficient . . . .
50711     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
50712 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
50713     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
50714     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
50715     ac_cxx_werror_flag=yes
50716     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50717 /* end confdefs.h.  */
50718 
50719 int
50720 main ()
50721 {
50722 
50723   ;
50724   return 0;
50725 }
50726 _ACEOF
50727 if ac_fn_cxx_try_link "$LINENO"; then :
50728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50729 $as_echo "no" >&6; }
50730        X_LIBS="$X_LIBS -R$x_libraries"
50731 else
50732   LIBS="$ac_xsave_LIBS -R $x_libraries"
50733        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50734 /* end confdefs.h.  */
50735 
50736 int
50737 main ()
50738 {
50739 
50740   ;
50741   return 0;
50742 }
50743 _ACEOF
50744 if ac_fn_cxx_try_link "$LINENO"; then :
50745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50746 $as_echo "yes" >&6; }
50747           X_LIBS="$X_LIBS -R $x_libraries"
50748 else
50749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
50750 $as_echo "neither works" >&6; }
50751 fi
50752 rm -f core conftest.err conftest.$ac_objext \
50753     conftest$ac_exeext conftest.$ac_ext
50754 fi
50755 rm -f core conftest.err conftest.$ac_objext \
50756     conftest$ac_exeext conftest.$ac_ext
50757     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
50758     LIBS=$ac_xsave_LIBS
50759   fi
50760 
50761   # Check for system-dependent libraries X programs must link with.
50762   # Do this before checking for the system-independent R6 libraries
50763   # (-lICE), since we may need -lsocket or whatever for X linking.
50764 
50765   if test "$ISC" = yes; then
50766     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
50767   else
50768     # Martyn Johnson says this is needed for Ultrix, if the X
50769     # libraries were built with DECnet support.  And Karl Berry says
50770     # the Alpha needs dnet_stub (dnet does not exist).
50771     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
50772     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50773 /* end confdefs.h.  */
50774 
50775 /* Override any GCC internal prototype to avoid an error.
50776    Use char because int might match the return type of a GCC
50777    builtin and then its argument prototype would still apply.  */
50778 #ifdef __cplusplus
50779 extern "C"
50780 #endif
50781 char XOpenDisplay ();
50782 int
50783 main ()
50784 {
50785 return XOpenDisplay ();
50786   ;
50787   return 0;
50788 }
50789 _ACEOF
50790 if ac_fn_cxx_try_link "$LINENO"; then :
50791 
50792 else
50793   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
50794 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
50795 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
50796   $as_echo_n "(cached) " >&6
50797 else
50798   ac_check_lib_save_LIBS=$LIBS
50799 LIBS="-ldnet  $LIBS"
50800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50801 /* end confdefs.h.  */
50802 
50803 /* Override any GCC internal prototype to avoid an error.
50804    Use char because int might match the return type of a GCC
50805    builtin and then its argument prototype would still apply.  */
50806 #ifdef __cplusplus
50807 extern "C"
50808 #endif
50809 char dnet_ntoa ();
50810 int
50811 main ()
50812 {
50813 return dnet_ntoa ();
50814   ;
50815   return 0;
50816 }
50817 _ACEOF
50818 if ac_fn_cxx_try_link "$LINENO"; then :
50819   ac_cv_lib_dnet_dnet_ntoa=yes
50820 else
50821   ac_cv_lib_dnet_dnet_ntoa=no
50822 fi
50823 rm -f core conftest.err conftest.$ac_objext \
50824     conftest$ac_exeext conftest.$ac_ext
50825 LIBS=$ac_check_lib_save_LIBS
50826 fi
50827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
50828 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
50829 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
50830   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
50831 fi
50832 
50833     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
50834       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
50835 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
50836 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
50837   $as_echo_n "(cached) " >&6
50838 else
50839   ac_check_lib_save_LIBS=$LIBS
50840 LIBS="-ldnet_stub  $LIBS"
50841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50842 /* end confdefs.h.  */
50843 
50844 /* Override any GCC internal prototype to avoid an error.
50845    Use char because int might match the return type of a GCC
50846    builtin and then its argument prototype would still apply.  */
50847 #ifdef __cplusplus
50848 extern "C"
50849 #endif
50850 char dnet_ntoa ();
50851 int
50852 main ()
50853 {
50854 return dnet_ntoa ();
50855   ;
50856   return 0;
50857 }
50858 _ACEOF
50859 if ac_fn_cxx_try_link "$LINENO"; then :
50860   ac_cv_lib_dnet_stub_dnet_ntoa=yes
50861 else
50862   ac_cv_lib_dnet_stub_dnet_ntoa=no
50863 fi
50864 rm -f core conftest.err conftest.$ac_objext \
50865     conftest$ac_exeext conftest.$ac_ext
50866 LIBS=$ac_check_lib_save_LIBS
50867 fi
50868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
50869 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
50870 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
50871   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
50872 fi
50873 
50874     fi
50875 fi
50876 rm -f core conftest.err conftest.$ac_objext \
50877     conftest$ac_exeext conftest.$ac_ext
50878     LIBS="$ac_xsave_LIBS"
50879 
50880     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
50881     # to get the SysV transport functions.
50882     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
50883     # needs -lnsl.
50884     # The nsl library prevents programs from opening the X display
50885     # on Irix 5.2, according to T.E. Dickey.
50886     # The functions gethostbyname, getservbyname, and inet_addr are
50887     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
50888     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
50889 if test "x$ac_cv_func_gethostbyname" = xyes; then :
50890 
50891 fi
50892 
50893     if test $ac_cv_func_gethostbyname = no; then
50894       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
50895 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
50896 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
50897   $as_echo_n "(cached) " >&6
50898 else
50899   ac_check_lib_save_LIBS=$LIBS
50900 LIBS="-lnsl  $LIBS"
50901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50902 /* end confdefs.h.  */
50903 
50904 /* Override any GCC internal prototype to avoid an error.
50905    Use char because int might match the return type of a GCC
50906    builtin and then its argument prototype would still apply.  */
50907 #ifdef __cplusplus
50908 extern "C"
50909 #endif
50910 char gethostbyname ();
50911 int
50912 main ()
50913 {
50914 return gethostbyname ();
50915   ;
50916   return 0;
50917 }
50918 _ACEOF
50919 if ac_fn_cxx_try_link "$LINENO"; then :
50920   ac_cv_lib_nsl_gethostbyname=yes
50921 else
50922   ac_cv_lib_nsl_gethostbyname=no
50923 fi
50924 rm -f core conftest.err conftest.$ac_objext \
50925     conftest$ac_exeext conftest.$ac_ext
50926 LIBS=$ac_check_lib_save_LIBS
50927 fi
50928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
50929 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
50930 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
50931   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
50932 fi
50933 
50934       if test $ac_cv_lib_nsl_gethostbyname = no; then
50935         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
50936 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
50937 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
50938   $as_echo_n "(cached) " >&6
50939 else
50940   ac_check_lib_save_LIBS=$LIBS
50941 LIBS="-lbsd  $LIBS"
50942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50943 /* end confdefs.h.  */
50944 
50945 /* Override any GCC internal prototype to avoid an error.
50946    Use char because int might match the return type of a GCC
50947    builtin and then its argument prototype would still apply.  */
50948 #ifdef __cplusplus
50949 extern "C"
50950 #endif
50951 char gethostbyname ();
50952 int
50953 main ()
50954 {
50955 return gethostbyname ();
50956   ;
50957   return 0;
50958 }
50959 _ACEOF
50960 if ac_fn_cxx_try_link "$LINENO"; then :
50961   ac_cv_lib_bsd_gethostbyname=yes
50962 else
50963   ac_cv_lib_bsd_gethostbyname=no
50964 fi
50965 rm -f core conftest.err conftest.$ac_objext \
50966     conftest$ac_exeext conftest.$ac_ext
50967 LIBS=$ac_check_lib_save_LIBS
50968 fi
50969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
50970 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
50971 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
50972   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
50973 fi
50974 
50975       fi
50976     fi
50977 
50978     # lieder@skyler.mavd.honeywell.com says without -lsocket,
50979     # socket/setsockopt and other routines are undefined under SCO ODT
50980     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
50981     # on later versions), says Simon Leinen: it contains gethostby*
50982     # variants that don't use the name server (or something).  -lsocket
50983     # must be given before -lnsl if both are needed.  We assume that
50984     # if connect needs -lnsl, so does gethostbyname.
50985     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
50986 if test "x$ac_cv_func_connect" = xyes; then :
50987 
50988 fi
50989 
50990     if test $ac_cv_func_connect = no; then
50991       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
50992 $as_echo_n "checking for connect in -lsocket... " >&6; }
50993 if ${ac_cv_lib_socket_connect+:} false; then :
50994   $as_echo_n "(cached) " >&6
50995 else
50996   ac_check_lib_save_LIBS=$LIBS
50997 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
50998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50999 /* end confdefs.h.  */
51000 
51001 /* Override any GCC internal prototype to avoid an error.
51002    Use char because int might match the return type of a GCC
51003    builtin and then its argument prototype would still apply.  */
51004 #ifdef __cplusplus
51005 extern "C"
51006 #endif
51007 char connect ();
51008 int
51009 main ()
51010 {
51011 return connect ();
51012   ;
51013   return 0;
51014 }
51015 _ACEOF
51016 if ac_fn_cxx_try_link "$LINENO"; then :
51017   ac_cv_lib_socket_connect=yes
51018 else
51019   ac_cv_lib_socket_connect=no
51020 fi
51021 rm -f core conftest.err conftest.$ac_objext \
51022     conftest$ac_exeext conftest.$ac_ext
51023 LIBS=$ac_check_lib_save_LIBS
51024 fi
51025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
51026 $as_echo "$ac_cv_lib_socket_connect" >&6; }
51027 if test "x$ac_cv_lib_socket_connect" = xyes; then :
51028   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
51029 fi
51030 
51031     fi
51032 
51033     # Guillermo Gomez says -lposix is necessary on A/UX.
51034     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
51035 if test "x$ac_cv_func_remove" = xyes; then :
51036 
51037 fi
51038 
51039     if test $ac_cv_func_remove = no; then
51040       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
51041 $as_echo_n "checking for remove in -lposix... " >&6; }
51042 if ${ac_cv_lib_posix_remove+:} false; then :
51043   $as_echo_n "(cached) " >&6
51044 else
51045   ac_check_lib_save_LIBS=$LIBS
51046 LIBS="-lposix  $LIBS"
51047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51048 /* end confdefs.h.  */
51049 
51050 /* Override any GCC internal prototype to avoid an error.
51051    Use char because int might match the return type of a GCC
51052    builtin and then its argument prototype would still apply.  */
51053 #ifdef __cplusplus
51054 extern "C"
51055 #endif
51056 char remove ();
51057 int
51058 main ()
51059 {
51060 return remove ();
51061   ;
51062   return 0;
51063 }
51064 _ACEOF
51065 if ac_fn_cxx_try_link "$LINENO"; then :
51066   ac_cv_lib_posix_remove=yes
51067 else
51068   ac_cv_lib_posix_remove=no
51069 fi
51070 rm -f core conftest.err conftest.$ac_objext \
51071     conftest$ac_exeext conftest.$ac_ext
51072 LIBS=$ac_check_lib_save_LIBS
51073 fi
51074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
51075 $as_echo "$ac_cv_lib_posix_remove" >&6; }
51076 if test "x$ac_cv_lib_posix_remove" = xyes; then :
51077   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
51078 fi
51079 
51080     fi
51081 
51082     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
51083     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
51084 if test "x$ac_cv_func_shmat" = xyes; then :
51085 
51086 fi
51087 
51088     if test $ac_cv_func_shmat = no; then
51089       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
51090 $as_echo_n "checking for shmat in -lipc... " >&6; }
51091 if ${ac_cv_lib_ipc_shmat+:} false; then :
51092   $as_echo_n "(cached) " >&6
51093 else
51094   ac_check_lib_save_LIBS=$LIBS
51095 LIBS="-lipc  $LIBS"
51096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51097 /* end confdefs.h.  */
51098 
51099 /* Override any GCC internal prototype to avoid an error.
51100    Use char because int might match the return type of a GCC
51101    builtin and then its argument prototype would still apply.  */
51102 #ifdef __cplusplus
51103 extern "C"
51104 #endif
51105 char shmat ();
51106 int
51107 main ()
51108 {
51109 return shmat ();
51110   ;
51111   return 0;
51112 }
51113 _ACEOF
51114 if ac_fn_cxx_try_link "$LINENO"; then :
51115   ac_cv_lib_ipc_shmat=yes
51116 else
51117   ac_cv_lib_ipc_shmat=no
51118 fi
51119 rm -f core conftest.err conftest.$ac_objext \
51120     conftest$ac_exeext conftest.$ac_ext
51121 LIBS=$ac_check_lib_save_LIBS
51122 fi
51123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
51124 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
51125 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
51126   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
51127 fi
51128 
51129     fi
51130   fi
51131 
51132   # Check for libraries that X11R6 Xt/Xaw programs need.
51133   ac_save_LDFLAGS=$LDFLAGS
51134   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
51135   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
51136   # check for ICE first), but we must link in the order -lSM -lICE or
51137   # we get undefined symbols.  So assume we have SM if we have ICE.
51138   # These have to be linked with before -lX11, unlike the other
51139   # libraries we check for below, so use a different variable.
51140   # John Interrante, Karl Berry
51141   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
51142 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
51143 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
51144   $as_echo_n "(cached) " >&6
51145 else
51146   ac_check_lib_save_LIBS=$LIBS
51147 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
51148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51149 /* end confdefs.h.  */
51150 
51151 /* Override any GCC internal prototype to avoid an error.
51152    Use char because int might match the return type of a GCC
51153    builtin and then its argument prototype would still apply.  */
51154 #ifdef __cplusplus
51155 extern "C"
51156 #endif
51157 char IceConnectionNumber ();
51158 int
51159 main ()
51160 {
51161 return IceConnectionNumber ();
51162   ;
51163   return 0;
51164 }
51165 _ACEOF
51166 if ac_fn_cxx_try_link "$LINENO"; then :
51167   ac_cv_lib_ICE_IceConnectionNumber=yes
51168 else
51169   ac_cv_lib_ICE_IceConnectionNumber=no
51170 fi
51171 rm -f core conftest.err conftest.$ac_objext \
51172     conftest$ac_exeext conftest.$ac_ext
51173 LIBS=$ac_check_lib_save_LIBS
51174 fi
51175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
51176 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
51177 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
51178   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
51179 fi
51180 
51181   LDFLAGS=$ac_save_LDFLAGS
51182 
51183 fi
51184 
51185 
51186     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
51187     # this doesn't make sense so we remove it.
51188     if test "x$COMPILE_TYPE" = xcross; then
51189       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
51190     fi
51191 
51192     if test "x$no_x" = xyes; then
51193 
51194   # Print a helpful message on how to acquire the necessary build dependency.
51195   # x11 is the help tag: freetype, cups, alsa etc
51196   MISSING_DEPENDENCY=x11
51197 
51198   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51199     cygwin_help $MISSING_DEPENDENCY
51200   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51201     msys_help $MISSING_DEPENDENCY
51202   else
51203     PKGHANDLER_COMMAND=
51204 
51205     case $PKGHANDLER in
51206       apt-get)
51207         apt_help     $MISSING_DEPENDENCY ;;
51208       yum)
51209         yum_help     $MISSING_DEPENDENCY ;;
51210       port)
51211         port_help    $MISSING_DEPENDENCY ;;
51212       pkgutil)
51213         pkgutil_help $MISSING_DEPENDENCY ;;
51214       pkgadd)
51215         pkgadd_help  $MISSING_DEPENDENCY ;;
51216     esac
51217 
51218     if test "x$PKGHANDLER_COMMAND" != x; then
51219       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51220     fi
51221   fi
51222 
51223       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
51224     fi
51225 
51226     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51227       OPENWIN_HOME="/usr/openwin"
51228       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
51229       X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
51230           -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
51231           -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
51232           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
51233     fi
51234 
51235     ac_ext=c
51236 ac_cpp='$CPP $CPPFLAGS'
51237 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51238 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51239 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51240 
51241     OLD_CFLAGS="$CFLAGS"
51242     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
51243 
51244     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
51245     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
51246 do :
51247   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51248 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
51249           # include <X11/Xlib.h>
51250           # include <X11/Xutil.h>
51251 
51252 
51253 "
51254 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51255   cat >>confdefs.h <<_ACEOF
51256 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51257 _ACEOF
51258  X11_HEADERS_OK=yes
51259 else
51260   X11_HEADERS_OK=no; break
51261 fi
51262 
51263 done
51264 
51265 
51266     if test "x$X11_HEADERS_OK" = xno; then
51267 
51268   # Print a helpful message on how to acquire the necessary build dependency.
51269   # x11 is the help tag: freetype, cups, alsa etc
51270   MISSING_DEPENDENCY=x11
51271 
51272   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51273     cygwin_help $MISSING_DEPENDENCY
51274   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51275     msys_help $MISSING_DEPENDENCY
51276   else
51277     PKGHANDLER_COMMAND=
51278 
51279     case $PKGHANDLER in
51280       apt-get)
51281         apt_help     $MISSING_DEPENDENCY ;;
51282       yum)
51283         yum_help     $MISSING_DEPENDENCY ;;
51284       port)
51285         port_help    $MISSING_DEPENDENCY ;;
51286       pkgutil)
51287         pkgutil_help $MISSING_DEPENDENCY ;;
51288       pkgadd)
51289         pkgadd_help  $MISSING_DEPENDENCY ;;
51290     esac
51291 
51292     if test "x$PKGHANDLER_COMMAND" != x; then
51293       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51294     fi
51295   fi
51296 
51297       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
51298     fi
51299 
51300     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
51301     # defined in libawt_xawt.
51302     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
51303 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
51304     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51305 /* end confdefs.h.  */
51306 #include <X11/extensions/Xrender.h>
51307 int
51308 main ()
51309 {
51310 XLinearGradient x;
51311   ;
51312   return 0;
51313 }
51314 _ACEOF
51315 if ac_fn_c_try_compile "$LINENO"; then :
51316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51317 $as_echo "yes" >&6; }
51318 else
51319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51320 $as_echo "no" >&6; }
51321          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
51322 fi
51323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51324 
51325     CFLAGS="$OLD_CFLAGS"
51326     ac_ext=cpp
51327 ac_cpp='$CXXCPP $CPPFLAGS'
51328 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51329 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51330 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51331 
51332   fi # NEEDS_LIB_X11
51333 
51334 
51335 
51336 
51337 
51338 
51339 # Check whether --with-cups was given.
51340 if test "${with_cups+set}" = set; then :
51341   withval=$with_cups;
51342 fi
51343 
51344 
51345 # Check whether --with-cups-include was given.
51346 if test "${with_cups_include+set}" = set; then :
51347   withval=$with_cups_include;
51348 fi
51349 
51350 
51351   if test "x$NEEDS_LIB_CUPS" = xfalse; then
51352     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
51353         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
51354       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
51355 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
51356     fi
51357     CUPS_CFLAGS=
51358   else
51359     CUPS_FOUND=no
51360 
51361     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
51362       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
51363     fi
51364 
51365     if test "x${with_cups}" != x; then
51366       CUPS_CFLAGS="-I${with_cups}/include"
51367       CUPS_FOUND=yes
51368     fi
51369     if test "x${with_cups_include}" != x; then
51370       CUPS_CFLAGS="-I${with_cups_include}"
51371       CUPS_FOUND=yes
51372     fi
51373     if test "x$CUPS_FOUND" = xno; then
51374       # Are the cups headers installed in the default /usr/include location?
51375       for ac_header in cups/cups.h cups/ppd.h
51376 do :
51377   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51378 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
51379 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51380   cat >>confdefs.h <<_ACEOF
51381 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51382 _ACEOF
51383 
51384           CUPS_FOUND=yes
51385           CUPS_CFLAGS=
51386           DEFAULT_CUPS=yes
51387 
51388 fi
51389 
51390 done
51391 
51392     fi
51393     if test "x$CUPS_FOUND" = xno; then
51394       # Getting nervous now? Lets poke around for standard Solaris third-party
51395       # package installation locations.
51396       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
51397 $as_echo_n "checking for cups headers... " >&6; }
51398       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
51399         # An SFW package seems to be installed!
51400         CUPS_FOUND=yes
51401         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
51402       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
51403         # A CSW package seems to be installed!
51404         CUPS_FOUND=yes
51405         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
51406       fi
51407       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
51408 $as_echo "$CUPS_FOUND" >&6; }
51409     fi
51410     if test "x$CUPS_FOUND" = xno; then
51411 
51412   # Print a helpful message on how to acquire the necessary build dependency.
51413   # cups is the help tag: freetype, cups, alsa etc
51414   MISSING_DEPENDENCY=cups
51415 
51416   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51417     cygwin_help $MISSING_DEPENDENCY
51418   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51419     msys_help $MISSING_DEPENDENCY
51420   else
51421     PKGHANDLER_COMMAND=
51422 
51423     case $PKGHANDLER in
51424       apt-get)
51425         apt_help     $MISSING_DEPENDENCY ;;
51426       yum)
51427         yum_help     $MISSING_DEPENDENCY ;;
51428       port)
51429         port_help    $MISSING_DEPENDENCY ;;
51430       pkgutil)
51431         pkgutil_help $MISSING_DEPENDENCY ;;
51432       pkgadd)
51433         pkgadd_help  $MISSING_DEPENDENCY ;;
51434     esac
51435 
51436     if test "x$PKGHANDLER_COMMAND" != x; then
51437       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51438     fi
51439   fi
51440 
51441       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
51442     fi
51443   fi
51444 
51445 
51446 
51447 
51448 
51449 # Check whether --with-freetype was given.
51450 if test "${with_freetype+set}" = set; then :
51451   withval=$with_freetype;
51452 fi
51453 
51454 
51455 # Check whether --with-freetype-include was given.
51456 if test "${with_freetype_include+set}" = set; then :
51457   withval=$with_freetype_include;
51458 fi
51459 
51460 
51461 # Check whether --with-freetype-lib was given.
51462 if test "${with_freetype_lib+set}" = set; then :
51463   withval=$with_freetype_lib;
51464 fi
51465 
51466 
51467 # Check whether --with-freetype-src was given.
51468 if test "${with_freetype_src+set}" = set; then :
51469   withval=$with_freetype_src;
51470 fi
51471 
51472   # Check whether --enable-freetype-bundling was given.
51473 if test "${enable_freetype_bundling+set}" = set; then :
51474   enableval=$enable_freetype_bundling;
51475 fi
51476 
51477 
51478   # Need to specify explicitly since it needs to be overridden on some versions of macosx
51479   FREETYPE_BASE_NAME=freetype
51480   FREETYPE_CFLAGS=
51481   FREETYPE_LIBS=
51482   FREETYPE_BUNDLE_LIB_PATH=
51483 
51484   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
51485     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
51486         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
51487         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
51488         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
51489       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
51490 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
51491     fi
51492     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
51493       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
51494 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
51495     fi
51496   else
51497     # freetype is needed to build; go get it!
51498 
51499     BUNDLE_FREETYPE="$enable_freetype_bundling"
51500 
51501     if  test "x$with_freetype_src" != x; then
51502       if test "x$OPENJDK_TARGET_OS" = xwindows; then
51503         # Try to build freetype if --with-freetype-src was given on Windows
51504 
51505   FREETYPE_SRC_PATH="$with_freetype_src"
51506   BUILD_FREETYPE=yes
51507 
51508   # Check if the freetype sources are acessible..
51509   if ! test -d $FREETYPE_SRC_PATH; then
51510     { $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
51511 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
51512     BUILD_FREETYPE=no
51513   fi
51514   # ..and contain a vc2010 project file
51515   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
51516   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
51517     { $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
51518 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
51519     BUILD_FREETYPE=no
51520   fi
51521   # Now check if configure found a version of 'msbuild.exe'
51522   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
51523     { $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
51524 $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;}
51525     BUILD_FREETYPE=no
51526   fi
51527 
51528   # Ready to go..
51529   if test "x$BUILD_FREETYPE" = xyes; then
51530     # msbuild requires trailing slashes for output directories
51531     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
51532     freetype_lib_path_unix="$freetype_lib_path"
51533     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
51534 
51535   unix_path="$vcxproj_path"
51536   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51537     windows_path=`$CYGPATH -m "$unix_path"`
51538     vcxproj_path="$windows_path"
51539   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51540     windows_path=`cmd //c echo $unix_path`
51541     vcxproj_path="$windows_path"
51542   fi
51543 
51544 
51545   unix_path="$freetype_lib_path"
51546   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51547     windows_path=`$CYGPATH -m "$unix_path"`
51548     freetype_lib_path="$windows_path"
51549   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51550     windows_path=`cmd //c echo $unix_path`
51551     freetype_lib_path="$windows_path"
51552   fi
51553 
51554 
51555   unix_path="$freetype_obj_path"
51556   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51557     windows_path=`$CYGPATH -m "$unix_path"`
51558     freetype_obj_path="$windows_path"
51559   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51560     windows_path=`cmd //c echo $unix_path`
51561     freetype_obj_path="$windows_path"
51562   fi
51563 
51564     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51565       freetype_platform=x64
51566     else
51567       freetype_platform=win32
51568     fi
51569 
51570     # The original freetype project file is for VS 2010 (i.e. 'v100'),
51571     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
51572     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
51573     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
51574     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
51575 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
51576 
51577     # First we try to build the freetype.dll
51578     $ECHO -e "@echo off\n"\
51579         "$MSBUILD $vcxproj_path "\
51580         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51581         "/p:Configuration=\"Release Multithreaded\" "\
51582         "/p:Platform=$freetype_platform "\
51583         "/p:ConfigurationType=DynamicLibrary "\
51584         "/p:TargetName=freetype "\
51585         "/p:OutDir=\"$freetype_lib_path\" "\
51586         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
51587     cmd /c freetype.bat
51588 
51589     if test -s "$freetype_lib_path_unix/freetype.dll"; then
51590       # If that succeeds we also build freetype.lib
51591       $ECHO -e "@echo off\n"\
51592           "$MSBUILD $vcxproj_path "\
51593           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51594           "/p:Configuration=\"Release Multithreaded\" "\
51595           "/p:Platform=$freetype_platform "\
51596           "/p:ConfigurationType=StaticLibrary "\
51597           "/p:TargetName=freetype "\
51598           "/p:OutDir=\"$freetype_lib_path\" "\
51599           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
51600       cmd /c freetype.bat
51601 
51602       if test -s "$freetype_lib_path_unix/freetype.lib"; then
51603         # Once we build both, lib and dll, set freetype lib and include path appropriately
51604         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
51605         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
51606         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
51607 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
51608       else
51609         BUILD_FREETYPE=no
51610       fi
51611     else
51612       BUILD_FREETYPE=no
51613     fi
51614   fi
51615 
51616         if test "x$BUILD_FREETYPE" = xyes; then
51617           # Okay, we built it. Check that it works.
51618 
51619   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51620   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51621   METHOD="--with-freetype-src"
51622 
51623   # Let's start with an optimistic view of the world :-)
51624   FOUND_FREETYPE=yes
51625 
51626   # First look for the canonical freetype main include file ft2build.h.
51627   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51628     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51629     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51630     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51631       # Fail.
51632       FOUND_FREETYPE=no
51633     fi
51634   fi
51635 
51636   if test "x$FOUND_FREETYPE" = xyes; then
51637     # Include file found, let's continue the sanity check.
51638     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51639 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51640 
51641     # Reset to default value
51642     FREETYPE_BASE_NAME=freetype
51643     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51644     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51645       if test "x$OPENJDK_TARGET_OS" = xmacosx \
51646           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51647         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51648         # for the .6 version explicitly.
51649         FREETYPE_BASE_NAME=freetype.6
51650         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51651         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51652 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51653       else
51654         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51655 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51656         FOUND_FREETYPE=no
51657       fi
51658     else
51659       if test "x$OPENJDK_TARGET_OS" = xwindows; then
51660         # On Windows, we will need both .lib and .dll file.
51661         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51662           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51663 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51664           FOUND_FREETYPE=no
51665         fi
51666       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51667           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51668         # Found lib in isa dir, use that instead.
51669         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51670         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51671 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51672       fi
51673     fi
51674   fi
51675 
51676   if test "x$FOUND_FREETYPE" = xyes; then
51677 
51678   # Only process if variable expands to non-empty
51679 
51680   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51681     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51682 
51683   # Input might be given as Windows format, start by converting to
51684   # unix format.
51685   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51686   new_path=`$CYGPATH -u "$path"`
51687 
51688   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51689   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51690   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51691   # "foo.exe" is OK but "foo" is an error.
51692   #
51693   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51694   # It is also a way to make sure we got the proper file name for the real test later on.
51695   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51696   if test "x$test_shortpath" = x; then
51697     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51698 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51699     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51700   fi
51701 
51702   # Call helper function which possibly converts this using DOS-style short mode.
51703   # If so, the updated path is stored in $new_path.
51704 
51705   input_path="$new_path"
51706   # Check if we need to convert this using DOS-style short mode. If the path
51707   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51708   # take no chances and rewrite it.
51709   # Note: m4 eats our [], so we need to use [ and ] instead.
51710   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51711   if test "x$has_forbidden_chars" != x; then
51712     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51713     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51714     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51715     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51716       # Going to short mode and back again did indeed matter. Since short mode is
51717       # case insensitive, let's make it lowercase to improve readability.
51718       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51719       # Now convert it back to Unix-style (cygpath)
51720       input_path=`$CYGPATH -u "$shortmode_path"`
51721       new_path="$input_path"
51722     fi
51723   fi
51724 
51725   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51726   if test "x$test_cygdrive_prefix" = x; then
51727     # As a simple fix, exclude /usr/bin since it's not a real path.
51728     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51729       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51730       # a path prefixed by /cygdrive for fixpath to work.
51731       new_path="$CYGWIN_ROOT_PATH$input_path"
51732     fi
51733   fi
51734 
51735 
51736   if test "x$path" != "x$new_path"; then
51737     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51738     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51739 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51740   fi
51741 
51742     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51743 
51744   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51745   has_colon=`$ECHO $path | $GREP ^.:`
51746   new_path="$path"
51747   if test "x$has_colon" = x; then
51748     # Not in mixed or Windows style, start by that.
51749     new_path=`cmd //c echo $path`
51750   fi
51751 
51752 
51753   input_path="$new_path"
51754   # Check if we need to convert this using DOS-style short mode. If the path
51755   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51756   # take no chances and rewrite it.
51757   # Note: m4 eats our [], so we need to use [ and ] instead.
51758   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51759   if test "x$has_forbidden_chars" != x; then
51760     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51761     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51762   fi
51763 
51764 
51765   windows_path="$new_path"
51766   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51767     unix_path=`$CYGPATH -u "$windows_path"`
51768     new_path="$unix_path"
51769   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51770     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51771     new_path="$unix_path"
51772   fi
51773 
51774   if test "x$path" != "x$new_path"; then
51775     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51776     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51777 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51778   fi
51779 
51780   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51781   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51782 
51783     else
51784       # We're on a unix platform. Hooray! :)
51785       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51786       has_space=`$ECHO "$path" | $GREP " "`
51787       if test "x$has_space" != x; then
51788         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51789 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51790         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51791       fi
51792 
51793       # Use eval to expand a potential ~
51794       eval path="$path"
51795       if test ! -f "$path" && test ! -d "$path"; then
51796         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51797       fi
51798 
51799       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51800     fi
51801   fi
51802 
51803 
51804   # Only process if variable expands to non-empty
51805 
51806   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51807     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51808 
51809   # Input might be given as Windows format, start by converting to
51810   # unix format.
51811   path="$POTENTIAL_FREETYPE_LIB_PATH"
51812   new_path=`$CYGPATH -u "$path"`
51813 
51814   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51815   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51816   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51817   # "foo.exe" is OK but "foo" is an error.
51818   #
51819   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51820   # It is also a way to make sure we got the proper file name for the real test later on.
51821   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51822   if test "x$test_shortpath" = x; then
51823     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51824 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51825     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51826   fi
51827 
51828   # Call helper function which possibly converts this using DOS-style short mode.
51829   # If so, the updated path is stored in $new_path.
51830 
51831   input_path="$new_path"
51832   # Check if we need to convert this using DOS-style short mode. If the path
51833   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51834   # take no chances and rewrite it.
51835   # Note: m4 eats our [], so we need to use [ and ] instead.
51836   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51837   if test "x$has_forbidden_chars" != x; then
51838     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51839     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51840     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51841     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51842       # Going to short mode and back again did indeed matter. Since short mode is
51843       # case insensitive, let's make it lowercase to improve readability.
51844       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51845       # Now convert it back to Unix-style (cygpath)
51846       input_path=`$CYGPATH -u "$shortmode_path"`
51847       new_path="$input_path"
51848     fi
51849   fi
51850 
51851   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51852   if test "x$test_cygdrive_prefix" = x; then
51853     # As a simple fix, exclude /usr/bin since it's not a real path.
51854     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51855       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51856       # a path prefixed by /cygdrive for fixpath to work.
51857       new_path="$CYGWIN_ROOT_PATH$input_path"
51858     fi
51859   fi
51860 
51861 
51862   if test "x$path" != "x$new_path"; then
51863     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51864     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51865 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51866   fi
51867 
51868     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51869 
51870   path="$POTENTIAL_FREETYPE_LIB_PATH"
51871   has_colon=`$ECHO $path | $GREP ^.:`
51872   new_path="$path"
51873   if test "x$has_colon" = x; then
51874     # Not in mixed or Windows style, start by that.
51875     new_path=`cmd //c echo $path`
51876   fi
51877 
51878 
51879   input_path="$new_path"
51880   # Check if we need to convert this using DOS-style short mode. If the path
51881   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51882   # take no chances and rewrite it.
51883   # Note: m4 eats our [], so we need to use [ and ] instead.
51884   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51885   if test "x$has_forbidden_chars" != x; then
51886     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51887     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51888   fi
51889 
51890 
51891   windows_path="$new_path"
51892   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51893     unix_path=`$CYGPATH -u "$windows_path"`
51894     new_path="$unix_path"
51895   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51896     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51897     new_path="$unix_path"
51898   fi
51899 
51900   if test "x$path" != "x$new_path"; then
51901     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51902     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51903 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51904   fi
51905 
51906   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51907   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51908 
51909     else
51910       # We're on a unix platform. Hooray! :)
51911       path="$POTENTIAL_FREETYPE_LIB_PATH"
51912       has_space=`$ECHO "$path" | $GREP " "`
51913       if test "x$has_space" != x; then
51914         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51915 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51916         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51917       fi
51918 
51919       # Use eval to expand a potential ~
51920       eval path="$path"
51921       if test ! -f "$path" && test ! -d "$path"; then
51922         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51923       fi
51924 
51925       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51926     fi
51927   fi
51928 
51929 
51930     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51931     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51932 $as_echo_n "checking for freetype includes... " >&6; }
51933     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51934 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51935     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51936     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51937 $as_echo_n "checking for freetype libraries... " >&6; }
51938     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51939 $as_echo "$FREETYPE_LIB_PATH" >&6; }
51940   fi
51941 
51942           if test "x$FOUND_FREETYPE" != xyes; then
51943             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
51944           fi
51945         else
51946           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
51947 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
51948           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
51949         fi
51950       else
51951         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
51952 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
51953       fi
51954     fi
51955 
51956     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
51957       # User has specified settings
51958 
51959       if test "x$BUNDLE_FREETYPE" = x; then
51960         # If not specified, default is to bundle freetype
51961         BUNDLE_FREETYPE=yes
51962       fi
51963 
51964       if test "x$with_freetype" != x; then
51965         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
51966         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
51967       fi
51968 
51969       # Allow --with-freetype-lib and --with-freetype-include to override
51970       if test "x$with_freetype_include" != x; then
51971         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
51972       fi
51973       if test "x$with_freetype_lib" != x; then
51974         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
51975       fi
51976 
51977       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51978         # Okay, we got it. Check that it works.
51979 
51980   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51981   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51982   METHOD="--with-freetype"
51983 
51984   # Let's start with an optimistic view of the world :-)
51985   FOUND_FREETYPE=yes
51986 
51987   # First look for the canonical freetype main include file ft2build.h.
51988   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51989     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51990     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51991     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51992       # Fail.
51993       FOUND_FREETYPE=no
51994     fi
51995   fi
51996 
51997   if test "x$FOUND_FREETYPE" = xyes; then
51998     # Include file found, let's continue the sanity check.
51999     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52000 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52001 
52002     # Reset to default value
52003     FREETYPE_BASE_NAME=freetype
52004     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52005     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52006       if test "x$OPENJDK_TARGET_OS" = xmacosx \
52007           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52008         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52009         # for the .6 version explicitly.
52010         FREETYPE_BASE_NAME=freetype.6
52011         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52012         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52013 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52014       else
52015         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52016 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52017         FOUND_FREETYPE=no
52018       fi
52019     else
52020       if test "x$OPENJDK_TARGET_OS" = xwindows; then
52021         # On Windows, we will need both .lib and .dll file.
52022         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52023           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52024 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52025           FOUND_FREETYPE=no
52026         fi
52027       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52028           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52029         # Found lib in isa dir, use that instead.
52030         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52031         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52032 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52033       fi
52034     fi
52035   fi
52036 
52037   if test "x$FOUND_FREETYPE" = xyes; then
52038 
52039   # Only process if variable expands to non-empty
52040 
52041   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52042     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52043 
52044   # Input might be given as Windows format, start by converting to
52045   # unix format.
52046   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52047   new_path=`$CYGPATH -u "$path"`
52048 
52049   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52050   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52051   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52052   # "foo.exe" is OK but "foo" is an error.
52053   #
52054   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52055   # It is also a way to make sure we got the proper file name for the real test later on.
52056   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52057   if test "x$test_shortpath" = x; then
52058     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52059 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52060     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52061   fi
52062 
52063   # Call helper function which possibly converts this using DOS-style short mode.
52064   # If so, the updated path is stored in $new_path.
52065 
52066   input_path="$new_path"
52067   # Check if we need to convert this using DOS-style short mode. If the path
52068   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52069   # take no chances and rewrite it.
52070   # Note: m4 eats our [], so we need to use [ and ] instead.
52071   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52072   if test "x$has_forbidden_chars" != x; then
52073     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52074     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52075     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52076     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52077       # Going to short mode and back again did indeed matter. Since short mode is
52078       # case insensitive, let's make it lowercase to improve readability.
52079       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52080       # Now convert it back to Unix-style (cygpath)
52081       input_path=`$CYGPATH -u "$shortmode_path"`
52082       new_path="$input_path"
52083     fi
52084   fi
52085 
52086   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52087   if test "x$test_cygdrive_prefix" = x; then
52088     # As a simple fix, exclude /usr/bin since it's not a real path.
52089     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52090       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52091       # a path prefixed by /cygdrive for fixpath to work.
52092       new_path="$CYGWIN_ROOT_PATH$input_path"
52093     fi
52094   fi
52095 
52096 
52097   if test "x$path" != "x$new_path"; then
52098     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52099     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52100 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52101   fi
52102 
52103     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52104 
52105   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52106   has_colon=`$ECHO $path | $GREP ^.:`
52107   new_path="$path"
52108   if test "x$has_colon" = x; then
52109     # Not in mixed or Windows style, start by that.
52110     new_path=`cmd //c echo $path`
52111   fi
52112 
52113 
52114   input_path="$new_path"
52115   # Check if we need to convert this using DOS-style short mode. If the path
52116   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52117   # take no chances and rewrite it.
52118   # Note: m4 eats our [], so we need to use [ and ] instead.
52119   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52120   if test "x$has_forbidden_chars" != x; then
52121     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52122     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52123   fi
52124 
52125 
52126   windows_path="$new_path"
52127   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52128     unix_path=`$CYGPATH -u "$windows_path"`
52129     new_path="$unix_path"
52130   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52131     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52132     new_path="$unix_path"
52133   fi
52134 
52135   if test "x$path" != "x$new_path"; then
52136     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52137     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52138 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52139   fi
52140 
52141   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52142   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52143 
52144     else
52145       # We're on a unix platform. Hooray! :)
52146       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52147       has_space=`$ECHO "$path" | $GREP " "`
52148       if test "x$has_space" != x; then
52149         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52150 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52151         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52152       fi
52153 
52154       # Use eval to expand a potential ~
52155       eval path="$path"
52156       if test ! -f "$path" && test ! -d "$path"; then
52157         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52158       fi
52159 
52160       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52161     fi
52162   fi
52163 
52164 
52165   # Only process if variable expands to non-empty
52166 
52167   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52168     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52169 
52170   # Input might be given as Windows format, start by converting to
52171   # unix format.
52172   path="$POTENTIAL_FREETYPE_LIB_PATH"
52173   new_path=`$CYGPATH -u "$path"`
52174 
52175   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52176   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52177   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52178   # "foo.exe" is OK but "foo" is an error.
52179   #
52180   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52181   # It is also a way to make sure we got the proper file name for the real test later on.
52182   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52183   if test "x$test_shortpath" = x; then
52184     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52185 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52186     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52187   fi
52188 
52189   # Call helper function which possibly converts this using DOS-style short mode.
52190   # If so, the updated path is stored in $new_path.
52191 
52192   input_path="$new_path"
52193   # Check if we need to convert this using DOS-style short mode. If the path
52194   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52195   # take no chances and rewrite it.
52196   # Note: m4 eats our [], so we need to use [ and ] instead.
52197   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52198   if test "x$has_forbidden_chars" != x; then
52199     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52200     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52201     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52202     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52203       # Going to short mode and back again did indeed matter. Since short mode is
52204       # case insensitive, let's make it lowercase to improve readability.
52205       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52206       # Now convert it back to Unix-style (cygpath)
52207       input_path=`$CYGPATH -u "$shortmode_path"`
52208       new_path="$input_path"
52209     fi
52210   fi
52211 
52212   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52213   if test "x$test_cygdrive_prefix" = x; then
52214     # As a simple fix, exclude /usr/bin since it's not a real path.
52215     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52216       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52217       # a path prefixed by /cygdrive for fixpath to work.
52218       new_path="$CYGWIN_ROOT_PATH$input_path"
52219     fi
52220   fi
52221 
52222 
52223   if test "x$path" != "x$new_path"; then
52224     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52225     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52226 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52227   fi
52228 
52229     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52230 
52231   path="$POTENTIAL_FREETYPE_LIB_PATH"
52232   has_colon=`$ECHO $path | $GREP ^.:`
52233   new_path="$path"
52234   if test "x$has_colon" = x; then
52235     # Not in mixed or Windows style, start by that.
52236     new_path=`cmd //c echo $path`
52237   fi
52238 
52239 
52240   input_path="$new_path"
52241   # Check if we need to convert this using DOS-style short mode. If the path
52242   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52243   # take no chances and rewrite it.
52244   # Note: m4 eats our [], so we need to use [ and ] instead.
52245   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52246   if test "x$has_forbidden_chars" != x; then
52247     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52248     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52249   fi
52250 
52251 
52252   windows_path="$new_path"
52253   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52254     unix_path=`$CYGPATH -u "$windows_path"`
52255     new_path="$unix_path"
52256   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52257     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52258     new_path="$unix_path"
52259   fi
52260 
52261   if test "x$path" != "x$new_path"; then
52262     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52263     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52264 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52265   fi
52266 
52267   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52268   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52269 
52270     else
52271       # We're on a unix platform. Hooray! :)
52272       path="$POTENTIAL_FREETYPE_LIB_PATH"
52273       has_space=`$ECHO "$path" | $GREP " "`
52274       if test "x$has_space" != x; then
52275         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52276 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52277         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52278       fi
52279 
52280       # Use eval to expand a potential ~
52281       eval path="$path"
52282       if test ! -f "$path" && test ! -d "$path"; then
52283         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52284       fi
52285 
52286       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52287     fi
52288   fi
52289 
52290 
52291     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52292     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52293 $as_echo_n "checking for freetype includes... " >&6; }
52294     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52295 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52296     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52297     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52298 $as_echo_n "checking for freetype libraries... " >&6; }
52299     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52300 $as_echo "$FREETYPE_LIB_PATH" >&6; }
52301   fi
52302 
52303         if test "x$FOUND_FREETYPE" != xyes; then
52304           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
52305         fi
52306       else
52307         # User specified only one of lib or include. This is an error.
52308         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
52309           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
52310 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
52311           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
52312         else
52313           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
52314 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
52315           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
52316         fi
52317       fi
52318     else
52319       # User did not specify settings, but we need freetype. Try to locate it.
52320 
52321       if test "x$BUNDLE_FREETYPE" = x; then
52322         # If not specified, default is to bundle freetype only on windows
52323         if test "x$OPENJDK_TARGET_OS" = xwindows; then
52324           BUNDLE_FREETYPE=yes
52325         else
52326           BUNDLE_FREETYPE=no
52327         fi
52328       fi
52329 
52330       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
52331       if test "x$SYSROOT" = x; then
52332         if test "x$FOUND_FREETYPE" != xyes; then
52333           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
52334           if test "x$PKG_CONFIG" != x; then
52335 
52336 pkg_failed=no
52337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
52338 $as_echo_n "checking for FREETYPE... " >&6; }
52339 
52340 if test -n "$FREETYPE_CFLAGS"; then
52341     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
52342  elif test -n "$PKG_CONFIG"; then
52343     if test -n "$PKG_CONFIG" && \
52344     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
52345   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
52346   ac_status=$?
52347   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52348   test $ac_status = 0; }; then
52349   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
52350 else
52351   pkg_failed=yes
52352 fi
52353  else
52354     pkg_failed=untried
52355 fi
52356 if test -n "$FREETYPE_LIBS"; then
52357     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
52358  elif test -n "$PKG_CONFIG"; then
52359     if test -n "$PKG_CONFIG" && \
52360     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
52361   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
52362   ac_status=$?
52363   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52364   test $ac_status = 0; }; then
52365   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
52366 else
52367   pkg_failed=yes
52368 fi
52369  else
52370     pkg_failed=untried
52371 fi
52372 
52373 
52374 
52375 if test $pkg_failed = yes; then
52376 
52377 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
52378         _pkg_short_errors_supported=yes
52379 else
52380         _pkg_short_errors_supported=no
52381 fi
52382         if test $_pkg_short_errors_supported = yes; then
52383                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
52384         else
52385                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
52386         fi
52387         # Put the nasty error message in config.log where it belongs
52388         echo "$FREETYPE_PKG_ERRORS" >&5
52389 
52390         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52391 $as_echo "no" >&6; }
52392                 FOUND_FREETYPE=no
52393 elif test $pkg_failed = untried; then
52394         FOUND_FREETYPE=no
52395 else
52396         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
52397         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
52398         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52399 $as_echo "yes" >&6; }
52400         FOUND_FREETYPE=yes
52401 fi
52402             if test "x$FOUND_FREETYPE" = xyes; then
52403               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
52404               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
52405               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
52406               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
52407                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
52408               fi
52409               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
52410               if test "x$BUNDLE_FREETYPE" = xyes; then
52411                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
52412 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
52413                 FOUND_FREETYPE=no
52414               else
52415                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
52416 $as_echo_n "checking for freetype... " >&6; }
52417                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
52418 $as_echo "yes (using pkg-config)" >&6; }
52419               fi
52420             fi
52421           fi
52422         fi
52423       fi
52424 
52425       if test "x$FOUND_FREETYPE" != xyes; then
52426         # Check in well-known locations
52427         if test "x$OPENJDK_TARGET_OS" = xwindows; then
52428           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
52429 
52430   windows_path="$FREETYPE_BASE_DIR"
52431   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52432     unix_path=`$CYGPATH -u "$windows_path"`
52433     FREETYPE_BASE_DIR="$unix_path"
52434   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52435     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52436     FREETYPE_BASE_DIR="$unix_path"
52437   fi
52438 
52439 
52440   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52441   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52442   METHOD="well-known location"
52443 
52444   # Let's start with an optimistic view of the world :-)
52445   FOUND_FREETYPE=yes
52446 
52447   # First look for the canonical freetype main include file ft2build.h.
52448   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52449     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52450     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52451     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52452       # Fail.
52453       FOUND_FREETYPE=no
52454     fi
52455   fi
52456 
52457   if test "x$FOUND_FREETYPE" = xyes; then
52458     # Include file found, let's continue the sanity check.
52459     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52460 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52461 
52462     # Reset to default value
52463     FREETYPE_BASE_NAME=freetype
52464     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52465     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52466       if test "x$OPENJDK_TARGET_OS" = xmacosx \
52467           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52468         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52469         # for the .6 version explicitly.
52470         FREETYPE_BASE_NAME=freetype.6
52471         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52472         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52473 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52474       else
52475         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52476 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52477         FOUND_FREETYPE=no
52478       fi
52479     else
52480       if test "x$OPENJDK_TARGET_OS" = xwindows; then
52481         # On Windows, we will need both .lib and .dll file.
52482         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52483           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52484 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52485           FOUND_FREETYPE=no
52486         fi
52487       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52488           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52489         # Found lib in isa dir, use that instead.
52490         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52491         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52492 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52493       fi
52494     fi
52495   fi
52496 
52497   if test "x$FOUND_FREETYPE" = xyes; then
52498 
52499   # Only process if variable expands to non-empty
52500 
52501   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52502     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52503 
52504   # Input might be given as Windows format, start by converting to
52505   # unix format.
52506   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52507   new_path=`$CYGPATH -u "$path"`
52508 
52509   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52510   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52511   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52512   # "foo.exe" is OK but "foo" is an error.
52513   #
52514   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52515   # It is also a way to make sure we got the proper file name for the real test later on.
52516   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52517   if test "x$test_shortpath" = x; then
52518     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52519 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52520     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52521   fi
52522 
52523   # Call helper function which possibly converts this using DOS-style short mode.
52524   # If so, the updated path is stored in $new_path.
52525 
52526   input_path="$new_path"
52527   # Check if we need to convert this using DOS-style short mode. If the path
52528   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52529   # take no chances and rewrite it.
52530   # Note: m4 eats our [], so we need to use [ and ] instead.
52531   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52532   if test "x$has_forbidden_chars" != x; then
52533     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52534     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52535     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52536     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52537       # Going to short mode and back again did indeed matter. Since short mode is
52538       # case insensitive, let's make it lowercase to improve readability.
52539       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52540       # Now convert it back to Unix-style (cygpath)
52541       input_path=`$CYGPATH -u "$shortmode_path"`
52542       new_path="$input_path"
52543     fi
52544   fi
52545 
52546   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52547   if test "x$test_cygdrive_prefix" = x; then
52548     # As a simple fix, exclude /usr/bin since it's not a real path.
52549     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52550       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52551       # a path prefixed by /cygdrive for fixpath to work.
52552       new_path="$CYGWIN_ROOT_PATH$input_path"
52553     fi
52554   fi
52555 
52556 
52557   if test "x$path" != "x$new_path"; then
52558     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52559     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52560 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52561   fi
52562 
52563     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52564 
52565   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52566   has_colon=`$ECHO $path | $GREP ^.:`
52567   new_path="$path"
52568   if test "x$has_colon" = x; then
52569     # Not in mixed or Windows style, start by that.
52570     new_path=`cmd //c echo $path`
52571   fi
52572 
52573 
52574   input_path="$new_path"
52575   # Check if we need to convert this using DOS-style short mode. If the path
52576   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52577   # take no chances and rewrite it.
52578   # Note: m4 eats our [], so we need to use [ and ] instead.
52579   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52580   if test "x$has_forbidden_chars" != x; then
52581     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52582     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52583   fi
52584 
52585 
52586   windows_path="$new_path"
52587   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52588     unix_path=`$CYGPATH -u "$windows_path"`
52589     new_path="$unix_path"
52590   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52591     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52592     new_path="$unix_path"
52593   fi
52594 
52595   if test "x$path" != "x$new_path"; then
52596     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52597     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52598 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52599   fi
52600 
52601   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52602   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52603 
52604     else
52605       # We're on a unix platform. Hooray! :)
52606       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52607       has_space=`$ECHO "$path" | $GREP " "`
52608       if test "x$has_space" != x; then
52609         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52610 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52611         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52612       fi
52613 
52614       # Use eval to expand a potential ~
52615       eval path="$path"
52616       if test ! -f "$path" && test ! -d "$path"; then
52617         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52618       fi
52619 
52620       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52621     fi
52622   fi
52623 
52624 
52625   # Only process if variable expands to non-empty
52626 
52627   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52628     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52629 
52630   # Input might be given as Windows format, start by converting to
52631   # unix format.
52632   path="$POTENTIAL_FREETYPE_LIB_PATH"
52633   new_path=`$CYGPATH -u "$path"`
52634 
52635   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52636   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52637   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52638   # "foo.exe" is OK but "foo" is an error.
52639   #
52640   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52641   # It is also a way to make sure we got the proper file name for the real test later on.
52642   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52643   if test "x$test_shortpath" = x; then
52644     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52645 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52646     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52647   fi
52648 
52649   # Call helper function which possibly converts this using DOS-style short mode.
52650   # If so, the updated path is stored in $new_path.
52651 
52652   input_path="$new_path"
52653   # Check if we need to convert this using DOS-style short mode. If the path
52654   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52655   # take no chances and rewrite it.
52656   # Note: m4 eats our [], so we need to use [ and ] instead.
52657   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52658   if test "x$has_forbidden_chars" != x; then
52659     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52660     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52661     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52662     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52663       # Going to short mode and back again did indeed matter. Since short mode is
52664       # case insensitive, let's make it lowercase to improve readability.
52665       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52666       # Now convert it back to Unix-style (cygpath)
52667       input_path=`$CYGPATH -u "$shortmode_path"`
52668       new_path="$input_path"
52669     fi
52670   fi
52671 
52672   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52673   if test "x$test_cygdrive_prefix" = x; then
52674     # As a simple fix, exclude /usr/bin since it's not a real path.
52675     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52676       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52677       # a path prefixed by /cygdrive for fixpath to work.
52678       new_path="$CYGWIN_ROOT_PATH$input_path"
52679     fi
52680   fi
52681 
52682 
52683   if test "x$path" != "x$new_path"; then
52684     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52685     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52686 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52687   fi
52688 
52689     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52690 
52691   path="$POTENTIAL_FREETYPE_LIB_PATH"
52692   has_colon=`$ECHO $path | $GREP ^.:`
52693   new_path="$path"
52694   if test "x$has_colon" = x; then
52695     # Not in mixed or Windows style, start by that.
52696     new_path=`cmd //c echo $path`
52697   fi
52698 
52699 
52700   input_path="$new_path"
52701   # Check if we need to convert this using DOS-style short mode. If the path
52702   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52703   # take no chances and rewrite it.
52704   # Note: m4 eats our [], so we need to use [ and ] instead.
52705   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52706   if test "x$has_forbidden_chars" != x; then
52707     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52708     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52709   fi
52710 
52711 
52712   windows_path="$new_path"
52713   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52714     unix_path=`$CYGPATH -u "$windows_path"`
52715     new_path="$unix_path"
52716   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52717     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52718     new_path="$unix_path"
52719   fi
52720 
52721   if test "x$path" != "x$new_path"; then
52722     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52723     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52724 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52725   fi
52726 
52727   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52728   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52729 
52730     else
52731       # We're on a unix platform. Hooray! :)
52732       path="$POTENTIAL_FREETYPE_LIB_PATH"
52733       has_space=`$ECHO "$path" | $GREP " "`
52734       if test "x$has_space" != x; then
52735         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52736 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52737         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52738       fi
52739 
52740       # Use eval to expand a potential ~
52741       eval path="$path"
52742       if test ! -f "$path" && test ! -d "$path"; then
52743         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52744       fi
52745 
52746       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52747     fi
52748   fi
52749 
52750 
52751     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52752     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52753 $as_echo_n "checking for freetype includes... " >&6; }
52754     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52755 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52756     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52757     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52758 $as_echo_n "checking for freetype libraries... " >&6; }
52759     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52760 $as_echo "$FREETYPE_LIB_PATH" >&6; }
52761   fi
52762 
52763           if test "x$FOUND_FREETYPE" != xyes; then
52764             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
52765 
52766   windows_path="$FREETYPE_BASE_DIR"
52767   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52768     unix_path=`$CYGPATH -u "$windows_path"`
52769     FREETYPE_BASE_DIR="$unix_path"
52770   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52771     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52772     FREETYPE_BASE_DIR="$unix_path"
52773   fi
52774 
52775 
52776   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52777   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52778   METHOD="well-known location"
52779 
52780   # Let's start with an optimistic view of the world :-)
52781   FOUND_FREETYPE=yes
52782 
52783   # First look for the canonical freetype main include file ft2build.h.
52784   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52785     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52786     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52787     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52788       # Fail.
52789       FOUND_FREETYPE=no
52790     fi
52791   fi
52792 
52793   if test "x$FOUND_FREETYPE" = xyes; then
52794     # Include file found, let's continue the sanity check.
52795     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52796 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52797 
52798     # Reset to default value
52799     FREETYPE_BASE_NAME=freetype
52800     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52801     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52802       if test "x$OPENJDK_TARGET_OS" = xmacosx \
52803           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52804         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52805         # for the .6 version explicitly.
52806         FREETYPE_BASE_NAME=freetype.6
52807         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52808         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52809 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52810       else
52811         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52812 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52813         FOUND_FREETYPE=no
52814       fi
52815     else
52816       if test "x$OPENJDK_TARGET_OS" = xwindows; then
52817         # On Windows, we will need both .lib and .dll file.
52818         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52819           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52820 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52821           FOUND_FREETYPE=no
52822         fi
52823       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52824           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52825         # Found lib in isa dir, use that instead.
52826         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52827         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52828 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52829       fi
52830     fi
52831   fi
52832 
52833   if test "x$FOUND_FREETYPE" = xyes; then
52834 
52835   # Only process if variable expands to non-empty
52836 
52837   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52838     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52839 
52840   # Input might be given as Windows format, start by converting to
52841   # unix format.
52842   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52843   new_path=`$CYGPATH -u "$path"`
52844 
52845   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52846   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52847   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52848   # "foo.exe" is OK but "foo" is an error.
52849   #
52850   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52851   # It is also a way to make sure we got the proper file name for the real test later on.
52852   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52853   if test "x$test_shortpath" = x; then
52854     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52855 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52856     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52857   fi
52858 
52859   # Call helper function which possibly converts this using DOS-style short mode.
52860   # If so, the updated path is stored in $new_path.
52861 
52862   input_path="$new_path"
52863   # Check if we need to convert this using DOS-style short mode. If the path
52864   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52865   # take no chances and rewrite it.
52866   # Note: m4 eats our [], so we need to use [ and ] instead.
52867   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52868   if test "x$has_forbidden_chars" != x; then
52869     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52870     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52871     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52872     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52873       # Going to short mode and back again did indeed matter. Since short mode is
52874       # case insensitive, let's make it lowercase to improve readability.
52875       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52876       # Now convert it back to Unix-style (cygpath)
52877       input_path=`$CYGPATH -u "$shortmode_path"`
52878       new_path="$input_path"
52879     fi
52880   fi
52881 
52882   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52883   if test "x$test_cygdrive_prefix" = x; then
52884     # As a simple fix, exclude /usr/bin since it's not a real path.
52885     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52886       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52887       # a path prefixed by /cygdrive for fixpath to work.
52888       new_path="$CYGWIN_ROOT_PATH$input_path"
52889     fi
52890   fi
52891 
52892 
52893   if test "x$path" != "x$new_path"; then
52894     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52895     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52896 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52897   fi
52898 
52899     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52900 
52901   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52902   has_colon=`$ECHO $path | $GREP ^.:`
52903   new_path="$path"
52904   if test "x$has_colon" = x; then
52905     # Not in mixed or Windows style, start by that.
52906     new_path=`cmd //c echo $path`
52907   fi
52908 
52909 
52910   input_path="$new_path"
52911   # Check if we need to convert this using DOS-style short mode. If the path
52912   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52913   # take no chances and rewrite it.
52914   # Note: m4 eats our [], so we need to use [ and ] instead.
52915   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52916   if test "x$has_forbidden_chars" != x; then
52917     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52918     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52919   fi
52920 
52921 
52922   windows_path="$new_path"
52923   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52924     unix_path=`$CYGPATH -u "$windows_path"`
52925     new_path="$unix_path"
52926   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52927     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52928     new_path="$unix_path"
52929   fi
52930 
52931   if test "x$path" != "x$new_path"; then
52932     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52933     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52934 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52935   fi
52936 
52937   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52938   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52939 
52940     else
52941       # We're on a unix platform. Hooray! :)
52942       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52943       has_space=`$ECHO "$path" | $GREP " "`
52944       if test "x$has_space" != x; then
52945         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52946 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52947         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52948       fi
52949 
52950       # Use eval to expand a potential ~
52951       eval path="$path"
52952       if test ! -f "$path" && test ! -d "$path"; then
52953         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52954       fi
52955 
52956       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52957     fi
52958   fi
52959 
52960 
52961   # Only process if variable expands to non-empty
52962 
52963   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52964     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52965 
52966   # Input might be given as Windows format, start by converting to
52967   # unix format.
52968   path="$POTENTIAL_FREETYPE_LIB_PATH"
52969   new_path=`$CYGPATH -u "$path"`
52970 
52971   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52972   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52973   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52974   # "foo.exe" is OK but "foo" is an error.
52975   #
52976   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52977   # It is also a way to make sure we got the proper file name for the real test later on.
52978   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52979   if test "x$test_shortpath" = x; then
52980     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52981 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52982     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52983   fi
52984 
52985   # Call helper function which possibly converts this using DOS-style short mode.
52986   # If so, the updated path is stored in $new_path.
52987 
52988   input_path="$new_path"
52989   # Check if we need to convert this using DOS-style short mode. If the path
52990   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52991   # take no chances and rewrite it.
52992   # Note: m4 eats our [], so we need to use [ and ] instead.
52993   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52994   if test "x$has_forbidden_chars" != x; then
52995     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52996     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52997     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52998     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52999       # Going to short mode and back again did indeed matter. Since short mode is
53000       # case insensitive, let's make it lowercase to improve readability.
53001       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53002       # Now convert it back to Unix-style (cygpath)
53003       input_path=`$CYGPATH -u "$shortmode_path"`
53004       new_path="$input_path"
53005     fi
53006   fi
53007 
53008   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53009   if test "x$test_cygdrive_prefix" = x; then
53010     # As a simple fix, exclude /usr/bin since it's not a real path.
53011     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53012       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53013       # a path prefixed by /cygdrive for fixpath to work.
53014       new_path="$CYGWIN_ROOT_PATH$input_path"
53015     fi
53016   fi
53017 
53018 
53019   if test "x$path" != "x$new_path"; then
53020     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53021     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53022 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53023   fi
53024 
53025     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53026 
53027   path="$POTENTIAL_FREETYPE_LIB_PATH"
53028   has_colon=`$ECHO $path | $GREP ^.:`
53029   new_path="$path"
53030   if test "x$has_colon" = x; then
53031     # Not in mixed or Windows style, start by that.
53032     new_path=`cmd //c echo $path`
53033   fi
53034 
53035 
53036   input_path="$new_path"
53037   # Check if we need to convert this using DOS-style short mode. If the path
53038   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53039   # take no chances and rewrite it.
53040   # Note: m4 eats our [], so we need to use [ and ] instead.
53041   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53042   if test "x$has_forbidden_chars" != x; then
53043     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53044     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53045   fi
53046 
53047 
53048   windows_path="$new_path"
53049   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53050     unix_path=`$CYGPATH -u "$windows_path"`
53051     new_path="$unix_path"
53052   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53053     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53054     new_path="$unix_path"
53055   fi
53056 
53057   if test "x$path" != "x$new_path"; then
53058     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53059     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53060 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53061   fi
53062 
53063   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53064   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53065 
53066     else
53067       # We're on a unix platform. Hooray! :)
53068       path="$POTENTIAL_FREETYPE_LIB_PATH"
53069       has_space=`$ECHO "$path" | $GREP " "`
53070       if test "x$has_space" != x; then
53071         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53072 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53073         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53074       fi
53075 
53076       # Use eval to expand a potential ~
53077       eval path="$path"
53078       if test ! -f "$path" && test ! -d "$path"; then
53079         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53080       fi
53081 
53082       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53083     fi
53084   fi
53085 
53086 
53087     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53088     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53089 $as_echo_n "checking for freetype includes... " >&6; }
53090     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53091 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53092     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53093     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53094 $as_echo_n "checking for freetype libraries... " >&6; }
53095     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53096 $as_echo "$FREETYPE_LIB_PATH" >&6; }
53097   fi
53098 
53099           fi
53100         else
53101           FREETYPE_BASE_DIR="$SYSROOT/usr"
53102 
53103   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53104   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53105   METHOD="well-known location"
53106 
53107   # Let's start with an optimistic view of the world :-)
53108   FOUND_FREETYPE=yes
53109 
53110   # First look for the canonical freetype main include file ft2build.h.
53111   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53112     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53113     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53114     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53115       # Fail.
53116       FOUND_FREETYPE=no
53117     fi
53118   fi
53119 
53120   if test "x$FOUND_FREETYPE" = xyes; then
53121     # Include file found, let's continue the sanity check.
53122     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53123 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53124 
53125     # Reset to default value
53126     FREETYPE_BASE_NAME=freetype
53127     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53128     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53129       if test "x$OPENJDK_TARGET_OS" = xmacosx \
53130           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53131         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53132         # for the .6 version explicitly.
53133         FREETYPE_BASE_NAME=freetype.6
53134         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53135         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53136 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53137       else
53138         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53139 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53140         FOUND_FREETYPE=no
53141       fi
53142     else
53143       if test "x$OPENJDK_TARGET_OS" = xwindows; then
53144         # On Windows, we will need both .lib and .dll file.
53145         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53146           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53147 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53148           FOUND_FREETYPE=no
53149         fi
53150       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53151           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53152         # Found lib in isa dir, use that instead.
53153         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53154         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53155 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53156       fi
53157     fi
53158   fi
53159 
53160   if test "x$FOUND_FREETYPE" = xyes; then
53161 
53162   # Only process if variable expands to non-empty
53163 
53164   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53165     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53166 
53167   # Input might be given as Windows format, start by converting to
53168   # unix format.
53169   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53170   new_path=`$CYGPATH -u "$path"`
53171 
53172   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53173   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53174   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53175   # "foo.exe" is OK but "foo" is an error.
53176   #
53177   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53178   # It is also a way to make sure we got the proper file name for the real test later on.
53179   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53180   if test "x$test_shortpath" = x; then
53181     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53182 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53183     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53184   fi
53185 
53186   # Call helper function which possibly converts this using DOS-style short mode.
53187   # If so, the updated path is stored in $new_path.
53188 
53189   input_path="$new_path"
53190   # Check if we need to convert this using DOS-style short mode. If the path
53191   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53192   # take no chances and rewrite it.
53193   # Note: m4 eats our [], so we need to use [ and ] instead.
53194   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53195   if test "x$has_forbidden_chars" != x; then
53196     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53197     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53198     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53199     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53200       # Going to short mode and back again did indeed matter. Since short mode is
53201       # case insensitive, let's make it lowercase to improve readability.
53202       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53203       # Now convert it back to Unix-style (cygpath)
53204       input_path=`$CYGPATH -u "$shortmode_path"`
53205       new_path="$input_path"
53206     fi
53207   fi
53208 
53209   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53210   if test "x$test_cygdrive_prefix" = x; then
53211     # As a simple fix, exclude /usr/bin since it's not a real path.
53212     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53213       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53214       # a path prefixed by /cygdrive for fixpath to work.
53215       new_path="$CYGWIN_ROOT_PATH$input_path"
53216     fi
53217   fi
53218 
53219 
53220   if test "x$path" != "x$new_path"; then
53221     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53222     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53223 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53224   fi
53225 
53226     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53227 
53228   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53229   has_colon=`$ECHO $path | $GREP ^.:`
53230   new_path="$path"
53231   if test "x$has_colon" = x; then
53232     # Not in mixed or Windows style, start by that.
53233     new_path=`cmd //c echo $path`
53234   fi
53235 
53236 
53237   input_path="$new_path"
53238   # Check if we need to convert this using DOS-style short mode. If the path
53239   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53240   # take no chances and rewrite it.
53241   # Note: m4 eats our [], so we need to use [ and ] instead.
53242   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53243   if test "x$has_forbidden_chars" != x; then
53244     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53245     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53246   fi
53247 
53248 
53249   windows_path="$new_path"
53250   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53251     unix_path=`$CYGPATH -u "$windows_path"`
53252     new_path="$unix_path"
53253   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53254     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53255     new_path="$unix_path"
53256   fi
53257 
53258   if test "x$path" != "x$new_path"; then
53259     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53260     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53261 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53262   fi
53263 
53264   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53265   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53266 
53267     else
53268       # We're on a unix platform. Hooray! :)
53269       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53270       has_space=`$ECHO "$path" | $GREP " "`
53271       if test "x$has_space" != x; then
53272         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53273 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53274         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53275       fi
53276 
53277       # Use eval to expand a potential ~
53278       eval path="$path"
53279       if test ! -f "$path" && test ! -d "$path"; then
53280         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53281       fi
53282 
53283       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53284     fi
53285   fi
53286 
53287 
53288   # Only process if variable expands to non-empty
53289 
53290   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53291     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53292 
53293   # Input might be given as Windows format, start by converting to
53294   # unix format.
53295   path="$POTENTIAL_FREETYPE_LIB_PATH"
53296   new_path=`$CYGPATH -u "$path"`
53297 
53298   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53299   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53300   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53301   # "foo.exe" is OK but "foo" is an error.
53302   #
53303   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53304   # It is also a way to make sure we got the proper file name for the real test later on.
53305   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53306   if test "x$test_shortpath" = x; then
53307     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53308 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53309     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53310   fi
53311 
53312   # Call helper function which possibly converts this using DOS-style short mode.
53313   # If so, the updated path is stored in $new_path.
53314 
53315   input_path="$new_path"
53316   # Check if we need to convert this using DOS-style short mode. If the path
53317   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53318   # take no chances and rewrite it.
53319   # Note: m4 eats our [], so we need to use [ and ] instead.
53320   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53321   if test "x$has_forbidden_chars" != x; then
53322     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53323     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53324     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53325     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53326       # Going to short mode and back again did indeed matter. Since short mode is
53327       # case insensitive, let's make it lowercase to improve readability.
53328       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53329       # Now convert it back to Unix-style (cygpath)
53330       input_path=`$CYGPATH -u "$shortmode_path"`
53331       new_path="$input_path"
53332     fi
53333   fi
53334 
53335   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53336   if test "x$test_cygdrive_prefix" = x; then
53337     # As a simple fix, exclude /usr/bin since it's not a real path.
53338     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53339       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53340       # a path prefixed by /cygdrive for fixpath to work.
53341       new_path="$CYGWIN_ROOT_PATH$input_path"
53342     fi
53343   fi
53344 
53345 
53346   if test "x$path" != "x$new_path"; then
53347     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53348     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53349 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53350   fi
53351 
53352     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53353 
53354   path="$POTENTIAL_FREETYPE_LIB_PATH"
53355   has_colon=`$ECHO $path | $GREP ^.:`
53356   new_path="$path"
53357   if test "x$has_colon" = x; then
53358     # Not in mixed or Windows style, start by that.
53359     new_path=`cmd //c echo $path`
53360   fi
53361 
53362 
53363   input_path="$new_path"
53364   # Check if we need to convert this using DOS-style short mode. If the path
53365   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53366   # take no chances and rewrite it.
53367   # Note: m4 eats our [], so we need to use [ and ] instead.
53368   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53369   if test "x$has_forbidden_chars" != x; then
53370     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53371     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53372   fi
53373 
53374 
53375   windows_path="$new_path"
53376   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53377     unix_path=`$CYGPATH -u "$windows_path"`
53378     new_path="$unix_path"
53379   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53380     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53381     new_path="$unix_path"
53382   fi
53383 
53384   if test "x$path" != "x$new_path"; then
53385     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53386     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53387 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53388   fi
53389 
53390   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53391   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53392 
53393     else
53394       # We're on a unix platform. Hooray! :)
53395       path="$POTENTIAL_FREETYPE_LIB_PATH"
53396       has_space=`$ECHO "$path" | $GREP " "`
53397       if test "x$has_space" != x; then
53398         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53399 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53400         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53401       fi
53402 
53403       # Use eval to expand a potential ~
53404       eval path="$path"
53405       if test ! -f "$path" && test ! -d "$path"; then
53406         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53407       fi
53408 
53409       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53410     fi
53411   fi
53412 
53413 
53414     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53415     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53416 $as_echo_n "checking for freetype includes... " >&6; }
53417     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53418 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53419     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53420     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53421 $as_echo_n "checking for freetype libraries... " >&6; }
53422     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53423 $as_echo "$FREETYPE_LIB_PATH" >&6; }
53424   fi
53425 
53426 
53427           if test "x$FOUND_FREETYPE" != xyes; then
53428             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
53429 
53430   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53431   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53432   METHOD="well-known location"
53433 
53434   # Let's start with an optimistic view of the world :-)
53435   FOUND_FREETYPE=yes
53436 
53437   # First look for the canonical freetype main include file ft2build.h.
53438   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53439     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53440     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53441     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53442       # Fail.
53443       FOUND_FREETYPE=no
53444     fi
53445   fi
53446 
53447   if test "x$FOUND_FREETYPE" = xyes; then
53448     # Include file found, let's continue the sanity check.
53449     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53450 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53451 
53452     # Reset to default value
53453     FREETYPE_BASE_NAME=freetype
53454     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53455     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53456       if test "x$OPENJDK_TARGET_OS" = xmacosx \
53457           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53458         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53459         # for the .6 version explicitly.
53460         FREETYPE_BASE_NAME=freetype.6
53461         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53462         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53463 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53464       else
53465         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53466 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53467         FOUND_FREETYPE=no
53468       fi
53469     else
53470       if test "x$OPENJDK_TARGET_OS" = xwindows; then
53471         # On Windows, we will need both .lib and .dll file.
53472         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53473           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53474 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53475           FOUND_FREETYPE=no
53476         fi
53477       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53478           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53479         # Found lib in isa dir, use that instead.
53480         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53481         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53482 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53483       fi
53484     fi
53485   fi
53486 
53487   if test "x$FOUND_FREETYPE" = xyes; then
53488 
53489   # Only process if variable expands to non-empty
53490 
53491   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53492     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53493 
53494   # Input might be given as Windows format, start by converting to
53495   # unix format.
53496   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53497   new_path=`$CYGPATH -u "$path"`
53498 
53499   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53500   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53501   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53502   # "foo.exe" is OK but "foo" is an error.
53503   #
53504   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53505   # It is also a way to make sure we got the proper file name for the real test later on.
53506   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53507   if test "x$test_shortpath" = x; then
53508     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53509 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53510     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53511   fi
53512 
53513   # Call helper function which possibly converts this using DOS-style short mode.
53514   # If so, the updated path is stored in $new_path.
53515 
53516   input_path="$new_path"
53517   # Check if we need to convert this using DOS-style short mode. If the path
53518   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53519   # take no chances and rewrite it.
53520   # Note: m4 eats our [], so we need to use [ and ] instead.
53521   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53522   if test "x$has_forbidden_chars" != x; then
53523     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53524     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53525     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53526     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53527       # Going to short mode and back again did indeed matter. Since short mode is
53528       # case insensitive, let's make it lowercase to improve readability.
53529       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53530       # Now convert it back to Unix-style (cygpath)
53531       input_path=`$CYGPATH -u "$shortmode_path"`
53532       new_path="$input_path"
53533     fi
53534   fi
53535 
53536   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53537   if test "x$test_cygdrive_prefix" = x; then
53538     # As a simple fix, exclude /usr/bin since it's not a real path.
53539     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53540       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53541       # a path prefixed by /cygdrive for fixpath to work.
53542       new_path="$CYGWIN_ROOT_PATH$input_path"
53543     fi
53544   fi
53545 
53546 
53547   if test "x$path" != "x$new_path"; then
53548     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53549     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53550 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53551   fi
53552 
53553     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53554 
53555   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53556   has_colon=`$ECHO $path | $GREP ^.:`
53557   new_path="$path"
53558   if test "x$has_colon" = x; then
53559     # Not in mixed or Windows style, start by that.
53560     new_path=`cmd //c echo $path`
53561   fi
53562 
53563 
53564   input_path="$new_path"
53565   # Check if we need to convert this using DOS-style short mode. If the path
53566   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53567   # take no chances and rewrite it.
53568   # Note: m4 eats our [], so we need to use [ and ] instead.
53569   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53570   if test "x$has_forbidden_chars" != x; then
53571     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53572     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53573   fi
53574 
53575 
53576   windows_path="$new_path"
53577   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53578     unix_path=`$CYGPATH -u "$windows_path"`
53579     new_path="$unix_path"
53580   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53581     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53582     new_path="$unix_path"
53583   fi
53584 
53585   if test "x$path" != "x$new_path"; then
53586     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53587     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53588 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53589   fi
53590 
53591   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53592   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53593 
53594     else
53595       # We're on a unix platform. Hooray! :)
53596       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53597       has_space=`$ECHO "$path" | $GREP " "`
53598       if test "x$has_space" != x; then
53599         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53600 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53601         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53602       fi
53603 
53604       # Use eval to expand a potential ~
53605       eval path="$path"
53606       if test ! -f "$path" && test ! -d "$path"; then
53607         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53608       fi
53609 
53610       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53611     fi
53612   fi
53613 
53614 
53615   # Only process if variable expands to non-empty
53616 
53617   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53618     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53619 
53620   # Input might be given as Windows format, start by converting to
53621   # unix format.
53622   path="$POTENTIAL_FREETYPE_LIB_PATH"
53623   new_path=`$CYGPATH -u "$path"`
53624 
53625   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53626   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53627   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53628   # "foo.exe" is OK but "foo" is an error.
53629   #
53630   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53631   # It is also a way to make sure we got the proper file name for the real test later on.
53632   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53633   if test "x$test_shortpath" = x; then
53634     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53635 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53636     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53637   fi
53638 
53639   # Call helper function which possibly converts this using DOS-style short mode.
53640   # If so, the updated path is stored in $new_path.
53641 
53642   input_path="$new_path"
53643   # Check if we need to convert this using DOS-style short mode. If the path
53644   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53645   # take no chances and rewrite it.
53646   # Note: m4 eats our [], so we need to use [ and ] instead.
53647   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53648   if test "x$has_forbidden_chars" != x; then
53649     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53650     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53651     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53652     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53653       # Going to short mode and back again did indeed matter. Since short mode is
53654       # case insensitive, let's make it lowercase to improve readability.
53655       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53656       # Now convert it back to Unix-style (cygpath)
53657       input_path=`$CYGPATH -u "$shortmode_path"`
53658       new_path="$input_path"
53659     fi
53660   fi
53661 
53662   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53663   if test "x$test_cygdrive_prefix" = x; then
53664     # As a simple fix, exclude /usr/bin since it's not a real path.
53665     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53666       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53667       # a path prefixed by /cygdrive for fixpath to work.
53668       new_path="$CYGWIN_ROOT_PATH$input_path"
53669     fi
53670   fi
53671 
53672 
53673   if test "x$path" != "x$new_path"; then
53674     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53675     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53676 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53677   fi
53678 
53679     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53680 
53681   path="$POTENTIAL_FREETYPE_LIB_PATH"
53682   has_colon=`$ECHO $path | $GREP ^.:`
53683   new_path="$path"
53684   if test "x$has_colon" = x; then
53685     # Not in mixed or Windows style, start by that.
53686     new_path=`cmd //c echo $path`
53687   fi
53688 
53689 
53690   input_path="$new_path"
53691   # Check if we need to convert this using DOS-style short mode. If the path
53692   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53693   # take no chances and rewrite it.
53694   # Note: m4 eats our [], so we need to use [ and ] instead.
53695   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53696   if test "x$has_forbidden_chars" != x; then
53697     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53698     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53699   fi
53700 
53701 
53702   windows_path="$new_path"
53703   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53704     unix_path=`$CYGPATH -u "$windows_path"`
53705     new_path="$unix_path"
53706   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53707     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53708     new_path="$unix_path"
53709   fi
53710 
53711   if test "x$path" != "x$new_path"; then
53712     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53713     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53714 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53715   fi
53716 
53717   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53718   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53719 
53720     else
53721       # We're on a unix platform. Hooray! :)
53722       path="$POTENTIAL_FREETYPE_LIB_PATH"
53723       has_space=`$ECHO "$path" | $GREP " "`
53724       if test "x$has_space" != x; then
53725         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53726 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53727         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53728       fi
53729 
53730       # Use eval to expand a potential ~
53731       eval path="$path"
53732       if test ! -f "$path" && test ! -d "$path"; then
53733         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53734       fi
53735 
53736       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53737     fi
53738   fi
53739 
53740 
53741     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53742     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53743 $as_echo_n "checking for freetype includes... " >&6; }
53744     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53745 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53746     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53747     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53748 $as_echo_n "checking for freetype libraries... " >&6; }
53749     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53750 $as_echo "$FREETYPE_LIB_PATH" >&6; }
53751   fi
53752 
53753           fi
53754 
53755           if test "x$FOUND_FREETYPE" != xyes; then
53756             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
53757 
53758   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53759   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53760   METHOD="well-known location"
53761 
53762   # Let's start with an optimistic view of the world :-)
53763   FOUND_FREETYPE=yes
53764 
53765   # First look for the canonical freetype main include file ft2build.h.
53766   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53767     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53768     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53769     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53770       # Fail.
53771       FOUND_FREETYPE=no
53772     fi
53773   fi
53774 
53775   if test "x$FOUND_FREETYPE" = xyes; then
53776     # Include file found, let's continue the sanity check.
53777     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53778 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53779 
53780     # Reset to default value
53781     FREETYPE_BASE_NAME=freetype
53782     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53783     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53784       if test "x$OPENJDK_TARGET_OS" = xmacosx \
53785           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53786         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53787         # for the .6 version explicitly.
53788         FREETYPE_BASE_NAME=freetype.6
53789         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53790         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53791 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53792       else
53793         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53794 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53795         FOUND_FREETYPE=no
53796       fi
53797     else
53798       if test "x$OPENJDK_TARGET_OS" = xwindows; then
53799         # On Windows, we will need both .lib and .dll file.
53800         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53801           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53802 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53803           FOUND_FREETYPE=no
53804         fi
53805       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53806           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53807         # Found lib in isa dir, use that instead.
53808         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53809         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53810 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53811       fi
53812     fi
53813   fi
53814 
53815   if test "x$FOUND_FREETYPE" = xyes; then
53816 
53817   # Only process if variable expands to non-empty
53818 
53819   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53820     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53821 
53822   # Input might be given as Windows format, start by converting to
53823   # unix format.
53824   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53825   new_path=`$CYGPATH -u "$path"`
53826 
53827   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53828   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53829   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53830   # "foo.exe" is OK but "foo" is an error.
53831   #
53832   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53833   # It is also a way to make sure we got the proper file name for the real test later on.
53834   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53835   if test "x$test_shortpath" = x; then
53836     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53837 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53838     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53839   fi
53840 
53841   # Call helper function which possibly converts this using DOS-style short mode.
53842   # If so, the updated path is stored in $new_path.
53843 
53844   input_path="$new_path"
53845   # Check if we need to convert this using DOS-style short mode. If the path
53846   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53847   # take no chances and rewrite it.
53848   # Note: m4 eats our [], so we need to use [ and ] instead.
53849   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53850   if test "x$has_forbidden_chars" != x; then
53851     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53852     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53853     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53854     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53855       # Going to short mode and back again did indeed matter. Since short mode is
53856       # case insensitive, let's make it lowercase to improve readability.
53857       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53858       # Now convert it back to Unix-style (cygpath)
53859       input_path=`$CYGPATH -u "$shortmode_path"`
53860       new_path="$input_path"
53861     fi
53862   fi
53863 
53864   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53865   if test "x$test_cygdrive_prefix" = x; then
53866     # As a simple fix, exclude /usr/bin since it's not a real path.
53867     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53868       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53869       # a path prefixed by /cygdrive for fixpath to work.
53870       new_path="$CYGWIN_ROOT_PATH$input_path"
53871     fi
53872   fi
53873 
53874 
53875   if test "x$path" != "x$new_path"; then
53876     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53877     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53878 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53879   fi
53880 
53881     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53882 
53883   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53884   has_colon=`$ECHO $path | $GREP ^.:`
53885   new_path="$path"
53886   if test "x$has_colon" = x; then
53887     # Not in mixed or Windows style, start by that.
53888     new_path=`cmd //c echo $path`
53889   fi
53890 
53891 
53892   input_path="$new_path"
53893   # Check if we need to convert this using DOS-style short mode. If the path
53894   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53895   # take no chances and rewrite it.
53896   # Note: m4 eats our [], so we need to use [ and ] instead.
53897   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53898   if test "x$has_forbidden_chars" != x; then
53899     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53900     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53901   fi
53902 
53903 
53904   windows_path="$new_path"
53905   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53906     unix_path=`$CYGPATH -u "$windows_path"`
53907     new_path="$unix_path"
53908   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53909     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53910     new_path="$unix_path"
53911   fi
53912 
53913   if test "x$path" != "x$new_path"; then
53914     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53915     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53916 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53917   fi
53918 
53919   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53920   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53921 
53922     else
53923       # We're on a unix platform. Hooray! :)
53924       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53925       has_space=`$ECHO "$path" | $GREP " "`
53926       if test "x$has_space" != x; then
53927         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53928 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53929         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53930       fi
53931 
53932       # Use eval to expand a potential ~
53933       eval path="$path"
53934       if test ! -f "$path" && test ! -d "$path"; then
53935         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53936       fi
53937 
53938       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53939     fi
53940   fi
53941 
53942 
53943   # Only process if variable expands to non-empty
53944 
53945   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53946     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53947 
53948   # Input might be given as Windows format, start by converting to
53949   # unix format.
53950   path="$POTENTIAL_FREETYPE_LIB_PATH"
53951   new_path=`$CYGPATH -u "$path"`
53952 
53953   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53954   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53955   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53956   # "foo.exe" is OK but "foo" is an error.
53957   #
53958   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53959   # It is also a way to make sure we got the proper file name for the real test later on.
53960   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53961   if test "x$test_shortpath" = x; then
53962     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53963 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53964     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53965   fi
53966 
53967   # Call helper function which possibly converts this using DOS-style short mode.
53968   # If so, the updated path is stored in $new_path.
53969 
53970   input_path="$new_path"
53971   # Check if we need to convert this using DOS-style short mode. If the path
53972   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53973   # take no chances and rewrite it.
53974   # Note: m4 eats our [], so we need to use [ and ] instead.
53975   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53976   if test "x$has_forbidden_chars" != x; then
53977     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53978     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53979     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53980     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53981       # Going to short mode and back again did indeed matter. Since short mode is
53982       # case insensitive, let's make it lowercase to improve readability.
53983       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53984       # Now convert it back to Unix-style (cygpath)
53985       input_path=`$CYGPATH -u "$shortmode_path"`
53986       new_path="$input_path"
53987     fi
53988   fi
53989 
53990   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53991   if test "x$test_cygdrive_prefix" = x; then
53992     # As a simple fix, exclude /usr/bin since it's not a real path.
53993     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53994       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53995       # a path prefixed by /cygdrive for fixpath to work.
53996       new_path="$CYGWIN_ROOT_PATH$input_path"
53997     fi
53998   fi
53999 
54000 
54001   if test "x$path" != "x$new_path"; then
54002     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54003     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54004 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54005   fi
54006 
54007     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54008 
54009   path="$POTENTIAL_FREETYPE_LIB_PATH"
54010   has_colon=`$ECHO $path | $GREP ^.:`
54011   new_path="$path"
54012   if test "x$has_colon" = x; then
54013     # Not in mixed or Windows style, start by that.
54014     new_path=`cmd //c echo $path`
54015   fi
54016 
54017 
54018   input_path="$new_path"
54019   # Check if we need to convert this using DOS-style short mode. If the path
54020   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54021   # take no chances and rewrite it.
54022   # Note: m4 eats our [], so we need to use [ and ] instead.
54023   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54024   if test "x$has_forbidden_chars" != x; then
54025     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54026     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54027   fi
54028 
54029 
54030   windows_path="$new_path"
54031   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54032     unix_path=`$CYGPATH -u "$windows_path"`
54033     new_path="$unix_path"
54034   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54035     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54036     new_path="$unix_path"
54037   fi
54038 
54039   if test "x$path" != "x$new_path"; then
54040     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54041     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54042 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54043   fi
54044 
54045   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54046   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54047 
54048     else
54049       # We're on a unix platform. Hooray! :)
54050       path="$POTENTIAL_FREETYPE_LIB_PATH"
54051       has_space=`$ECHO "$path" | $GREP " "`
54052       if test "x$has_space" != x; then
54053         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54054 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54055         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54056       fi
54057 
54058       # Use eval to expand a potential ~
54059       eval path="$path"
54060       if test ! -f "$path" && test ! -d "$path"; then
54061         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54062       fi
54063 
54064       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54065     fi
54066   fi
54067 
54068 
54069     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54070     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54071 $as_echo_n "checking for freetype includes... " >&6; }
54072     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54073 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54074     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54075     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54076 $as_echo_n "checking for freetype libraries... " >&6; }
54077     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54078 $as_echo "$FREETYPE_LIB_PATH" >&6; }
54079   fi
54080 
54081           fi
54082 
54083           if test "x$FOUND_FREETYPE" != xyes; then
54084             FREETYPE_BASE_DIR="$SYSROOT/usr"
54085             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54086 
54087   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54088   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
54089   METHOD="well-known location"
54090 
54091   # Let's start with an optimistic view of the world :-)
54092   FOUND_FREETYPE=yes
54093 
54094   # First look for the canonical freetype main include file ft2build.h.
54095   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54096     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54097     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54098     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54099       # Fail.
54100       FOUND_FREETYPE=no
54101     fi
54102   fi
54103 
54104   if test "x$FOUND_FREETYPE" = xyes; then
54105     # Include file found, let's continue the sanity check.
54106     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54107 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54108 
54109     # Reset to default value
54110     FREETYPE_BASE_NAME=freetype
54111     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54112     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54113       if test "x$OPENJDK_TARGET_OS" = xmacosx \
54114           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54115         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54116         # for the .6 version explicitly.
54117         FREETYPE_BASE_NAME=freetype.6
54118         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54119         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54120 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54121       else
54122         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54123 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54124         FOUND_FREETYPE=no
54125       fi
54126     else
54127       if test "x$OPENJDK_TARGET_OS" = xwindows; then
54128         # On Windows, we will need both .lib and .dll file.
54129         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54130           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54131 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54132           FOUND_FREETYPE=no
54133         fi
54134       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54135           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54136         # Found lib in isa dir, use that instead.
54137         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54138         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54139 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54140       fi
54141     fi
54142   fi
54143 
54144   if test "x$FOUND_FREETYPE" = xyes; then
54145 
54146   # Only process if variable expands to non-empty
54147 
54148   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54149     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54150 
54151   # Input might be given as Windows format, start by converting to
54152   # unix format.
54153   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54154   new_path=`$CYGPATH -u "$path"`
54155 
54156   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54157   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54158   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54159   # "foo.exe" is OK but "foo" is an error.
54160   #
54161   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54162   # It is also a way to make sure we got the proper file name for the real test later on.
54163   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54164   if test "x$test_shortpath" = x; then
54165     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54166 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54167     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54168   fi
54169 
54170   # Call helper function which possibly converts this using DOS-style short mode.
54171   # If so, the updated path is stored in $new_path.
54172 
54173   input_path="$new_path"
54174   # Check if we need to convert this using DOS-style short mode. If the path
54175   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54176   # take no chances and rewrite it.
54177   # Note: m4 eats our [], so we need to use [ and ] instead.
54178   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54179   if test "x$has_forbidden_chars" != x; then
54180     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54181     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54182     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54183     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54184       # Going to short mode and back again did indeed matter. Since short mode is
54185       # case insensitive, let's make it lowercase to improve readability.
54186       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54187       # Now convert it back to Unix-style (cygpath)
54188       input_path=`$CYGPATH -u "$shortmode_path"`
54189       new_path="$input_path"
54190     fi
54191   fi
54192 
54193   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54194   if test "x$test_cygdrive_prefix" = x; then
54195     # As a simple fix, exclude /usr/bin since it's not a real path.
54196     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54197       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54198       # a path prefixed by /cygdrive for fixpath to work.
54199       new_path="$CYGWIN_ROOT_PATH$input_path"
54200     fi
54201   fi
54202 
54203 
54204   if test "x$path" != "x$new_path"; then
54205     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54206     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54207 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54208   fi
54209 
54210     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54211 
54212   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54213   has_colon=`$ECHO $path | $GREP ^.:`
54214   new_path="$path"
54215   if test "x$has_colon" = x; then
54216     # Not in mixed or Windows style, start by that.
54217     new_path=`cmd //c echo $path`
54218   fi
54219 
54220 
54221   input_path="$new_path"
54222   # Check if we need to convert this using DOS-style short mode. If the path
54223   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54224   # take no chances and rewrite it.
54225   # Note: m4 eats our [], so we need to use [ and ] instead.
54226   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54227   if test "x$has_forbidden_chars" != x; then
54228     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54229     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54230   fi
54231 
54232 
54233   windows_path="$new_path"
54234   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54235     unix_path=`$CYGPATH -u "$windows_path"`
54236     new_path="$unix_path"
54237   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54238     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54239     new_path="$unix_path"
54240   fi
54241 
54242   if test "x$path" != "x$new_path"; then
54243     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54244     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54245 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54246   fi
54247 
54248   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54249   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54250 
54251     else
54252       # We're on a unix platform. Hooray! :)
54253       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54254       has_space=`$ECHO "$path" | $GREP " "`
54255       if test "x$has_space" != x; then
54256         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54257 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54258         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54259       fi
54260 
54261       # Use eval to expand a potential ~
54262       eval path="$path"
54263       if test ! -f "$path" && test ! -d "$path"; then
54264         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54265       fi
54266 
54267       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54268     fi
54269   fi
54270 
54271 
54272   # Only process if variable expands to non-empty
54273 
54274   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54275     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54276 
54277   # Input might be given as Windows format, start by converting to
54278   # unix format.
54279   path="$POTENTIAL_FREETYPE_LIB_PATH"
54280   new_path=`$CYGPATH -u "$path"`
54281 
54282   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54283   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54284   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54285   # "foo.exe" is OK but "foo" is an error.
54286   #
54287   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54288   # It is also a way to make sure we got the proper file name for the real test later on.
54289   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54290   if test "x$test_shortpath" = x; then
54291     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54292 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54293     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54294   fi
54295 
54296   # Call helper function which possibly converts this using DOS-style short mode.
54297   # If so, the updated path is stored in $new_path.
54298 
54299   input_path="$new_path"
54300   # Check if we need to convert this using DOS-style short mode. If the path
54301   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54302   # take no chances and rewrite it.
54303   # Note: m4 eats our [], so we need to use [ and ] instead.
54304   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54305   if test "x$has_forbidden_chars" != x; then
54306     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54307     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54308     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54309     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54310       # Going to short mode and back again did indeed matter. Since short mode is
54311       # case insensitive, let's make it lowercase to improve readability.
54312       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54313       # Now convert it back to Unix-style (cygpath)
54314       input_path=`$CYGPATH -u "$shortmode_path"`
54315       new_path="$input_path"
54316     fi
54317   fi
54318 
54319   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54320   if test "x$test_cygdrive_prefix" = x; then
54321     # As a simple fix, exclude /usr/bin since it's not a real path.
54322     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54323       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54324       # a path prefixed by /cygdrive for fixpath to work.
54325       new_path="$CYGWIN_ROOT_PATH$input_path"
54326     fi
54327   fi
54328 
54329 
54330   if test "x$path" != "x$new_path"; then
54331     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54332     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54333 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54334   fi
54335 
54336     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54337 
54338   path="$POTENTIAL_FREETYPE_LIB_PATH"
54339   has_colon=`$ECHO $path | $GREP ^.:`
54340   new_path="$path"
54341   if test "x$has_colon" = x; then
54342     # Not in mixed or Windows style, start by that.
54343     new_path=`cmd //c echo $path`
54344   fi
54345 
54346 
54347   input_path="$new_path"
54348   # Check if we need to convert this using DOS-style short mode. If the path
54349   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54350   # take no chances and rewrite it.
54351   # Note: m4 eats our [], so we need to use [ and ] instead.
54352   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54353   if test "x$has_forbidden_chars" != x; then
54354     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54355     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54356   fi
54357 
54358 
54359   windows_path="$new_path"
54360   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54361     unix_path=`$CYGPATH -u "$windows_path"`
54362     new_path="$unix_path"
54363   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54364     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54365     new_path="$unix_path"
54366   fi
54367 
54368   if test "x$path" != "x$new_path"; then
54369     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54370     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54371 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54372   fi
54373 
54374   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54375   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54376 
54377     else
54378       # We're on a unix platform. Hooray! :)
54379       path="$POTENTIAL_FREETYPE_LIB_PATH"
54380       has_space=`$ECHO "$path" | $GREP " "`
54381       if test "x$has_space" != x; then
54382         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54383 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54384         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54385       fi
54386 
54387       # Use eval to expand a potential ~
54388       eval path="$path"
54389       if test ! -f "$path" && test ! -d "$path"; then
54390         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54391       fi
54392 
54393       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54394     fi
54395   fi
54396 
54397 
54398     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54399     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54400 $as_echo_n "checking for freetype includes... " >&6; }
54401     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54402 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54403     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54404     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54405 $as_echo_n "checking for freetype libraries... " >&6; }
54406     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54407 $as_echo "$FREETYPE_LIB_PATH" >&6; }
54408   fi
54409 
54410             else
54411 
54412   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54413   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
54414   METHOD="well-known location"
54415 
54416   # Let's start with an optimistic view of the world :-)
54417   FOUND_FREETYPE=yes
54418 
54419   # First look for the canonical freetype main include file ft2build.h.
54420   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54421     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54422     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54423     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54424       # Fail.
54425       FOUND_FREETYPE=no
54426     fi
54427   fi
54428 
54429   if test "x$FOUND_FREETYPE" = xyes; then
54430     # Include file found, let's continue the sanity check.
54431     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54432 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54433 
54434     # Reset to default value
54435     FREETYPE_BASE_NAME=freetype
54436     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54437     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54438       if test "x$OPENJDK_TARGET_OS" = xmacosx \
54439           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54440         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54441         # for the .6 version explicitly.
54442         FREETYPE_BASE_NAME=freetype.6
54443         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54444         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54445 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54446       else
54447         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54448 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54449         FOUND_FREETYPE=no
54450       fi
54451     else
54452       if test "x$OPENJDK_TARGET_OS" = xwindows; then
54453         # On Windows, we will need both .lib and .dll file.
54454         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54455           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54456 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54457           FOUND_FREETYPE=no
54458         fi
54459       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54460           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54461         # Found lib in isa dir, use that instead.
54462         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54463         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54464 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54465       fi
54466     fi
54467   fi
54468 
54469   if test "x$FOUND_FREETYPE" = xyes; then
54470 
54471   # Only process if variable expands to non-empty
54472 
54473   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54474     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54475 
54476   # Input might be given as Windows format, start by converting to
54477   # unix format.
54478   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54479   new_path=`$CYGPATH -u "$path"`
54480 
54481   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54482   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54483   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54484   # "foo.exe" is OK but "foo" is an error.
54485   #
54486   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54487   # It is also a way to make sure we got the proper file name for the real test later on.
54488   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54489   if test "x$test_shortpath" = x; then
54490     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54491 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54492     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54493   fi
54494 
54495   # Call helper function which possibly converts this using DOS-style short mode.
54496   # If so, the updated path is stored in $new_path.
54497 
54498   input_path="$new_path"
54499   # Check if we need to convert this using DOS-style short mode. If the path
54500   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54501   # take no chances and rewrite it.
54502   # Note: m4 eats our [], so we need to use [ and ] instead.
54503   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54504   if test "x$has_forbidden_chars" != x; then
54505     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54506     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54507     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54508     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54509       # Going to short mode and back again did indeed matter. Since short mode is
54510       # case insensitive, let's make it lowercase to improve readability.
54511       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54512       # Now convert it back to Unix-style (cygpath)
54513       input_path=`$CYGPATH -u "$shortmode_path"`
54514       new_path="$input_path"
54515     fi
54516   fi
54517 
54518   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54519   if test "x$test_cygdrive_prefix" = x; then
54520     # As a simple fix, exclude /usr/bin since it's not a real path.
54521     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54522       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54523       # a path prefixed by /cygdrive for fixpath to work.
54524       new_path="$CYGWIN_ROOT_PATH$input_path"
54525     fi
54526   fi
54527 
54528 
54529   if test "x$path" != "x$new_path"; then
54530     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54531     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54532 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54533   fi
54534 
54535     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54536 
54537   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54538   has_colon=`$ECHO $path | $GREP ^.:`
54539   new_path="$path"
54540   if test "x$has_colon" = x; then
54541     # Not in mixed or Windows style, start by that.
54542     new_path=`cmd //c echo $path`
54543   fi
54544 
54545 
54546   input_path="$new_path"
54547   # Check if we need to convert this using DOS-style short mode. If the path
54548   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54549   # take no chances and rewrite it.
54550   # Note: m4 eats our [], so we need to use [ and ] instead.
54551   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54552   if test "x$has_forbidden_chars" != x; then
54553     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54554     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54555   fi
54556 
54557 
54558   windows_path="$new_path"
54559   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54560     unix_path=`$CYGPATH -u "$windows_path"`
54561     new_path="$unix_path"
54562   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54563     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54564     new_path="$unix_path"
54565   fi
54566 
54567   if test "x$path" != "x$new_path"; then
54568     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54569     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54570 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54571   fi
54572 
54573   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54574   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54575 
54576     else
54577       # We're on a unix platform. Hooray! :)
54578       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54579       has_space=`$ECHO "$path" | $GREP " "`
54580       if test "x$has_space" != x; then
54581         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54582 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54583         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54584       fi
54585 
54586       # Use eval to expand a potential ~
54587       eval path="$path"
54588       if test ! -f "$path" && test ! -d "$path"; then
54589         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54590       fi
54591 
54592       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54593     fi
54594   fi
54595 
54596 
54597   # Only process if variable expands to non-empty
54598 
54599   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54600     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54601 
54602   # Input might be given as Windows format, start by converting to
54603   # unix format.
54604   path="$POTENTIAL_FREETYPE_LIB_PATH"
54605   new_path=`$CYGPATH -u "$path"`
54606 
54607   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54608   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54609   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54610   # "foo.exe" is OK but "foo" is an error.
54611   #
54612   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54613   # It is also a way to make sure we got the proper file name for the real test later on.
54614   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54615   if test "x$test_shortpath" = x; then
54616     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54617 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54618     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54619   fi
54620 
54621   # Call helper function which possibly converts this using DOS-style short mode.
54622   # If so, the updated path is stored in $new_path.
54623 
54624   input_path="$new_path"
54625   # Check if we need to convert this using DOS-style short mode. If the path
54626   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54627   # take no chances and rewrite it.
54628   # Note: m4 eats our [], so we need to use [ and ] instead.
54629   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54630   if test "x$has_forbidden_chars" != x; then
54631     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54632     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54633     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54634     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54635       # Going to short mode and back again did indeed matter. Since short mode is
54636       # case insensitive, let's make it lowercase to improve readability.
54637       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54638       # Now convert it back to Unix-style (cygpath)
54639       input_path=`$CYGPATH -u "$shortmode_path"`
54640       new_path="$input_path"
54641     fi
54642   fi
54643 
54644   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54645   if test "x$test_cygdrive_prefix" = x; then
54646     # As a simple fix, exclude /usr/bin since it's not a real path.
54647     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54648       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54649       # a path prefixed by /cygdrive for fixpath to work.
54650       new_path="$CYGWIN_ROOT_PATH$input_path"
54651     fi
54652   fi
54653 
54654 
54655   if test "x$path" != "x$new_path"; then
54656     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54657     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54658 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54659   fi
54660 
54661     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54662 
54663   path="$POTENTIAL_FREETYPE_LIB_PATH"
54664   has_colon=`$ECHO $path | $GREP ^.:`
54665   new_path="$path"
54666   if test "x$has_colon" = x; then
54667     # Not in mixed or Windows style, start by that.
54668     new_path=`cmd //c echo $path`
54669   fi
54670 
54671 
54672   input_path="$new_path"
54673   # Check if we need to convert this using DOS-style short mode. If the path
54674   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54675   # take no chances and rewrite it.
54676   # Note: m4 eats our [], so we need to use [ and ] instead.
54677   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54678   if test "x$has_forbidden_chars" != x; then
54679     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54680     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54681   fi
54682 
54683 
54684   windows_path="$new_path"
54685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54686     unix_path=`$CYGPATH -u "$windows_path"`
54687     new_path="$unix_path"
54688   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54689     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54690     new_path="$unix_path"
54691   fi
54692 
54693   if test "x$path" != "x$new_path"; then
54694     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54695     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54696 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54697   fi
54698 
54699   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54700   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54701 
54702     else
54703       # We're on a unix platform. Hooray! :)
54704       path="$POTENTIAL_FREETYPE_LIB_PATH"
54705       has_space=`$ECHO "$path" | $GREP " "`
54706       if test "x$has_space" != x; then
54707         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54708 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54709         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54710       fi
54711 
54712       # Use eval to expand a potential ~
54713       eval path="$path"
54714       if test ! -f "$path" && test ! -d "$path"; then
54715         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54716       fi
54717 
54718       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54719     fi
54720   fi
54721 
54722 
54723     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54724     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54725 $as_echo_n "checking for freetype includes... " >&6; }
54726     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54727 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54728     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54729     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54730 $as_echo_n "checking for freetype libraries... " >&6; }
54731     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54732 $as_echo "$FREETYPE_LIB_PATH" >&6; }
54733   fi
54734 
54735               if test "x$FOUND_FREETYPE" != xyes; then
54736 
54737   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54738   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
54739   METHOD="well-known location"
54740 
54741   # Let's start with an optimistic view of the world :-)
54742   FOUND_FREETYPE=yes
54743 
54744   # First look for the canonical freetype main include file ft2build.h.
54745   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54746     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54747     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54748     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54749       # Fail.
54750       FOUND_FREETYPE=no
54751     fi
54752   fi
54753 
54754   if test "x$FOUND_FREETYPE" = xyes; then
54755     # Include file found, let's continue the sanity check.
54756     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54757 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54758 
54759     # Reset to default value
54760     FREETYPE_BASE_NAME=freetype
54761     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54762     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54763       if test "x$OPENJDK_TARGET_OS" = xmacosx \
54764           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54765         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54766         # for the .6 version explicitly.
54767         FREETYPE_BASE_NAME=freetype.6
54768         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54769         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54770 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54771       else
54772         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54773 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54774         FOUND_FREETYPE=no
54775       fi
54776     else
54777       if test "x$OPENJDK_TARGET_OS" = xwindows; then
54778         # On Windows, we will need both .lib and .dll file.
54779         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54780           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54781 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54782           FOUND_FREETYPE=no
54783         fi
54784       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54785           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54786         # Found lib in isa dir, use that instead.
54787         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54788         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54789 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54790       fi
54791     fi
54792   fi
54793 
54794   if test "x$FOUND_FREETYPE" = xyes; then
54795 
54796   # Only process if variable expands to non-empty
54797 
54798   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54799     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54800 
54801   # Input might be given as Windows format, start by converting to
54802   # unix format.
54803   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54804   new_path=`$CYGPATH -u "$path"`
54805 
54806   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54807   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54808   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54809   # "foo.exe" is OK but "foo" is an error.
54810   #
54811   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54812   # It is also a way to make sure we got the proper file name for the real test later on.
54813   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54814   if test "x$test_shortpath" = x; then
54815     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54816 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54817     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54818   fi
54819 
54820   # Call helper function which possibly converts this using DOS-style short mode.
54821   # If so, the updated path is stored in $new_path.
54822 
54823   input_path="$new_path"
54824   # Check if we need to convert this using DOS-style short mode. If the path
54825   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54826   # take no chances and rewrite it.
54827   # Note: m4 eats our [], so we need to use [ and ] instead.
54828   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54829   if test "x$has_forbidden_chars" != x; then
54830     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54831     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54832     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54833     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54834       # Going to short mode and back again did indeed matter. Since short mode is
54835       # case insensitive, let's make it lowercase to improve readability.
54836       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54837       # Now convert it back to Unix-style (cygpath)
54838       input_path=`$CYGPATH -u "$shortmode_path"`
54839       new_path="$input_path"
54840     fi
54841   fi
54842 
54843   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54844   if test "x$test_cygdrive_prefix" = x; then
54845     # As a simple fix, exclude /usr/bin since it's not a real path.
54846     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54847       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54848       # a path prefixed by /cygdrive for fixpath to work.
54849       new_path="$CYGWIN_ROOT_PATH$input_path"
54850     fi
54851   fi
54852 
54853 
54854   if test "x$path" != "x$new_path"; then
54855     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54856     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54857 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54858   fi
54859 
54860     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54861 
54862   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54863   has_colon=`$ECHO $path | $GREP ^.:`
54864   new_path="$path"
54865   if test "x$has_colon" = x; then
54866     # Not in mixed or Windows style, start by that.
54867     new_path=`cmd //c echo $path`
54868   fi
54869 
54870 
54871   input_path="$new_path"
54872   # Check if we need to convert this using DOS-style short mode. If the path
54873   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54874   # take no chances and rewrite it.
54875   # Note: m4 eats our [], so we need to use [ and ] instead.
54876   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54877   if test "x$has_forbidden_chars" != x; then
54878     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54879     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54880   fi
54881 
54882 
54883   windows_path="$new_path"
54884   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54885     unix_path=`$CYGPATH -u "$windows_path"`
54886     new_path="$unix_path"
54887   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54888     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54889     new_path="$unix_path"
54890   fi
54891 
54892   if test "x$path" != "x$new_path"; then
54893     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54894     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54895 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54896   fi
54897 
54898   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54899   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54900 
54901     else
54902       # We're on a unix platform. Hooray! :)
54903       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54904       has_space=`$ECHO "$path" | $GREP " "`
54905       if test "x$has_space" != x; then
54906         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54907 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54908         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54909       fi
54910 
54911       # Use eval to expand a potential ~
54912       eval path="$path"
54913       if test ! -f "$path" && test ! -d "$path"; then
54914         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54915       fi
54916 
54917       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54918     fi
54919   fi
54920 
54921 
54922   # Only process if variable expands to non-empty
54923 
54924   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54925     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54926 
54927   # Input might be given as Windows format, start by converting to
54928   # unix format.
54929   path="$POTENTIAL_FREETYPE_LIB_PATH"
54930   new_path=`$CYGPATH -u "$path"`
54931 
54932   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54933   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54934   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54935   # "foo.exe" is OK but "foo" is an error.
54936   #
54937   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54938   # It is also a way to make sure we got the proper file name for the real test later on.
54939   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54940   if test "x$test_shortpath" = x; then
54941     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54942 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54943     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54944   fi
54945 
54946   # Call helper function which possibly converts this using DOS-style short mode.
54947   # If so, the updated path is stored in $new_path.
54948 
54949   input_path="$new_path"
54950   # Check if we need to convert this using DOS-style short mode. If the path
54951   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54952   # take no chances and rewrite it.
54953   # Note: m4 eats our [], so we need to use [ and ] instead.
54954   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54955   if test "x$has_forbidden_chars" != x; then
54956     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54957     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54958     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54959     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54960       # Going to short mode and back again did indeed matter. Since short mode is
54961       # case insensitive, let's make it lowercase to improve readability.
54962       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54963       # Now convert it back to Unix-style (cygpath)
54964       input_path=`$CYGPATH -u "$shortmode_path"`
54965       new_path="$input_path"
54966     fi
54967   fi
54968 
54969   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54970   if test "x$test_cygdrive_prefix" = x; then
54971     # As a simple fix, exclude /usr/bin since it's not a real path.
54972     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54973       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54974       # a path prefixed by /cygdrive for fixpath to work.
54975       new_path="$CYGWIN_ROOT_PATH$input_path"
54976     fi
54977   fi
54978 
54979 
54980   if test "x$path" != "x$new_path"; then
54981     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54982     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54983 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54984   fi
54985 
54986     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54987 
54988   path="$POTENTIAL_FREETYPE_LIB_PATH"
54989   has_colon=`$ECHO $path | $GREP ^.:`
54990   new_path="$path"
54991   if test "x$has_colon" = x; then
54992     # Not in mixed or Windows style, start by that.
54993     new_path=`cmd //c echo $path`
54994   fi
54995 
54996 
54997   input_path="$new_path"
54998   # Check if we need to convert this using DOS-style short mode. If the path
54999   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55000   # take no chances and rewrite it.
55001   # Note: m4 eats our [], so we need to use [ and ] instead.
55002   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55003   if test "x$has_forbidden_chars" != x; then
55004     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55005     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55006   fi
55007 
55008 
55009   windows_path="$new_path"
55010   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55011     unix_path=`$CYGPATH -u "$windows_path"`
55012     new_path="$unix_path"
55013   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55014     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55015     new_path="$unix_path"
55016   fi
55017 
55018   if test "x$path" != "x$new_path"; then
55019     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55020     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55021 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55022   fi
55023 
55024   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55025   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55026 
55027     else
55028       # We're on a unix platform. Hooray! :)
55029       path="$POTENTIAL_FREETYPE_LIB_PATH"
55030       has_space=`$ECHO "$path" | $GREP " "`
55031       if test "x$has_space" != x; then
55032         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55033 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55034         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55035       fi
55036 
55037       # Use eval to expand a potential ~
55038       eval path="$path"
55039       if test ! -f "$path" && test ! -d "$path"; then
55040         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55041       fi
55042 
55043       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55044     fi
55045   fi
55046 
55047 
55048     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55049     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55050 $as_echo_n "checking for freetype includes... " >&6; }
55051     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55052 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55053     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55054     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55055 $as_echo_n "checking for freetype libraries... " >&6; }
55056     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55057 $as_echo "$FREETYPE_LIB_PATH" >&6; }
55058   fi
55059 
55060               fi
55061             fi
55062           fi
55063         fi
55064       fi # end check in well-known locations
55065 
55066       if test "x$FOUND_FREETYPE" != xyes; then
55067 
55068   # Print a helpful message on how to acquire the necessary build dependency.
55069   # freetype is the help tag: freetype, cups, alsa etc
55070   MISSING_DEPENDENCY=freetype
55071 
55072   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55073     cygwin_help $MISSING_DEPENDENCY
55074   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55075     msys_help $MISSING_DEPENDENCY
55076   else
55077     PKGHANDLER_COMMAND=
55078 
55079     case $PKGHANDLER in
55080       apt-get)
55081         apt_help     $MISSING_DEPENDENCY ;;
55082       yum)
55083         yum_help     $MISSING_DEPENDENCY ;;
55084       port)
55085         port_help    $MISSING_DEPENDENCY ;;
55086       pkgutil)
55087         pkgutil_help $MISSING_DEPENDENCY ;;
55088       pkgadd)
55089         pkgadd_help  $MISSING_DEPENDENCY ;;
55090     esac
55091 
55092     if test "x$PKGHANDLER_COMMAND" != x; then
55093       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55094     fi
55095   fi
55096 
55097         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
55098       fi
55099     fi # end user specified settings
55100 
55101     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
55102     if test "x$FREETYPE_CFLAGS" = x; then
55103 
55104   # Only process if variable expands to non-empty
55105 
55106   if test "x$FREETYPE_INCLUDE_PATH" != x; then
55107     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55108 
55109   # Input might be given as Windows format, start by converting to
55110   # unix format.
55111   path="$FREETYPE_INCLUDE_PATH"
55112   new_path=`$CYGPATH -u "$path"`
55113 
55114   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55115   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55116   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55117   # "foo.exe" is OK but "foo" is an error.
55118   #
55119   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55120   # It is also a way to make sure we got the proper file name for the real test later on.
55121   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55122   if test "x$test_shortpath" = x; then
55123     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55124 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55125     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
55126   fi
55127 
55128   # Call helper function which possibly converts this using DOS-style short mode.
55129   # If so, the updated path is stored in $new_path.
55130 
55131   input_path="$new_path"
55132   # Check if we need to convert this using DOS-style short mode. If the path
55133   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55134   # take no chances and rewrite it.
55135   # Note: m4 eats our [], so we need to use [ and ] instead.
55136   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55137   if test "x$has_forbidden_chars" != x; then
55138     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55139     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55140     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55141     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55142       # Going to short mode and back again did indeed matter. Since short mode is
55143       # case insensitive, let's make it lowercase to improve readability.
55144       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55145       # Now convert it back to Unix-style (cygpath)
55146       input_path=`$CYGPATH -u "$shortmode_path"`
55147       new_path="$input_path"
55148     fi
55149   fi
55150 
55151   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55152   if test "x$test_cygdrive_prefix" = x; then
55153     # As a simple fix, exclude /usr/bin since it's not a real path.
55154     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55155       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55156       # a path prefixed by /cygdrive for fixpath to work.
55157       new_path="$CYGWIN_ROOT_PATH$input_path"
55158     fi
55159   fi
55160 
55161 
55162   if test "x$path" != "x$new_path"; then
55163     FREETYPE_INCLUDE_PATH="$new_path"
55164     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55165 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55166   fi
55167 
55168     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55169 
55170   path="$FREETYPE_INCLUDE_PATH"
55171   has_colon=`$ECHO $path | $GREP ^.:`
55172   new_path="$path"
55173   if test "x$has_colon" = x; then
55174     # Not in mixed or Windows style, start by that.
55175     new_path=`cmd //c echo $path`
55176   fi
55177 
55178 
55179   input_path="$new_path"
55180   # Check if we need to convert this using DOS-style short mode. If the path
55181   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55182   # take no chances and rewrite it.
55183   # Note: m4 eats our [], so we need to use [ and ] instead.
55184   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55185   if test "x$has_forbidden_chars" != x; then
55186     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55187     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55188   fi
55189 
55190 
55191   windows_path="$new_path"
55192   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55193     unix_path=`$CYGPATH -u "$windows_path"`
55194     new_path="$unix_path"
55195   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55196     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55197     new_path="$unix_path"
55198   fi
55199 
55200   if test "x$path" != "x$new_path"; then
55201     FREETYPE_INCLUDE_PATH="$new_path"
55202     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55203 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55204   fi
55205 
55206   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55207   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55208 
55209     else
55210       # We're on a unix platform. Hooray! :)
55211       path="$FREETYPE_INCLUDE_PATH"
55212       has_space=`$ECHO "$path" | $GREP " "`
55213       if test "x$has_space" != x; then
55214         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55215 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55216         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55217       fi
55218 
55219       # Use eval to expand a potential ~
55220       eval path="$path"
55221       if test ! -f "$path" && test ! -d "$path"; then
55222         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55223       fi
55224 
55225       FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55226     fi
55227   fi
55228 
55229       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
55230         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
55231       else
55232         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
55233       fi
55234     fi
55235 
55236     if test "x$FREETYPE_LIBS" = x; then
55237 
55238   # Only process if variable expands to non-empty
55239 
55240   if test "x$FREETYPE_LIB_PATH" != x; then
55241     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55242 
55243   # Input might be given as Windows format, start by converting to
55244   # unix format.
55245   path="$FREETYPE_LIB_PATH"
55246   new_path=`$CYGPATH -u "$path"`
55247 
55248   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55249   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55250   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55251   # "foo.exe" is OK but "foo" is an error.
55252   #
55253   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55254   # It is also a way to make sure we got the proper file name for the real test later on.
55255   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55256   if test "x$test_shortpath" = x; then
55257     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55258 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55259     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
55260   fi
55261 
55262   # Call helper function which possibly converts this using DOS-style short mode.
55263   # If so, the updated path is stored in $new_path.
55264 
55265   input_path="$new_path"
55266   # Check if we need to convert this using DOS-style short mode. If the path
55267   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55268   # take no chances and rewrite it.
55269   # Note: m4 eats our [], so we need to use [ and ] instead.
55270   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55271   if test "x$has_forbidden_chars" != x; then
55272     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55273     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55274     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55275     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55276       # Going to short mode and back again did indeed matter. Since short mode is
55277       # case insensitive, let's make it lowercase to improve readability.
55278       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55279       # Now convert it back to Unix-style (cygpath)
55280       input_path=`$CYGPATH -u "$shortmode_path"`
55281       new_path="$input_path"
55282     fi
55283   fi
55284 
55285   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55286   if test "x$test_cygdrive_prefix" = x; then
55287     # As a simple fix, exclude /usr/bin since it's not a real path.
55288     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55289       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55290       # a path prefixed by /cygdrive for fixpath to work.
55291       new_path="$CYGWIN_ROOT_PATH$input_path"
55292     fi
55293   fi
55294 
55295 
55296   if test "x$path" != "x$new_path"; then
55297     FREETYPE_LIB_PATH="$new_path"
55298     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
55299 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55300   fi
55301 
55302     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55303 
55304   path="$FREETYPE_LIB_PATH"
55305   has_colon=`$ECHO $path | $GREP ^.:`
55306   new_path="$path"
55307   if test "x$has_colon" = x; then
55308     # Not in mixed or Windows style, start by that.
55309     new_path=`cmd //c echo $path`
55310   fi
55311 
55312 
55313   input_path="$new_path"
55314   # Check if we need to convert this using DOS-style short mode. If the path
55315   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55316   # take no chances and rewrite it.
55317   # Note: m4 eats our [], so we need to use [ and ] instead.
55318   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55319   if test "x$has_forbidden_chars" != x; then
55320     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55321     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55322   fi
55323 
55324 
55325   windows_path="$new_path"
55326   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55327     unix_path=`$CYGPATH -u "$windows_path"`
55328     new_path="$unix_path"
55329   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55330     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55331     new_path="$unix_path"
55332   fi
55333 
55334   if test "x$path" != "x$new_path"; then
55335     FREETYPE_LIB_PATH="$new_path"
55336     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
55337 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55338   fi
55339 
55340   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55341   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55342 
55343     else
55344       # We're on a unix platform. Hooray! :)
55345       path="$FREETYPE_LIB_PATH"
55346       has_space=`$ECHO "$path" | $GREP " "`
55347       if test "x$has_space" != x; then
55348         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55349 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55350         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55351       fi
55352 
55353       # Use eval to expand a potential ~
55354       eval path="$path"
55355       if test ! -f "$path" && test ! -d "$path"; then
55356         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55357       fi
55358 
55359       FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55360     fi
55361   fi
55362 
55363       if test "x$OPENJDK_TARGET_OS" = xwindows; then
55364         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
55365       else
55366         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
55367       fi
55368     fi
55369 
55370     # Try to compile it
55371     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
55372 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
55373     ac_ext=cpp
55374 ac_cpp='$CXXCPP $CPPFLAGS'
55375 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55376 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55377 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
55378 
55379     PREV_CXXCFLAGS="$CXXFLAGS"
55380     PREV_LIBS="$LIBS"
55381     PREV_CXX="$CXX"
55382     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
55383     LIBS="$LIBS $FREETYPE_LIBS"
55384     CXX="$FIXPATH $CXX"
55385     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55386 /* end confdefs.h.  */
55387 
55388           #include<ft2build.h>
55389           #include FT_FREETYPE_H
55390           int main () {
55391             FT_Init_FreeType(NULL);
55392             return 0;
55393           }
55394 
55395 _ACEOF
55396 if ac_fn_cxx_try_link "$LINENO"; then :
55397 
55398           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55399 $as_echo "yes" >&6; }
55400 
55401 else
55402 
55403           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55404 $as_echo "no" >&6; }
55405           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
55406 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
55407           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
55408 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
55409 
55410 
55411   # Print a helpful message on how to acquire the necessary build dependency.
55412   # freetype is the help tag: freetype, cups, alsa etc
55413   MISSING_DEPENDENCY=freetype
55414 
55415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55416     cygwin_help $MISSING_DEPENDENCY
55417   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55418     msys_help $MISSING_DEPENDENCY
55419   else
55420     PKGHANDLER_COMMAND=
55421 
55422     case $PKGHANDLER in
55423       apt-get)
55424         apt_help     $MISSING_DEPENDENCY ;;
55425       yum)
55426         yum_help     $MISSING_DEPENDENCY ;;
55427       port)
55428         port_help    $MISSING_DEPENDENCY ;;
55429       pkgutil)
55430         pkgutil_help $MISSING_DEPENDENCY ;;
55431       pkgadd)
55432         pkgadd_help  $MISSING_DEPENDENCY ;;
55433     esac
55434 
55435     if test "x$PKGHANDLER_COMMAND" != x; then
55436       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55437     fi
55438   fi
55439 
55440 
55441           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
55442 
55443 
55444 fi
55445 rm -f core conftest.err conftest.$ac_objext \
55446     conftest$ac_exeext conftest.$ac_ext
55447     CXXCFLAGS="$PREV_CXXFLAGS"
55448     LIBS="$PREV_LIBS"
55449     CXX="$PREV_CXX"
55450     ac_ext=cpp
55451 ac_cpp='$CXXCPP $CPPFLAGS'
55452 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55453 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55454 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
55455 
55456 
55457     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
55458 $as_echo_n "checking if we should bundle freetype... " >&6; }
55459     if test "x$BUNDLE_FREETYPE" = xyes; then
55460       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
55461     fi
55462     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
55463 $as_echo "$BUNDLE_FREETYPE" >&6; }
55464 
55465   fi # end freetype needed
55466 
55467 
55468 
55469 
55470 
55471 
55472 
55473 # Check whether --with-alsa was given.
55474 if test "${with_alsa+set}" = set; then :
55475   withval=$with_alsa;
55476 fi
55477 
55478 
55479 # Check whether --with-alsa-include was given.
55480 if test "${with_alsa_include+set}" = set; then :
55481   withval=$with_alsa_include;
55482 fi
55483 
55484 
55485 # Check whether --with-alsa-lib was given.
55486 if test "${with_alsa_lib+set}" = set; then :
55487   withval=$with_alsa_lib;
55488 fi
55489 
55490 
55491   if test "x$NEEDS_LIB_ALSA" = xfalse; then
55492     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
55493         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
55494         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
55495       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
55496 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
55497     fi
55498     ALSA_CFLAGS=
55499     ALSA_LIBS=
55500   else
55501     ALSA_FOUND=no
55502 
55503     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
55504       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
55505     fi
55506 
55507     if test "x${with_alsa}" != x; then
55508       ALSA_LIBS="-L${with_alsa}/lib -lasound"
55509       ALSA_CFLAGS="-I${with_alsa}/include"
55510       ALSA_FOUND=yes
55511     fi
55512     if test "x${with_alsa_include}" != x; then
55513       ALSA_CFLAGS="-I${with_alsa_include}"
55514       ALSA_FOUND=yes
55515     fi
55516     if test "x${with_alsa_lib}" != x; then
55517       ALSA_LIBS="-L${with_alsa_lib} -lasound"
55518       ALSA_FOUND=yes
55519     fi
55520     # Do not try pkg-config if we have a sysroot set.
55521     if test "x$SYSROOT" = x; then
55522       if test "x$ALSA_FOUND" = xno; then
55523 
55524 pkg_failed=no
55525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
55526 $as_echo_n "checking for ALSA... " >&6; }
55527 
55528 if test -n "$ALSA_CFLAGS"; then
55529     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
55530  elif test -n "$PKG_CONFIG"; then
55531     if test -n "$PKG_CONFIG" && \
55532     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
55533   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
55534   ac_status=$?
55535   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55536   test $ac_status = 0; }; then
55537   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
55538 else
55539   pkg_failed=yes
55540 fi
55541  else
55542     pkg_failed=untried
55543 fi
55544 if test -n "$ALSA_LIBS"; then
55545     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
55546  elif test -n "$PKG_CONFIG"; then
55547     if test -n "$PKG_CONFIG" && \
55548     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
55549   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
55550   ac_status=$?
55551   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55552   test $ac_status = 0; }; then
55553   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
55554 else
55555   pkg_failed=yes
55556 fi
55557  else
55558     pkg_failed=untried
55559 fi
55560 
55561 
55562 
55563 if test $pkg_failed = yes; then
55564 
55565 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55566         _pkg_short_errors_supported=yes
55567 else
55568         _pkg_short_errors_supported=no
55569 fi
55570         if test $_pkg_short_errors_supported = yes; then
55571                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
55572         else
55573                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
55574         fi
55575         # Put the nasty error message in config.log where it belongs
55576         echo "$ALSA_PKG_ERRORS" >&5
55577 
55578         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55579 $as_echo "no" >&6; }
55580                 ALSA_FOUND=no
55581 elif test $pkg_failed = untried; then
55582         ALSA_FOUND=no
55583 else
55584         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
55585         ALSA_LIBS=$pkg_cv_ALSA_LIBS
55586         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55587 $as_echo "yes" >&6; }
55588         ALSA_FOUND=yes
55589 fi
55590       fi
55591     fi
55592     if test "x$ALSA_FOUND" = xno; then
55593       for ac_header in alsa/asoundlib.h
55594 do :
55595   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
55596 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
55597   cat >>confdefs.h <<_ACEOF
55598 #define HAVE_ALSA_ASOUNDLIB_H 1
55599 _ACEOF
55600 
55601             ALSA_FOUND=yes
55602             ALSA_CFLAGS=-Iignoreme
55603             ALSA_LIBS=-lasound
55604             DEFAULT_ALSA=yes
55605 
55606 else
55607   ALSA_FOUND=no
55608 
55609 fi
55610 
55611 done
55612 
55613     fi
55614     if test "x$ALSA_FOUND" = xno; then
55615 
55616   # Print a helpful message on how to acquire the necessary build dependency.
55617   # alsa is the help tag: freetype, cups, alsa etc
55618   MISSING_DEPENDENCY=alsa
55619 
55620   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55621     cygwin_help $MISSING_DEPENDENCY
55622   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55623     msys_help $MISSING_DEPENDENCY
55624   else
55625     PKGHANDLER_COMMAND=
55626 
55627     case $PKGHANDLER in
55628       apt-get)
55629         apt_help     $MISSING_DEPENDENCY ;;
55630       yum)
55631         yum_help     $MISSING_DEPENDENCY ;;
55632       port)
55633         port_help    $MISSING_DEPENDENCY ;;
55634       pkgutil)
55635         pkgutil_help $MISSING_DEPENDENCY ;;
55636       pkgadd)
55637         pkgadd_help  $MISSING_DEPENDENCY ;;
55638     esac
55639 
55640     if test "x$PKGHANDLER_COMMAND" != x; then
55641       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55642     fi
55643   fi
55644 
55645       as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
55646     fi
55647   fi
55648 
55649 
55650 
55651 
55652 
55653 
55654 # Check whether --with-libffi was given.
55655 if test "${with_libffi+set}" = set; then :
55656   withval=$with_libffi;
55657 fi
55658 
55659 
55660 # Check whether --with-libffi-include was given.
55661 if test "${with_libffi_include+set}" = set; then :
55662   withval=$with_libffi_include;
55663 fi
55664 
55665 
55666 # Check whether --with-libffi-lib was given.
55667 if test "${with_libffi_lib+set}" = set; then :
55668   withval=$with_libffi_lib;
55669 fi
55670 
55671 
55672   if test "x$NEEDS_LIB_FFI" = xfalse; then
55673     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
55674         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
55675         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
55676       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
55677 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
55678     fi
55679     LIBFFI_CFLAGS=
55680     LIBFFI_LIBS=
55681   else
55682     LIBFFI_FOUND=no
55683 
55684     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
55685       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
55686     fi
55687 
55688     if test "x${with_libffi}" != x; then
55689       LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
55690       LIBFFI_CFLAGS="-I${with_libffi}/include"
55691       LIBFFI_FOUND=yes
55692     fi
55693     if test "x${with_libffi_include}" != x; then
55694       LIBFFI_CFLAGS="-I${with_libffi_include}"
55695       LIBFFI_FOUND=yes
55696     fi
55697     if test "x${with_libffi_lib}" != x; then
55698       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
55699       LIBFFI_FOUND=yes
55700     fi
55701     # Do not try pkg-config if we have a sysroot set.
55702     if test "x$SYSROOT" = x; then
55703       if test "x$LIBFFI_FOUND" = xno; then
55704         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
55705 
55706 pkg_failed=no
55707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
55708 $as_echo_n "checking for LIBFFI... " >&6; }
55709 
55710 if test -n "$LIBFFI_CFLAGS"; then
55711     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
55712  elif test -n "$PKG_CONFIG"; then
55713     if test -n "$PKG_CONFIG" && \
55714     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
55715   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
55716   ac_status=$?
55717   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55718   test $ac_status = 0; }; then
55719   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
55720 else
55721   pkg_failed=yes
55722 fi
55723  else
55724     pkg_failed=untried
55725 fi
55726 if test -n "$LIBFFI_LIBS"; then
55727     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
55728  elif test -n "$PKG_CONFIG"; then
55729     if test -n "$PKG_CONFIG" && \
55730     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
55731   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
55732   ac_status=$?
55733   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55734   test $ac_status = 0; }; then
55735   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
55736 else
55737   pkg_failed=yes
55738 fi
55739  else
55740     pkg_failed=untried
55741 fi
55742 
55743 
55744 
55745 if test $pkg_failed = yes; then
55746 
55747 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55748         _pkg_short_errors_supported=yes
55749 else
55750         _pkg_short_errors_supported=no
55751 fi
55752         if test $_pkg_short_errors_supported = yes; then
55753                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
55754         else
55755                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
55756         fi
55757         # Put the nasty error message in config.log where it belongs
55758         echo "$LIBFFI_PKG_ERRORS" >&5
55759 
55760         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55761 $as_echo "no" >&6; }
55762                 LIBFFI_FOUND=no
55763 elif test $pkg_failed = untried; then
55764         LIBFFI_FOUND=no
55765 else
55766         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
55767         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
55768         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55769 $as_echo "yes" >&6; }
55770         LIBFFI_FOUND=yes
55771 fi
55772       fi
55773     fi
55774     if test "x$LIBFFI_FOUND" = xno; then
55775       for ac_header in ffi.h
55776 do :
55777   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
55778 if test "x$ac_cv_header_ffi_h" = xyes; then :
55779   cat >>confdefs.h <<_ACEOF
55780 #define HAVE_FFI_H 1
55781 _ACEOF
55782 
55783             LIBFFI_FOUND=yes
55784             LIBFFI_CFLAGS=
55785             LIBFFI_LIBS=-lffi
55786 
55787 else
55788   LIBFFI_FOUND=no
55789 
55790 fi
55791 
55792 done
55793 
55794     fi
55795     if test "x$LIBFFI_FOUND" = xno; then
55796 
55797   # Print a helpful message on how to acquire the necessary build dependency.
55798   # ffi is the help tag: freetype, cups, alsa etc
55799   MISSING_DEPENDENCY=ffi
55800 
55801   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55802     cygwin_help $MISSING_DEPENDENCY
55803   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55804     msys_help $MISSING_DEPENDENCY
55805   else
55806     PKGHANDLER_COMMAND=
55807 
55808     case $PKGHANDLER in
55809       apt-get)
55810         apt_help     $MISSING_DEPENDENCY ;;
55811       yum)
55812         yum_help     $MISSING_DEPENDENCY ;;
55813       port)
55814         port_help    $MISSING_DEPENDENCY ;;
55815       pkgutil)
55816         pkgutil_help $MISSING_DEPENDENCY ;;
55817       pkgadd)
55818         pkgadd_help  $MISSING_DEPENDENCY ;;
55819     esac
55820 
55821     if test "x$PKGHANDLER_COMMAND" != x; then
55822       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55823     fi
55824   fi
55825 
55826       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
55827     fi
55828 
55829     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
55830 $as_echo_n "checking if libffi works... " >&6; }
55831     ac_ext=c
55832 ac_cpp='$CPP $CPPFLAGS'
55833 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55834 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55835 ac_compiler_gnu=$ac_cv_c_compiler_gnu
55836 
55837     OLD_CFLAGS="$CFLAGS"
55838     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
55839     OLD_LIBS="$LIBS"
55840     LIBS="$LIBS $LIBFFI_LIBS"
55841     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55842 /* end confdefs.h.  */
55843 #include <ffi.h>
55844 int
55845 main ()
55846 {
55847 
55848           ffi_call(NULL, NULL, NULL, NULL);
55849           return 0;
55850 
55851   ;
55852   return 0;
55853 }
55854 _ACEOF
55855 if ac_fn_c_try_link "$LINENO"; then :
55856   LIBFFI_WORKS=yes
55857 else
55858   LIBFFI_WORKS=no
55859 
55860 fi
55861 rm -f core conftest.err conftest.$ac_objext \
55862     conftest$ac_exeext conftest.$ac_ext
55863     CFLAGS="$OLD_CFLAGS"
55864     LIBS="$OLD_LIBS"
55865     ac_ext=cpp
55866 ac_cpp='$CXXCPP $CPPFLAGS'
55867 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55868 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55869 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
55870 
55871     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
55872 $as_echo "$LIBFFI_WORKS" >&6; }
55873 
55874     if test "x$LIBFFI_WORKS" = xno; then
55875 
55876   # Print a helpful message on how to acquire the necessary build dependency.
55877   # ffi is the help tag: freetype, cups, alsa etc
55878   MISSING_DEPENDENCY=ffi
55879 
55880   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55881     cygwin_help $MISSING_DEPENDENCY
55882   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55883     msys_help $MISSING_DEPENDENCY
55884   else
55885     PKGHANDLER_COMMAND=
55886 
55887     case $PKGHANDLER in
55888       apt-get)
55889         apt_help     $MISSING_DEPENDENCY ;;
55890       yum)
55891         yum_help     $MISSING_DEPENDENCY ;;
55892       port)
55893         port_help    $MISSING_DEPENDENCY ;;
55894       pkgutil)
55895         pkgutil_help $MISSING_DEPENDENCY ;;
55896       pkgadd)
55897         pkgadd_help  $MISSING_DEPENDENCY ;;
55898     esac
55899 
55900     if test "x$PKGHANDLER_COMMAND" != x; then
55901       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55902     fi
55903   fi
55904 
55905       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
55906     fi
55907   fi
55908 
55909 
55910 
55911 
55912 
55913   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
55914     # Extract the first word of "llvm-config", so it can be a program name with args.
55915 set dummy llvm-config; ac_word=$2
55916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55917 $as_echo_n "checking for $ac_word... " >&6; }
55918 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
55919   $as_echo_n "(cached) " >&6
55920 else
55921   if test -n "$LLVM_CONFIG"; then
55922   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
55923 else
55924 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55925 for as_dir in $PATH
55926 do
55927   IFS=$as_save_IFS
55928   test -z "$as_dir" && as_dir=.
55929     for ac_exec_ext in '' $ac_executable_extensions; do
55930   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55931     ac_cv_prog_LLVM_CONFIG="llvm-config"
55932     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55933     break 2
55934   fi
55935 done
55936   done
55937 IFS=$as_save_IFS
55938 
55939 fi
55940 fi
55941 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
55942 if test -n "$LLVM_CONFIG"; then
55943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
55944 $as_echo "$LLVM_CONFIG" >&6; }
55945 else
55946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55947 $as_echo "no" >&6; }
55948 fi
55949 
55950 
55951 
55952     if test "x$LLVM_CONFIG" != xllvm-config; then
55953       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
55954     fi
55955 
55956     llvm_components="jit mcjit engine nativecodegen native"
55957     unset LLVM_CFLAGS
55958     for flag in $("$LLVM_CONFIG" --cxxflags); do
55959       if echo "${flag}" | grep -q '^-[ID]'; then
55960         if test "${flag}" != "-D_DEBUG" ; then
55961           if test "${LLVM_CFLAGS}" != "" ; then
55962             LLVM_CFLAGS="${LLVM_CFLAGS} "
55963           fi
55964           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
55965         fi
55966       fi
55967     done
55968     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
55969     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
55970 
55971     unset LLVM_LDFLAGS
55972     for flag in $("${LLVM_CONFIG}" --ldflags); do
55973       if echo "${flag}" | grep -q '^-L'; then
55974         if test "${LLVM_LDFLAGS}" != ""; then
55975           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
55976         fi
55977         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
55978       fi
55979     done
55980 
55981     unset LLVM_LIBS
55982     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
55983       if echo "${flag}" | grep -q '^-l'; then
55984         if test "${LLVM_LIBS}" != ""; then
55985           LLVM_LIBS="${LLVM_LIBS} "
55986         fi
55987         LLVM_LIBS="${LLVM_LIBS}${flag}"
55988       fi
55989     done
55990 
55991 
55992 
55993 
55994   fi
55995 
55996 
55997 
55998 # Check whether --with-libjpeg was given.
55999 if test "${with_libjpeg+set}" = set; then :
56000   withval=$with_libjpeg;
56001 fi
56002 
56003 
56004   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
56005 $as_echo_n "checking for which libjpeg to use... " >&6; }
56006   # default is bundled
56007   DEFAULT_LIBJPEG=bundled
56008   # if user didn't specify, use DEFAULT_LIBJPEG
56009   if test "x${with_libjpeg}" = "x"; then
56010     with_libjpeg=${DEFAULT_LIBJPEG}
56011   fi
56012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
56013 $as_echo "${with_libjpeg}" >&6; }
56014 
56015   if test "x${with_libjpeg}" = "xbundled"; then
56016     USE_EXTERNAL_LIBJPEG=false
56017   elif test "x${with_libjpeg}" = "xsystem"; then
56018     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
56019 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
56020 
56021 else
56022    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
56023 fi
56024 
56025 
56026     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
56027 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
56028 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
56029   $as_echo_n "(cached) " >&6
56030 else
56031   ac_check_lib_save_LIBS=$LIBS
56032 LIBS="-ljpeg  $LIBS"
56033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56034 /* end confdefs.h.  */
56035 
56036 /* Override any GCC internal prototype to avoid an error.
56037    Use char because int might match the return type of a GCC
56038    builtin and then its argument prototype would still apply.  */
56039 #ifdef __cplusplus
56040 extern "C"
56041 #endif
56042 char jpeg_CreateDecompress ();
56043 int
56044 main ()
56045 {
56046 return jpeg_CreateDecompress ();
56047   ;
56048   return 0;
56049 }
56050 _ACEOF
56051 if ac_fn_cxx_try_link "$LINENO"; then :
56052   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
56053 else
56054   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
56055 fi
56056 rm -f core conftest.err conftest.$ac_objext \
56057     conftest$ac_exeext conftest.$ac_ext
56058 LIBS=$ac_check_lib_save_LIBS
56059 fi
56060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
56061 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
56062 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
56063   cat >>confdefs.h <<_ACEOF
56064 #define HAVE_LIBJPEG 1
56065 _ACEOF
56066 
56067   LIBS="-ljpeg $LIBS"
56068 
56069 else
56070    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
56071 fi
56072 
56073 
56074     USE_EXTERNAL_LIBJPEG=true
56075   else
56076     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
56077   fi
56078 
56079 
56080 
56081 
56082 
56083 # Check whether --with-giflib was given.
56084 if test "${with_giflib+set}" = set; then :
56085   withval=$with_giflib;
56086 fi
56087 
56088 
56089   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
56090 $as_echo_n "checking for which giflib to use... " >&6; }
56091   # default is bundled
56092   DEFAULT_GIFLIB=bundled
56093   # if user didn't specify, use DEFAULT_GIFLIB
56094   if test "x${with_giflib}" = "x"; then
56095     with_giflib=${DEFAULT_GIFLIB}
56096   fi
56097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
56098 $as_echo "${with_giflib}" >&6; }
56099 
56100   if test "x${with_giflib}" = "xbundled"; then
56101     USE_EXTERNAL_LIBGIF=false
56102   elif test "x${with_giflib}" = "xsystem"; then
56103     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
56104 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
56105 
56106 else
56107    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
56108 fi
56109 
56110 
56111     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
56112 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
56113 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
56114   $as_echo_n "(cached) " >&6
56115 else
56116   ac_check_lib_save_LIBS=$LIBS
56117 LIBS="-lgif  $LIBS"
56118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56119 /* end confdefs.h.  */
56120 
56121 /* Override any GCC internal prototype to avoid an error.
56122    Use char because int might match the return type of a GCC
56123    builtin and then its argument prototype would still apply.  */
56124 #ifdef __cplusplus
56125 extern "C"
56126 #endif
56127 char DGifGetCode ();
56128 int
56129 main ()
56130 {
56131 return DGifGetCode ();
56132   ;
56133   return 0;
56134 }
56135 _ACEOF
56136 if ac_fn_cxx_try_link "$LINENO"; then :
56137   ac_cv_lib_gif_DGifGetCode=yes
56138 else
56139   ac_cv_lib_gif_DGifGetCode=no
56140 fi
56141 rm -f core conftest.err conftest.$ac_objext \
56142     conftest$ac_exeext conftest.$ac_ext
56143 LIBS=$ac_check_lib_save_LIBS
56144 fi
56145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
56146 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
56147 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
56148   cat >>confdefs.h <<_ACEOF
56149 #define HAVE_LIBGIF 1
56150 _ACEOF
56151 
56152   LIBS="-lgif $LIBS"
56153 
56154 else
56155    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
56156 fi
56157 
56158 
56159     USE_EXTERNAL_LIBGIF=true
56160   else
56161     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
56162   fi
56163 
56164 
56165 
56166 
56167 
56168 # Check whether --with-libpng was given.
56169 if test "${with_libpng+set}" = set; then :
56170   withval=$with_libpng;
56171 fi
56172 
56173 
56174   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
56175 $as_echo_n "checking for which libpng to use... " >&6; }
56176 
56177   # default is bundled
56178   DEFAULT_LIBPNG=bundled
56179   # if user didn't specify, use DEFAULT_LIBPNG
56180   if test "x${with_libpng}" = "x"; then
56181       with_libpng=${DEFAULT_LIBPNG}
56182   fi
56183 
56184   if test "x${with_libpng}" = "xbundled"; then
56185       USE_EXTERNAL_LIBPNG=false
56186       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
56187 $as_echo "bundled" >&6; }
56188   elif test "x${with_libpng}" = "xsystem"; then
56189 
56190 pkg_failed=no
56191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
56192 $as_echo_n "checking for PNG... " >&6; }
56193 
56194 if test -n "$PNG_CFLAGS"; then
56195     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
56196  elif test -n "$PKG_CONFIG"; then
56197     if test -n "$PKG_CONFIG" && \
56198     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
56199   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
56200   ac_status=$?
56201   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56202   test $ac_status = 0; }; then
56203   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
56204 else
56205   pkg_failed=yes
56206 fi
56207  else
56208     pkg_failed=untried
56209 fi
56210 if test -n "$PNG_LIBS"; then
56211     pkg_cv_PNG_LIBS="$PNG_LIBS"
56212  elif test -n "$PKG_CONFIG"; then
56213     if test -n "$PKG_CONFIG" && \
56214     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
56215   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
56216   ac_status=$?
56217   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56218   test $ac_status = 0; }; then
56219   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
56220 else
56221   pkg_failed=yes
56222 fi
56223  else
56224     pkg_failed=untried
56225 fi
56226 
56227 
56228 
56229 if test $pkg_failed = yes; then
56230 
56231 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
56232         _pkg_short_errors_supported=yes
56233 else
56234         _pkg_short_errors_supported=no
56235 fi
56236         if test $_pkg_short_errors_supported = yes; then
56237                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
56238         else
56239                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
56240         fi
56241         # Put the nasty error message in config.log where it belongs
56242         echo "$PNG_PKG_ERRORS" >&5
56243 
56244         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56245 $as_echo "no" >&6; }
56246                  LIBPNG_FOUND=no
56247 elif test $pkg_failed = untried; then
56248          LIBPNG_FOUND=no
56249 else
56250         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
56251         PNG_LIBS=$pkg_cv_PNG_LIBS
56252         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56253 $as_echo "yes" >&6; }
56254          LIBPNG_FOUND=yes
56255 fi
56256       if test "x${LIBPNG_FOUND}" = "xyes"; then
56257           USE_EXTERNAL_LIBPNG=true
56258           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
56259 $as_echo "system" >&6; }
56260       else
56261           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
56262 $as_echo "system not found" >&6; }
56263           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
56264       fi
56265   else
56266       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
56267   fi
56268 
56269 
56270 
56271 
56272 
56273 # Check whether --with-zlib was given.
56274 if test "${with_zlib+set}" = set; then :
56275   withval=$with_zlib;
56276 fi
56277 
56278 
56279   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
56280 $as_echo_n "checking for compress in -lz... " >&6; }
56281 if ${ac_cv_lib_z_compress+:} false; then :
56282   $as_echo_n "(cached) " >&6
56283 else
56284   ac_check_lib_save_LIBS=$LIBS
56285 LIBS="-lz  $LIBS"
56286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56287 /* end confdefs.h.  */
56288 
56289 /* Override any GCC internal prototype to avoid an error.
56290    Use char because int might match the return type of a GCC
56291    builtin and then its argument prototype would still apply.  */
56292 #ifdef __cplusplus
56293 extern "C"
56294 #endif
56295 char compress ();
56296 int
56297 main ()
56298 {
56299 return compress ();
56300   ;
56301   return 0;
56302 }
56303 _ACEOF
56304 if ac_fn_cxx_try_link "$LINENO"; then :
56305   ac_cv_lib_z_compress=yes
56306 else
56307   ac_cv_lib_z_compress=no
56308 fi
56309 rm -f core conftest.err conftest.$ac_objext \
56310     conftest$ac_exeext conftest.$ac_ext
56311 LIBS=$ac_check_lib_save_LIBS
56312 fi
56313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
56314 $as_echo "$ac_cv_lib_z_compress" >&6; }
56315 if test "x$ac_cv_lib_z_compress" = xyes; then :
56316    ZLIB_FOUND=yes
56317 else
56318    ZLIB_FOUND=no
56319 fi
56320 
56321 
56322   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
56323 $as_echo_n "checking for which zlib to use... " >&6; }
56324 
56325   DEFAULT_ZLIB=bundled
56326   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
56327     # On macosx default is system...on others default is bundled
56328     DEFAULT_ZLIB=system
56329   fi
56330 
56331   if test "x${ZLIB_FOUND}" != "xyes"; then
56332     # If we don't find any system...set default to bundled
56333     DEFAULT_ZLIB=bundled
56334   fi
56335 
56336   # If user didn't specify, use DEFAULT_ZLIB
56337   if test "x${with_zlib}" = "x"; then
56338     with_zlib=${DEFAULT_ZLIB}
56339   fi
56340 
56341   if test "x${with_zlib}" = "xbundled"; then
56342     USE_EXTERNAL_LIBZ=false
56343     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
56344 $as_echo "bundled" >&6; }
56345   elif test "x${with_zlib}" = "xsystem"; then
56346     if test "x${ZLIB_FOUND}" = "xyes"; then
56347       USE_EXTERNAL_LIBZ=true
56348       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
56349 $as_echo "system" >&6; }
56350     else
56351       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
56352 $as_echo "system not found" >&6; }
56353       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
56354     fi
56355   else
56356     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
56357   fi
56358 
56359 
56360 
56361 
56362 
56363 # Check whether --with-lcms was given.
56364 if test "${with_lcms+set}" = set; then :
56365   withval=$with_lcms;
56366 fi
56367 
56368 
56369   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
56370 $as_echo_n "checking for which lcms to use... " >&6; }
56371 
56372   DEFAULT_LCMS=bundled
56373   # If user didn't specify, use DEFAULT_LCMS
56374   if test "x${with_lcms}" = "x"; then
56375       with_lcms=${DEFAULT_LCMS}
56376   fi
56377 
56378   if test "x${with_lcms}" = "xbundled"; then
56379     USE_EXTERNAL_LCMS=false
56380     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
56381 $as_echo "bundled" >&6; }
56382   elif test "x${with_lcms}" = "xsystem"; then
56383     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
56384 $as_echo "system" >&6; }
56385 
56386 pkg_failed=no
56387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
56388 $as_echo_n "checking for LCMS... " >&6; }
56389 
56390 if test -n "$LCMS_CFLAGS"; then
56391     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
56392  elif test -n "$PKG_CONFIG"; then
56393     if test -n "$PKG_CONFIG" && \
56394     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
56395   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
56396   ac_status=$?
56397   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56398   test $ac_status = 0; }; then
56399   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
56400 else
56401   pkg_failed=yes
56402 fi
56403  else
56404     pkg_failed=untried
56405 fi
56406 if test -n "$LCMS_LIBS"; then
56407     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
56408  elif test -n "$PKG_CONFIG"; then
56409     if test -n "$PKG_CONFIG" && \
56410     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
56411   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
56412   ac_status=$?
56413   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56414   test $ac_status = 0; }; then
56415   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
56416 else
56417   pkg_failed=yes
56418 fi
56419  else
56420     pkg_failed=untried
56421 fi
56422 
56423 
56424 
56425 if test $pkg_failed = yes; then
56426 
56427 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
56428         _pkg_short_errors_supported=yes
56429 else
56430         _pkg_short_errors_supported=no
56431 fi
56432         if test $_pkg_short_errors_supported = yes; then
56433                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
56434         else
56435                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
56436         fi
56437         # Put the nasty error message in config.log where it belongs
56438         echo "$LCMS_PKG_ERRORS" >&5
56439 
56440         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56441 $as_echo "no" >&6; }
56442                 LCMS_FOUND=no
56443 elif test $pkg_failed = untried; then
56444         LCMS_FOUND=no
56445 else
56446         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
56447         LCMS_LIBS=$pkg_cv_LCMS_LIBS
56448         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56449 $as_echo "yes" >&6; }
56450         LCMS_FOUND=yes
56451 fi
56452     if test "x${LCMS_FOUND}" = "xyes"; then
56453       USE_EXTERNAL_LCMS=true
56454     else
56455       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
56456     fi
56457   else
56458     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
56459   fi
56460 
56461 
56462 
56463 
56464 
56465 
56466 
56467 
56468 
56469 
56470 
56471   # Setup libm (the maths library)
56472   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
56473 $as_echo_n "checking for cos in -lm... " >&6; }
56474 if ${ac_cv_lib_m_cos+:} false; then :
56475   $as_echo_n "(cached) " >&6
56476 else
56477   ac_check_lib_save_LIBS=$LIBS
56478 LIBS="-lm  $LIBS"
56479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56480 /* end confdefs.h.  */
56481 
56482 /* Override any GCC internal prototype to avoid an error.
56483    Use char because int might match the return type of a GCC
56484    builtin and then its argument prototype would still apply.  */
56485 #ifdef __cplusplus
56486 extern "C"
56487 #endif
56488 char cos ();
56489 int
56490 main ()
56491 {
56492 return cos ();
56493   ;
56494   return 0;
56495 }
56496 _ACEOF
56497 if ac_fn_cxx_try_link "$LINENO"; then :
56498   ac_cv_lib_m_cos=yes
56499 else
56500   ac_cv_lib_m_cos=no
56501 fi
56502 rm -f core conftest.err conftest.$ac_objext \
56503     conftest$ac_exeext conftest.$ac_ext
56504 LIBS=$ac_check_lib_save_LIBS
56505 fi
56506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
56507 $as_echo "$ac_cv_lib_m_cos" >&6; }
56508 if test "x$ac_cv_lib_m_cos" = xyes; then :
56509   cat >>confdefs.h <<_ACEOF
56510 #define HAVE_LIBM 1
56511 _ACEOF
56512 
56513   LIBS="-lm $LIBS"
56514 
56515 else
56516 
56517       { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
56518 $as_echo "$as_me: Maths library was not found" >&6;}
56519 
56520 fi
56521 
56522   LIBM=-lm
56523 
56524 
56525   # Setup libdl (for dynamic library loading)
56526   save_LIBS="$LIBS"
56527   LIBS=""
56528   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
56529 $as_echo_n "checking for dlopen in -ldl... " >&6; }
56530 if ${ac_cv_lib_dl_dlopen+:} false; then :
56531   $as_echo_n "(cached) " >&6
56532 else
56533   ac_check_lib_save_LIBS=$LIBS
56534 LIBS="-ldl  $LIBS"
56535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56536 /* end confdefs.h.  */
56537 
56538 /* Override any GCC internal prototype to avoid an error.
56539    Use char because int might match the return type of a GCC
56540    builtin and then its argument prototype would still apply.  */
56541 #ifdef __cplusplus
56542 extern "C"
56543 #endif
56544 char dlopen ();
56545 int
56546 main ()
56547 {
56548 return dlopen ();
56549   ;
56550   return 0;
56551 }
56552 _ACEOF
56553 if ac_fn_cxx_try_link "$LINENO"; then :
56554   ac_cv_lib_dl_dlopen=yes
56555 else
56556   ac_cv_lib_dl_dlopen=no
56557 fi
56558 rm -f core conftest.err conftest.$ac_objext \
56559     conftest$ac_exeext conftest.$ac_ext
56560 LIBS=$ac_check_lib_save_LIBS
56561 fi
56562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
56563 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
56564 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
56565   cat >>confdefs.h <<_ACEOF
56566 #define HAVE_LIBDL 1
56567 _ACEOF
56568 
56569   LIBS="-ldl $LIBS"
56570 
56571 fi
56572 
56573   LIBDL="$LIBS"
56574 
56575   LIBS="$save_LIBS"
56576 
56577   # Deprecated libraries, keep the flags for backwards compatibility
56578   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
56579 
56580 
56581 # Check whether --with-dxsdk was given.
56582 if test "${with_dxsdk+set}" = set; then :
56583   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
56584 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
56585 fi
56586 
56587 
56588 
56589 
56590 # Check whether --with-dxsdk-lib was given.
56591 if test "${with_dxsdk_lib+set}" = set; then :
56592   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
56593 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
56594 fi
56595 
56596 
56597 
56598 
56599 # Check whether --with-dxsdk-include was given.
56600 if test "${with_dxsdk_include+set}" = set; then :
56601   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
56602 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
56603 fi
56604 
56605 
56606   fi
56607 
56608   # Control if libzip can use mmap. Available for purposes of overriding.
56609   LIBZIP_CAN_USE_MMAP=true
56610 
56611 
56612 
56613 
56614 
56615 
56616 
56617 
56618 
56619 
56620 
56621 
56622 
56623 
56624 ###############################################################################
56625 #
56626 # We need to do some final tweaking, when everything else is done.
56627 #
56628 ###############################################################################
56629 
56630 
56631   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
56632 
56633 
56634   # The name of the Service Agent jar.
56635   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
56636   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
56637     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
56638   fi
56639 
56640 
56641 
56642   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
56643 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
56644 
56645   if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
56646     ENABLE_INTREE_EC=yes
56647     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56648 $as_echo "yes" >&6; }
56649   else
56650     ENABLE_INTREE_EC=no
56651     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56652 $as_echo "no" >&6; }
56653   fi
56654 
56655 
56656 
56657 
56658 ###############################################################################
56659 #
56660 # Configure parts of the build that only affect the build performance,
56661 # not the result.
56662 #
56663 ###############################################################################
56664 
56665 
56666   # How many cores do we have on this build system?
56667 
56668 # Check whether --with-num-cores was given.
56669 if test "${with_num_cores+set}" = set; then :
56670   withval=$with_num_cores;
56671 fi
56672 
56673   if test "x$with_num_cores" = x; then
56674     # The number of cores were not specified, try to probe them.
56675 
56676   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
56677 $as_echo_n "checking for number of cores... " >&6; }
56678   NUM_CORES=1
56679   FOUND_CORES=no
56680 
56681   if test -f /proc/cpuinfo; then
56682     # Looks like a Linux (or cygwin) system
56683     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
56684     FOUND_CORES=yes
56685   elif test -x /usr/sbin/psrinfo; then
56686     # Looks like a Solaris system
56687     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
56688     FOUND_CORES=yes
56689   elif test -x /usr/sbin/system_profiler; then
56690     # Looks like a MacOSX system
56691     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
56692     FOUND_CORES=yes
56693   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
56694     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
56695     FOUND_CORES=yes
56696   elif test -n "$NUMBER_OF_PROCESSORS"; then
56697     # On windows, look in the env
56698     NUM_CORES=$NUMBER_OF_PROCESSORS
56699     FOUND_CORES=yes
56700   fi
56701 
56702   if test "x$FOUND_CORES" = xyes; then
56703     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
56704 $as_echo "$NUM_CORES" >&6; }
56705   else
56706     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
56707 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
56708     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
56709 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
56710   fi
56711 
56712   else
56713     NUM_CORES=$with_num_cores
56714   fi
56715 
56716 
56717 
56718   # How much memory do we have on this build system?
56719 
56720 # Check whether --with-memory-size was given.
56721 if test "${with_memory_size+set}" = set; then :
56722   withval=$with_memory_size;
56723 fi
56724 
56725   if test "x$with_memory_size" = x; then
56726     # The memory size was not specified, try to probe it.
56727 
56728   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
56729 $as_echo_n "checking for memory size... " >&6; }
56730   # Default to 1024 MB
56731   MEMORY_SIZE=1024
56732   FOUND_MEM=no
56733 
56734   if test -f /proc/meminfo; then
56735     # Looks like a Linux (or cygwin) system
56736     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
56737     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
56738     FOUND_MEM=yes
56739   elif test -x /usr/sbin/prtconf; then
56740     # Looks like a Solaris or AIX system
56741     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
56742     FOUND_MEM=yes
56743   elif test -x /usr/sbin/system_profiler; then
56744     # Looks like a MacOSX system
56745     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
56746     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
56747     FOUND_MEM=yes
56748   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
56749     # Windows, but without cygwin
56750     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
56751     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
56752     FOUND_MEM=yes
56753   fi
56754 
56755   if test "x$FOUND_MEM" = xyes; then
56756     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
56757 $as_echo "$MEMORY_SIZE MB" >&6; }
56758   else
56759     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
56760 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
56761     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
56762 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
56763   fi
56764 
56765   else
56766     MEMORY_SIZE=$with_memory_size
56767   fi
56768 
56769 
56770 
56771   # Provide a decent default number of parallel jobs for make depending on
56772   # number of cores, amount of memory and machine architecture.
56773 
56774 # Check whether --with-jobs was given.
56775 if test "${with_jobs+set}" = set; then :
56776   withval=$with_jobs;
56777 fi
56778 
56779   if test "x$with_jobs" = x; then
56780     # Number of jobs was not specified, calculate.
56781     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
56782 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
56783     # Approximate memory in GB.
56784     memory_gb=`expr $MEMORY_SIZE / 1024`
56785     # Pick the lowest of memory in gb and number of cores.
56786     if test "$memory_gb" -lt "$NUM_CORES"; then
56787       JOBS="$memory_gb"
56788     else
56789       JOBS="$NUM_CORES"
56790     fi
56791     if test "$JOBS" -eq "0"; then
56792       JOBS=1
56793     fi
56794     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
56795 $as_echo "$JOBS" >&6; }
56796   else
56797     JOBS=$with_jobs
56798   fi
56799 
56800 
56801 
56802 # Setup arguments for the boot jdk (after cores and memory have been setup)
56803 
56804   ##############################################################################
56805   #
56806   # Specify jvm options for anything that is run with the Boot JDK.
56807   # Not all JVM:s accept the same arguments on the command line.
56808   #
56809 
56810 # Check whether --with-boot-jdk-jvmargs was given.
56811 if test "${with_boot_jdk_jvmargs+set}" = set; then :
56812   withval=$with_boot_jdk_jvmargs;
56813 fi
56814 
56815 
56816   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
56817 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
56818 
56819   # Disable special log output when a debug build is used as Boot JDK...
56820 
56821   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
56822   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
56823   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
56824   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56825   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56826   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56827     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
56828     JVM_ARG_OK=true
56829   else
56830     $ECHO "Arg failed:" >&5
56831     $ECHO "$OUTPUT" >&5
56832     JVM_ARG_OK=false
56833   fi
56834 
56835 
56836   # Apply user provided options.
56837 
56838   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
56839   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
56840   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
56841   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56842   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56843   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56844     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
56845     JVM_ARG_OK=true
56846   else
56847     $ECHO "Arg failed:" >&5
56848     $ECHO "$OUTPUT" >&5
56849     JVM_ARG_OK=false
56850   fi
56851 
56852 
56853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
56854 $as_echo "$boot_jdk_jvmargs" >&6; }
56855 
56856   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
56857   JAVA_FLAGS=$boot_jdk_jvmargs
56858 
56859 
56860 
56861   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
56862 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
56863 
56864   # Starting amount of heap memory.
56865 
56866   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
56867   $ECHO "Command: $JAVA -Xms64M -version" >&5
56868   OUTPUT=`$JAVA -Xms64M -version 2>&1`
56869   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56870   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56871   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56872     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
56873     JVM_ARG_OK=true
56874   else
56875     $ECHO "Arg failed:" >&5
56876     $ECHO "$OUTPUT" >&5
56877     JVM_ARG_OK=false
56878   fi
56879 
56880 
56881   # Maximum amount of heap memory.
56882   # Maximum stack size.
56883   JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
56884   if test "x$BOOT_JDK_BITS" = "x32"; then
56885     if test "$JVM_MAX_HEAP" -gt "1100"; then
56886       JVM_MAX_HEAP=1100
56887     elif test "$JVM_MAX_HEAP" -lt "512"; then
56888       JVM_MAX_HEAP=512
56889     fi
56890     STACK_SIZE=768
56891   else
56892     # Running a 64 bit JVM allows for and requires a bigger heap
56893     if test "$JVM_MAX_HEAP" -gt "1600"; then
56894       JVM_MAX_HEAP=1600
56895     elif test "$JVM_MAX_HEAP" -lt "512"; then
56896       JVM_MAX_HEAP=512
56897     fi
56898     STACK_SIZE=1536
56899   fi
56900 
56901   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
56902   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
56903   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
56904   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56905   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56906   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56907     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
56908     JVM_ARG_OK=true
56909   else
56910     $ECHO "Arg failed:" >&5
56911     $ECHO "$OUTPUT" >&5
56912     JVM_ARG_OK=false
56913   fi
56914 
56915 
56916   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
56917   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
56918   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
56919   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56920   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56921   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56922     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
56923     JVM_ARG_OK=true
56924   else
56925     $ECHO "Arg failed:" >&5
56926     $ECHO "$OUTPUT" >&5
56927     JVM_ARG_OK=false
56928   fi
56929 
56930 
56931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
56932 $as_echo "$boot_jdk_jvmargs_big" >&6; }
56933 
56934   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
56935 
56936 
56937   # By default, the main javac compilations use big
56938   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
56939 
56940 
56941   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
56942 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
56943 
56944   # Use serial gc for small short lived tools if possible
56945 
56946   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
56947   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
56948   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
56949   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56950   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56951   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56952     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
56953     JVM_ARG_OK=true
56954   else
56955     $ECHO "Arg failed:" >&5
56956     $ECHO "$OUTPUT" >&5
56957     JVM_ARG_OK=false
56958   fi
56959 
56960 
56961   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
56962   $ECHO "Command: $JAVA -Xms32M -version" >&5
56963   OUTPUT=`$JAVA -Xms32M -version 2>&1`
56964   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56965   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56966   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56967     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
56968     JVM_ARG_OK=true
56969   else
56970     $ECHO "Arg failed:" >&5
56971     $ECHO "$OUTPUT" >&5
56972     JVM_ARG_OK=false
56973   fi
56974 
56975 
56976   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
56977   $ECHO "Command: $JAVA -Xmx512M -version" >&5
56978   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
56979   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56980   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56981   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56982     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
56983     JVM_ARG_OK=true
56984   else
56985     $ECHO "Arg failed:" >&5
56986     $ECHO "$OUTPUT" >&5
56987     JVM_ARG_OK=false
56988   fi
56989 
56990 
56991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
56992 $as_echo "$boot_jdk_jvmargs_small" >&6; }
56993 
56994   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
56995 
56996 
56997   JAVA_TOOL_FLAGS_SMALL=""
56998   for f in $JAVA_FLAGS_SMALL; do
56999     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
57000   done
57001 
57002 
57003 
57004 # Setup smart javac (after cores and memory have been setup)
57005 
57006 
57007 # Check whether --with-sjavac-server-java was given.
57008 if test "${with_sjavac_server_java+set}" = set; then :
57009   withval=$with_sjavac_server_java;
57010 fi
57011 
57012 
57013   if test "x$with_sjavac_server_java" != x; then
57014     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
57015     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
57016     if test "x$FOUND_VERSION" = x; then
57017       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
57018     fi
57019   else
57020     SJAVAC_SERVER_JAVA="$JAVA"
57021   fi
57022 
57023 
57024   if test "$MEMORY_SIZE" -gt "3000"; then
57025 
57026   $ECHO "Check if jvm arg is ok: -d64" >&5
57027   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
57028   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
57029   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57030   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57031   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57032     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
57033     JVM_ARG_OK=true
57034   else
57035     $ECHO "Arg failed:" >&5
57036     $ECHO "$OUTPUT" >&5
57037     JVM_ARG_OK=false
57038   fi
57039 
57040     if test "$JVM_ARG_OK" = true; then
57041       JVM_64BIT=true
57042       JVM_ARG_OK=false
57043     fi
57044   fi
57045 
57046   MX_VALUE=`expr $MEMORY_SIZE / 2`
57047   if test "$JVM_64BIT" = true; then
57048     # Set ms lower than mx since more than one instance of the server might
57049     # get launched at the same time before they figure out which instance won.
57050     MS_VALUE=512
57051     if test "$MX_VALUE" -gt "2048"; then
57052       MX_VALUE=2048
57053     fi
57054   else
57055     MS_VALUE=256
57056     if test "$MX_VALUE" -gt "1500"; then
57057       MX_VALUE=1500
57058     fi
57059   fi
57060   if test "$MX_VALUE" -lt "512"; then
57061     MX_VALUE=512
57062   fi
57063 
57064   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
57065   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
57066   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
57067   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57068   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57069   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57070     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
57071     JVM_ARG_OK=true
57072   else
57073     $ECHO "Arg failed:" >&5
57074     $ECHO "$OUTPUT" >&5
57075     JVM_ARG_OK=false
57076   fi
57077 
57078 
57079 
57080   # Check whether --enable-sjavac was given.
57081 if test "${enable_sjavac+set}" = set; then :
57082   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
57083 else
57084   ENABLE_SJAVAC="no"
57085 fi
57086 
57087   if test "x$JVM_ARG_OK" = "xfalse"; then
57088     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
57089 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
57090     ENABLE_SJAVAC="no"
57091   fi
57092   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
57093 $as_echo_n "checking whether to use sjavac... " >&6; }
57094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
57095 $as_echo "$ENABLE_SJAVAC" >&6; }
57096 
57097 
57098   # Check whether --enable-javac-server was given.
57099 if test "${enable_javac_server+set}" = set; then :
57100   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
57101 else
57102   ENABLE_JAVAC_SERVER="yes"
57103 fi
57104 
57105   if test "x$JVM_ARG_OK" = "xfalse"; then
57106     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
57107 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
57108     ENABLE_JAVAC_SERVER="no"
57109   fi
57110   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
57111 $as_echo_n "checking whether to use javac server... " >&6; }
57112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
57113 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
57114 
57115 
57116   if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
57117     # When using a server javac, the small client instances do not need much
57118     # resources.
57119     JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
57120   fi
57121 
57122 
57123 # Setup use of icecc if requested
57124 
57125   # Check whether --enable-icecc was given.
57126 if test "${enable_icecc+set}" = set; then :
57127   enableval=$enable_icecc;
57128 fi
57129 
57130 
57131   if test "x${enable_icecc}" = "xyes"; then
57132 
57133 
57134 
57135   # Publish this variable in the help.
57136 
57137 
57138   if [ -z "${ICECC_CMD+x}" ]; then
57139     # The variable is not set by user, try to locate tool using the code snippet
57140     for ac_prog in icecc
57141 do
57142   # Extract the first word of "$ac_prog", so it can be a program name with args.
57143 set dummy $ac_prog; ac_word=$2
57144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57145 $as_echo_n "checking for $ac_word... " >&6; }
57146 if ${ac_cv_path_ICECC_CMD+:} false; then :
57147   $as_echo_n "(cached) " >&6
57148 else
57149   case $ICECC_CMD in
57150   [\\/]* | ?:[\\/]*)
57151   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
57152   ;;
57153   *)
57154   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57155 for as_dir in $PATH
57156 do
57157   IFS=$as_save_IFS
57158   test -z "$as_dir" && as_dir=.
57159     for ac_exec_ext in '' $ac_executable_extensions; do
57160   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57161     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
57162     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57163     break 2
57164   fi
57165 done
57166   done
57167 IFS=$as_save_IFS
57168 
57169   ;;
57170 esac
57171 fi
57172 ICECC_CMD=$ac_cv_path_ICECC_CMD
57173 if test -n "$ICECC_CMD"; then
57174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
57175 $as_echo "$ICECC_CMD" >&6; }
57176 else
57177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57178 $as_echo "no" >&6; }
57179 fi
57180 
57181 
57182   test -n "$ICECC_CMD" && break
57183 done
57184 
57185   else
57186     # The variable is set, but is it from the command line or the environment?
57187 
57188     # Try to remove the string !ICECC_CMD! from our list.
57189     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
57190     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
57191       # If it failed, the variable was not from the command line. Ignore it,
57192       # but warn the user (except for BASH, which is always set by the calling BASH).
57193       if test "xICECC_CMD" != xBASH; then
57194         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
57195 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
57196       fi
57197       # Try to locate tool using the code snippet
57198       for ac_prog in icecc
57199 do
57200   # Extract the first word of "$ac_prog", so it can be a program name with args.
57201 set dummy $ac_prog; ac_word=$2
57202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57203 $as_echo_n "checking for $ac_word... " >&6; }
57204 if ${ac_cv_path_ICECC_CMD+:} false; then :
57205   $as_echo_n "(cached) " >&6
57206 else
57207   case $ICECC_CMD in
57208   [\\/]* | ?:[\\/]*)
57209   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
57210   ;;
57211   *)
57212   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57213 for as_dir in $PATH
57214 do
57215   IFS=$as_save_IFS
57216   test -z "$as_dir" && as_dir=.
57217     for ac_exec_ext in '' $ac_executable_extensions; do
57218   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57219     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
57220     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57221     break 2
57222   fi
57223 done
57224   done
57225 IFS=$as_save_IFS
57226 
57227   ;;
57228 esac
57229 fi
57230 ICECC_CMD=$ac_cv_path_ICECC_CMD
57231 if test -n "$ICECC_CMD"; then
57232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
57233 $as_echo "$ICECC_CMD" >&6; }
57234 else
57235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57236 $as_echo "no" >&6; }
57237 fi
57238 
57239 
57240   test -n "$ICECC_CMD" && break
57241 done
57242 
57243     else
57244       # If it succeeded, then it was overridden by the user. We will use it
57245       # for the tool.
57246 
57247       # First remove it from the list of overridden variables, so we can test
57248       # for unknown variables in the end.
57249       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57250 
57251       # Check if we try to supply an empty value
57252       if test "x$ICECC_CMD" = x; then
57253         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
57254 $as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
57255         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
57256 $as_echo_n "checking for ICECC_CMD... " >&6; }
57257         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57258 $as_echo "disabled" >&6; }
57259       else
57260         # Check if the provided tool contains a complete path.
57261         tool_specified="$ICECC_CMD"
57262         tool_basename="${tool_specified##*/}"
57263         if test "x$tool_basename" = "x$tool_specified"; then
57264           # A command without a complete path is provided, search $PATH.
57265           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
57266 $as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
57267           # Extract the first word of "$tool_basename", so it can be a program name with args.
57268 set dummy $tool_basename; ac_word=$2
57269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57270 $as_echo_n "checking for $ac_word... " >&6; }
57271 if ${ac_cv_path_ICECC_CMD+:} false; then :
57272   $as_echo_n "(cached) " >&6
57273 else
57274   case $ICECC_CMD in
57275   [\\/]* | ?:[\\/]*)
57276   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
57277   ;;
57278   *)
57279   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57280 for as_dir in $PATH
57281 do
57282   IFS=$as_save_IFS
57283   test -z "$as_dir" && as_dir=.
57284     for ac_exec_ext in '' $ac_executable_extensions; do
57285   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57286     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
57287     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57288     break 2
57289   fi
57290 done
57291   done
57292 IFS=$as_save_IFS
57293 
57294   ;;
57295 esac
57296 fi
57297 ICECC_CMD=$ac_cv_path_ICECC_CMD
57298 if test -n "$ICECC_CMD"; then
57299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
57300 $as_echo "$ICECC_CMD" >&6; }
57301 else
57302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57303 $as_echo "no" >&6; }
57304 fi
57305 
57306 
57307           if test "x$ICECC_CMD" = x; then
57308             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
57309           fi
57310         else
57311           # Otherwise we believe it is a complete path. Use it as it is.
57312           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
57313 $as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
57314           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
57315 $as_echo_n "checking for ICECC_CMD... " >&6; }
57316           if test ! -x "$tool_specified"; then
57317             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
57318 $as_echo "not found" >&6; }
57319             as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
57320           fi
57321           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
57322 $as_echo "$tool_specified" >&6; }
57323         fi
57324       fi
57325     fi
57326 
57327   fi
57328 
57329 
57330 
57331   if test "x$ICECC_CMD" = x; then
57332     as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
57333   fi
57334 
57335 
57336     old_path="$PATH"
57337 
57338     # Look for icecc-create-env in some known places
57339     PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
57340 
57341 
57342 
57343   # Publish this variable in the help.
57344 
57345 
57346   if [ -z "${ICECC_CREATE_ENV+x}" ]; then
57347     # The variable is not set by user, try to locate tool using the code snippet
57348     for ac_prog in icecc-create-env
57349 do
57350   # Extract the first word of "$ac_prog", so it can be a program name with args.
57351 set dummy $ac_prog; ac_word=$2
57352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57353 $as_echo_n "checking for $ac_word... " >&6; }
57354 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
57355   $as_echo_n "(cached) " >&6
57356 else
57357   case $ICECC_CREATE_ENV in
57358   [\\/]* | ?:[\\/]*)
57359   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
57360   ;;
57361   *)
57362   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57363 for as_dir in $PATH
57364 do
57365   IFS=$as_save_IFS
57366   test -z "$as_dir" && as_dir=.
57367     for ac_exec_ext in '' $ac_executable_extensions; do
57368   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57369     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
57370     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57371     break 2
57372   fi
57373 done
57374   done
57375 IFS=$as_save_IFS
57376 
57377   ;;
57378 esac
57379 fi
57380 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
57381 if test -n "$ICECC_CREATE_ENV"; then
57382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
57383 $as_echo "$ICECC_CREATE_ENV" >&6; }
57384 else
57385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57386 $as_echo "no" >&6; }
57387 fi
57388 
57389 
57390   test -n "$ICECC_CREATE_ENV" && break
57391 done
57392 
57393   else
57394     # The variable is set, but is it from the command line or the environment?
57395 
57396     # Try to remove the string !ICECC_CREATE_ENV! from our list.
57397     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
57398     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
57399       # If it failed, the variable was not from the command line. Ignore it,
57400       # but warn the user (except for BASH, which is always set by the calling BASH).
57401       if test "xICECC_CREATE_ENV" != xBASH; then
57402         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
57403 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
57404       fi
57405       # Try to locate tool using the code snippet
57406       for ac_prog in icecc-create-env
57407 do
57408   # Extract the first word of "$ac_prog", so it can be a program name with args.
57409 set dummy $ac_prog; ac_word=$2
57410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57411 $as_echo_n "checking for $ac_word... " >&6; }
57412 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
57413   $as_echo_n "(cached) " >&6
57414 else
57415   case $ICECC_CREATE_ENV in
57416   [\\/]* | ?:[\\/]*)
57417   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
57418   ;;
57419   *)
57420   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57421 for as_dir in $PATH
57422 do
57423   IFS=$as_save_IFS
57424   test -z "$as_dir" && as_dir=.
57425     for ac_exec_ext in '' $ac_executable_extensions; do
57426   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57427     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
57428     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57429     break 2
57430   fi
57431 done
57432   done
57433 IFS=$as_save_IFS
57434 
57435   ;;
57436 esac
57437 fi
57438 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
57439 if test -n "$ICECC_CREATE_ENV"; then
57440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
57441 $as_echo "$ICECC_CREATE_ENV" >&6; }
57442 else
57443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57444 $as_echo "no" >&6; }
57445 fi
57446 
57447 
57448   test -n "$ICECC_CREATE_ENV" && break
57449 done
57450 
57451     else
57452       # If it succeeded, then it was overridden by the user. We will use it
57453       # for the tool.
57454 
57455       # First remove it from the list of overridden variables, so we can test
57456       # for unknown variables in the end.
57457       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57458 
57459       # Check if we try to supply an empty value
57460       if test "x$ICECC_CREATE_ENV" = x; then
57461         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
57462 $as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
57463         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
57464 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
57465         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57466 $as_echo "disabled" >&6; }
57467       else
57468         # Check if the provided tool contains a complete path.
57469         tool_specified="$ICECC_CREATE_ENV"
57470         tool_basename="${tool_specified##*/}"
57471         if test "x$tool_basename" = "x$tool_specified"; then
57472           # A command without a complete path is provided, search $PATH.
57473           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
57474 $as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
57475           # Extract the first word of "$tool_basename", so it can be a program name with args.
57476 set dummy $tool_basename; ac_word=$2
57477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57478 $as_echo_n "checking for $ac_word... " >&6; }
57479 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
57480   $as_echo_n "(cached) " >&6
57481 else
57482   case $ICECC_CREATE_ENV in
57483   [\\/]* | ?:[\\/]*)
57484   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
57485   ;;
57486   *)
57487   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57488 for as_dir in $PATH
57489 do
57490   IFS=$as_save_IFS
57491   test -z "$as_dir" && as_dir=.
57492     for ac_exec_ext in '' $ac_executable_extensions; do
57493   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57494     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
57495     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57496     break 2
57497   fi
57498 done
57499   done
57500 IFS=$as_save_IFS
57501 
57502   ;;
57503 esac
57504 fi
57505 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
57506 if test -n "$ICECC_CREATE_ENV"; then
57507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
57508 $as_echo "$ICECC_CREATE_ENV" >&6; }
57509 else
57510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57511 $as_echo "no" >&6; }
57512 fi
57513 
57514 
57515           if test "x$ICECC_CREATE_ENV" = x; then
57516             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
57517           fi
57518         else
57519           # Otherwise we believe it is a complete path. Use it as it is.
57520           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
57521 $as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
57522           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
57523 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
57524           if test ! -x "$tool_specified"; then
57525             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
57526 $as_echo "not found" >&6; }
57527             as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
57528           fi
57529           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
57530 $as_echo "$tool_specified" >&6; }
57531         fi
57532       fi
57533     fi
57534 
57535   fi
57536 
57537 
57538 
57539   if test "x$ICECC_CREATE_ENV" = x; then
57540     as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
57541   fi
57542 
57543 
57544     # Use icecc-create-env to create a minimal compilation environment that can
57545     # be sent to the other hosts in the icecream cluster.
57546     icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
57547     ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
57548     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
57549 $as_echo_n "checking for icecc build environment for target compiler... " >&6; }
57550     if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
57551       cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57552           && ${ICECC_CREATE_ENV} --gcc ${CC} ${CXX} > ${icecc_create_env_log}
57553     elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
57554       # For clang, the icecc compilerwrapper is needed. It usually resides next
57555       # to icecc-create-env.
57556 
57557 
57558 
57559   # Publish this variable in the help.
57560 
57561 
57562   if [ -z "${ICECC_WRAPPER+x}" ]; then
57563     # The variable is not set by user, try to locate tool using the code snippet
57564     for ac_prog in compilerwrapper
57565 do
57566   # Extract the first word of "$ac_prog", so it can be a program name with args.
57567 set dummy $ac_prog; ac_word=$2
57568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57569 $as_echo_n "checking for $ac_word... " >&6; }
57570 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
57571   $as_echo_n "(cached) " >&6
57572 else
57573   case $ICECC_WRAPPER in
57574   [\\/]* | ?:[\\/]*)
57575   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
57576   ;;
57577   *)
57578   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57579 for as_dir in $PATH
57580 do
57581   IFS=$as_save_IFS
57582   test -z "$as_dir" && as_dir=.
57583     for ac_exec_ext in '' $ac_executable_extensions; do
57584   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57585     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
57586     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57587     break 2
57588   fi
57589 done
57590   done
57591 IFS=$as_save_IFS
57592 
57593   ;;
57594 esac
57595 fi
57596 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
57597 if test -n "$ICECC_WRAPPER"; then
57598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
57599 $as_echo "$ICECC_WRAPPER" >&6; }
57600 else
57601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57602 $as_echo "no" >&6; }
57603 fi
57604 
57605 
57606   test -n "$ICECC_WRAPPER" && break
57607 done
57608 
57609   else
57610     # The variable is set, but is it from the command line or the environment?
57611 
57612     # Try to remove the string !ICECC_WRAPPER! from our list.
57613     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
57614     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
57615       # If it failed, the variable was not from the command line. Ignore it,
57616       # but warn the user (except for BASH, which is always set by the calling BASH).
57617       if test "xICECC_WRAPPER" != xBASH; then
57618         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
57619 $as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
57620       fi
57621       # Try to locate tool using the code snippet
57622       for ac_prog in compilerwrapper
57623 do
57624   # Extract the first word of "$ac_prog", so it can be a program name with args.
57625 set dummy $ac_prog; ac_word=$2
57626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57627 $as_echo_n "checking for $ac_word... " >&6; }
57628 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
57629   $as_echo_n "(cached) " >&6
57630 else
57631   case $ICECC_WRAPPER in
57632   [\\/]* | ?:[\\/]*)
57633   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
57634   ;;
57635   *)
57636   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57637 for as_dir in $PATH
57638 do
57639   IFS=$as_save_IFS
57640   test -z "$as_dir" && as_dir=.
57641     for ac_exec_ext in '' $ac_executable_extensions; do
57642   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57643     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
57644     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57645     break 2
57646   fi
57647 done
57648   done
57649 IFS=$as_save_IFS
57650 
57651   ;;
57652 esac
57653 fi
57654 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
57655 if test -n "$ICECC_WRAPPER"; then
57656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
57657 $as_echo "$ICECC_WRAPPER" >&6; }
57658 else
57659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57660 $as_echo "no" >&6; }
57661 fi
57662 
57663 
57664   test -n "$ICECC_WRAPPER" && break
57665 done
57666 
57667     else
57668       # If it succeeded, then it was overridden by the user. We will use it
57669       # for the tool.
57670 
57671       # First remove it from the list of overridden variables, so we can test
57672       # for unknown variables in the end.
57673       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57674 
57675       # Check if we try to supply an empty value
57676       if test "x$ICECC_WRAPPER" = x; then
57677         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
57678 $as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
57679         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
57680 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
57681         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57682 $as_echo "disabled" >&6; }
57683       else
57684         # Check if the provided tool contains a complete path.
57685         tool_specified="$ICECC_WRAPPER"
57686         tool_basename="${tool_specified##*/}"
57687         if test "x$tool_basename" = "x$tool_specified"; then
57688           # A command without a complete path is provided, search $PATH.
57689           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
57690 $as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
57691           # Extract the first word of "$tool_basename", so it can be a program name with args.
57692 set dummy $tool_basename; ac_word=$2
57693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57694 $as_echo_n "checking for $ac_word... " >&6; }
57695 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
57696   $as_echo_n "(cached) " >&6
57697 else
57698   case $ICECC_WRAPPER in
57699   [\\/]* | ?:[\\/]*)
57700   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
57701   ;;
57702   *)
57703   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57704 for as_dir in $PATH
57705 do
57706   IFS=$as_save_IFS
57707   test -z "$as_dir" && as_dir=.
57708     for ac_exec_ext in '' $ac_executable_extensions; do
57709   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57710     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
57711     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57712     break 2
57713   fi
57714 done
57715   done
57716 IFS=$as_save_IFS
57717 
57718   ;;
57719 esac
57720 fi
57721 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
57722 if test -n "$ICECC_WRAPPER"; then
57723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
57724 $as_echo "$ICECC_WRAPPER" >&6; }
57725 else
57726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57727 $as_echo "no" >&6; }
57728 fi
57729 
57730 
57731           if test "x$ICECC_WRAPPER" = x; then
57732             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
57733           fi
57734         else
57735           # Otherwise we believe it is a complete path. Use it as it is.
57736           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
57737 $as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
57738           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
57739 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
57740           if test ! -x "$tool_specified"; then
57741             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
57742 $as_echo "not found" >&6; }
57743             as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
57744           fi
57745           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
57746 $as_echo "$tool_specified" >&6; }
57747         fi
57748       fi
57749     fi
57750 
57751   fi
57752 
57753 
57754 
57755   if test "x$ICECC_WRAPPER" = x; then
57756     as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
57757   fi
57758 
57759 
57760       cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57761           && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
57762     else
57763       as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
57764     fi
57765     PATH="$old_path"
57766     # The bundle with the compiler gets a name based on checksums. Parse log file
57767     # to find it.
57768     ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
57769     ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
57770     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
57771 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
57772     ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
57773 
57774     if test "x${COMPILE_TYPE}" = "xcross"; then
57775       # If cross compiling, create a separate env package for the build compiler
57776       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
57777 $as_echo_n "checking for icecc build environment for build compiler... " >&6; }
57778       # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
57779       if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
57780         cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57781             && ${ICECC_CREATE_ENV} --gcc ${BUILD_CC} ${BUILD_CXX} > ${icecc_create_env_log}
57782       elif test "x${BUILD_CC##*/}" = "xclang"; then
57783         cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57784             && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
57785       else
57786         as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
57787       fi
57788       ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
57789       ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
57790       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
57791 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
57792       BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
57793           ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
57794     else
57795       BUILD_ICECC="${ICECC}"
57796     fi
57797 
57798 
57799   fi
57800 
57801 
57802 # Can the C/C++ compiler use precompiled headers?
57803 
57804 
57805   ###############################################################################
57806   #
57807   # Can the C/C++ compiler use precompiled headers?
57808   #
57809   # Check whether --enable-precompiled-headers was given.
57810 if test "${enable_precompiled_headers+set}" = set; then :
57811   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
57812 else
57813   ENABLE_PRECOMPH=yes
57814 fi
57815 
57816 
57817   USE_PRECOMPILED_HEADER=1
57818   { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
57819 $as_echo_n "checking If precompiled header is enabled... " >&6; }
57820   if test "x$ENABLE_PRECOMPH" = xno; then
57821     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
57822 $as_echo "no, forced" >&6; }
57823     USE_PRECOMPILED_HEADER=0
57824   elif test "x$ICECC" != "x"; then
57825     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
57826 $as_echo "no, does not work effectively with icecc" >&6; }
57827     USE_PRECOMPILED_HEADER=0
57828   else
57829     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57830 $as_echo "yes" >&6; }
57831   fi
57832 
57833   if test "x$ENABLE_PRECOMPH" = xyes; then
57834     # Check that the compiler actually supports precomp headers.
57835     if test "x$TOOLCHAIN_TYPE" = xgcc; then
57836       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
57837 $as_echo_n "checking that precompiled headers work... " >&6; }
57838       echo "int alfa();" > conftest.h
57839       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
57840       if test ! -f conftest.hpp.gch; then
57841         USE_PRECOMPILED_HEADER=0
57842         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57843 $as_echo "no" >&6; }
57844       else
57845         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57846 $as_echo "yes" >&6; }
57847       fi
57848       rm -f conftest.h conftest.hpp.gch
57849     fi
57850   fi
57851 
57852 
57853 
57854 
57855 # Setup use of ccache, if available
57856 
57857   # Check whether --enable-ccache was given.
57858 if test "${enable_ccache+set}" = set; then :
57859   enableval=$enable_ccache;
57860 fi
57861 
57862 
57863   CCACHE=
57864   CCACHE_STATUS=
57865   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
57866 $as_echo_n "checking is ccache enabled... " >&6; }
57867   if test "x$enable_ccache" = xyes; then
57868     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
57869       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57870 $as_echo "yes" >&6; }
57871       OLD_PATH="$PATH"
57872       if test "x$TOOLCHAIN_PATH" != x; then
57873         PATH=$TOOLCHAIN_PATH:$PATH
57874       fi
57875 
57876 
57877 
57878   # Publish this variable in the help.
57879 
57880 
57881   if [ -z "${CCACHE+x}" ]; then
57882     # The variable is not set by user, try to locate tool using the code snippet
57883     for ac_prog in ccache
57884 do
57885   # Extract the first word of "$ac_prog", so it can be a program name with args.
57886 set dummy $ac_prog; ac_word=$2
57887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57888 $as_echo_n "checking for $ac_word... " >&6; }
57889 if ${ac_cv_path_CCACHE+:} false; then :
57890   $as_echo_n "(cached) " >&6
57891 else
57892   case $CCACHE in
57893   [\\/]* | ?:[\\/]*)
57894   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
57895   ;;
57896   *)
57897   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57898 for as_dir in $PATH
57899 do
57900   IFS=$as_save_IFS
57901   test -z "$as_dir" && as_dir=.
57902     for ac_exec_ext in '' $ac_executable_extensions; do
57903   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57904     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
57905     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57906     break 2
57907   fi
57908 done
57909   done
57910 IFS=$as_save_IFS
57911 
57912   ;;
57913 esac
57914 fi
57915 CCACHE=$ac_cv_path_CCACHE
57916 if test -n "$CCACHE"; then
57917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
57918 $as_echo "$CCACHE" >&6; }
57919 else
57920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57921 $as_echo "no" >&6; }
57922 fi
57923 
57924 
57925   test -n "$CCACHE" && break
57926 done
57927 
57928   else
57929     # The variable is set, but is it from the command line or the environment?
57930 
57931     # Try to remove the string !CCACHE! from our list.
57932     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
57933     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
57934       # If it failed, the variable was not from the command line. Ignore it,
57935       # but warn the user (except for BASH, which is always set by the calling BASH).
57936       if test "xCCACHE" != xBASH; then
57937         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
57938 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
57939       fi
57940       # Try to locate tool using the code snippet
57941       for ac_prog in ccache
57942 do
57943   # Extract the first word of "$ac_prog", so it can be a program name with args.
57944 set dummy $ac_prog; ac_word=$2
57945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57946 $as_echo_n "checking for $ac_word... " >&6; }
57947 if ${ac_cv_path_CCACHE+:} false; then :
57948   $as_echo_n "(cached) " >&6
57949 else
57950   case $CCACHE in
57951   [\\/]* | ?:[\\/]*)
57952   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
57953   ;;
57954   *)
57955   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57956 for as_dir in $PATH
57957 do
57958   IFS=$as_save_IFS
57959   test -z "$as_dir" && as_dir=.
57960     for ac_exec_ext in '' $ac_executable_extensions; do
57961   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57962     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
57963     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57964     break 2
57965   fi
57966 done
57967   done
57968 IFS=$as_save_IFS
57969 
57970   ;;
57971 esac
57972 fi
57973 CCACHE=$ac_cv_path_CCACHE
57974 if test -n "$CCACHE"; then
57975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
57976 $as_echo "$CCACHE" >&6; }
57977 else
57978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57979 $as_echo "no" >&6; }
57980 fi
57981 
57982 
57983   test -n "$CCACHE" && break
57984 done
57985 
57986     else
57987       # If it succeeded, then it was overridden by the user. We will use it
57988       # for the tool.
57989 
57990       # First remove it from the list of overridden variables, so we can test
57991       # for unknown variables in the end.
57992       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57993 
57994       # Check if we try to supply an empty value
57995       if test "x$CCACHE" = x; then
57996         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
57997 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
57998         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
57999 $as_echo_n "checking for CCACHE... " >&6; }
58000         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
58001 $as_echo "disabled" >&6; }
58002       else
58003         # Check if the provided tool contains a complete path.
58004         tool_specified="$CCACHE"
58005         tool_basename="${tool_specified##*/}"
58006         if test "x$tool_basename" = "x$tool_specified"; then
58007           # A command without a complete path is provided, search $PATH.
58008           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
58009 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
58010           # Extract the first word of "$tool_basename", so it can be a program name with args.
58011 set dummy $tool_basename; ac_word=$2
58012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58013 $as_echo_n "checking for $ac_word... " >&6; }
58014 if ${ac_cv_path_CCACHE+:} false; then :
58015   $as_echo_n "(cached) " >&6
58016 else
58017   case $CCACHE in
58018   [\\/]* | ?:[\\/]*)
58019   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
58020   ;;
58021   *)
58022   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58023 for as_dir in $PATH
58024 do
58025   IFS=$as_save_IFS
58026   test -z "$as_dir" && as_dir=.
58027     for ac_exec_ext in '' $ac_executable_extensions; do
58028   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58029     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
58030     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58031     break 2
58032   fi
58033 done
58034   done
58035 IFS=$as_save_IFS
58036 
58037   ;;
58038 esac
58039 fi
58040 CCACHE=$ac_cv_path_CCACHE
58041 if test -n "$CCACHE"; then
58042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
58043 $as_echo "$CCACHE" >&6; }
58044 else
58045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58046 $as_echo "no" >&6; }
58047 fi
58048 
58049 
58050           if test "x$CCACHE" = x; then
58051             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
58052           fi
58053         else
58054           # Otherwise we believe it is a complete path. Use it as it is.
58055           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
58056 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
58057           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
58058 $as_echo_n "checking for CCACHE... " >&6; }
58059           if test ! -x "$tool_specified"; then
58060             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
58061 $as_echo "not found" >&6; }
58062             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
58063           fi
58064           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
58065 $as_echo "$tool_specified" >&6; }
58066         fi
58067       fi
58068     fi
58069 
58070   fi
58071 
58072 
58073 
58074   if test "x$CCACHE" = x; then
58075     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
58076   fi
58077 
58078 
58079       PATH="$OLD_PATH"
58080       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
58081       CCACHE_STATUS="Active ($CCACHE_VERSION)"
58082     else
58083       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58084 $as_echo "no" >&6; }
58085       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
58086 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
58087     fi
58088   elif test "x$enable_ccache" = xno; then
58089     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
58090 $as_echo "no, explicitly disabled" >&6; }
58091     CCACHE_STATUS="Disabled"
58092   elif test "x$enable_ccache" = x; then
58093     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58094 $as_echo "no" >&6; }
58095   else
58096     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
58097 $as_echo "unknown" >&6; }
58098     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
58099   fi
58100 
58101 
58102 
58103 # Check whether --with-ccache-dir was given.
58104 if test "${with_ccache_dir+set}" = set; then :
58105   withval=$with_ccache_dir;
58106 fi
58107 
58108 
58109   if test "x$with_ccache_dir" != x; then
58110     # When using a non home ccache directory, assume the use is to share ccache files
58111     # with other users. Thus change the umask.
58112     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
58113     if test "x$CCACHE" = x; then
58114       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
58115 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
58116     fi
58117   fi
58118 
58119   if test "x$CCACHE" != x; then
58120 
58121   if test "x$CCACHE" != x; then
58122     if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
58123       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
58124           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
58125       if test "x$HAS_BAD_CCACHE" != "x"; then
58126         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
58127       fi
58128       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
58129 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
58130       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
58131       PUSHED_FLAGS="$CXXFLAGS"
58132       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
58133       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58134 /* end confdefs.h.  */
58135 
58136 int
58137 main ()
58138 {
58139 
58140   ;
58141   return 0;
58142 }
58143 _ACEOF
58144 if ac_fn_cxx_try_compile "$LINENO"; then :
58145   CC_KNOWS_CCACHE_TRICK=yes
58146 else
58147   CC_KNOWS_CCACHE_TRICK=no
58148 fi
58149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58150       CXXFLAGS="$PUSHED_FLAGS"
58151       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
58152         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58153 $as_echo "yes" >&6; }
58154         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
58155 
58156         CCACHE_SLOPPINESS=pch_defines,time_macros
58157       else
58158         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58159 $as_echo "no" >&6; }
58160         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
58161       fi
58162     fi
58163 
58164     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
58165         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
58166 
58167     if test "x$SET_CCACHE_DIR" != x; then
58168       mkdir -p $CCACHE_DIR > /dev/null 2>&1
58169       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
58170     fi
58171   fi
58172 
58173   fi
58174 
58175 
58176 ###############################################################################
58177 #
58178 # And now the finish...
58179 #
58180 ###############################################################################
58181 
58182 # Check for some common pitfalls
58183 
58184   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58185     file_to_test="$SRC_ROOT/LICENSE"
58186     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
58187       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
58188     fi
58189   fi
58190 
58191 
58192   # Did user specify any unknown variables?
58193 
58194   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
58195     # Replace the separating ! with spaces before presenting for end user.
58196     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
58197     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
58198 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
58199   fi
58200 
58201 
58202   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
58203 $as_echo_n "checking if build directory is on local disk... " >&6; }
58204 
58205   # df -l lists only local disks; if the given directory is not found then
58206   # a non-zero exit code is given
58207   if test "x$DF" = x; then
58208     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58209       # msys does not have df; use Windows "net use" instead.
58210       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
58211       if test "x$IS_NETWORK_DISK" = x; then
58212         OUTPUT_DIR_IS_LOCAL="yes"
58213       else
58214         OUTPUT_DIR_IS_LOCAL="no"
58215       fi
58216     else
58217       # No df here, say it's local
58218       OUTPUT_DIR_IS_LOCAL="yes"
58219     fi
58220   else
58221     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
58222       OUTPUT_DIR_IS_LOCAL="yes"
58223     else
58224       OUTPUT_DIR_IS_LOCAL="no"
58225     fi
58226   fi
58227 
58228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
58229 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
58230 
58231 
58232 
58233   # Check if the user has any old-style ALT_ variables set.
58234   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
58235 
58236   # Before generating output files, test if they exist. If they do, this is a reconfigure.
58237   # Since we can't properly handle the dependencies for this, warn the user about the situation
58238   if test -e $OUTPUT_ROOT/spec.gmk; then
58239     IS_RECONFIGURE=yes
58240   else
58241     IS_RECONFIGURE=no
58242   fi
58243 
58244 
58245 # At the end, call the custom hook. (Dummy macro if no custom sources available)
58246 
58247 
58248 # We're messing a bit with internal autoconf variables to put the config.status
58249 # in the output directory instead of the current directory.
58250 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
58251 
58252 # Create the actual output files. Now the main work of configure is done.
58253 cat >confcache <<\_ACEOF
58254 # This file is a shell script that caches the results of configure
58255 # tests run on this system so they can be shared between configure
58256 # scripts and configure runs, see configure's option --config-cache.
58257 # It is not useful on other systems.  If it contains results you don't
58258 # want to keep, you may remove or edit it.
58259 #
58260 # config.status only pays attention to the cache file if you give it
58261 # the --recheck option to rerun configure.
58262 #
58263 # `ac_cv_env_foo' variables (set or unset) will be overridden when
58264 # loading this file, other *unset* `ac_cv_foo' will be assigned the
58265 # following values.
58266 
58267 _ACEOF
58268 
58269 # The following way of writing the cache mishandles newlines in values,
58270 # but we know of no workaround that is simple, portable, and efficient.
58271 # So, we kill variables containing newlines.
58272 # Ultrix sh set writes to stderr and can't be redirected directly,
58273 # and sets the high bit in the cache file unless we assign to the vars.
58274 (
58275   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
58276     eval ac_val=\$$ac_var
58277     case $ac_val in #(
58278     *${as_nl}*)
58279       case $ac_var in #(
58280       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
58281 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
58282       esac
58283       case $ac_var in #(
58284       _ | IFS | as_nl) ;; #(
58285       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
58286       *) { eval $ac_var=; unset $ac_var;} ;;
58287       esac ;;
58288     esac
58289   done
58290 
58291   (set) 2>&1 |
58292     case $as_nl`(ac_space=' '; set) 2>&1` in #(
58293     *${as_nl}ac_space=\ *)
58294       # `set' does not quote correctly, so add quotes: double-quote
58295       # substitution turns \\\\ into \\, and sed turns \\ into \.
58296       sed -n \
58297         "s/'/'\\\\''/g;
58298           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
58299       ;; #(
58300     *)
58301       # `set' quotes correctly as required by POSIX, so do not add quotes.
58302       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
58303       ;;
58304     esac |
58305     sort
58306 ) |
58307   sed '
58308      /^ac_cv_env_/b end
58309      t clear
58310      :clear
58311      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
58312      t end
58313      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
58314      :end' >>confcache
58315 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
58316   if test -w "$cache_file"; then
58317     if test "x$cache_file" != "x/dev/null"; then
58318       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
58319 $as_echo "$as_me: updating cache $cache_file" >&6;}
58320       if test ! -f "$cache_file" || test -h "$cache_file"; then
58321         cat confcache >"$cache_file"
58322       else
58323         case $cache_file in #(
58324         */* | ?:*)
58325           mv -f confcache "$cache_file"$$ &&
58326           mv -f "$cache_file"$$ "$cache_file" ;; #(
58327         *)
58328           mv -f confcache "$cache_file" ;;
58329         esac
58330       fi
58331     fi
58332   else
58333     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
58334 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
58335   fi
58336 fi
58337 rm -f confcache
58338 
58339 test "x$prefix" = xNONE && prefix=$ac_default_prefix
58340 # Let make expand exec_prefix.
58341 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
58342 
58343 # Transform confdefs.h into DEFS.
58344 # Protect against shell expansion while executing Makefile rules.
58345 # Protect against Makefile macro expansion.
58346 #
58347 # If the first sed substitution is executed (which looks for macros that
58348 # take arguments), then branch to the quote section.  Otherwise,
58349 # look for a macro that doesn't take arguments.
58350 ac_script='
58351 :mline
58352 /\\$/{
58353  N
58354  s,\\\n,,
58355  b mline
58356 }
58357 t clear
58358 :clear
58359 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
58360 t quote
58361 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
58362 t quote
58363 b any
58364 :quote
58365 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
58366 s/\[/\\&/g
58367 s/\]/\\&/g
58368 s/\$/$$/g
58369 H
58370 :any
58371 ${
58372         g
58373         s/^\n//
58374         s/\n/ /g
58375         p
58376 }
58377 '
58378 DEFS=`sed -n "$ac_script" confdefs.h`
58379 
58380 
58381 ac_libobjs=
58382 ac_ltlibobjs=
58383 U=
58384 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
58385   # 1. Remove the extension, and $U if already installed.
58386   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
58387   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
58388   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
58389   #    will be set to the directory where LIBOBJS objects are built.
58390   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
58391   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
58392 done
58393 LIBOBJS=$ac_libobjs
58394 
58395 LTLIBOBJS=$ac_ltlibobjs
58396 
58397 
58398 
58399 : "${CONFIG_STATUS=./config.status}"
58400 ac_write_fail=0
58401 ac_clean_files_save=$ac_clean_files
58402 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
58403 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
58404 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
58405 as_write_fail=0
58406 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
58407 #! $SHELL
58408 # Generated by $as_me.
58409 # Run this file to recreate the current configuration.
58410 # Compiler output produced by configure, useful for debugging
58411 # configure, is in config.log if it exists.
58412 
58413 debug=false
58414 ac_cs_recheck=false
58415 ac_cs_silent=false
58416 
58417 SHELL=\${CONFIG_SHELL-$SHELL}
58418 export SHELL
58419 _ASEOF
58420 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
58421 ## -------------------- ##
58422 ## M4sh Initialization. ##
58423 ## -------------------- ##
58424 
58425 # Be more Bourne compatible
58426 DUALCASE=1; export DUALCASE # for MKS sh
58427 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
58428   emulate sh
58429   NULLCMD=:
58430   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
58431   # is contrary to our usage.  Disable this feature.
58432   alias -g '${1+"$@"}'='"$@"'
58433   setopt NO_GLOB_SUBST
58434 else
58435   case `(set -o) 2>/dev/null` in #(
58436   *posix*) :
58437     set -o posix ;; #(
58438   *) :
58439      ;;
58440 esac
58441 fi
58442 
58443 
58444 as_nl='
58445 '
58446 export as_nl
58447 # Printing a long string crashes Solaris 7 /usr/bin/printf.
58448 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
58449 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
58450 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
58451 # Prefer a ksh shell builtin over an external printf program on Solaris,
58452 # but without wasting forks for bash or zsh.
58453 if test -z "$BASH_VERSION$ZSH_VERSION" \
58454     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
58455   as_echo='print -r --'
58456   as_echo_n='print -rn --'
58457 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
58458   as_echo='printf %s\n'
58459   as_echo_n='printf %s'
58460 else
58461   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
58462     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58463     as_echo_n='/usr/ucb/echo -n'
58464   else
58465     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58466     as_echo_n_body='eval
58467       arg=$1;
58468       case $arg in #(
58469       *"$as_nl"*)
58470         expr "X$arg" : "X\\(.*\\)$as_nl";
58471         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
58472       esac;
58473       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
58474     '
58475     export as_echo_n_body
58476     as_echo_n='sh -c $as_echo_n_body as_echo'
58477   fi
58478   export as_echo_body
58479   as_echo='sh -c $as_echo_body as_echo'
58480 fi
58481 
58482 # The user is always right.
58483 if test "${PATH_SEPARATOR+set}" != set; then
58484   PATH_SEPARATOR=:
58485   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
58486     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
58487       PATH_SEPARATOR=';'
58488   }
58489 fi
58490 
58491 
58492 # IFS
58493 # We need space, tab and new line, in precisely that order.  Quoting is
58494 # there to prevent editors from complaining about space-tab.
58495 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
58496 # splitting by setting IFS to empty value.)
58497 IFS=" ""        $as_nl"
58498 
58499 # Find who we are.  Look in the path if we contain no directory separator.
58500 as_myself=
58501 case $0 in #((
58502   *[\\/]* ) as_myself=$0 ;;
58503   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58504 for as_dir in $PATH
58505 do
58506   IFS=$as_save_IFS
58507   test -z "$as_dir" && as_dir=.
58508     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
58509   done
58510 IFS=$as_save_IFS
58511 
58512      ;;
58513 esac
58514 # We did not find ourselves, most probably we were run as `sh COMMAND'
58515 # in which case we are not to be found in the path.
58516 if test "x$as_myself" = x; then
58517   as_myself=$0
58518 fi
58519 if test ! -f "$as_myself"; then
58520   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
58521   exit 1
58522 fi
58523 
58524 # Unset variables that we do not need and which cause bugs (e.g. in
58525 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
58526 # suppresses any "Segmentation fault" message there.  '((' could
58527 # trigger a bug in pdksh 5.2.14.
58528 for as_var in BASH_ENV ENV MAIL MAILPATH
58529 do eval test x\${$as_var+set} = xset \
58530   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
58531 done
58532 PS1='$ '
58533 PS2='> '
58534 PS4='+ '
58535 
58536 # NLS nuisances.
58537 LC_ALL=C
58538 export LC_ALL
58539 LANGUAGE=C
58540 export LANGUAGE
58541 
58542 # CDPATH.
58543 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
58544 
58545 
58546 # as_fn_error STATUS ERROR [LINENO LOG_FD]
58547 # ----------------------------------------
58548 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
58549 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
58550 # script with STATUS, using 1 if that was 0.
58551 as_fn_error ()
58552 {
58553   as_status=$1; test $as_status -eq 0 && as_status=1
58554   if test "$4"; then
58555     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
58556     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
58557   fi
58558   $as_echo "$as_me: error: $2" >&2
58559   as_fn_exit $as_status
58560 } # as_fn_error
58561 
58562 
58563 # as_fn_set_status STATUS
58564 # -----------------------
58565 # Set $? to STATUS, without forking.
58566 as_fn_set_status ()
58567 {
58568   return $1
58569 } # as_fn_set_status
58570 
58571 # as_fn_exit STATUS
58572 # -----------------
58573 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
58574 as_fn_exit ()
58575 {
58576   set +e
58577   as_fn_set_status $1
58578   exit $1
58579 } # as_fn_exit
58580 
58581 # as_fn_unset VAR
58582 # ---------------
58583 # Portably unset VAR.
58584 as_fn_unset ()
58585 {
58586   { eval $1=; unset $1;}
58587 }
58588 as_unset=as_fn_unset
58589 # as_fn_append VAR VALUE
58590 # ----------------------
58591 # Append the text in VALUE to the end of the definition contained in VAR. Take
58592 # advantage of any shell optimizations that allow amortized linear growth over
58593 # repeated appends, instead of the typical quadratic growth present in naive
58594 # implementations.
58595 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
58596   eval 'as_fn_append ()
58597   {
58598     eval $1+=\$2
58599   }'
58600 else
58601   as_fn_append ()
58602   {
58603     eval $1=\$$1\$2
58604   }
58605 fi # as_fn_append
58606 
58607 # as_fn_arith ARG...
58608 # ------------------
58609 # Perform arithmetic evaluation on the ARGs, and store the result in the
58610 # global $as_val. Take advantage of shells that can avoid forks. The arguments
58611 # must be portable across $(()) and expr.
58612 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
58613   eval 'as_fn_arith ()
58614   {
58615     as_val=$(( $* ))
58616   }'
58617 else
58618   as_fn_arith ()
58619   {
58620     as_val=`expr "$@" || test $? -eq 1`
58621   }
58622 fi # as_fn_arith
58623 
58624 
58625 if expr a : '\(a\)' >/dev/null 2>&1 &&
58626    test "X`expr 00001 : '.*\(...\)'`" = X001; then
58627   as_expr=expr
58628 else
58629   as_expr=false
58630 fi
58631 
58632 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
58633   as_basename=basename
58634 else
58635   as_basename=false
58636 fi
58637 
58638 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
58639   as_dirname=dirname
58640 else
58641   as_dirname=false
58642 fi
58643 
58644 as_me=`$as_basename -- "$0" ||
58645 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
58646          X"$0" : 'X\(//\)$' \| \
58647          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
58648 $as_echo X/"$0" |
58649     sed '/^.*\/\([^/][^/]*\)\/*$/{
58650             s//\1/
58651             q
58652           }
58653           /^X\/\(\/\/\)$/{
58654             s//\1/
58655             q
58656           }
58657           /^X\/\(\/\).*/{
58658             s//\1/
58659             q
58660           }
58661           s/.*/./; q'`
58662 
58663 # Avoid depending upon Character Ranges.
58664 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
58665 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
58666 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
58667 as_cr_digits='0123456789'
58668 as_cr_alnum=$as_cr_Letters$as_cr_digits
58669 
58670 ECHO_C= ECHO_N= ECHO_T=
58671 case `echo -n x` in #(((((
58672 -n*)
58673   case `echo 'xy\c'` in
58674   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
58675   xy)  ECHO_C='\c';;
58676   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
58677        ECHO_T=' ';;
58678   esac;;
58679 *)
58680   ECHO_N='-n';;
58681 esac
58682 
58683 rm -f conf$$ conf$$.exe conf$$.file
58684 if test -d conf$$.dir; then
58685   rm -f conf$$.dir/conf$$.file
58686 else
58687   rm -f conf$$.dir
58688   mkdir conf$$.dir 2>/dev/null
58689 fi
58690 if (echo >conf$$.file) 2>/dev/null; then
58691   if ln -s conf$$.file conf$$ 2>/dev/null; then
58692     as_ln_s='ln -s'
58693     # ... but there are two gotchas:
58694     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
58695     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
58696     # In both cases, we have to default to `cp -pR'.
58697     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
58698       as_ln_s='cp -pR'
58699   elif ln conf$$.file conf$$ 2>/dev/null; then
58700     as_ln_s=ln
58701   else
58702     as_ln_s='cp -pR'
58703   fi
58704 else
58705   as_ln_s='cp -pR'
58706 fi
58707 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
58708 rmdir conf$$.dir 2>/dev/null
58709 
58710 
58711 # as_fn_mkdir_p
58712 # -------------
58713 # Create "$as_dir" as a directory, including parents if necessary.
58714 as_fn_mkdir_p ()
58715 {
58716 
58717   case $as_dir in #(
58718   -*) as_dir=./$as_dir;;
58719   esac
58720   test -d "$as_dir" || eval $as_mkdir_p || {
58721     as_dirs=
58722     while :; do
58723       case $as_dir in #(
58724       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
58725       *) as_qdir=$as_dir;;
58726       esac
58727       as_dirs="'$as_qdir' $as_dirs"
58728       as_dir=`$as_dirname -- "$as_dir" ||
58729 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
58730          X"$as_dir" : 'X\(//\)[^/]' \| \
58731          X"$as_dir" : 'X\(//\)$' \| \
58732          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
58733 $as_echo X"$as_dir" |
58734     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
58735             s//\1/
58736             q
58737           }
58738           /^X\(\/\/\)[^/].*/{
58739             s//\1/
58740             q
58741           }
58742           /^X\(\/\/\)$/{
58743             s//\1/
58744             q
58745           }
58746           /^X\(\/\).*/{
58747             s//\1/
58748             q
58749           }
58750           s/.*/./; q'`
58751       test -d "$as_dir" && break
58752     done
58753     test -z "$as_dirs" || eval "mkdir $as_dirs"
58754   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
58755 
58756 
58757 } # as_fn_mkdir_p
58758 if mkdir -p . 2>/dev/null; then
58759   as_mkdir_p='mkdir -p "$as_dir"'
58760 else
58761   test -d ./-p && rmdir ./-p
58762   as_mkdir_p=false
58763 fi
58764 
58765 
58766 # as_fn_executable_p FILE
58767 # -----------------------
58768 # Test if FILE is an executable regular file.
58769 as_fn_executable_p ()
58770 {
58771   test -f "$1" && test -x "$1"
58772 } # as_fn_executable_p
58773 as_test_x='test -x'
58774 as_executable_p=as_fn_executable_p
58775 
58776 # Sed expression to map a string onto a valid CPP name.
58777 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
58778 
58779 # Sed expression to map a string onto a valid variable name.
58780 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
58781 
58782 
58783 exec 6>&1
58784 ## ----------------------------------- ##
58785 ## Main body of $CONFIG_STATUS script. ##
58786 ## ----------------------------------- ##
58787 _ASEOF
58788 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
58789 
58790 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58791 # Save the log message, to keep $0 and so on meaningful, and to
58792 # report actual input values of CONFIG_FILES etc. instead of their
58793 # values after options handling.
58794 ac_log="
58795 This file was extended by OpenJDK $as_me jdk9, which was
58796 generated by GNU Autoconf 2.69.  Invocation command line was
58797 
58798   CONFIG_FILES    = $CONFIG_FILES
58799   CONFIG_HEADERS  = $CONFIG_HEADERS
58800   CONFIG_LINKS    = $CONFIG_LINKS
58801   CONFIG_COMMANDS = $CONFIG_COMMANDS
58802   $ $0 $@
58803 
58804 on `(hostname || uname -n) 2>/dev/null | sed 1q`
58805 "
58806 
58807 _ACEOF
58808 
58809 case $ac_config_files in *"
58810 "*) set x $ac_config_files; shift; ac_config_files=$*;;
58811 esac
58812 
58813 
58814 
58815 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58816 # Files that config.status was made for.
58817 config_files="$ac_config_files"
58818 
58819 _ACEOF
58820 
58821 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58822 ac_cs_usage="\
58823 \`$as_me' instantiates files and other configuration actions
58824 from templates according to the current configuration.  Unless the files
58825 and actions are specified as TAGs, all are instantiated by default.
58826 
58827 Usage: $0 [OPTION]... [TAG]...
58828 
58829   -h, --help       print this help, then exit
58830   -V, --version    print version number and configuration settings, then exit
58831       --config     print configuration, then exit
58832   -q, --quiet, --silent
58833                    do not print progress messages
58834   -d, --debug      don't remove temporary files
58835       --recheck    update $as_me by reconfiguring in the same conditions
58836       --file=FILE[:TEMPLATE]
58837                    instantiate the configuration file FILE
58838 
58839 Configuration files:
58840 $config_files
58841 
58842 Report bugs to <build-dev@openjdk.java.net>.
58843 OpenJDK home page: <http://openjdk.java.net>."
58844 
58845 _ACEOF
58846 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58847 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
58848 ac_cs_version="\\
58849 OpenJDK config.status jdk9
58850 configured by $0, generated by GNU Autoconf 2.69,
58851   with options \\"\$ac_cs_config\\"
58852 
58853 Copyright (C) 2012 Free Software Foundation, Inc.
58854 This config.status script is free software; the Free Software Foundation
58855 gives unlimited permission to copy, distribute and modify it."
58856 
58857 ac_pwd='$ac_pwd'
58858 srcdir='$srcdir'
58859 AWK='$AWK'
58860 test -n "\$AWK" || AWK=awk
58861 _ACEOF
58862 
58863 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58864 # The default lists apply if the user does not specify any file.
58865 ac_need_defaults=:
58866 while test $# != 0
58867 do
58868   case $1 in
58869   --*=?*)
58870     ac_option=`expr "X$1" : 'X\([^=]*\)='`
58871     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
58872     ac_shift=:
58873     ;;
58874   --*=)
58875     ac_option=`expr "X$1" : 'X\([^=]*\)='`
58876     ac_optarg=
58877     ac_shift=:
58878     ;;
58879   *)
58880     ac_option=$1
58881     ac_optarg=$2
58882     ac_shift=shift
58883     ;;
58884   esac
58885 
58886   case $ac_option in
58887   # Handling of the options.
58888   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
58889     ac_cs_recheck=: ;;
58890   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
58891     $as_echo "$ac_cs_version"; exit ;;
58892   --config | --confi | --conf | --con | --co | --c )
58893     $as_echo "$ac_cs_config"; exit ;;
58894   --debug | --debu | --deb | --de | --d | -d )
58895     debug=: ;;
58896   --file | --fil | --fi | --f )
58897     $ac_shift
58898     case $ac_optarg in
58899     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
58900     '') as_fn_error $? "missing file argument" ;;
58901     esac
58902     as_fn_append CONFIG_FILES " '$ac_optarg'"
58903     ac_need_defaults=false;;
58904   --he | --h |  --help | --hel | -h )
58905     $as_echo "$ac_cs_usage"; exit ;;
58906   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
58907   | -silent | --silent | --silen | --sile | --sil | --si | --s)
58908     ac_cs_silent=: ;;
58909 
58910   # This is an error.
58911   -*) as_fn_error $? "unrecognized option: \`$1'
58912 Try \`$0 --help' for more information." ;;
58913 
58914   *) as_fn_append ac_config_targets " $1"
58915      ac_need_defaults=false ;;
58916 
58917   esac
58918   shift
58919 done
58920 
58921 ac_configure_extra_args=
58922 
58923 if $ac_cs_silent; then
58924   exec 6>/dev/null
58925   ac_configure_extra_args="$ac_configure_extra_args --silent"
58926 fi
58927 
58928 _ACEOF
58929 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58930 if \$ac_cs_recheck; then
58931   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
58932   shift
58933   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
58934   CONFIG_SHELL='$SHELL'
58935   export CONFIG_SHELL
58936   exec "\$@"
58937 fi
58938 
58939 _ACEOF
58940 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58941 exec 5>>config.log
58942 {
58943   echo
58944   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
58945 ## Running $as_me. ##
58946 _ASBOX
58947   $as_echo "$ac_log"
58948 } >&5
58949 
58950 _ACEOF
58951 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58952 _ACEOF
58953 
58954 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58955 
58956 # Handling of arguments.
58957 for ac_config_target in $ac_config_targets
58958 do
58959   case $ac_config_target in
58960     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
58961     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
58962     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
58963     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
58964     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
58965 
58966   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
58967   esac
58968 done
58969 
58970 
58971 # If the user did not use the arguments to specify the items to instantiate,
58972 # then the envvar interface is used.  Set only those that are not.
58973 # We use the long form for the default assignment because of an extremely
58974 # bizarre bug on SunOS 4.1.3.
58975 if $ac_need_defaults; then
58976   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
58977 fi
58978 
58979 # Have a temporary directory for convenience.  Make it in the build tree
58980 # simply because there is no reason against having it here, and in addition,
58981 # creating and moving files from /tmp can sometimes cause problems.
58982 # Hook for its removal unless debugging.
58983 # Note that there is a small window in which the directory will not be cleaned:
58984 # after its creation but before its name has been assigned to `$tmp'.
58985 $debug ||
58986 {
58987   tmp= ac_tmp=
58988   trap 'exit_status=$?
58989   : "${ac_tmp:=$tmp}"
58990   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
58991 ' 0
58992   trap 'as_fn_exit 1' 1 2 13 15
58993 }
58994 # Create a (secure) tmp directory for tmp files.
58995 
58996 {
58997   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
58998   test -d "$tmp"
58999 }  ||
59000 {
59001   tmp=./conf$$-$RANDOM
59002   (umask 077 && mkdir "$tmp")
59003 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
59004 ac_tmp=$tmp
59005 
59006 # Set up the scripts for CONFIG_FILES section.
59007 # No need to generate them if there are no CONFIG_FILES.
59008 # This happens for instance with `./config.status config.h'.
59009 if test -n "$CONFIG_FILES"; then
59010 
59011 
59012 ac_cr=`echo X | tr X '\015'`
59013 # On cygwin, bash can eat \r inside `` if the user requested igncr.
59014 # But we know of no other shell where ac_cr would be empty at this
59015 # point, so we can use a bashism as a fallback.
59016 if test "x$ac_cr" = x; then
59017   eval ac_cr=\$\'\\r\'
59018 fi
59019 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
59020 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
59021   ac_cs_awk_cr='\\r'
59022 else
59023   ac_cs_awk_cr=$ac_cr
59024 fi
59025 
59026 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
59027 _ACEOF
59028 
59029 
59030 {
59031   echo "cat >conf$$subs.awk <<_ACEOF" &&
59032   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
59033   echo "_ACEOF"
59034 } >conf$$subs.sh ||
59035   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
59036 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
59037 ac_delim='%!_!# '
59038 for ac_last_try in false false false false false :; do
59039   . ./conf$$subs.sh ||
59040     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
59041 
59042   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
59043   if test $ac_delim_n = $ac_delim_num; then
59044     break
59045   elif $ac_last_try; then
59046     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
59047   else
59048     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
59049   fi
59050 done
59051 rm -f conf$$subs.sh
59052 
59053 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59054 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
59055 _ACEOF
59056 sed -n '
59057 h
59058 s/^/S["/; s/!.*/"]=/
59059 p
59060 g
59061 s/^[^!]*!//
59062 :repl
59063 t repl
59064 s/'"$ac_delim"'$//
59065 t delim
59066 :nl
59067 h
59068 s/\(.\{148\}\)..*/\1/
59069 t more1
59070 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
59071 p
59072 n
59073 b repl
59074 :more1
59075 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
59076 p
59077 g
59078 s/.\{148\}//
59079 t nl
59080 :delim
59081 h
59082 s/\(.\{148\}\)..*/\1/
59083 t more2
59084 s/["\\]/\\&/g; s/^/"/; s/$/"/
59085 p
59086 b
59087 :more2
59088 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
59089 p
59090 g
59091 s/.\{148\}//
59092 t delim
59093 ' <conf$$subs.awk | sed '
59094 /^[^""]/{
59095   N
59096   s/\n//
59097 }
59098 ' >>$CONFIG_STATUS || ac_write_fail=1
59099 rm -f conf$$subs.awk
59100 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59101 _ACAWK
59102 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
59103   for (key in S) S_is_set[key] = 1
59104   FS = ""
59105 
59106 }
59107 {
59108   line = $ 0
59109   nfields = split(line, field, "@")
59110   substed = 0
59111   len = length(field[1])
59112   for (i = 2; i < nfields; i++) {
59113     key = field[i]
59114     keylen = length(key)
59115     if (S_is_set[key]) {
59116       value = S[key]
59117       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
59118       len += length(value) + length(field[++i])
59119       substed = 1
59120     } else
59121       len += 1 + keylen
59122   }
59123 
59124   print line
59125 }
59126 
59127 _ACAWK
59128 _ACEOF
59129 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59130 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
59131   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
59132 else
59133   cat
59134 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
59135   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
59136 _ACEOF
59137 
59138 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
59139 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
59140 # trailing colons and then remove the whole line if VPATH becomes empty
59141 # (actually we leave an empty line to preserve line numbers).
59142 if test "x$srcdir" = x.; then
59143   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
59144 h
59145 s///
59146 s/^/:/
59147 s/[      ]*$/:/
59148 s/:\$(srcdir):/:/g
59149 s/:\${srcdir}:/:/g
59150 s/:@srcdir@:/:/g
59151 s/^:*//
59152 s/:*$//
59153 x
59154 s/\(=[   ]*\).*/\1/
59155 G
59156 s/\n//
59157 s/^[^=]*=[       ]*$//
59158 }'
59159 fi
59160 
59161 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59162 fi # test -n "$CONFIG_FILES"
59163 
59164 
59165 eval set X "  :F $CONFIG_FILES      "
59166 shift
59167 for ac_tag
59168 do
59169   case $ac_tag in
59170   :[FHLC]) ac_mode=$ac_tag; continue;;
59171   esac
59172   case $ac_mode$ac_tag in
59173   :[FHL]*:*);;
59174   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
59175   :[FH]-) ac_tag=-:-;;
59176   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
59177   esac
59178   ac_save_IFS=$IFS
59179   IFS=:
59180   set x $ac_tag
59181   IFS=$ac_save_IFS
59182   shift
59183   ac_file=$1
59184   shift
59185 
59186   case $ac_mode in
59187   :L) ac_source=$1;;
59188   :[FH])
59189     ac_file_inputs=
59190     for ac_f
59191     do
59192       case $ac_f in
59193       -) ac_f="$ac_tmp/stdin";;
59194       *) # Look for the file first in the build tree, then in the source tree
59195          # (if the path is not absolute).  The absolute path cannot be DOS-style,
59196          # because $ac_f cannot contain `:'.
59197          test -f "$ac_f" ||
59198            case $ac_f in
59199            [\\/$]*) false;;
59200            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
59201            esac ||
59202            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
59203       esac
59204       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
59205       as_fn_append ac_file_inputs " '$ac_f'"
59206     done
59207 
59208     # Let's still pretend it is `configure' which instantiates (i.e., don't
59209     # use $as_me), people would be surprised to read:
59210     #    /* config.h.  Generated by config.status.  */
59211     configure_input='Generated from '`
59212           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
59213         `' by configure.'
59214     if test x"$ac_file" != x-; then
59215       configure_input="$ac_file.  $configure_input"
59216       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
59217 $as_echo "$as_me: creating $ac_file" >&6;}
59218     fi
59219     # Neutralize special characters interpreted by sed in replacement strings.
59220     case $configure_input in #(
59221     *\&* | *\|* | *\\* )
59222        ac_sed_conf_input=`$as_echo "$configure_input" |
59223        sed 's/[\\\\&|]/\\\\&/g'`;; #(
59224     *) ac_sed_conf_input=$configure_input;;
59225     esac
59226 
59227     case $ac_tag in
59228     *:-:* | *:-) cat >"$ac_tmp/stdin" \
59229       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
59230     esac
59231     ;;
59232   esac
59233 
59234   ac_dir=`$as_dirname -- "$ac_file" ||
59235 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
59236          X"$ac_file" : 'X\(//\)[^/]' \| \
59237          X"$ac_file" : 'X\(//\)$' \| \
59238          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
59239 $as_echo X"$ac_file" |
59240     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
59241             s//\1/
59242             q
59243           }
59244           /^X\(\/\/\)[^/].*/{
59245             s//\1/
59246             q
59247           }
59248           /^X\(\/\/\)$/{
59249             s//\1/
59250             q
59251           }
59252           /^X\(\/\).*/{
59253             s//\1/
59254             q
59255           }
59256           s/.*/./; q'`
59257   as_dir="$ac_dir"; as_fn_mkdir_p
59258   ac_builddir=.
59259 
59260 case "$ac_dir" in
59261 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
59262 *)
59263   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
59264   # A ".." for each directory in $ac_dir_suffix.
59265   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
59266   case $ac_top_builddir_sub in
59267   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
59268   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
59269   esac ;;
59270 esac
59271 ac_abs_top_builddir=$ac_pwd
59272 ac_abs_builddir=$ac_pwd$ac_dir_suffix
59273 # for backward compatibility:
59274 ac_top_builddir=$ac_top_build_prefix
59275 
59276 case $srcdir in
59277   .)  # We are building in place.
59278     ac_srcdir=.
59279     ac_top_srcdir=$ac_top_builddir_sub
59280     ac_abs_top_srcdir=$ac_pwd ;;
59281   [\\/]* | ?:[\\/]* )  # Absolute name.
59282     ac_srcdir=$srcdir$ac_dir_suffix;
59283     ac_top_srcdir=$srcdir
59284     ac_abs_top_srcdir=$srcdir ;;
59285   *) # Relative name.
59286     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
59287     ac_top_srcdir=$ac_top_build_prefix$srcdir
59288     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
59289 esac
59290 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
59291 
59292 
59293   case $ac_mode in
59294   :F)
59295   #
59296   # CONFIG_FILE
59297   #
59298 
59299 _ACEOF
59300 
59301 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59302 # If the template does not know about datarootdir, expand it.
59303 # FIXME: This hack should be removed a few years after 2.60.
59304 ac_datarootdir_hack=; ac_datarootdir_seen=
59305 ac_sed_dataroot='
59306 /datarootdir/ {
59307   p
59308   q
59309 }
59310 /@datadir@/p
59311 /@docdir@/p
59312 /@infodir@/p
59313 /@localedir@/p
59314 /@mandir@/p'
59315 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
59316 *datarootdir*) ac_datarootdir_seen=yes;;
59317 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
59318   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
59319 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
59320 _ACEOF
59321 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59322   ac_datarootdir_hack='
59323   s&@datadir@&$datadir&g
59324   s&@docdir@&$docdir&g
59325   s&@infodir@&$infodir&g
59326   s&@localedir@&$localedir&g
59327   s&@mandir@&$mandir&g
59328   s&\\\${datarootdir}&$datarootdir&g' ;;
59329 esac
59330 _ACEOF
59331 
59332 # Neutralize VPATH when `$srcdir' = `.'.
59333 # Shell code in configure.ac might set extrasub.
59334 # FIXME: do we really want to maintain this feature?
59335 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59336 ac_sed_extra="$ac_vpsub
59337 $extrasub
59338 _ACEOF
59339 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59340 :t
59341 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
59342 s|@configure_input@|$ac_sed_conf_input|;t t
59343 s&@top_builddir@&$ac_top_builddir_sub&;t t
59344 s&@top_build_prefix@&$ac_top_build_prefix&;t t
59345 s&@srcdir@&$ac_srcdir&;t t
59346 s&@abs_srcdir@&$ac_abs_srcdir&;t t
59347 s&@top_srcdir@&$ac_top_srcdir&;t t
59348 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
59349 s&@builddir@&$ac_builddir&;t t
59350 s&@abs_builddir@&$ac_abs_builddir&;t t
59351 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
59352 $ac_datarootdir_hack
59353 "
59354 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
59355   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
59356 
59357 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
59358   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
59359   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
59360       "$ac_tmp/out"`; test -z "$ac_out"; } &&
59361   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
59362 which seems to be undefined.  Please make sure it is defined" >&5
59363 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
59364 which seems to be undefined.  Please make sure it is defined" >&2;}
59365 
59366   rm -f "$ac_tmp/stdin"
59367   case $ac_file in
59368   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
59369   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
59370   esac \
59371   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
59372  ;;
59373 
59374 
59375 
59376   esac
59377 
59378 done # for ac_tag
59379 
59380 
59381 as_fn_exit 0
59382 _ACEOF
59383 ac_clean_files=$ac_clean_files_save
59384 
59385 test $ac_write_fail = 0 ||
59386   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
59387 
59388 
59389 # configure is writing to config.log, and then calls config.status.
59390 # config.status does its own redirection, appending to config.log.
59391 # Unfortunately, on DOS this fails, as config.log is still kept open
59392 # by configure, so config.status won't be able to write to it; its
59393 # output is simply discarded.  So we exec the FD to /dev/null,
59394 # effectively closing config.log, so it can be properly (re)opened and
59395 # appended to by config.status.  When coming back to configure, we
59396 # need to make the FD available again.
59397 if test "$no_create" != yes; then
59398   ac_cs_success=:
59399   ac_config_status_args=
59400   test "$silent" = yes &&
59401     ac_config_status_args="$ac_config_status_args --quiet"
59402   exec 5>/dev/null
59403   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
59404   exec 5>>config.log
59405   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
59406   # would make configure fail if this is the last instruction.
59407   $ac_cs_success || as_fn_exit 1
59408 fi
59409 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
59410   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
59411 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
59412 fi
59413 
59414 
59415 # After AC_OUTPUT, we need to do final work
59416 
59417 
59418   # Try to move config.log (generated by autoconf) to the configure-support directory.
59419   if test -e ./config.log; then
59420     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
59421   fi
59422 
59423   # Rotate our log file (configure.log)
59424   if test -e "$OUTPUT_ROOT/configure.log.old"; then
59425     $RM -f "$OUTPUT_ROOT/configure.log.old"
59426   fi
59427   if test -e "$OUTPUT_ROOT/configure.log"; then
59428     $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
59429   fi
59430 
59431   # Move configure.log from current directory to the build output root
59432   if test -e ./configure.log; then
59433     echo found it
59434     $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
59435   fi
59436 
59437   # Make the compare script executable
59438   $CHMOD +x $OUTPUT_ROOT/compare.sh
59439 
59440 
59441 # Finally output some useful information to the user
59442 
59443   # Finally output some useful information to the user
59444 
59445   printf "\n"
59446   printf "====================================================\n"
59447   if test "x$no_create" != "xyes"; then
59448     if test "x$IS_RECONFIGURE" != "xyes"; then
59449       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
59450     else
59451       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
59452     fi
59453   else
59454     if test "x$IS_RECONFIGURE" != "xyes"; then
59455       printf "A configuration has been successfully checked but not created\n"
59456     else
59457       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
59458     fi
59459   fi
59460   if test "x$CONFIGURE_COMMAND_LINE" != x; then
59461     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
59462   else
59463     printf "using default settings.\n"
59464   fi
59465 
59466   printf "\n"
59467   printf "Configuration summary:\n"
59468   printf "* Debug level:    $DEBUG_LEVEL\n"
59469   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
59470   printf "* JDK variant:    $JDK_VARIANT\n"
59471   printf "* JVM variants:   $with_jvm_variants\n"
59472   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
59473   printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
59474 
59475   printf "\n"
59476   printf "Tools summary:\n"
59477   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
59478     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
59479   fi
59480   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
59481   if test "x$TOOLCHAIN_VERSION" != "x"; then
59482     print_version=" $TOOLCHAIN_VERSION"
59483   fi
59484   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
59485   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
59486   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
59487 
59488   printf "\n"
59489   printf "Build performance summary:\n"
59490   printf "* Cores to use:   $JOBS\n"
59491   printf "* Memory limit:   $MEMORY_SIZE MB\n"
59492   if test "x$CCACHE_STATUS" != "x"; then
59493     printf "* ccache status:  $CCACHE_STATUS\n"
59494   fi
59495   printf "\n"
59496 
59497   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
59498     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
59499     printf "will result in longer build times.\n"
59500     printf "\n"
59501   fi
59502 
59503   if test "x$FOUND_ALT_VARIABLES" != "x"; then
59504     printf "WARNING: You have old-style ALT_ environment variables set.\n"
59505     printf "These are not respected, and will be ignored. It is recommended\n"
59506     printf "that you clean your environment. The following variables are set:\n"
59507     printf "$FOUND_ALT_VARIABLES\n"
59508     printf "\n"
59509   fi
59510 
59511   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
59512     printf "WARNING: Your build output directory is not on a local disk.\n"
59513     printf "This will severely degrade build performance!\n"
59514     printf "It is recommended that you create an output directory on a local disk,\n"
59515     printf "and run the configure script again from that directory.\n"
59516     printf "\n"
59517   fi
59518 
59519   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
59520     printf "WARNING: The result of this configuration has overridden an older\n"
59521     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
59522     printf "proper build. Failure to do so might result in strange build problems.\n"
59523     printf "\n"
59524   fi
59525 
59526   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
59527     printf "WARNING: The result of this configuration was not saved.\n"
59528     printf "You should run without '--no-create | -n' to create the configuration.\n"
59529     printf "\n"
59530   fi
59531 
59532 
59533 
59534   # Locate config.log.
59535   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
59536     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
59537   elif test -e "./config.log"; then
59538     CONFIG_LOG_PATH="."
59539   fi
59540 
59541   if test -e "$CONFIG_LOG_PATH/config.log"; then
59542     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
59543     if test $? -eq 0; then
59544       printf "The following warnings were produced. Repeated here for convenience:\n"
59545       # We must quote sed expression (using []) to stop m4 from eating the [].
59546       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
59547       printf "\n"
59548     fi
59549   fi
59550